Subject: pkg/10903: Ethereal package doesn't recognize PPP interface type
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mike@novacons.com>
List: netbsd-bugs
Date: 08/27/2000 19:38:16
>Number:         10903
>Category:       pkg
>Synopsis:       Ethereal package doesn't recognize PPP interface type
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 27 19:39:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Mike Wlodarczyk
>Release:        netbsd-1-5 branch and current pkgsrc as of August 24, 2000
>Organization:
Nova Consulting Services
>Environment:
System: NetBSD avernus 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (AVERNUS) #0: Sun Aug 27 15:29:49 PDT 2000 root@avernus:/usr/src/sys/arch/i386/compile/AVERNUS i386


>Description:
The NetBSD specific PPP types in /usr/include/net/bpf.h:

/* NetBSD-specific types */
#define DLT_PPP_SERIAL  50      /* PPP over serial (async and sync) */
#define DLT_PPP_ETHER   51      /* PPP over Ethernet */

aren't supported by the ethereal package because the values are used as
an index into the pcap_encap lookup table and it doesn't extend that far.

>How-To-Repeat:
Install the ethereal package and try to capture packets on a PPP interface.
It complains that
    "The network you're capturing from is of a type that Ethereal doesn't support."

>Fix:
A bit ugly I suppose, but it fits the current coding model. Only tested on
serial line PPP.

*** patches/patch-aa.orig	Sun Aug 27 18:40:09 2000
--- patches/patch-aa	Sun Aug 27 18:40:51 2000
***************
*** 0 ****
--- 1,52 ----
+ $NetBSD$
+ *** wiretap/libpcap.c.orig	Wed Aug  2 18:56:55 2000
+ --- wiretap/libpcap.c	Sun Aug 27 17:56:55 2000
+ ***************
+ *** 110,116 ****
+   				   frames" */
+   	WTAP_ENCAP_UNKNOWN,
+   	WTAP_ENCAP_UNKNOWN,
+ ! 	WTAP_ENCAP_LINUX_ATM_CLIP
+   };
+   #define NUM_PCAP_ENCAPS (sizeof pcap_encap / sizeof pcap_encap[0])
+   
+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37 2000
--- files/patch-sum	Sun Aug 27 18:47:13 2000
***************
*** 1,6 ****
! $NetBSD: patch-sum,v 1.4 2000/03/07 15:08:25 frueauf Exp $
  
! This placeholder file is generated by the ``makepatchsum'' target
! whenever the patches directory is empty or missing. Its purpose
! is to ensure that the presence of any obsolete patches will cause
! the proper error to be emitted at build time.
--- 1,3 ----
! $NetBSD$
  
! MD5 (patch-aa) = 5f171271fa5c51ab4db0eaa9c5a3f20b
>Release-Note:
>Audit-Trail:
>Unformatted: