packet filtering in virtual NIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, All

I create a virtual netowrk card by supplementing a network driver. To simulate the activity of receving packets I customize packet data and call ioctl to feed them to netif_rx. My registered hook is like this
 static struct nf_hook_ops ns_hook = { {NULL,NULL},scan_hook,
                                                              //PF_INET,NF_IP_PRE_ROUTING,                           //I have tried this
                                                              PF_BRIDGE,NF_BR_PRE_ROUTING,                     // and this
                                                               1};
Both hooks point does not work for my crafted data but work for real packets (through real NIC).
Does anyone know what I'm doing wrong? Thanks for help.

 Derek

                



TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux