BSD 4_3 release
[unix-history] / usr / src / include / protocols / routed.h
index 14335e7..ad7a61c 100644 (file)
@@ -1,4 +1,11 @@
-/*     routed.h        82/06/10        4.7     */
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)protocol.h  5.1 (Berkeley) 6/4/85
+ */
+
 /*
  * Routing Information Protocol
  *
 /*
  * Routing Information Protocol
  *
@@ -6,6 +13,8 @@
  * by changing 32-bit net numbers to sockaddr's and
  * padding stuff to 32-bit boundaries.
  */
  * by changing 32-bit net numbers to sockaddr's and
  * padding stuff to 32-bit boundaries.
  */
+#define        RIPVERSION      1
+
 struct netinfo {
        struct  sockaddr rip_dst;       /* destination net/host */
        int     rip_metric;             /* cost of route */
 struct netinfo {
        struct  sockaddr rip_dst;       /* destination net/host */
        int     rip_metric;             /* cost of route */
@@ -13,7 +22,8 @@ struct netinfo {
 
 struct rip {
        u_char  rip_cmd;                /* request/response */
 
 struct rip {
        u_char  rip_cmd;                /* request/response */
-       u_char  rip_res1[3];            /* pad to 32-bit boundary */
+       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 ... */
        union {
                struct  netinfo ru_nets[1];     /* variable length... */
                char    ru_tracefile[1];        /* ditto ... */
@@ -22,6 +32,9 @@ struct rip {
 #define        rip_tracefile   ripun.ru_tracefile
 };
  
 #define        rip_tracefile   ripun.ru_tracefile
 };
  
+/*
+ * Packet types.
+ */
 #define        RIPCMD_REQUEST          1       /* want info */
 #define        RIPCMD_RESPONSE         2       /* responding to request */
 #define        RIPCMD_TRACEON          3       /* turn tracing on */
 #define        RIPCMD_REQUEST          1       /* want info */
 #define        RIPCMD_RESPONSE         2       /* responding to request */
 #define        RIPCMD_TRACEON          3       /* turn tracing on */
@@ -33,7 +46,6 @@ char *ripcmds[RIPCMD_MAX] =
   { "#0", "REQUEST", "RESPONSE", "TRACEON", "TRACEOFF" };
 #endif
 
   { "#0", "REQUEST", "RESPONSE", "TRACEON", "TRACEOFF" };
 #endif
 
-#define IPPORT_ROUTESERVER     520     /* well-known port */
 #define        HOPCNT_INFINITY         16      /* per Xerox NS */
 #define        MAXPACKETSIZE           512     /* max broadcast size */
 
 #define        HOPCNT_INFINITY         16      /* per Xerox NS */
 #define        MAXPACKETSIZE           512     /* max broadcast size */