1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
Index: ethernet.c
===================================================================
RCS file: /sources/hurd/hurd/pfinet/ethernet.c,v
retrieving revision 1.32
diff -u -r1.32 ethernet.c
--- ethernet.c 9 Oct 2007 08:01:34 -0000 1.32
+++ ethernet.c 29 Aug 2008 23:46:13 -0000
@@ -68,15 +68,15 @@
{
}
-static short ether_filter[] =
+/* The BPF instruction allows IP and ARP packets */
+static struct bpf_insn ether_filter[] =
{
-#ifdef NETF_IN
- /* We have to tell the packet filtering code that we're interested in
- incoming packets. */
- NETF_IN, /* Header. */
-#endif
- NETF_PUSHLIT | NETF_NOP,
- 1
+ {NETF_IN|NETF_BPF, /* Header. */ 0, 0, 0},
+ {40, 0, 0, 12},
+ {21, 1, 0, 2054},
+ {21, 0, 1, 2048},
+ {6, 0, 0, 1500},
+ {6, 0, 0, 0}
};
static int ether_filter_len = sizeof (ether_filter) / sizeof (short);
|