summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_neighbor.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-07-14 17:30:56 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-07-14 17:30:56 +0200
commit22106bbf6870c19db1a06f3182b894c852686eae (patch)
tree9b2c8861988a80aa42d3095b804190e38d409903 /ospf6d/ospf6_neighbor.c
parentospf6d: rewrite ospf6_lsdb_lookup_next() (diff)
parentMerge pull request #803 from opensourcerouting/redhat-doc-fixes-master (diff)
downloadfrr-22106bbf6870c19db1a06f3182b894c852686eae.tar.xz
frr-22106bbf6870c19db1a06f3182b894c852686eae.zip
Merge remote-tracking branch 'frr/master' into table-hash-ospf6-lsdb-refactor
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_neighbor.c')
-rw-r--r--ospf6d/ospf6_neighbor.c105
1 files changed, 45 insertions, 60 deletions
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index 9ff4e5583..d0a97eea4 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -664,16 +664,16 @@ ospf6_neighbor_show (struct vty *vty, struct ospf6_neighbor *on)
timerstring (&res, duration, sizeof (duration));
/*
- vty_out (vty, "%-15s %3d %11s %6s/%-12s %11s %s[%s]%s",
+ vty_out (vty, "%-15s %3d %11s %6s/%-12s %11s %s[%s]\n",
"Neighbor ID", "Pri", "DeadTime", "State", "", "Duration",
- "I/F", "State", VNL);
+ "I/F", "State");
*/
- vty_out (vty, "%-15s %3d %11s %8s/%-12s %11s %s[%s]%s",
+ vty_out (vty, "%-15s %3d %11s %8s/%-12s %11s %s[%s]\n",
router_id, on->priority, deadtime,
ospf6_neighbor_state_str[on->state], nstate, duration,
on->ospf6_if->interface->name,
- ospf6_interface_state_str[on->ospf6_if->state], VNL);
+ ospf6_interface_state_str[on->ospf6_if->state]);
}
static void
@@ -685,9 +685,9 @@ ospf6_neighbor_show_drchoice (struct vty *vty, struct ospf6_neighbor *on)
struct timeval now, res;
/*
- vty_out (vty, "%-15s %6s/%-11s %-15s %-15s %s[%s]%s",
+ vty_out (vty, "%-15s %6s/%-11s %-15s %-15s %s[%s]\n",
"RouterID", "State", "Duration", "DR", "BDR", "I/F",
- "State", VNL);
+ "State");
*/
inet_ntop (AF_INET, &on->router_id, router_id, sizeof (router_id));
@@ -698,11 +698,10 @@ ospf6_neighbor_show_drchoice (struct vty *vty, struct ospf6_neighbor *on)
timersub (&now, &on->last_changed, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]%s",
+ vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]\n",
router_id, ospf6_neighbor_state_str[on->state],
duration, drouter, bdrouter, on->ospf6_if->interface->name,
- ospf6_interface_state_str[on->ospf6_if->state],
- VNL);
+ ospf6_interface_state_str[on->ospf6_if->state]);
}
static void
@@ -722,87 +721,74 @@ ospf6_neighbor_show_detail (struct vty *vty, struct ospf6_neighbor *on)
timersub (&now, &on->last_changed, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " Neighbor %s%s", on->name,
- VNL);
- vty_out (vty, " Area %s via interface %s (ifindex %d)%s",
+ vty_out (vty, " Neighbor %s\n", on->name);
+ vty_out (vty, " Area %s via interface %s (ifindex %d)\n",
on->ospf6_if->area->name,
on->ospf6_if->interface->name,
- on->ospf6_if->interface->ifindex,
- VNL);
- vty_out (vty, " His IfIndex: %d Link-local address: %s%s",
- on->ifindex, linklocal_addr,
- VNL);
- vty_out (vty, " State %s for a duration of %s%s",
- ospf6_neighbor_state_str[on->state], duration,
- VNL);
- vty_out (vty, " His choice of DR/BDR %s/%s, Priority %d%s",
- drouter, bdrouter, on->priority,
- VNL);
- vty_out (vty, " DbDesc status: %s%s%s SeqNum: %#lx%s",
+ on->ospf6_if->interface->ifindex);
+ vty_out (vty, " His IfIndex: %d Link-local address: %s\n",
+ on->ifindex, linklocal_addr);
+ vty_out (vty, " State %s for a duration of %s\n",
+ ospf6_neighbor_state_str[on->state], duration);
+ vty_out (vty, " His choice of DR/BDR %s/%s, Priority %d\n",
+ drouter, bdrouter, on->priority);
+ vty_out (vty, " DbDesc status: %s%s%s SeqNum: %#lx\n",
(CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_IBIT) ? "Initial " : ""),
(CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_MBIT) ? "More " : ""),
(CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_MSBIT) ?
- "Master" : "Slave"), (u_long) ntohl (on->dbdesc_seqnum),
- VNL);
+ "Master" : "Slave"), (u_long) ntohl (on->dbdesc_seqnum));
- vty_out (vty, " Summary-List: %d LSAs%s", on->summary_list->count,
- VNL);
+ vty_out (vty, " Summary-List: %d LSAs\n", on->summary_list->count);
for (ALL_LSDB(on->summary_list, lsa))
- vty_out (vty, " %s%s", lsa->name, VNL);
+ vty_out (vty, " %s\n", lsa->name);
- vty_out (vty, " Request-List: %d LSAs%s", on->request_list->count,
- VNL);
+ vty_out (vty, " Request-List: %d LSAs\n", on->request_list->count);
for (ALL_LSDB(on->request_list, lsa))
- vty_out (vty, " %s%s", lsa->name, VNL);
+ vty_out (vty, " %s\n", lsa->name);
- vty_out (vty, " Retrans-List: %d LSAs%s", on->retrans_list->count,
- VNL);
+ vty_out (vty, " Retrans-List: %d LSAs\n", on->retrans_list->count);
for (ALL_LSDB(on->retrans_list, lsa))
- vty_out (vty, " %s%s", lsa->name, VNL);
+ vty_out (vty, " %s\n", lsa->name);
timerclear (&res);
if (on->thread_send_dbdesc)
timersub (&on->thread_send_dbdesc->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for DbDesc in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for DbDesc in Time %s [thread %s]\n",
on->dbdesc_list->count, duration,
- (on->thread_send_dbdesc ? "on" : "off"),
- VNL);
+ (on->thread_send_dbdesc ? "on" : "off"));
for (ALL_LSDB(on->dbdesc_list, lsa))
- vty_out (vty, " %s%s", lsa->name, VNL);
+ vty_out (vty, " %s\n", lsa->name);
timerclear (&res);
if (on->thread_send_lsreq)
timersub (&on->thread_send_lsreq->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for LSReq in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for LSReq in Time %s [thread %s]\n",
on->request_list->count, duration,
- (on->thread_send_lsreq ? "on" : "off"),
- VNL);
+ (on->thread_send_lsreq ? "on" : "off"));
for (ALL_LSDB(on->request_list, lsa))
- vty_out (vty, " %s%s", lsa->name, VNL);
+ vty_out (vty, " %s\n", lsa->name);
timerclear (&res);
if (on->thread_send_lsupdate)
timersub (&on->thread_send_lsupdate->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for LSUpdate in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for LSUpdate in Time %s [thread %s]\n",
on->lsupdate_list->count, duration,
- (on->thread_send_lsupdate ? "on" : "off"),
- VNL);
+ (on->thread_send_lsupdate ? "on" : "off"));
for (ALL_LSDB(on->lsupdate_list, lsa))
- vty_out (vty, " %s%s", lsa->name, VNL);
+ vty_out (vty, " %s\n", lsa->name);
timerclear (&res);
if (on->thread_send_lsack)
timersub (&on->thread_send_lsack->u.sands, &now, &res);
timerstring (&res, duration, sizeof (duration));
- vty_out (vty, " %d Pending LSAs for LSAck in Time %s [thread %s]%s",
+ vty_out (vty, " %d Pending LSAs for LSAck in Time %s [thread %s]\n",
on->lsack_list->count, duration,
- (on->thread_send_lsack ? "on" : "off"),
- VNL);
+ (on->thread_send_lsack ? "on" : "off"));
for (ALL_LSDB(on->lsack_list, lsa))
- vty_out (vty, " %s%s", lsa->name, VNL);
+ vty_out (vty, " %s\n", lsa->name);
ospf6_bfd_show_info(vty, on->bfd_info, 0);
}
@@ -836,13 +822,13 @@ DEFUN (show_ipv6_ospf6_neighbor,
}
if (showfunc == ospf6_neighbor_show)
- vty_out (vty, "%-15s %3s %11s %8s/%-12s %11s %s[%s]%s",
+ vty_out (vty, "%-15s %3s %11s %8s/%-12s %11s %s[%s]\n",
"Neighbor ID", "Pri", "DeadTime", "State", "IfState", "Duration",
- "I/F", "State", VNL);
+ "I/F", "State");
else if (showfunc == ospf6_neighbor_show_drchoice)
- vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]%s",
+ vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]\n",
"RouterID", "State", "Duration", "DR", "BDR", "I/F",
- "State", VNL);
+ "State");
for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, i, oa))
for (ALL_LIST_ELEMENTS_RO (oa->if_list, j, oi))
@@ -876,8 +862,7 @@ DEFUN (show_ipv6_ospf6_neighbor_one,
if ((inet_pton (AF_INET, argv[idx_ipv4]->arg, &router_id)) != 1)
{
- vty_out (vty, "Router-ID is not parsable: %s%s", argv[idx_ipv4]->arg,
- VNL);
+ vty_out (vty, "Router-ID is not parsable: %s\n", argv[idx_ipv4]->arg);
return CMD_SUCCESS;
}
@@ -1000,11 +985,11 @@ config_write_ospf6_debug_neighbor (struct vty *vty)
{
if (IS_OSPF6_DEBUG_NEIGHBOR (STATE) &&
IS_OSPF6_DEBUG_NEIGHBOR (EVENT))
- vty_out (vty, "debug ospf6 neighbor%s", VNL);
+ vty_out (vty, "debug ospf6 neighbor\n");
else if (IS_OSPF6_DEBUG_NEIGHBOR (STATE))
- vty_out (vty, "debug ospf6 neighbor state%s", VNL);
+ vty_out (vty, "debug ospf6 neighbor state\n");
else if (IS_OSPF6_DEBUG_NEIGHBOR (EVENT))
- vty_out (vty, "debug ospf6 neighbor event%s", VNL);
+ vty_out (vty, "debug ospf6 neighbor event\n");
return 0;
}