diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:30:07 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:30:07 -0800 |
commit | 5e0936b99e2d50769c5432b47c4d07c3dcdd37c6 (patch) | |
tree | 7ed686be807c3cce93be58daaf49169a94a21b04 /data/rip.d | |
parent | 39c3e9d45c422c33aaf85c552a96434f2b9371e2 (diff) | |
download | netcat-5e0936b99e2d50769c5432b47c4d07c3dcdd37c6.tar.gz |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'data/rip.d')
-rw-r--r-- | data/rip.d | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/data/rip.d b/data/rip.d new file mode 100644 index 0000000..da505e2 --- /dev/null +++ b/data/rip.d @@ -0,0 +1,52 @@ +# struct netinfo { +# struct sockaddr rip_dst; /* destination net/host */ +# int rip_metric; /* cost of route */ +# }; +# struct rip { +# u_char rip_cmd; /* request/response */ +# u_char rip_vers; /* protocol version # */ +# u_char rip_res1[2]; /* pad to 32-bit boundary */ +# union { +# struct netinfo ru_nets[1]; /* variable length... */ +# char ru_tracefile[1]; /* ditto ... */ +# } ripun; +#define rip_nets ripun.ru_nets +#define rip_tracefile ripun.ru_tracefile +#define RIPCMD_REQUEST 1 /* want info */ +#define RIPCMD_RESPONSE 2 /* responding to request */ +#define RIPCMD_TRACEON 3 /* turn tracing on */ +#define RIPCMD_TRACEOFF 4 /* turn it off */ +#define HOPCNT_INFINITY 16 /* per Xerox NS */ +#define MAXPACKETSIZE 512 /* max broadcast size */ + +### RIP packet redux +### UDP send FROM clued-rtr/520 to target/520 +2 # RIPCMD_RESPONSE +1 # version +0 # padding +0 + +# sockaddr-plus-metric structs begin, as many as necessary... +0 # len +2 # AF_INET +0 # port +0 +# addr bytes: +X +Y +Z +Q +0 # filler, out to 16 bytes [sizeof (sockaddr)] ... +0 +0 +0 +0 +0 +0 +0 +0 # metric: net-order integer +0 +0 +1 + +## that's it |