]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_neighbor.h
Merge pull request #5653 from slankdev/slankdev-bgpd-support-prefix-sid-srv6-l3vpn
[mirror_frr.git] / ospf6d / ospf6_neighbor.h
index 529f586f1a81750e624508f354e6ac844882348d..e221e9d82cc5dfb7a437509dd22ca17f48a83e61 100644 (file)
@@ -35,31 +35,31 @@ extern unsigned char conf_debug_ospf6_neighbor;
 /* Neighbor structure */
 struct ospf6_neighbor {
        /* Neighbor Router ID String */
-       char name[32];
+       char name[36];
 
        /* OSPFv3 Interface this neighbor belongs to */
        struct ospf6_interface *ospf6_if;
 
        /* Neighbor state */
-       u_char state;
+       uint8_t state;
 
        /* timestamp of last changing state */
-       u_int32_t state_change;
+       uint32_t state_change;
        struct timeval last_changed;
 
        /* Neighbor Router ID */
-       u_int32_t router_id;
+       uint32_t router_id;
 
        /* Neighbor Interface ID */
        ifindex_t ifindex;
 
        /* Router Priority of this neighbor */
-       u_char priority;
+       uint8_t priority;
 
-       u_int32_t drouter;
-       u_int32_t bdrouter;
-       u_int32_t prev_drouter;
-       u_int32_t prev_bdrouter;
+       uint32_t drouter;
+       uint32_t bdrouter;
+       uint32_t prev_drouter;
+       uint32_t prev_bdrouter;
 
        /* Options field (Capability) */
        char options[3];
@@ -68,8 +68,8 @@ struct ospf6_neighbor {
        struct in6_addr linklocal_addr;
 
        /* For Database Exchange */
-       u_char dbdesc_bits;
-       u_int32_t dbdesc_seqnum;
+       uint8_t dbdesc_bits;
+       uint32_t dbdesc_seqnum;
        /* Last received Database Description packet */
        struct ospf6_dbdesc dbdesc_last;
 
@@ -123,11 +123,7 @@ struct ospf6_neighbor {
 #define OSPF6_NEIGHBOR_EVENT_INACTIVITY_TIMER    10
 #define OSPF6_NEIGHBOR_EVENT_MAX_EVENT           11
 
-static const char *ospf6_neighbor_event_str[] = {
-       "NoEvent",      "HelloReceived", "2-WayReceived",   "NegotiationDone",
-       "ExchangeDone", "LoadingDone",   "AdjOK?",        "SeqNumberMismatch",
-       "BadLSReq",     "1-WayReceived", "InactivityTimer",
-};
+extern const char *const ospf6_neighbor_event_str[];
 
 static inline const char *ospf6_neighbor_event_string(int event)
 {
@@ -138,16 +134,16 @@ static inline const char *ospf6_neighbor_event_string(int event)
        return OSPF6_NEIGHBOR_UNKNOWN_EVENT_STRING;
 }
 
-extern const char *ospf6_neighbor_state_str[];
+extern const char *const ospf6_neighbor_state_str[];
 
 
 /* Function Prototypes */
 int ospf6_neighbor_cmp(void *va, void *vb);
 void ospf6_neighbor_dbex_init(struct ospf6_neighbor *on);
 
-struct ospf6_neighbor *ospf6_neighbor_lookup(u_int32_t,
+struct ospf6_neighbor *ospf6_neighbor_lookup(uint32_t,
                                             struct ospf6_interface *);
-struct ospf6_neighbor *ospf6_neighbor_create(u_int32_t,
+struct ospf6_neighbor *ospf6_neighbor_create(uint32_t,
                                             struct ospf6_interface *);
 void ospf6_neighbor_delete(struct ospf6_neighbor *);