Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux netfilterÔ´Âë·ÖÎö(5)


Îå¡¢ ipt_do_table()º¯Êý£¬Êý¾Ý°üµÄ¹ýÂË
 
5.1          ipt_entry Ïà¹Ø½á¹¹  ip_tables.h
ipt_entry½á¹¹Ç°ÃæÓйýÁË£¬ÔÙ¿´Ò»±é
struct ipt_entry
{
struct ipt_ip ip;
/* ËùҪƥÅäµÄ±¨ÎĵÄIPÍ·ÐÅÏ¢ */
unsigned int nfcache;
/* λÏòÁ¿£¬±êʾ±¾¹æÔò¹ØÐı¨ÎĵÄʲô²¿·Ö£¬ÔÝδʹÓà */
u_int16_t target_offset;
/* targetÇøµÄÆ«ÒÆ£¬Í¨³£targetÇøÎ»ÓÚmatchÇøÖ®ºó£¬¶ømatchÇøÔòÔÚipt_entryµÄĩβ£»
³õʼ»¯Îªsizeof(struct ipt_entry)£¬¼´¼Ù¶¨Ã»ÓÐmatch */
u_int16_t next_offset;
/* ÏÂÒ»Ìõ¹æÔòÏà¶ÔÓÚ±¾¹æÔòµÄÆ«ÒÆ£¬Ò²¼´±¾¹æÔòËùÓÿռäµÄ×ܺͣ¬
³õʼ»¯Îªsizeof(struct ipt_entry)+sizeof(struct ipt_target)£¬¼´Ã»ÓÐmatch */
unsigned int comefrom;
/* λÏòÁ¿£¬±ê¼Çµ÷Óñ¾¹æÔòµÄHOOKºÅ£¬¿ÉÓÃÓÚ¼ì²é¹æÔòµÄÓÐЧÐÔ */
struct ipt_counters counters;
/* ¼Ç¼¸Ã¹æÔò´¦Àí¹ýµÄ±¨ÎÄÊýºÍ±¨ÎÄ×Ü×Ö½ÚÊý */
unsigned char elems[0];
/*target»òÕßÊÇmatchµÄÆðʼλÖà */
}
 
ipt_ip½á¹¹  ip_tables.h
struct ipt_ip {
      struct in_addr src, dst;         /* À´Ô´/Ä¿µÄµØÖ· */
      struct in_addr smsk, dmsk;     /* À´Ô´/Ä¿µÄµØÖ·µÄÑÚÂë */
 
      char iniface[IFNAMSIZ], outiface[IFNAMSIZ];    /*ÊäÈëÊä³öÍøÂç½Ó¿Ú*/
      unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
 
      u_int16_t proto;    /* ЭÒé, 0 = ANY */
     
      u_int8_t flags;      /* ±êÖ¾×Ö¶Î */
      u_int8_t invflags;    /* È¡·´±êÖ¾ */
};
 
 
5.2  ipt_do_tableº¯Êý   ip_tables.c
 
unsigned int
ipt_do_table(struct sk_buff **pskb,
           unsigned int hook,
           const struct net_device *in,
    &


Ïà¹ØÎĵµ£º

Linux netfilterÔ´Âë·ÖÎö(2)

תÌù×Ôhttp://alexanderlaw.blog.hexun.com/8968771_d.html
¶þ¡¢ipt_tableÊý¾Ý½á¹¹ºÍ±íµÄ³õʼ»¯
 
2.1  include/linux/netfilter_ipv4/ip_tables.h   struct  ipt_table ±í½á¹¹
struct ipt_table
{
struct list_head list;
/* ±íÁ´ */
char name[IPT_TABLE_MAXNAMELEN];
/* ±íÃû£¬Èç"fil ......

Linux»·¾³½ø³Ì¼äͨÐÅ£¨¶þ£©£¨Ï£©


Linux»·¾³½ø³Ì¼äͨÐÅ£¨¶þ£©:
Ðźţ¨Ï£©
ÎĵµÑ¡Ïî
<tr
valign="top"><td width="8"><img alt="" height="1" width="8"
src="//www.ibm.com/i/c.gif"/></td><td width="16"><img alt="" width=& ......

linux mysqlÅäÖÃ


Ð¶ÔØmysql
1¡¢²éÕÒÒÔǰÊÇ·ñ×°ÓÐmysql
ÃüÁrpm -qa|grep -i mysql
¿ÉÒÔ¿´µ½mysqlµÄÁ½¸ö°ü£º
mysql-4.1.12-3.RHEL4.1
mysqlclient10-3.23.58-4.RHEL4.1
2¡¢É¾³ýmysql
ɾ³ýÃüÁrpm -e --nodeps °üÃû
( rpm -ev mysql-4.1.12-3.RHEL4.1 )
3¡¢É¾³ýÀϰ汾mysqlµÄ¿ª·¢Í·ÎļþºÍ¿â
ÃüÁrm -fr /usr/lib/mysql
r ......

linuxϳ£ÓõÄÃüÁî

1.´ÅÅÌÃüÁî
       mount        ¹ÒÉÏÎļþϵͳ
       umount       жÏÂÒѹÒÉϵÄÎļþϵͳ
       df          ......

LinuxÍø¿¨Çý¶¯·ÖÎö

×ªÔØ×Ôhttp://www.examda.com/linux/fudao/20070919/112113103.html 
      ѧϰӦ¸ÃÊÇÒ»¸öÏȰÑÎÊÌâ¼òµ¥»¯£¬ÔÚ°ÑÎÊÌ⸴ÔÓ»¯µÄ¹ý³Ì¡£Ò»¿ªÊ¼¾Í×ÅÊÖ´¦Àí¸´ÔÓµÄÎÊÌ⣬ÄÑÃâÈà ÈËÓÐÐľªµ¨²ü£¬×½½ó¼ûÖâµÄ¸Ð¾õ¡£¶ÁLinuxÍø¿¨Çý¶¯Ò²ÊÇÒ»Ñù¡£Ädz¤³¤µÄÔ´Âë¼ÐÔÓ×ÅÄÇЩÎÒÃÇİÉúµÄ±äÁ¿ºÍ·ûºÅ£¬Íû¶øÉúη±ãÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ