Subject: BPF under NetBSD/Alpha...
To: None <port-alpha@NetBSD.ORG>
From: Chris G Demetriou <Chris_G_Demetriou@UX2.SP.CS.CMU.EDU>
List: port-alpha
Date: 04/29/1996 10:55:50
So, I had reason over the weekend to make BPF work with
NetBSD/Alpha...

The following changes haven't been committed to the master sources
yet, but are what I had to do to make it work properly.  They may go
into the master sources in a slightly different form, but if you need
them, well, here they are...


chris
=========================
Index: lib/libpcap/pcap.h
===================================================================
RCS file: /a/cvsroot/src/lib/libpcap/pcap.h,v
retrieving revision 1.2
diff -c -r1.2 pcap.h
*** pcap.h	1995/03/06 11:39:07	1.2
--- pcap.h	1996/04/29 14:54:12
***************
*** 55,62 ****
   * predates the bpf typedefs for 64-bit support.
   */
  #if BPF_RELEASE - 0 < 199406
! typedef	long bpf_int32;
! typedef	u_long bpf_u_int32;
  #endif
  
  typedef struct pcap pcap_t;
--- 55,62 ----
   * predates the bpf typedefs for 64-bit support.
   */
  #if BPF_RELEASE - 0 < 199406
! typedef	int32_t bpf_int32;
! typedef	u_int32_t bpf_u_int32;
  #endif
  
  typedef struct pcap pcap_t;
Index: sys/net/bpf.h
===================================================================
RCS file: /a/cvsroot/src/sys/net/bpf.h,v
retrieving revision 1.13
diff -c -r1.13 bpf.h
*** bpf.h	1996/02/13 21:59:58	1.13
--- bpf.h	1996/04/29 14:54:13
***************
*** 146,152 ****
--- 146,156 ----
   * Only the kernel needs to know about it; applications use bh_hdrlen.
   */
  #ifdef _KERNEL
+ #ifndef __alpha__
  #define SIZEOF_BPF_HDR 18
+ #else
+ #define SIZEOF_BPF_HDR sizeof(struct bpf_hdr)
+ #endif
  #endif
  
  /*