summaryrefslogtreecommitdiffstats
path: root/proto/rip/rip.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto/rip/rip.h')
-rw-r--r--proto/rip/rip.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/proto/rip/rip.h b/proto/rip/rip.h
index 8bcd0ce..3af19ee 100644
--- a/proto/rip/rip.h
+++ b/proto/rip/rip.h
@@ -3,6 +3,10 @@
*/
struct rip_connection {
+ node n;
+
+ int num;
+ struct proto *proto;
ip_addr addr;
struct rip_entry *sendptr;
sock *send;
@@ -10,6 +14,11 @@ struct rip_connection {
struct rip_packet_heading {
u8 command;
+#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 RIPCMD_MAX 5
u8 version;
#define RIP_V1 1
#define RIP_V2 2
@@ -19,9 +28,9 @@ struct rip_packet_heading {
struct rip_block {
u16 family; /* 0xffff on first message means this is authentication */
u16 tag;
- u32 network;
- u32 netmask;
- u32 nexthop;
+ ip_addr network;
+ ip_addr netmask;
+ ip_addr nexthop;
u32 metric;
};
@@ -30,7 +39,7 @@ struct rip_entry {
ip_addr whotoldme;
ip_addr network;
- ip_addr netmask;
+ int pxlen;
ip_addr nexthop;
int metric;