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

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

תÌù×Ô£ºhttp://alexanderlaw.blog.hexun.com/8968960_d.html
Æß¡¢ target Æ¥Åä
7.1 ipt_targetºÍipt_entry_target½á¹¹      ip_tables.h
ipt_targetºÍipt_match½á¹¹ÀàËÆ£º
struct ipt_target
{
      struct list_head list;
 
      const char name[IPT_FUNCTION_MAXNAMELEN];
 
/* ÔÚʹÓñ¾MatchµÄ¹æÔò×¢Èë±íÖÐ֮ǰµ÷Ó㬽øÐÐÓÐЧÐÔ¼ì²é£¬Èç¹û·µ»Ø0£¬¹æÔò¾Í²»»á¼ÓÈëiptablesÖÐ */
      int (*checkentry)(const char *tablename,
                   const struct ipt_entry *e,
                   void *targinfo,
                   unsigned int targinfosize,
                   unsigned int hook_mask);
 
/* ÔÚ°üº¬±¾TargetµÄ¹æÔò´Ó±íÖÐɾ³ýʱµ÷Óã¬ÓëcheckentryÅäºÏ¿ÉÓÃÓÚ¶¯Ì¬ÄÚ´æ·ÖÅäºÍÊÍ·Å */
      void (*destroy)(void *targinfo, unsigned int targinfosize);
 
/* targetµÄÄ£¿éº¯Êý£¬Èç¹ûÐèÒª¼ÌÐø´¦ÀíÔò·µ»ØIPT_CONTINUE£¨-1£©£¬·ñÔò·µ»ØNF_ACCEPT¡¢NF_DROPµÈÖµ£¬ËüµÄµ÷ÓÃÕ߸ù¾ÝËüµÄ·µ»ØÖµÀ´ÅжÏÈçºÎ´¦ÀíËü´¦Àí¹ýµÄ±¨ÎÄ*/
      unsigned int (*target)(struct sk_buff **pskb,
                        const struct net_device *in,
                        const struct net_device *out,
                        unsigned int hooknum,
        &n


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

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


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

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 ¹Ø»úÖ¸Áî

1¹Ø»úÃüÁî shutdown 1£©shutdown --help
2£©shutdown -h now ÏÖÔÚÁ¢¼´¹Ø»ú == halt Ö¸Áî
3£©shutdown -r now ÏÖÔÚÁ¢¼´ÖØÆô
4£©shutdown -r +3 Èý·ÖÖÓºóÖØÆô
5£©shutdown -h +3 "The System will shutdown after 3 minutes" ÌáʾʹÓÃÕß½«ÔÚÈý·ÖÖÓºó¹Ø»ú
6£©shutdown -r 20:23 ÔÚ20£º23ʱ½«ÖØÆô¼ÆËã»ú
7£©shutdown ......

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


ËÄ¡¢nf_hook_ops ¹³×ÓµÄ×¢²á
ÔÚfilter±íµÄ³õʼ»¯º¯Êýstatic int __init init(void)ÖгýÁËÓÐÒ»¸önf_register_hookº¯Êý×¢²áÒ»¸ötablesÍ⣬»¹ÓÉnf_register_hookº¯Êý×¢²áÁË3¸öhook
 
4.1        nf_hook_opsÊý¾Ý½á¹¹ netfilter.h
struct nf_hook_ops
{
      ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ