6 /* RIP PACKET STRUCTURES
12 u_int16_t addressFamily;
13 u_int16_t routeTagOrAuthenticationType;
23 /* Defines for which parts have been modified
25 #define RIP_MOD_COMMAND 1
26 #define RIP_MOD_VERSION 1<<1
27 #define RIP_MOD_ADDRFAM 1<<2
28 #define RIP_MOD_ROUTETAG 1<<3
29 #define RIP_IS_AUTH 1<<4
33 sendip_option rip_opts[] = {
34 {"v",1,"RIP version","2"},
36 "RIP command (1=request, 2=response, 3=traceon (obsolete), 4=traceoff (obsolete), 5=poll (undocumented), 6=poll entry (undocumented)","1"},
37 {"e",1,"Add a RIP entry. Format is: Address family:route tag:address:subnet mask:next hop:metric","2:0:0.0.0.0:255.255.255.0:0.0.0.0:16, any option my be left out to use the default"},
38 {"a",1,"RIP authenticat packet, argument is the password; do not use any other RIP options on this RIP header",NULL},
39 {"d",0,"RIP default request - get router's entire routing table; do not use any other RIP options on this RIP header",NULL}
43 #define RIP_NUM_ENTRIES(d) (((d)->alloc_len-sizeof(rip_header))/sizeof(rip_options))
44 #define RIP_ADD_ENTRY(d) { (d)->data = realloc((d)->data,(d)->alloc_len+sizeof(rip_options)); (d)->alloc_len+=sizeof(rip_options); }
45 #define RIP_OPTION(d) ((rip_options *)((u_int32_t *)((d)->data)+((d)->alloc_len>>2)-(sizeof(rip_options)>>2)))
46 #endif /* _SENDIP_RIP_H */