*/
void show_ip_eigrp_topology_header(struct vty *vty, struct eigrp *eigrp)
{
- struct in_addr router_id;
- router_id.s_addr = eigrp->router_id;
-
vty_out(vty, "\nEIGRP Topology Table for AS(%d)/ID(%s)\n\n", eigrp->AS,
- inet_ntoa(router_id));
+ inet_ntoa(eigrp->router_id));
vty_out(vty,
"Codes: P - Passive, A - Active, U - Update, Q - Query, "
"R - Reply\n r - reply Status, s - sia Status\n\n");
rn->info = (void *)pref;
/* Schedule Router ID Update. */
- if (eigrp->router_id == 0)
+ if (eigrp->router_id.s_addr == 0)
eigrp_router_id_update(eigrp);
/* Run network config now. */
/* Get target interface. */
*/
for (ALL_LIST_ELEMENTS(eigrp_om->eigrp, node, nnode, eigrp)) {
/* EIGRP must be on and Router-ID must be configured. */
- if (!eigrp || eigrp->router_id == 0)
+ if (!eigrp || eigrp->router_id.s_addr == 0)
continue;
/* Run each network for this interface. */
char *name;
/* EIGRP Router ID. */
- uint32_t router_id; /* Configured automatically. */
- uint32_t router_id_static; /* Configured manually. */
+ struct in_addr router_id; /* Configured automatically. */
+ struct in_addr router_id_static; /* Configured manually. */
struct list *eiflist; /* eigrp interfaces */
uint8_t passive_interface_default; /* passive-interface default */
write++;
/* Router ID print. */
- if (eigrp->router_id_static != 0) {
- struct in_addr router_id_static;
- router_id_static.s_addr = htonl(eigrp->router_id_static);
+ if (eigrp->router_id_static.s_addr != 0) {
vty_out(vty, " eigrp router-id %s\n",
- inet_ntoa(router_id_static));
+ inet_ntoa(eigrp->router_id_static));
}
/* Network area print. */
{
struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT);
struct interface *ifp;
- uint32_t router_id, router_id_old;
+ struct in_addr router_id, router_id_old;
router_id_old = eigrp->router_id;
- if (eigrp->router_id_static != 0)
+ if (eigrp->router_id_static.s_addr != 0)
router_id = eigrp->router_id_static;
- else if (eigrp->router_id != 0)
+ else if (eigrp->router_id.s_addr != 0)
router_id = eigrp->router_id;
else
- router_id = router_id_zebra.s_addr;
+ router_id = router_id_zebra;
eigrp->router_id = router_id;
- if (router_id_old != router_id) {
+ if (router_id_old.s_addr != router_id.s_addr) {
// if (IS_DEBUG_EIGRP_EVENT)
// zlog_debug("Router-ID[NEW:%s]: Update",
// inet_ntoa(eigrp->router_id));
/* init information relevant to peers */
eigrp->vrid = 0;
eigrp->AS = atoi(AS);
- eigrp->router_id = 0L;
- eigrp->router_id_static = 0L;
+ eigrp->router_id.s_addr = 0;
+ eigrp->router_id_static.s_addr = 0;
eigrp->sequence_number = 1;
/*Configure default K Values for EIGRP Process*/