aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty_interface.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-02-17 02:18:38 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-02-17 19:34:28 +0100
commit6c0b2e570c56b79ccb4e0905e3d2288fc55443e2 (patch)
tree4aebbcbe745244fad732c751be9c969b508b96ed /src/vty_interface.c
parentea247c1d0a30362afd4602acdcd595b4afd616ec (diff)
mtp: Make the mtp_link point to a specific type of link
We might want to be able to change the type of a link at runtime. Decouple the link and the actual type of the link.
Diffstat (limited to 'src/vty_interface.c')
-rw-r--r--src/vty_interface.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/vty_interface.c b/src/vty_interface.c
index 0c1cb3d..06df291 100644
--- a/src/vty_interface.c
+++ b/src/vty_interface.c
@@ -494,18 +494,13 @@ DEFUN(pcap_set_stop, pcap_set_stop_cmd,
#define FIND_LINK(vty, set_no, nr) ({ \
struct mtp_link_set *set = NULL; \
- struct mtp_link *link = NULL, *tmp; \
+ struct mtp_link *link = NULL; \
set = mtp_link_set_num(bsc, set_no); \
if (!set) { \
vty_out(vty, "Unknown Linkset nr %d.%s", set_no, VTY_NEWLINE); \
return CMD_WARNING; \
} \
- llist_for_each_entry(tmp, &set->links, entry) { \
- if (tmp->link_no == nr) { \
- link = tmp; \
- break; \
- } \
- } \
+ link = mtp_link_num(set, nr); \
if (!link) { \
vty_out(vty, "Can not find link %d.%s", nr, VTY_NEWLINE); \
return CMD_WARNING; \