summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc/data/rip.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr.bin/nc/data/rip.d')
-rw-r--r--src/usr.bin/nc/data/rip.d52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/usr.bin/nc/data/rip.d b/src/usr.bin/nc/data/rip.d
new file mode 100644
index 0000000000..da505e2143
--- /dev/null
+++ b/src/usr.bin/nc/data/rip.d
@@ -0,0 +1,52 @@
1# struct netinfo {
2# struct sockaddr rip_dst; /* destination net/host */
3# int rip_metric; /* cost of route */
4# };
5# struct rip {
6# u_char rip_cmd; /* request/response */
7# u_char rip_vers; /* protocol version # */
8# u_char rip_res1[2]; /* pad to 32-bit boundary */
9# union {
10# struct netinfo ru_nets[1]; /* variable length... */
11# char ru_tracefile[1]; /* ditto ... */
12# } ripun;
13#define rip_nets ripun.ru_nets
14#define rip_tracefile ripun.ru_tracefile
15#define RIPCMD_REQUEST 1 /* want info */
16#define RIPCMD_RESPONSE 2 /* responding to request */
17#define RIPCMD_TRACEON 3 /* turn tracing on */
18#define RIPCMD_TRACEOFF 4 /* turn it off */
19#define HOPCNT_INFINITY 16 /* per Xerox NS */
20#define MAXPACKETSIZE 512 /* max broadcast size */
21
22### RIP packet redux
23### UDP send FROM clued-rtr/520 to target/520
242 # RIPCMD_RESPONSE
251 # version
260 # padding
270
28
29# sockaddr-plus-metric structs begin, as many as necessary...
300 # len
312 # AF_INET
320 # port
330
34# addr bytes:
35X
36Y
37Z
38Q
390 # filler, out to 16 bytes [sizeof (sockaddr)] ...
400
410
420
430
440
450
460
470 # metric: net-order integer
480
490
501
51
52## that's it