summaryrefslogtreecommitdiffstats
path: root/nhrpd/nhrpd.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-12-20 11:10:34 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2021-04-30 10:33:18 +0200
commit7f48cfa5e4d93bb8899e0eb815074741df3c8177 (patch)
tree04e6f009fd53b396c7ef7490a52c2934ebdcb5a3 /nhrpd/nhrpd.h
parentlib, zebra: get gre information (diff)
downloadfrr-7f48cfa5e4d93bb8899e0eb815074741df3c8177.tar.xz
frr-7f48cfa5e4d93bb8899e0eb815074741df3c8177.zip
nhrpd: redirect netlink gre with zebra
as zebra has a new api to get gre and set gre source commands, netlink gre get and netlink gre source function calls are redirected to zebra by using the zapi interface. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'nhrpd/nhrpd.h')
-rw-r--r--nhrpd/nhrpd.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/nhrpd/nhrpd.h b/nhrpd/nhrpd.h
index 730f9b7d1..17abb0476 100644
--- a/nhrpd/nhrpd.h
+++ b/nhrpd/nhrpd.h
@@ -86,14 +86,22 @@ static inline int notifier_active(struct notifier_list *l)
return !list_empty(&l->notifier_head);
}
+extern struct hash *nhrp_gre_list;
+
void nhrp_zebra_init(void);
void nhrp_zebra_terminate(void);
void nhrp_send_zebra_configure_arp(struct interface *ifp, int family);
void nhrp_send_zebra_nbr(union sockunion *in,
union sockunion *out,
struct interface *ifp);
-void nhrp_send_zebra_configure_arp(struct interface *ifp,
- int family);
+
+void nhrp_send_zebra_gre_source_set(struct interface *ifp,
+ unsigned int link_idx,
+ vrf_id_t link_vrf_id);
+
+extern int nhrp_send_zebra_gre_request(struct interface *ifp);
+extern struct nhrp_gre_info *nhrp_gre_info_alloc(struct nhrp_gre_info *p);
+
struct zbuf;
struct nhrp_vc;
struct nhrp_cache;
@@ -300,8 +308,10 @@ struct nhrp_interface {
char *ipsec_profile, *ipsec_fallback_profile, *source;
union sockunion nbma;
union sockunion nat_nbma;
- unsigned int linkidx;
- uint32_t grekey;
+ unsigned int link_idx;
+ unsigned int link_vrf_id;
+ uint32_t i_grekey;
+ uint32_t o_grekey;
struct hash *peer_hash;
struct hash *cache_config_hash;
@@ -325,6 +335,18 @@ struct nhrp_interface {
} afi[AFI_MAX];
};
+struct nhrp_gre_info {
+ ifindex_t ifindex;
+ struct in_addr vtep_ip; /* IFLA_GRE_LOCAL */
+ struct in_addr vtep_ip_remote; /* IFLA_GRE_REMOTE */
+ uint32_t ikey;
+ uint32_t okey;
+ ifindex_t ifindex_link; /* Interface index of interface
+ * linked with GRE
+ */
+ vrf_id_t vrfid_link;
+};
+
extern struct zebra_privs_t nhrpd_privs;
int sock_open_unix(const char *path);
@@ -332,6 +354,8 @@ int sock_open_unix(const char *path);
void nhrp_interface_init(void);
void nhrp_interface_update(struct interface *ifp);
void nhrp_interface_update_mtu(struct interface *ifp, afi_t afi);
+void nhrp_interface_update_nbma(struct interface *ifp,
+ struct nhrp_gre_info *gre_info);
int nhrp_interface_add(ZAPI_CALLBACK_ARGS);
int nhrp_interface_delete(ZAPI_CALLBACK_ARGS);
@@ -340,6 +364,7 @@ int nhrp_interface_down(ZAPI_CALLBACK_ARGS);
int nhrp_interface_address_add(ZAPI_CALLBACK_ARGS);
int nhrp_interface_address_delete(ZAPI_CALLBACK_ARGS);
void nhrp_neighbor_operation(ZAPI_CALLBACK_ARGS);
+void nhrp_gre_update(ZAPI_CALLBACK_ARGS);
void nhrp_interface_notify_add(struct interface *ifp, struct notifier_block *n,
notifier_fn_t fn);