]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_interface.h
Merge pull request #10447 from ton31337/fix/json_with_whitespaces
[mirror_frr.git] / ospf6d / ospf6_interface.h
index ee24b989bdb1be5401d4e81d0b03d62436299481..9a57a7f4dec605fa73c049a17753e098a594a1ee 100644 (file)
@@ -24,6 +24,9 @@
 #include "qobj.h"
 #include "hook.h"
 #include "if.h"
+#include "ospf6d.h"
+
+DECLARE_MTYPE(OSPF6_AUTH_MANUAL_KEY);
 
 /* Debug option */
 extern unsigned char conf_debug_ospf6_interface;
@@ -31,6 +34,21 @@ extern unsigned char conf_debug_ospf6_interface;
 #define OSPF6_DEBUG_INTERFACE_OFF() (conf_debug_ospf6_interface = 0)
 #define IS_OSPF6_DEBUG_INTERFACE (conf_debug_ospf6_interface)
 
+struct ospf6_auth_data {
+       /* config data */
+       uint8_t hash_algo; /* hash algorithm type */
+       uint16_t key_id;   /* key-id used as SA in auth packet */
+       char *auth_key;    /* Auth key */
+       char *keychain;    /* keychain name */
+
+       /* operational data */
+       uint8_t flags; /* Flags related to auth config */
+
+       /* Counters and Statistics */
+       uint32_t tx_drop; /* Pkt drop due to auth fail while sending */
+       uint32_t rx_drop; /* Pkt drop due to auth fail while reading */
+};
+
 /* Interface structure */
 struct ospf6_interface {
        /* IF info from zebra */
@@ -95,6 +113,9 @@ struct ospf6_interface {
        /* MTU mismatch check */
        uint8_t mtu_ignore;
 
+       /* Authentication trailer related config */
+       struct ospf6_auth_data at_data;
+
        /* Decision of DR Election */
        in_addr_t drouter;
        in_addr_t bdrouter;
@@ -205,11 +226,11 @@ extern struct in6_addr *
 ospf6_interface_get_global_address(struct interface *ifp);
 
 /* interface event */
-extern int interface_up(struct thread *thread);
-extern int interface_down(struct thread *thread);
-extern int wait_timer(struct thread *thread);
-extern int backup_seen(struct thread *thread);
-extern int neighbor_change(struct thread *thread);
+extern void interface_up(struct thread *thread);
+extern void interface_down(struct thread *thread);
+extern void wait_timer(struct thread *thread);
+extern void backup_seen(struct thread *thread);
+extern void neighbor_change(struct thread *thread);
 
 extern void ospf6_interface_init(void);
 extern void ospf6_interface_clear(struct interface *ifp);
@@ -221,6 +242,9 @@ extern void install_element_ospf6_debug_interface(void);
 extern int ospf6_interface_neighbor_count(struct ospf6_interface *oi);
 extern uint8_t dr_election(struct ospf6_interface *oi);
 
+extern void ospf6_interface_auth_trailer_cmd_init(void);
+extern void ospf6_auth_write_config(struct vty *vty,
+                                   struct ospf6_auth_data *at_data);
 DECLARE_HOOK(ospf6_interface_change,
             (struct ospf6_interface * oi, int state, int old_state),
             (oi, state, old_state));