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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
? addrconf.d
? af_inet.d
? af_inet6.d
? arp.d
? checksum.d
? datagram.d
? datagram_ipv6.d
? dev.d
? dev_mcast.d
? devinet.d
? dst.d
? dummy.d
? eth.d
? ethernet.d
? exthdrs.d
? fib_frontend.d
? fib_hash.d
? fib_semantics.d
? icmp.d
? icmpv6.d
? igmp.d
? iioctl-ops.d
? iioctl.sdefs.d
? iioctlServer.c
? iioctlServer.d
? iioctl_S.h
? io-ops.d
? io.sdefs.d
? ioServer.c
? ioServer.d
? io_S.h
? iovec.d
? ip6_fib.d
? ip6_flowlabel.d
? ip6_input.d
? ip6_output.d
? ip_forward.d
? ip_fragment.d
? ip_input.d
? ip_options.d
? ip_output.d
? ip_sockglue.d
? ipv6_sockglue.d
? kmem_cache.d
? loopback.d
? main.d
? mcast.d
? misc.d
? ndisc.d
? neighbour.d
? old-checksum.d
? options.d
? pfinet
? pfinet-ops.d
? pfinet.prof_d
? pfinet.sdefs.d
? pfinetServer.c
? pfinetServer.d
? pfinet_S.h
? protocol.d
? protocol_ipv6.d
? raw.d
? raw_ipv6.d
? reassembly.d
? route.d
? route_ipv6.d
? sched.d
? skbuff.d
? sock.d
? socket-ops.d
? socket.d
? socket.sdefs.d
? socketServer.c
? socketServer.d
? socket_S.h
? startup_notify.sdefs.d
? startup_notifyServer.c
? startup_notifyServer.d
? startup_notify_S.h
? stubs.d
? syncookies.d
? sysctl_net_ipv4.d
? tcp.d
? tcp_input.d
? tcp_ipv4.d
? tcp_ipv6.d
? tcp_output.d
? tcp_timer.d
? time.d
? timer-emul.d
? timer.d
? tmp.patch
? tunnel.d
? udp.d
? udp_ipv6.d
? utils.d
? asm/checksum.h
Index: ethernet.c
===================================================================
RCS file: /sources/hurd/hurd/pfinet/ethernet.c,v
retrieving revision 1.32
diff -r1.32 ethernet.c
28a29,30
> #define _HACK_ERRNO_H
> #include <errno.h>
33a36
> #include <device/bpf.h>
71c74,75
< static short ether_filter[] =
---
> /* The BPF instruction allows IP and ARP packets */
> static struct bpf_insn ether_filter[] =
73,79c77,82
< #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}
98a102
> static int count = 0;
118a123,125
> // fprintf (stderr, "pfinet receives the %dst packet.\n", ++count);
> // fflush (stderr);
>
169,171c176,179
< err = get_privileged_ports (0, &master_device);
< if (err)
< error (2, err, "cannot get device master port");
---
> /* The device name here is the path of a device file. */
> master_device = file_name_lookup (dev->name, 0, 0);
> if (master_device == MACH_PORT_NULL)
> error (2, errno, "file_name_lookup %s", dev->name);
173c181
< err = device_open (master_device, D_WRITE | D_READ, dev->name, &edev->ether_port);
---
> err = device_open (master_device, D_WRITE | D_READ, "eth", &edev->ether_port);
|