PORTNAME= knock
PORTVERSION= 0.5.20051124
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= shaun
#else
cap = pcap_open_live(o_int, 65535, 0, 0, pcapErr);
#endif
@@ -222,6 +222,9 @@
case DLT_RAW:
dprint("raw interface detected, no encapsulation\n");
break;
+ case DLT_NULL:
+ dprint("tun interface detected. pppoe on freebsd\n");
+ break;
default:
fprintf(stderr, "error: unsupported link-layer type: %d\n", lltype);
cleanup(1);
@@ -1209,6 +1212,8 @@
ip = (struct ip*)((u_char*)packet + 16);
} else if(lltype == DLT_RAW) {
ip = (struct ip*)((u_char*)packet);
+ } else if(lltype == DLT_NULL) {
+ ip = (struct ip*)((u_char*)packet + 4);
}
if(ip->ip_v != 4) {