summaryrefslogtreecommitdiffstats
path: root/pimd/pim_msdp.h
diff options
context:
space:
mode:
authoranuradhak <anuradhak@cumulusnetworks.com>2016-11-12 14:39:44 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-22 02:26:15 +0100
commit977d71cc7abc10e9ee4d496de3a4b9fb118df002 (patch)
tree9979259e6d33b379e3f50af962f0b837c939e810 /pimd/pim_msdp.h
parentpimd: Backing up broken state. (diff)
downloadfrr-977d71cc7abc10e9ee4d496de3a4b9fb118df002.tar.xz
frr-977d71cc7abc10e9ee4d496de3a4b9fb118df002.zip
pim-msdp: part-4: cli cleanup
1. Add support for mesh-group based configuration that is easy to apply via automation. The older per-peer configuartion is temporarily hidden and will be cleaned up later. Sample config - ip msdp mesh-group cumulus source 100.1.1.4 ip msdp mesh-group cumulus member 100.1.1.5 ip msdp mesh-group cumulus member 100.1.1.6 2. Added support for detail peer and sa-cache displays. Along with filter keys. 3. Add json output for all the msdp displays. With this commit basic support for anycast-RP with MSDP (in numbered network is complete). Unnumbered support will be added separately. Ticket: CM-13306 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_msdp.h')
-rw-r--r--pimd/pim_msdp.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/pimd/pim_msdp.h b/pimd/pim_msdp.h
index 5e13b33b5..4809749b9 100644
--- a/pimd/pim_msdp.h
+++ b/pimd/pim_msdp.h
@@ -46,12 +46,17 @@ enum pim_msdp_err {
PIM_MSDP_ERR_PEER_EXISTS = -2,
PIM_MSDP_ERR_MAX_MESH_GROUPS = -3,
PIM_MSDP_ERR_NO_PEER = -4,
+ PIM_MSDP_ERR_MG_MBR_EXISTS = -5,
+ PIM_MSDP_ERR_NO_MG = -6,
+ PIM_MSDP_ERR_NO_MG_MBR = -7,
+ PIM_MSDP_ERR_SIP_EQ_DIP = -8,
};
#define PIM_MSDP_STATE_STRLEN 16
#define PIM_MSDP_PEER_KEY_STRLEN 80
#define PIM_MSDP_SA_KEY_STRLEN 80
#define PIM_MSDP_UPTIME_STRLEN 80
+#define PIM_MSDP_TIMER_STRLEN 12
#define PIM_MSDP_TCP_PORT 639
#define PIM_MSDP_SOCKET_SNDBUF_SIZE 65536
@@ -123,6 +128,12 @@ struct pim_msdp_peer {
struct thread *t_write;
/* stats */
+ uint32_t conn_attempts;
+ uint32_t est_flaps;
+#define PIM_MSDP_PEER_LAST_RESET_STR 20
+ char last_reset[PIM_MSDP_PEER_LAST_RESET_STR];
+
+ /* packet stats */
uint32_t ka_tx_cnt;
uint32_t sa_tx_cnt;
uint32_t ka_rx_cnt;
@@ -133,6 +144,19 @@ struct pim_msdp_peer {
int64_t uptime;
};
+struct pim_msdp_mg_mbr {
+ struct in_addr mbr_ip;
+ struct pim_msdp_peer *mp;
+};
+
+/* PIM MSDP mesh-group */
+struct pim_msdp_mg {
+ char *mesh_group_name;
+ struct in_addr src_ip;
+ uint32_t mbr_cnt;
+ struct list *mbr_list;
+};
+
enum pim_msdp_flags {
PIM_MSDPF_NONE = 0,
PIM_MSDPF_ENABLE = (1 << 0),
@@ -166,6 +190,9 @@ struct pim_msdp {
struct stream *work_obuf;
struct in_addr originator_id;
+
+ /* currently only one mesh-group is supported - so just stash it here */
+ struct pim_msdp_mg *mg;
};
#define PIM_MSDP_PEER_READ_ON(mp) THREAD_READ_ON(msdp->master, mp->t_read, pim_msdp_read, mp, mp->fd);
@@ -177,7 +204,7 @@ struct pim_msdp {
extern struct pim_msdp *msdp;
void pim_msdp_init(struct thread_master *master);
void pim_msdp_exit(void);
-enum pim_msdp_err pim_msdp_peer_add(struct in_addr peer, struct in_addr local, const char *mesh_group_name);
+enum pim_msdp_err pim_msdp_peer_add(struct in_addr peer, struct in_addr local, const char *mesh_group_name, struct pim_msdp_peer **mp_p);
enum pim_msdp_err pim_msdp_peer_del(struct in_addr peer_addr);
char *pim_msdp_state_dump(enum pim_msdp_peer_state state, char *buf, int buf_size);
struct pim_msdp_peer *pim_msdp_peer_find(struct in_addr peer_addr);
@@ -197,4 +224,9 @@ void pim_msdp_i_am_rp_changed(void);
bool pim_msdp_peer_rpf_check(struct pim_msdp_peer *mp, struct in_addr rp);
void pim_msdp_up_join_state_changed(struct pim_upstream *xg_up);
void pim_msdp_up_xg_del(struct prefix_sg *sg);
+enum pim_msdp_err pim_msdp_mg_mbr_add(const char *mesh_group_name, struct in_addr mbr_ip);
+enum pim_msdp_err pim_msdp_mg_mbr_del(const char *mesh_group_name, struct in_addr mbr_ip);
+enum pim_msdp_err pim_msdp_mg_src_del(const char *mesh_group_name);
+enum pim_msdp_err pim_msdp_mg_src_add(const char *mesh_group_name, struct in_addr src_ip);
+enum pim_msdp_err pim_msdp_mg_del(const char *mesh_group_name);
#endif