Patch submitted by Delman Lee This is a patch allows PPP to work with tcpdump 3.0 -Adam (acaldwel@103mort2.cs.ohiou.edu) --- libpcap-0.0/pcap-linux.c.orig Wed Aug 3 15:17:22 1994 +++ libpcap-0.0/pcap-linux.c Wed Aug 3 16:04:02 1994 @@ -61,6 +61,10 @@ buf = (char *)p->buffer+16; bufsize = p->bufsize - 16; memset(p->buffer,0,16); + } else if (p->linktype == DLT_PPP) { + buf = (char *)p->buffer+4; + bufsize = p->bufsize - 4; + memset(p->buffer,0,4); } else { buf = (char *)p->buffer; bufsize = p->bufsize; @@ -82,6 +86,8 @@ if (p->linktype == DLT_SLIP) datalen+=16; + else if (p->linktype == DLT_PPP) + datalen+=4; caplen = (datalen > p->bufsize) ? datalen : p->bufsize; @@ -130,6 +136,8 @@ p->linktype = DLT_EN10MB; else if (strncmp("sl", device, 2) == 0) p->linktype = DLT_SLIP; + else if (strncmp("pp", device, 2) == 0) + p->linktype = DLT_PPP; else { sprintf(ebuf, "snoop: unknown physical layer type"); goto bad; @@ -147,7 +155,7 @@ goto bad; } - if (p->linktype != DLT_SLIP && promisc) { + if (p->linktype != DLT_SLIP && p->linktype != DLT_PPP && promisc) { strcpy(ifr.ifr_name, device); /* interface we're gonna use */ if (ioctl(p->fd, SIOCGIFFLAGS, &ifr) < 0 ) { /* get flags */ sprintf(ebuf, "socket ioctl get: %s", pcap_strerror(errno));