]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_interface.h
eigrpd: eigrp usage of uint32_t to struct in_addr for router_id data
[mirror_frr.git] / ospf6d / ospf6_interface.h
index 0408fc69d6305b56a79e73540ce3cdc723f37edd..8fd43f099a03c0b3bca4c549e4d3afdc543afc88 100644 (file)
 
 /* Debug option */
 extern unsigned char conf_debug_ospf6_interface;
-#define OSPF6_DEBUG_INTERFACE_ON() \
-  (conf_debug_ospf6_interface = 1)
-#define OSPF6_DEBUG_INTERFACE_OFF() \
-  (conf_debug_ospf6_interface = 0)
-#define IS_OSPF6_DEBUG_INTERFACE \
-  (conf_debug_ospf6_interface)
+#define OSPF6_DEBUG_INTERFACE_ON() (conf_debug_ospf6_interface = 1)
+#define OSPF6_DEBUG_INTERFACE_OFF() (conf_debug_ospf6_interface = 0)
+#define IS_OSPF6_DEBUG_INTERFACE (conf_debug_ospf6_interface)
 
 /* Interface structure */
-struct ospf6_interface
-{
-  /* IF info from zebra */
-  struct interface *interface;
+struct ospf6_interface {
+       /* IF info from zebra */
+       struct interface *interface;
 
-  /* back pointer */
-  struct ospf6_area *area;
+       /* back pointer */
+       struct ospf6_area *area;
 
-  /* list of ospf6 neighbor */
-  struct list *neighbor_list;
+       /* list of ospf6 neighbor */
+       struct list *neighbor_list;
 
-  /* linklocal address of this I/F */
-  struct in6_addr *linklocal_addr;
+       /* linklocal address of this I/F */
+       struct in6_addr *linklocal_addr;
 
-  /* Interface ID; use interface->ifindex */
+       /* Interface ID; use interface->ifindex */
 
-  /* ospf6 instance id */
-  u_char instance_id;
+       /* ospf6 instance id */
+       uint8_t instance_id;
 
-  /* I/F transmission delay */
-  u_int32_t transdelay;
+       /* I/F transmission delay */
+       uint32_t transdelay;
 
-  /* Network Type */
-  u_char type;
+       /* Network Type */
+       uint8_t type;
 
-  /* Router Priority */
-  u_char priority;
+       /* Router Priority */
+       uint8_t priority;
 
-  /* Time Interval */
-  u_int16_t hello_interval;
-  u_int16_t dead_interval;
-  u_int32_t rxmt_interval;
+       /* Time Interval */
+       uint16_t hello_interval;
+       uint16_t dead_interval;
+       uint32_t rxmt_interval;
 
-  u_int32_t state_change;
+       uint32_t state_change;
 
-  /* Cost */
-  u_int32_t cost;
+       /* Cost */
+       uint32_t cost;
 
-  /* I/F MTU */
-  u_int32_t ifmtu;
+       /* I/F MTU */
+       uint32_t ifmtu;
 
-  /* Interface State */
-  u_char state;
+       /* Configured MTU */
+       uint32_t c_ifmtu;
 
-  /* Interface socket setting trial counter, resets on success */
-  u_char sso_try_cnt;
+       /* Interface State */
+       uint8_t state;
 
-  /* OSPF6 Interface flag */
-  char flag;
+       /* Interface socket setting trial counter, resets on success */
+       uint8_t sso_try_cnt;
 
-  /* MTU mismatch check */
-  u_char mtu_ignore;
+       /* OSPF6 Interface flag */
+       char flag;
 
-  /* Decision of DR Election */
-  u_int32_t drouter;
-  u_int32_t bdrouter;
-  u_int32_t prev_drouter;
-  u_int32_t prev_bdrouter;
+       /* MTU mismatch check */
+       uint8_t mtu_ignore;
 
-  /* Linklocal LSA Database: includes Link-LSA */
-  struct ospf6_lsdb *lsdb;
-  struct ospf6_lsdb *lsdb_self;
+       /* Decision of DR Election */
+       uint32_t drouter;
+       uint32_t bdrouter;
+       uint32_t prev_drouter;
+       uint32_t prev_bdrouter;
 
-  struct ospf6_lsdb *lsupdate_list;
-  struct ospf6_lsdb *lsack_list;
+       /* Linklocal LSA Database: includes Link-LSA */
+       struct ospf6_lsdb *lsdb;
+       struct ospf6_lsdb *lsdb_self;
 
-  /* Ongoing Tasks */
-  struct thread *thread_send_hello;
-  struct thread *thread_send_lsupdate;
-  struct thread *thread_send_lsack;
+       struct ospf6_lsdb *lsupdate_list;
+       struct ospf6_lsdb *lsack_list;
 
-  struct thread *thread_network_lsa;
-  struct thread *thread_link_lsa;
-  struct thread *thread_intra_prefix_lsa;
+       /* Ongoing Tasks */
+       struct thread *thread_send_hello;
+       struct thread *thread_send_lsupdate;
+       struct thread *thread_send_lsack;
 
-  struct ospf6_route_table *route_connected;
+       struct thread *thread_network_lsa;
+       struct thread *thread_link_lsa;
+       struct thread *thread_intra_prefix_lsa;
+       struct thread *thread_as_extern_lsa;
 
-  /* prefix-list name to filter connected prefix */
-  char *plist_name;
+       struct ospf6_route_table *route_connected;
 
-  /* BFD information */
-  void *bfd_info;
+       /* prefix-list name to filter connected prefix */
+       char *plist_name;
 
-  QOBJ_FIELDS
+       /* BFD information */
+       void *bfd_info;
+
+       /* Statistics Fields */
+       uint32_t hello_in;
+       uint32_t hello_out;
+       uint32_t db_desc_in;
+       uint32_t db_desc_out;
+       uint32_t ls_req_in;
+       uint32_t ls_req_out;
+       uint32_t ls_upd_in;
+       uint32_t ls_upd_out;
+       uint32_t ls_ack_in;
+       uint32_t ls_ack_out;
+       uint32_t discarded;
+
+       QOBJ_FIELDS
 };
 DECLARE_QOBJ_TYPE(ospf6_interface)
 
@@ -153,37 +166,35 @@ extern const char *ospf6_interface_state_str[];
 #define OSPF6_INTERFACE_SSO_RETRY_INT  1
 #define OSPF6_INTERFACE_SSO_RETRY_MAX  5
 
-
 /* Function Prototypes */
 
-extern struct ospf6_interface *ospf6_interface_lookup_by_ifindex (ifindex_t);
-extern struct ospf6_interface *ospf6_interface_create (struct interface *);
-extern void ospf6_interface_delete (struct ospf6_interface *);
+extern struct ospf6_interface *ospf6_interface_lookup_by_ifindex(ifindex_t);
+extern struct ospf6_interface *ospf6_interface_create(struct interface *);
+extern void ospf6_interface_delete(struct ospf6_interface *);
 
-extern void ospf6_interface_enable (struct ospf6_interface *);
-extern void ospf6_interface_disable (struct ospf6_interface *);
+extern void ospf6_interface_enable(struct ospf6_interface *);
+extern void ospf6_interface_disable(struct ospf6_interface *);
 
-extern void ospf6_interface_if_add (struct interface *);
-extern void ospf6_interface_if_del (struct interface *);
-extern void ospf6_interface_state_update (struct interface *);
-extern void ospf6_interface_connected_route_update (struct interface *);
+extern void ospf6_interface_if_add(struct interface *);
+extern void ospf6_interface_state_update(struct interface *);
+extern void ospf6_interface_connected_route_update(struct interface *);
 
 /* interface event */
-extern int interface_up (struct thread *);
-extern int interface_down (struct thread *);
-extern int wait_timer (struct thread *);
-extern int backup_seen (struct thread *);
-extern int neighbor_change (struct thread *);
+extern int interface_up(struct thread *);
+extern int interface_down(struct thread *);
+extern int wait_timer(struct thread *);
+extern int backup_seen(struct thread *);
+extern int neighbor_change(struct thread *);
 
-extern void ospf6_interface_init (void);
+extern void ospf6_interface_init(void);
 
-extern void install_element_ospf6_clear_interface (void);
+extern void install_element_ospf6_clear_interface(void);
 
-extern int config_write_ospf6_debug_interface (struct vty *vty);
-extern void install_element_ospf6_debug_interface (void);
+extern int config_write_ospf6_debug_interface(struct vty *vty);
+extern void install_element_ospf6_debug_interface(void);
 
 DECLARE_HOOK(ospf6_interface_change,
-               (struct ospf6_interface *oi, int state, int old_state),
-               (oi, state, old_state))
+            (struct ospf6_interface * oi, int state, int old_state),
+            (oi, state, old_state))
 
 #endif /* OSPF6_INTERFACE_H */