evContext
), in the main module.
msprsmd_ssd_connection
in the file jnx-msprsmd_ssd
.c. In the same file:
msprsmd_ssd_msg()
. This function was specified as a callback when the handler was registered in the call to the libssd function ssd_ipc_connect_rt_tbl()
.
ssd_setup_route_service()
.
ssd_request_route_table_lookup()
.
msprsmd_ssd_add_nexthop()
.
msprsmd_kcom_ifl_msg_handler()
. This happens in function msprsmd_kcom_start_switchover()
in the file jnx-msprsmd_kcom
.c.
msprsmd_kcom_ifl_msg_handler()
. For introductory information on libssd, see Route Manager Application. For introductory information on KCOM, see Using the GENCFG/SSRB Library.
To shut down, the daemon leaves the ssd state (next hops and routes) intact and exits. The exit has no effect on the active control plane, and the Routing Protocol daemon (rpd) removes the routes later.
msprsmd_ssd_add_nexthop()
.
The function ssd_request_nexthop_add()
takes an ssd_nh_add_parms
structure, whose rnhm_dst_flag
field specifies whether to send to a control or data core. This field defaults to DATA:
struct ssd_nh_add_parms { ifl_idx_t ifl; /* ifl interface for the next hop */ struct ssd_nh_opq_data opq_data; /* Opaque data to be added to the next hop */ u_int8_t dst_flag; /* SSD_NEXTHOP_DST_FLAG_CTRL or SSD_NEXTHOP_DST_FLAG_DATA */ u_int8_t pkt_dist_type; /* Round-robin / flow affinity */ };
The code in msprsmd_ssd_add_nexthop()
initially resets the flag to CONTROL:
struct ssd_nh_add_parms parms; int error = 0; /* * Fill in ssd_nh_add_parms */ memset(&parms, 0, sizeof(struct ssd_nh_add_parms)); msprsmd_kcom_ifl_by_idx(msprsmd_if, &parms.ifl); parms.dst_flag = SSD_NEXTHOP_DST_FLAG_CTRL; parms.pkt_dist_type = SSD_NEXTHOP_PKT_DIST_FA; /* * Send the request */ error = ssd_request_nexthop_add(fd, SSD_CLIENT_CTX(msprsmd_if), &parms, SSD_CLIENT_CTX(msprsmd_if)); ...
Interface Activation and Deactivation