support linux cooked mode

This commit is contained in:
root 2018-06-29 17:54:31 +00:00
parent 7c1b34d5df
commit 7f848553f5
2 changed files with 5 additions and 0 deletions

@ -346,6 +346,10 @@ int init_raw_socket()
{
pcap_link_header_len=4;
}
else if(ret==DLT_LINUX_SLL)
{
pcap_link_header_len=16;
}
else
{
mylog(log_fatal,"unknown pcap link type : %d\n",ret);

@ -74,6 +74,7 @@ typedef unsigned char u_char;
#define DLT_SLIP 8 /* Serial Line IP */
#define DLT_PPP 9 /* Point-to-point Protocol */
#define DLT_FDDI 10 /* FDDI */
#define DLT_LINUX_SLL 113
#define PCAP_NETMASK_UNKNOWN 0xffffffff