diff options
| author | Karen Schoener <karen@voltanet.io> | 2020-07-22 12:10:59 -0400 | 
|---|---|---|
| committer | lynne <lynne@voltanet.io> | 2020-09-09 10:45:41 -0400 | 
| commit | e1894ff70f77f39ae993f875a96d6cb1282ffd1a (patch) | |
| tree | 2b626ddfa147660799e092679808e6e5fd6c055e /ldpd/ldpe.c | |
| parent | f088c4e77db8d31d9d1c5f8f027acc84cde0b28d (diff) | |
ldpd: Adding support for LDP IGP Synchronization
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
Diffstat (limited to 'ldpd/ldpe.c')
| -rw-r--r-- | ldpd/ldpe.c | 24 | 
1 files changed, 24 insertions, 0 deletions
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c index 655313bf16..29a37efb07 100644 --- a/ldpd/ldpe.c +++ b/ldpd/ldpe.c @@ -297,6 +297,7 @@ ldpe_dispatch_main(struct thread *thread)  #endif  	int			 n, shut = 0;  	struct ldp_access       *laccess; +	struct ldp_igp_sync_if_state_req *ldp_sync_if_state_req;  	iev->ev_read = NULL; @@ -559,6 +560,15 @@ ldpe_dispatch_main(struct thread *thread)  			ldpe_check_filter_af(AF_INET6, &leconf->ipv6,  				laccess->name);  			break; +		case IMSG_LDP_SYNC_IF_STATE_REQUEST: +			if (imsg.hdr.len != IMSG_HEADER_SIZE + +			    sizeof(struct ldp_igp_sync_if_state_req)) { +				log_warnx("%s: wrong imsg len", __func__); +				break; +			} +			ldp_sync_if_state_req = imsg.data; +			ldp_sync_fsm_state_req(ldp_sync_if_state_req); +			break;  		default:  			log_debug("ldpe_dispatch_main: error handling imsg %d",  			    imsg.hdr.type); @@ -979,6 +989,20 @@ ldpe_nbr_ctl(struct ctl_conn *c)  }  void +ldpe_ldp_sync_ctl(struct ctl_conn *c) +{ +	struct iface		*iface; +	struct ctl_ldp_sync	*ictl; + +	RB_FOREACH(iface, iface_head, &leconf->iface_tree) { +		ictl = ldp_sync_to_ctl(iface); +		imsg_compose_event(&c->iev, IMSG_CTL_SHOW_LDP_SYNC, +			0, 0, -1, ictl, sizeof(struct ctl_ldp_sync)); +	} +	imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0); +} + +void  mapping_list_add(struct mapping_head *mh, struct map *map)  {  	struct mapping_entry	*me;  | 
