summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-10-04 01:03:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-10-04 01:03:50 +0000
commite32185cccad9cb68578ab027b032e3c98a9dbeef (patch)
treea71a368917101f049834078af81268d3e87339f2 /sys/net
parent59a71a41359e40800cdf80819c92ca27972ef070 (diff)
bpf support for atm cards; from jason@ackley.net
none of us can test this, but that does not mean it has to sit in the pr database
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 7e42edc8e62..425a2d41b75 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.38 2003/09/23 16:51:13 millert Exp $ */
+/* $OpenBSD: bpf.c,v 1.39 2003/10/04 01:03:49 deraadt Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -59,7 +59,7 @@
#include <netinet/if_arc.h>
#include <netinet/if_ether.h>
-#define BPF_BUFSIZE 8192 /* 4096 too small for FDDI frames */
+#define BPF_BUFSIZE 9216 /* 8192 too small for ATM frames */
#define PRINET 26 /* interruptible */
@@ -150,6 +150,16 @@ bpf_movein(uio, linktype, mp, sockp)
hlen = 0;
break;
+ case DLT_ATM_RFC1483:
+ /*
+ * en atm driver requires 4-byte atm pseudo header.
+ * though it isn't standard, vpi:vci needs to be
+ * specified anyway.
+ */
+ sockp->sa_family = AF_UNSPEC;
+ hlen = 12; /* XXX 4(ATM_PH) + 3(LLC) + 5(SNAP) */
+ break;
+
default:
return (EIO);
}