diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-01-27 17:22:47 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-02-02 01:03:36 +0100 |
commit | 45a8eba9721f8d9b9939a2c916c476eb8be3e78d (patch) | |
tree | b9851dca94e1bba2341bdfc70d070af1e1ba7b4c /ldpd/ldpd.h | |
parent | ldpd: add synchronous IPC channels (diff) | |
download | frr-45a8eba9721f8d9b9939a2c916c476eb8be3e78d.tar.xz frr-45a8eba9721f8d9b9939a2c916c476eb8be3e78d.zip |
ldpd: introduce advanced filtering capabilities
This patch introduces several new configuration commands to ldpd. These
commands should allow the operator to define advanced filtering policies
for things like label advertisement, label allocation, etc.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/ldpd.h')
-rw-r--r-- | ldpd/ldpd.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/ldpd/ldpd.h b/ldpd/ldpd.h index 2c9706cf4..506891ff0 100644 --- a/ldpd/ldpd.h +++ b/ldpd/ldpd.h @@ -27,6 +27,7 @@ #include "imsg.h" #include "thread.h" #include "qobj.h" +#include "filter.h" #include "ldp.h" @@ -138,7 +139,8 @@ enum imsg_type { IMSG_RECONF_L2VPN_IPW, IMSG_RECONF_END, IMSG_DEBUG_UPDATE, - IMSG_LOG + IMSG_LOG, + IMSG_ACL_CHECK }; union ldpd_addr { @@ -411,12 +413,20 @@ struct ldpd_af_conf { uint16_t thello_holdtime; uint16_t thello_interval; union ldpd_addr trans_addr; + char acl_thello_accept_from[ACL_NAMSIZ]; + char acl_label_allocate_for[ACL_NAMSIZ]; + char acl_label_advertise_to[ACL_NAMSIZ]; + char acl_label_advertise_for[ACL_NAMSIZ]; + char acl_label_expnull_for[ACL_NAMSIZ]; + char acl_label_accept_from[ACL_NAMSIZ]; + char acl_label_accept_for[ACL_NAMSIZ]; int flags; }; #define F_LDPD_AF_ENABLED 0x0001 #define F_LDPD_AF_THELLO_ACCEPT 0x0002 #define F_LDPD_AF_EXPNULL 0x0004 #define F_LDPD_AF_NO_GTSM 0x0008 +#define F_LDPD_AF_ALLOCHOSTONLY 0x0010 struct ldpd_conf { struct in_addr rtr_id; @@ -500,6 +510,13 @@ struct kif { int mtu; }; +struct acl_check { + char acl[ACL_NAMSIZ]; + int af; + union ldpd_addr addr; + uint8_t prefixlen; +}; + /* control data structures */ struct ctl_iface { int af; @@ -630,6 +647,9 @@ void evbuf_event_add(struct evbuf *); void evbuf_init(struct evbuf *, int, int (*)(struct thread *), void *); void evbuf_clear(struct evbuf *); +int ldp_acl_request(struct imsgev *, char *, int, + union ldpd_addr *, uint8_t); +void ldp_acl_reply(struct imsgev *, struct acl_check *); struct ldpd_af_conf *ldp_af_conf_get(struct ldpd_conf *, int); struct ldpd_af_global *ldp_af_global_get(struct ldpd_global *, int); int ldp_is_dual_stack(struct ldpd_conf *); |