diff options
Diffstat (limited to 'pimd/pim_cmd.c')
| -rw-r--r-- | pimd/pim_cmd.c | 473 |
1 files changed, 167 insertions, 306 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 3901992361..088713012e 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -1525,46 +1525,6 @@ static void clear_interfaces() clear_pim_interfaces(); } -DEFUN (pim_interface, - pim_interface_cmd, - "interface IFNAME", - "Select an interface to configure\n" - "Interface's name\n") -{ - struct interface *ifp; - const char *ifname = argv[0]; - size_t sl; - - sl = strlen(ifname); - if (sl > INTERFACE_NAMSIZ) { - vty_out(vty, "%% Interface name %s is invalid: length exceeds " - "%d characters%s", - ifname, INTERFACE_NAMSIZ, VTY_NEWLINE); - return CMD_WARNING; - } - - ifp = if_lookup_by_name_len(ifname, sl); - if (!ifp) { - vty_out(vty, "%% Interface %s does not exist%s", ifname, VTY_NEWLINE); - - /* Returning here would prevent pimd from booting when there are - interface commands in pimd.conf, since all interfaces are - unknown at pimd boot time (the zebra daemon has not been - contacted for interface discovery). */ - - ifp = if_get_by_name_len(ifname, sl); - if (!ifp) { - vty_out(vty, "%% Could not create interface %s%s", ifname, VTY_NEWLINE); - return CMD_WARNING; - } - } - - vty->index = ifp; - vty->node = INTERFACE_NODE; - - return CMD_SUCCESS; -} - DEFUN (clear_ip_interfaces, clear_ip_interfaces_cmd, "clear ip interfaces", @@ -2366,13 +2326,14 @@ DEFUN (show_ip_rib, RIB_STR "Unicast address\n") { + int idx_ipv4 = 3; struct in_addr addr; const char *addr_str; struct pim_nexthop nexthop; char nexthop_addr_str[100]; int result; - addr_str = argv[0]; + addr_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, addr_str, &addr); if (result <= 0) { vty_out(vty, "Bad unicast address %s: errno=%d: %s%s", @@ -2464,16 +2425,17 @@ DEFUN (ip_pim_rp, "Rendevous Point\n" "ip address of RP\n") { + int idx_ipv4 = 3; int result; - result = inet_pton(AF_INET, argv[0], &qpim_rp.rpf_addr.s_addr); + result = inet_pton(AF_INET, argv[idx_ipv4]->arg, &qpim_rp.rpf_addr.s_addr); if (result <= 0) { - vty_out(vty, "%% Bad RP address specified: %s", argv[0]); + vty_out(vty, "%% Bad RP address specified: %s", argv[idx_ipv4]->arg); return CMD_WARNING; } if (pim_nexthop_lookup(&qpim_rp.source_nexthop, qpim_rp.rpf_addr, NULL) != 0) { - vty_out(vty, "%% No Path to RP address specified: %s", argv[0]); + vty_out(vty, "%% No Path to RP address specified: %s", argv[idx_ipv4]->arg); return CMD_WARNING; } @@ -2482,7 +2444,7 @@ DEFUN (ip_pim_rp, DEFUN (no_ip_pim_rp, no_ip_pim_rp_cmd, - "no ip pim rp {A.B.C.D}", + "no ip pim rp [A.B.C.D]", NO_STR IP_STR "pim multicast routing\n" @@ -2496,7 +2458,7 @@ DEFUN (no_ip_pim_rp, DEFUN (ip_multicast_routing, ip_multicast_routing_cmd, - PIM_CMD_IP_MULTICAST_ROUTING, + "ip multicast-routing", IP_STR "Enable IP multicast forwarding\n") { @@ -2509,7 +2471,7 @@ DEFUN (ip_multicast_routing, DEFUN (no_ip_multicast_routing, no_ip_multicast_routing_cmd, - PIM_CMD_NO " " PIM_CMD_IP_MULTICAST_ROUTING, + "no ip multicast-routing", NO_STR IP_STR "Global IP configuration subcommands\n" @@ -2529,9 +2491,10 @@ DEFUN (ip_ssmpingd, CONF_SSMPINGD_STR "Source address\n") { + int idx_ipv4 = 2; int result; struct in_addr source_addr; - const char *source_str = (argc > 0) ? argv[0] : "0.0.0.0"; + const char *source_str = (argc > idx_ipv4) ? argv[idx_ipv4]->arg : "0.0.0.0"; result = inet_pton(AF_INET, source_str, &source_addr); if (result <= 0) { @@ -2558,9 +2521,10 @@ DEFUN (no_ip_ssmpingd, CONF_SSMPINGD_STR "Source address\n") { + int idx_ipv4 = 3; int result; struct in_addr source_addr; - const char *source_str = (argc > 0) ? argv[0] : "0.0.0.0"; + const char *source_str = (argc > idx_ipv4) ? argv[idx_ipv4]->arg : "0.0.0.0"; result = inet_pton(AF_INET, source_str, &source_addr); if (result <= 0) { @@ -2585,10 +2549,9 @@ DEFUN (interface_ip_igmp, IP_STR IFACE_IGMP_STR) { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) { @@ -2616,10 +2579,9 @@ DEFUN (interface_no_ip_igmp, IP_STR IFACE_IGMP_STR) { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) return CMD_SUCCESS; @@ -2646,17 +2608,17 @@ DEFUN (interface_ip_igmp_join, "Multicast group address\n" "Source address\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; const char *group_str; const char *source_str; struct in_addr group_addr; struct in_addr source_addr; int result; - ifp = vty->index; - /* Group address */ - group_str = argv[0]; + group_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, group_str, &group_addr); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -2665,7 +2627,7 @@ DEFUN (interface_ip_igmp_join, } /* Source address */ - source_str = argv[1]; + source_str = argv[idx_ipv4_2]->arg; result = inet_pton(AF_INET, source_str, &source_addr); if (result <= 0) { vty_out(vty, "Bad source address %s: errno=%d: %s%s", @@ -2693,17 +2655,17 @@ DEFUN (interface_no_ip_igmp_join, "Multicast group address\n" "Source address\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); + int idx_ipv4 = 4; + int idx_ipv4_2 = 5; const char *group_str; const char *source_str; struct in_addr group_addr; struct in_addr source_addr; int result; - ifp = vty->index; - /* Group address */ - group_str = argv[0]; + group_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, group_str, &group_addr); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -2712,7 +2674,7 @@ DEFUN (interface_no_ip_igmp_join, } /* Source address */ - source_str = argv[1]; + source_str = argv[idx_ipv4_2]->arg; result = inet_pton(AF_INET, source_str, &source_addr); if (result <= 0) { vty_out(vty, "Bad source address %s: errno=%d: %s%s", @@ -2863,18 +2825,17 @@ static void change_query_max_response_time(struct pim_interface *pim_ifp, DEFUN (interface_ip_igmp_query_interval, interface_ip_igmp_query_interval_cmd, - PIM_CMD_IP_IGMP_QUERY_INTERVAL " <1-1800>", + "ip igmp query-interval (1-1800)", IP_STR IFACE_IGMP_STR IFACE_IGMP_QUERY_INTERVAL_STR "Query interval in seconds\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; int query_interval; int query_interval_dsec; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) { @@ -2885,7 +2846,7 @@ DEFUN (interface_ip_igmp_query_interval, return CMD_WARNING; } - query_interval = atoi(argv[0]); + query_interval = atoi(argv[4]->arg); query_interval_dsec = 10 * query_interval; /* @@ -2922,17 +2883,16 @@ DEFUN (interface_ip_igmp_query_interval, DEFUN (interface_no_ip_igmp_query_interval, interface_no_ip_igmp_query_interval_cmd, - PIM_CMD_NO " " PIM_CMD_IP_IGMP_QUERY_INTERVAL, + "no ip igmp query-interval", NO_STR IP_STR IFACE_IGMP_STR IFACE_IGMP_QUERY_INTERVAL_STR) { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; int default_query_interval_dsec; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) @@ -2958,17 +2918,16 @@ DEFUN (interface_no_ip_igmp_query_interval, DEFUN (interface_ip_igmp_query_max_response_time, interface_ip_igmp_query_max_response_time_cmd, - PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME " <1-25>", + "ip igmp query-max-response-time (1-25)", IP_STR IFACE_IGMP_STR IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_STR "Query response value in seconds\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; int query_max_response_time; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) { @@ -2979,7 +2938,7 @@ DEFUN (interface_ip_igmp_query_max_response_time, return CMD_WARNING; } - query_max_response_time = atoi(argv[0]); + query_max_response_time = atoi(argv[4]->arg); /* It seems we don't need to check bounds since command.c does it @@ -3015,17 +2974,16 @@ DEFUN (interface_ip_igmp_query_max_response_time, DEFUN (interface_no_ip_igmp_query_max_response_time, interface_no_ip_igmp_query_max_response_time_cmd, - PIM_CMD_NO " " PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME, + "no ip igmp query-max-response-time", NO_STR IP_STR IFACE_IGMP_STR IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_STR) { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; int default_query_interval_dsec; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) @@ -3051,18 +3009,17 @@ DEFUN (interface_no_ip_igmp_query_max_response_time, DEFUN (interface_ip_igmp_query_max_response_time_dsec, interface_ip_igmp_query_max_response_time_dsec_cmd, - PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC " <10-250>", + "ip igmp query-max-response-time-dsec (10-250)", IP_STR IFACE_IGMP_STR IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR "Query response value in deciseconds\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; int query_max_response_time_dsec; int default_query_interval_dsec; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) { @@ -3073,7 +3030,7 @@ DEFUN (interface_ip_igmp_query_max_response_time_dsec, return CMD_WARNING; } - query_max_response_time_dsec = atoi(argv[0]); + query_max_response_time_dsec = atoi(argv[4]->arg); /* It seems we don't need to check bounds since command.c does it @@ -3111,17 +3068,16 @@ DEFUN (interface_ip_igmp_query_max_response_time_dsec, DEFUN (interface_no_ip_igmp_query_max_response_time_dsec, interface_no_ip_igmp_query_max_response_time_dsec_cmd, - PIM_CMD_NO " " PIM_CMD_IP_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC, + "no ip igmp query-max-response-time-dsec", NO_STR IP_STR IFACE_IGMP_STR IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR) { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; int default_query_interval_dsec; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) @@ -3144,17 +3100,17 @@ DEFUN (interface_no_ip_igmp_query_max_response_time_dsec, DEFUN (interface_ip_pim_drprio, interface_ip_pim_drprio_cmd, - "ip pim drpriority <1-4294967295>", + "ip pim drpriority (1-4294967295)", IP_STR PIM_STR "Set the Designated Router Election Priority\n" "Value of the new DR Priority\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); + int idx_number = 3; struct pim_interface *pim_ifp; uint32_t old_dr_prio; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) { @@ -3164,7 +3120,7 @@ DEFUN (interface_ip_pim_drprio, old_dr_prio = pim_ifp->pim_dr_priority; - pim_ifp->pim_dr_priority = strtol(argv[0], NULL, 10); + pim_ifp->pim_dr_priority = strtol(argv[idx_number]->arg, NULL, 10); if (old_dr_prio != pim_ifp->pim_dr_priority) { if (pim_if_dr_election(ifp)) @@ -3176,16 +3132,16 @@ DEFUN (interface_ip_pim_drprio, DEFUN (interface_no_ip_pim_drprio, interface_no_ip_pim_drprio_cmd, - "no ip pim drpriority {<1-4294967295>}", + "no ip pim drpriority [(1-4294967295)]", + NO_STR IP_STR PIM_STR "Revert the Designated Router Priority to default\n" "Old Value of the Priority\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) { @@ -3234,9 +3190,7 @@ DEFUN (interface_ip_pim_ssm, PIM_STR IFACE_PIM_STR) { - struct interface *ifp; - - ifp = vty->index; + VTY_DECLVAR_CONTEXT(interface, ifp); if (!pim_cmd_interface_add(ifp, PIM_INTERFACE_SSM)) { vty_out(vty, "Could not enable PIM SSM on interface%s", VTY_NEWLINE); @@ -3253,9 +3207,7 @@ DEFUN (interface_ip_pim_sm, PIM_STR IFACE_PIM_SM_STR) { - struct interface *ifp; - - ifp = vty->index; + VTY_DECLVAR_CONTEXT(interface, ifp); if (!pim_cmd_interface_add(ifp, PIM_INTERFACE_SM)) { vty_out(vty, "Could not enable PIM SM on interface%s", VTY_NEWLINE); return CMD_WARNING; @@ -3305,9 +3257,7 @@ DEFUN (interface_no_ip_pim_ssm, PIM_STR IFACE_PIM_STR) { - struct interface *ifp; - - ifp = vty->index; + VTY_DECLVAR_CONTEXT(interface, ifp); if (!pim_cmd_interface_delete(ifp)) { vty_out(vty, "Unable to delete interface information%s", VTY_NEWLINE); return CMD_WARNING; @@ -3324,9 +3274,7 @@ DEFUN (interface_no_ip_pim_sm, PIM_STR IFACE_PIM_SM_STR) { - struct interface *ifp; - - ifp = vty->index; + VTY_DECLVAR_CONTEXT(interface, ifp); if (!pim_cmd_interface_delete(ifp)) { vty_out(vty, "Unable to delete interface information%s", VTY_NEWLINE); return CMD_WARNING; @@ -3343,7 +3291,9 @@ DEFUN (interface_ip_mroute, "Outgoing interface name\n" "Group address\n") { - struct interface *iif; + VTY_DECLVAR_CONTEXT(interface, iif); + int idx_interface = 2; + int idx_ipv4 = 3; struct interface *oif; const char *oifname; const char *grp_str; @@ -3351,9 +3301,7 @@ DEFUN (interface_ip_mroute, struct in_addr src_addr; int result; - iif = vty->index; - - oifname = argv[0]; + oifname = argv[idx_interface]->arg; oif = if_lookup_by_name(oifname); if (!oif) { vty_out(vty, "No such interface name %s%s", @@ -3361,7 +3309,7 @@ DEFUN (interface_ip_mroute, return CMD_WARNING; } - grp_str = argv[1]; + grp_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, grp_str, &grp_addr); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -3388,7 +3336,10 @@ DEFUN (interface_ip_mroute_source, "Group address\n" "Source address\n") { - struct interface *iif; + VTY_DECLVAR_CONTEXT(interface, iif); + int idx_interface = 2; + int idx_ipv4 = 3; + int idx_ipv4_2 = 4; struct interface *oif; const char *oifname; const char *grp_str; @@ -3397,9 +3348,7 @@ DEFUN (interface_ip_mroute_source, struct in_addr src_addr; int result; - iif = vty->index; - - oifname = argv[0]; + oifname = argv[idx_interface]->arg; oif = if_lookup_by_name(oifname); if (!oif) { vty_out(vty, "No such interface name %s%s", @@ -3407,7 +3356,7 @@ DEFUN (interface_ip_mroute_source, return CMD_WARNING; } - grp_str = argv[1]; + grp_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, grp_str, &grp_addr); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -3415,7 +3364,7 @@ DEFUN (interface_ip_mroute_source, return CMD_WARNING; } - src_str = argv[2]; + src_str = argv[idx_ipv4_2]->arg; result = inet_pton(AF_INET, src_str, &src_addr); if (result <= 0) { vty_out(vty, "Bad source address %s: errno=%d: %s%s", @@ -3440,7 +3389,9 @@ DEFUN (interface_no_ip_mroute, "Outgoing interface name\n" "Group Address\n") { - struct interface *iif; + VTY_DECLVAR_CONTEXT(interface, iif); + int idx_interface = 3; + int idx_ipv4 = 4; struct interface *oif; const char *oifname; const char *grp_str; @@ -3448,9 +3399,7 @@ DEFUN (interface_no_ip_mroute, struct in_addr src_addr; int result; - iif = vty->index; - - oifname = argv[0]; + oifname = argv[idx_interface]->arg; oif = if_lookup_by_name(oifname); if (!oif) { vty_out(vty, "No such interface name %s%s", @@ -3458,7 +3407,7 @@ DEFUN (interface_no_ip_mroute, return CMD_WARNING; } - grp_str = argv[1]; + grp_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, grp_str, &grp_addr); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -3486,7 +3435,10 @@ DEFUN (interface_no_ip_mroute_source, "Group Address\n" "Source Address\n") { - struct interface *iif; + VTY_DECLVAR_CONTEXT(interface, iif); + int idx_interface = 3; + int idx_ipv4 = 4; + int idx_ipv4_2 = 5; struct interface *oif; const char *oifname; const char *grp_str; @@ -3495,9 +3447,7 @@ DEFUN (interface_no_ip_mroute_source, struct in_addr src_addr; int result; - iif = vty->index; - - oifname = argv[0]; + oifname = argv[idx_interface]->arg; oif = if_lookup_by_name(oifname); if (!oif) { vty_out(vty, "No such interface name %s%s", @@ -3505,7 +3455,7 @@ DEFUN (interface_no_ip_mroute_source, return CMD_WARNING; } - grp_str = argv[1]; + grp_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, grp_str, &grp_addr); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -3513,7 +3463,7 @@ DEFUN (interface_no_ip_mroute_source, return CMD_WARNING; } - src_str = argv[2]; + src_str = argv[idx_ipv4_2]->arg; result = inet_pton(AF_INET, src_str, &src_addr); if (result <= 0) { vty_out(vty, "Bad source address %s: errno=%d: %s%s", @@ -3531,16 +3481,18 @@ DEFUN (interface_no_ip_mroute_source, DEFUN (interface_ip_pim_hello, interface_ip_pim_hello_cmd, - "ip pim hello <1-180>", + "ip pim hello (1-180) [(1-180)]", IP_STR PIM_STR IFACE_PIM_HELLO_STR - IFACE_PIM_HELLO_TIME_STR) + IFACE_PIM_HELLO_TIME_STR + IFACE_PIM_HELLO_HOLD_STR) { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); + int idx_time = 3; + int idx_hold = 4; struct pim_interface *pim_ifp; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) { @@ -3548,27 +3500,19 @@ DEFUN (interface_ip_pim_hello, return CMD_WARNING; } - pim_ifp->pim_hello_period = strtol(argv[0], NULL, 10); + pim_ifp->pim_hello_period = strtol(argv[idx_time]->arg, NULL, 10); - if (argc == 2) - pim_ifp->pim_default_holdtime = strtol(argv[1], NULL, 10); + if (argc > idx_hold) + pim_ifp->pim_default_holdtime = strtol(argv[idx_hold]->arg, NULL, 10); return CMD_SUCCESS; } -ALIAS (interface_ip_pim_hello, - interface_ip_pim_hello_hold_cmd, - "ip pim hello <1-180> <1-180>", - IP_STR - PIM_STR - IFACE_PIM_HELLO_STR - IFACE_PIM_HELLO_TIME_STR - IFACE_PIM_HELLO_HOLD_STR) DEFUN (interface_no_ip_pim_hello, interface_no_ip_pim_hello_cmd, - "no ip pim hello {<1-180> <1-180>}", + "no ip pim hello [(1-180) (1-180)]", NO_STR IP_STR PIM_STR @@ -3576,10 +3520,9 @@ DEFUN (interface_no_ip_pim_hello, IFACE_PIM_HELLO_TIME_STR IFACE_PIM_HELLO_HOLD_STR) { - struct interface *ifp; + VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; - ifp = vty->index; pim_ifp = ifp->info; if (!pim_ifp) { @@ -3618,11 +3561,6 @@ DEFUN (no_debug_igmp, return CMD_SUCCESS; } -ALIAS (no_debug_igmp, - undebug_igmp_cmd, - "undebug igmp", - UNDEBUG_STR - DEBUG_IGMP_STR) DEFUN (debug_igmp_events, debug_igmp_events_cmd, @@ -3647,12 +3585,6 @@ DEFUN (no_debug_igmp_events, return CMD_SUCCESS; } -ALIAS (no_debug_igmp_events, - undebug_igmp_events_cmd, - "undebug igmp events", - UNDEBUG_STR - DEBUG_IGMP_STR - DEBUG_IGMP_EVENTS_STR) DEFUN (debug_igmp_packets, debug_igmp_packets_cmd, @@ -3677,12 +3609,6 @@ DEFUN (no_debug_igmp_packets, return CMD_SUCCESS; } -ALIAS (no_debug_igmp_packets, - undebug_igmp_packets_cmd, - "undebug igmp packets", - UNDEBUG_STR - DEBUG_IGMP_STR - DEBUG_IGMP_PACKETS_STR) DEFUN (debug_igmp_trace, debug_igmp_trace_cmd, @@ -3707,12 +3633,6 @@ DEFUN (no_debug_igmp_trace, return CMD_SUCCESS; } -ALIAS (no_debug_igmp_trace, - undebug_igmp_trace_cmd, - "undebug igmp trace", - UNDEBUG_STR - DEBUG_IGMP_STR - DEBUG_IGMP_TRACE_STR) DEFUN (debug_mroute, debug_mroute_cmd, @@ -3735,11 +3655,6 @@ DEFUN (no_debug_mroute, return CMD_SUCCESS; } -ALIAS (no_debug_mroute, - undebug_mroute_cmd, - "undebug mroute", - UNDEBUG_STR - DEBUG_MROUTE_STR) DEFUN (debug_static, debug_static_cmd, @@ -3762,11 +3677,6 @@ DEFUN (no_debug_static, return CMD_SUCCESS; } -ALIAS (no_debug_static, - undebug_static_cmd, - "undebug static", - UNDEBUG_STR - DEBUG_STATIC_STR) DEFUN (debug_pim, debug_pim_cmd, @@ -3797,11 +3707,6 @@ DEFUN (no_debug_pim, return CMD_SUCCESS; } -ALIAS (no_debug_pim, - undebug_pim_cmd, - "undebug pim", - UNDEBUG_STR - DEBUG_PIM_STR) DEFUN (debug_pim_events, debug_pim_events_cmd, @@ -3826,12 +3731,6 @@ DEFUN (no_debug_pim_events, return CMD_SUCCESS; } -ALIAS (no_debug_pim_events, - undebug_pim_events_cmd, - "undebug pim events", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_EVENTS_STR) DEFUN (debug_pim_packets, debug_pim_packets_cmd, @@ -3847,19 +3746,20 @@ DEFUN (debug_pim_packets, DEFUN (debug_pim_packets_filter, debug_pim_packets_filter_cmd, - "debug pim packets (hello|joins)", + "debug pim packets <hello|joins>", DEBUG_STR DEBUG_PIM_STR DEBUG_PIM_PACKETS_STR DEBUG_PIM_HELLO_PACKETS_STR DEBUG_PIM_J_P_PACKETS_STR) { - if (strncmp(argv[0],"h",1) == 0) + int idx_hello_join = 3; + if (strncmp(argv[idx_hello_join]->arg,"h",1) == 0) { PIM_DO_DEBUG_PIM_HELLO; vty_out (vty, "PIM Hello debugging is on %s", VTY_NEWLINE); } - else if (strncmp(argv[0],"j",1) == 0) + else if (strncmp(argv[idx_hello_join]->arg,"j",1) == 0) { PIM_DO_DEBUG_PIM_J_P; vty_out (vty, "PIM Join/Prune debugging is on %s", VTY_NEWLINE); @@ -3884,7 +3784,7 @@ DEFUN (no_debug_pim_packets, DEFUN (no_debug_pim_packets_filter, no_debug_pim_packets_filter_cmd, - "no debug pim packets (hello|joins)", + "no debug pim packets <hello|joins>", NO_STR DEBUG_STR DEBUG_PIM_STR @@ -3892,12 +3792,13 @@ DEFUN (no_debug_pim_packets_filter, DEBUG_PIM_HELLO_PACKETS_STR DEBUG_PIM_J_P_PACKETS_STR) { - if (strncmp(argv[0],"h",1) == 0) + int idx_hello_join = 4; + if (strncmp(argv[idx_hello_join]->arg,"h",1) == 0) { PIM_DONT_DEBUG_PIM_HELLO; vty_out (vty, "PIM Hello debugging is off %s", VTY_NEWLINE); } - else if (strncmp(argv[0],"j",1) == 0) + else if (strncmp(argv[idx_hello_join]->arg,"j",1) == 0) { PIM_DONT_DEBUG_PIM_J_P; vty_out (vty, "PIM Join/Prune debugging is off %s", VTY_NEWLINE); @@ -3905,12 +3806,6 @@ DEFUN (no_debug_pim_packets_filter, return CMD_SUCCESS; } -ALIAS (no_debug_pim_packets, - undebug_pim_packets_cmd, - "undebug pim packets", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_PACKETS_STR) DEFUN (debug_pim_packetdump_send, debug_pim_packetdump_send_cmd, @@ -3937,13 +3832,6 @@ DEFUN (no_debug_pim_packetdump_send, return CMD_SUCCESS; } -ALIAS (no_debug_pim_packetdump_send, - undebug_pim_packetdump_send_cmd, - "undebug pim packet-dump send", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_PACKETDUMP_STR - DEBUG_PIM_PACKETDUMP_SEND_STR) DEFUN (debug_pim_packetdump_recv, debug_pim_packetdump_recv_cmd, @@ -3970,13 +3858,6 @@ DEFUN (no_debug_pim_packetdump_recv, return CMD_SUCCESS; } -ALIAS (no_debug_pim_packetdump_recv, - undebug_pim_packetdump_recv_cmd, - "undebug pim packet-dump receive", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_PACKETDUMP_STR - DEBUG_PIM_PACKETDUMP_RECV_STR) DEFUN (debug_pim_trace, debug_pim_trace_cmd, @@ -4001,12 +3882,6 @@ DEFUN (no_debug_pim_trace, return CMD_SUCCESS; } -ALIAS (no_debug_pim_trace, - undebug_pim_trace_cmd, - "undebug pim trace", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_TRACE_STR) DEFUN (debug_ssmpingd, debug_ssmpingd_cmd, @@ -4031,12 +3906,6 @@ DEFUN (no_debug_ssmpingd, return CMD_SUCCESS; } -ALIAS (no_debug_ssmpingd, - undebug_ssmpingd_cmd, - "undebug ssmpingd", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_SSMPINGD_STR) DEFUN (debug_pim_zebra, debug_pim_zebra_cmd, @@ -4061,12 +3930,6 @@ DEFUN (no_debug_pim_zebra, return CMD_SUCCESS; } -ALIAS (no_debug_pim_zebra, - undebug_pim_zebra_cmd, - "undebug pim zebra", - UNDEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_ZEBRA_STR) DEFUN (show_debugging_pim, show_debugging_pim_cmd, @@ -4105,7 +3968,7 @@ static struct igmp_sock *find_igmp_sock_by_fd(int fd) DEFUN (test_igmp_receive_report, test_igmp_receive_report_cmd, - "test igmp receive report <0-65535> A.B.C.D <1-6> .LINE", + "test igmp receive report (0-65535) A.B.C.D (1-6) LINE...", "Test\n" "Test IGMP protocol\n" "Test IGMP message\n" @@ -4115,6 +3978,10 @@ DEFUN (test_igmp_receive_report, "Record type\n" "Sources\n") { + int idx_number = 4; + int idx_ipv4 = 5; + int idx_number_2 = 6; + int idx_line = 7; char buf[1000]; char *igmp_msg; struct ip *ip_hdr; @@ -4136,7 +4003,7 @@ DEFUN (test_igmp_receive_report, struct in_addr *src_addr; int argi; - socket = argv[0]; + socket = argv[idx_number]->arg; socket_fd = atoi(socket); igmp = find_igmp_sock_by_fd(socket_fd); if (!igmp) { @@ -4145,7 +4012,7 @@ DEFUN (test_igmp_receive_report, return CMD_WARNING; } - grp_str = argv[1]; + grp_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, grp_str, &grp_addr); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -4153,7 +4020,7 @@ DEFUN (test_igmp_receive_report, return CMD_WARNING; } - record_type_str = argv[2]; + record_type_str = argv[idx_number_2]->arg; record_type = atoi(record_type_str); /* @@ -4180,8 +4047,8 @@ DEFUN (test_igmp_receive_report, /* Scan LINE sources */ sources = (struct in_addr *) (group_record + IGMP_V3_GROUP_RECORD_SOURCE_OFFSET); src_addr = sources; - for (argi = 3; argi < argc; ++argi,++src_addr) { - src_str = argv[argi]; + for (argi = idx_line; argi < argc; ++argi,++src_addr) { + src_str = argv[argi]->arg; result = inet_pton(AF_INET, src_str, src_addr); if (result <= 0) { vty_out(vty, "Bad source address %s: errno=%d: %s%s", @@ -4218,7 +4085,7 @@ static int hexval(uint8_t ch) DEFUN (test_pim_receive_dump, test_pim_receive_dump_cmd, - "test pim receive dump INTERFACE A.B.C.D .LINE", + "test pim receive dump INTERFACE A.B.C.D LINE...", "Test\n" "Test PIM protocol\n" "Test PIM message reception\n" @@ -4227,6 +4094,9 @@ DEFUN (test_pim_receive_dump, "Neighbor address\n" "Packet dump\n") { + int idx_interface = 4; + int idx_ipv4 = 5; + int idx_line = 6; uint8_t buf[1000]; uint8_t *pim_msg; struct ip *ip_hdr; @@ -4241,7 +4111,7 @@ DEFUN (test_pim_receive_dump, int result; /* Find interface */ - ifname = argv[0]; + ifname = argv[idx_interface]->arg; ifp = if_lookup_by_name(ifname); if (!ifp) { vty_out(vty, "No such interface name %s%s", @@ -4250,7 +4120,7 @@ DEFUN (test_pim_receive_dump, } /* Neighbor address */ - neigh_str = argv[1]; + neigh_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, neigh_str, &neigh_addr); if (result <= 0) { vty_out(vty, "Bad neighbor address %s: errno=%d: %s%s", @@ -4275,8 +4145,8 @@ DEFUN (test_pim_receive_dump, pim_msg_size = 0; /* Scan LINE dump into buffer */ - for (argi = 2; argi < argc; ++argi) { - const char *str = argv[argi]; + for (argi = idx_line; argi < argc; ++argi) { + const char *str = argv[argi]->arg; int str_len = strlen(str); int str_last = str_len - 1; int i; @@ -4330,7 +4200,7 @@ DEFUN (test_pim_receive_dump, DEFUN (test_pim_receive_hello, test_pim_receive_hello_cmd, - "test pim receive hello INTERFACE A.B.C.D <0-65535> <0-65535> <0-65535> <0-32767> <0-65535> <0-1>[LINE]", + "test pim receive hello INTERFACE A.B.C.D (0-65535) (0-65535) (0-65535) (0-32767) (0-65535) (0-1) [LINE]", "Test\n" "Test PIM protocol\n" "Test PIM message reception\n" @@ -4345,6 +4215,15 @@ DEFUN (test_pim_receive_hello, "Neighbor LAN prune delay T-bit\n" "Neighbor secondary addresses\n") { + int idx_interface = 4; + int idx_ipv4 = 5; + int idx_number = 6; + int idx_number_2 = 7; + int idx_number_3 = 8; + int idx_number_4 = 9; + int idx_number_5 = 10; + int idx_number_6 = 11; + int idx_line = 12; uint8_t buf[1000]; uint8_t *pim_msg; struct ip *ip_hdr; @@ -4366,7 +4245,7 @@ DEFUN (test_pim_receive_hello, int result; /* Find interface */ - ifname = argv[0]; + ifname = argv[idx_interface]->arg; ifp = if_lookup_by_name(ifname); if (!ifp) { vty_out(vty, "No such interface name %s%s", @@ -4375,7 +4254,7 @@ DEFUN (test_pim_receive_hello, } /* Neighbor address */ - neigh_str = argv[1]; + neigh_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, neigh_str, &neigh_addr); if (result <= 0) { vty_out(vty, "Bad neighbor address %s: errno=%d: %s%s", @@ -4383,12 +4262,12 @@ DEFUN (test_pim_receive_hello, return CMD_WARNING; } - neigh_holdtime = atoi(argv[2]); - neigh_dr_priority = atoi(argv[3]); - neigh_generation_id = atoi(argv[4]); - neigh_propagation_delay = atoi(argv[5]); - neigh_override_interval = atoi(argv[6]); - neigh_can_disable_join_suppression = atoi(argv[7]); + neigh_holdtime = atoi(argv[idx_number]->arg); + neigh_dr_priority = atoi(argv[idx_number_2]->arg); + neigh_generation_id = atoi(argv[idx_number_3]->arg); + neigh_propagation_delay = atoi(argv[idx_number_4]->arg); + neigh_override_interval = atoi(argv[idx_number_5]->arg); + neigh_can_disable_join_suppression = atoi(argv[idx_number_6]->arg); /* Tweak IP header @@ -4406,8 +4285,8 @@ DEFUN (test_pim_receive_hello, pim_msg = buf + ip_hlen; /* Scan LINE addresses */ - for (argi = 8; argi < argc; ++argi) { - const char *sec_str = argv[argi]; + for (argi = idx_line; argi < argc; ++argi) { + const char *sec_str = argv[argi]->arg; struct in_addr sec_addr; result = inet_pton(AF_INET, sec_str, &sec_addr); if (result <= 0) { @@ -4457,7 +4336,7 @@ DEFUN (test_pim_receive_hello, DEFUN (test_pim_receive_assert, test_pim_receive_assert_cmd, - "test pim receive assert INTERFACE A.B.C.D A.B.C.D A.B.C.D <0-65535> <0-65535> <0-1>", + "test pim receive assert INTERFACE A.B.C.D A.B.C.D A.B.C.D (0-65535) (0-65535) (0-1)", "Test\n" "Test PIM protocol\n" "Test PIM message reception\n" @@ -4470,6 +4349,13 @@ DEFUN (test_pim_receive_assert, "Assert route metric\n" "Assert RPT bit flag\n") { + int idx_interface = 4; + int idx_ipv4 = 5; + int idx_ipv4_2 = 6; + int idx_ipv4_3 = 7; + int idx_number = 8; + int idx_number_2 = 9; + int idx_number_3 = 10; uint8_t buf[1000]; uint8_t *buf_pastend = buf + sizeof(buf); uint8_t *pim_msg; @@ -4492,7 +4378,7 @@ DEFUN (test_pim_receive_assert, int result; /* Find interface */ - ifname = argv[0]; + ifname = argv[idx_interface]->arg; ifp = if_lookup_by_name(ifname); if (!ifp) { vty_out(vty, "No such interface name %s%s", @@ -4501,7 +4387,7 @@ DEFUN (test_pim_receive_assert, } /* Neighbor address */ - neigh_str = argv[1]; + neigh_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, neigh_str, &neigh_addr); if (result <= 0) { vty_out(vty, "Bad neighbor address %s: errno=%d: %s%s", @@ -4510,7 +4396,7 @@ DEFUN (test_pim_receive_assert, } /* Group address */ - group_str = argv[2]; + group_str = argv[idx_ipv4_2]->arg; result = inet_pton(AF_INET, group_str, &group_addr); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -4519,7 +4405,7 @@ DEFUN (test_pim_receive_assert, } /* Source address */ - source_str = argv[3]; + source_str = argv[idx_ipv4_3]->arg; result = inet_pton(AF_INET, source_str, &source_addr); if (result <= 0) { vty_out(vty, "Bad source address %s: errno=%d: %s%s", @@ -4527,9 +4413,9 @@ DEFUN (test_pim_receive_assert, return CMD_WARNING; } - assert_metric_preference = atoi(argv[4]); - assert_route_metric = atoi(argv[5]); - assert_rpt_bit_flag = atoi(argv[6]); + assert_metric_preference = atoi(argv[idx_number]->arg); + assert_route_metric = atoi(argv[idx_number_2]->arg); + assert_rpt_bit_flag = atoi(argv[idx_number_3]->arg); remain = buf_pastend - buf; if (remain < (int) sizeof(struct ip)) { @@ -4578,7 +4464,7 @@ DEFUN (test_pim_receive_assert, } static int recv_joinprune(struct vty *vty, - const char *argv[], + struct cmd_token **argv, int src_is_join) { uint8_t buf[1000]; @@ -4606,7 +4492,7 @@ static int recv_joinprune(struct vty *vty, uint16_t num_pruned; /* Find interface */ - ifname = argv[0]; + ifname = argv[0]->arg; ifp = if_lookup_by_name(ifname); if (!ifp) { vty_out(vty, "No such interface name %s%s", @@ -4614,10 +4500,10 @@ static int recv_joinprune(struct vty *vty, return CMD_WARNING; } - neigh_holdtime = atoi(argv[1]); + neigh_holdtime = atoi(argv[1]->arg); /* Neighbor destination address */ - neigh_dst_str = argv[2]; + neigh_dst_str = argv[2]->arg; result = inet_pton(AF_INET, neigh_dst_str, &neigh_dst_addr); if (result <= 0) { vty_out(vty, "Bad neighbor destination address %s: errno=%d: %s%s", @@ -4626,7 +4512,7 @@ static int recv_joinprune(struct vty *vty, } /* Neighbor source address */ - neigh_src_str = argv[3]; + neigh_src_str = argv[3]->arg; result = inet_pton(AF_INET, neigh_src_str, &neigh_src_addr); if (result <= 0) { vty_out(vty, "Bad neighbor source address %s: errno=%d: %s%s", @@ -4635,7 +4521,7 @@ static int recv_joinprune(struct vty *vty, } /* Multicast group address */ - group_str = argv[4]; + group_str = argv[4]->arg; result = inet_pton(AF_INET, group_str, &group_addr); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -4644,7 +4530,7 @@ static int recv_joinprune(struct vty *vty, } /* Multicast source address */ - source_str = argv[5]; + source_str = argv[5]->arg; result = inet_pton(AF_INET, source_str, &source_addr); if (result <= 0) { vty_out(vty, "Bad source address %s: errno=%d: %s%s", @@ -4765,7 +4651,7 @@ static int recv_joinprune(struct vty *vty, DEFUN (test_pim_receive_join, test_pim_receive_join_cmd, - "test pim receive join INTERFACE <0-65535> A.B.C.D A.B.C.D A.B.C.D A.B.C.D", + "test pim receive join INTERFACE (0-65535) A.B.C.D A.B.C.D A.B.C.D A.B.C.D", "Test\n" "Test PIM protocol\n" "Test PIM message reception\n" @@ -4782,7 +4668,7 @@ DEFUN (test_pim_receive_join, DEFUN (test_pim_receive_prune, test_pim_receive_prune_cmd, - "test pim receive prune INTERFACE <0-65535> A.B.C.D A.B.C.D A.B.C.D A.B.C.D", + "test pim receive prune INTERFACE (0-65535) A.B.C.D A.B.C.D A.B.C.D A.B.C.D", "Test\n" "Test PIM protocol\n" "Test PIM message reception\n" @@ -4799,7 +4685,7 @@ DEFUN (test_pim_receive_prune, DEFUN (test_pim_receive_upcall, test_pim_receive_upcall_cmd, - "test pim receive upcall (nocache|wrongvif|wholepkt) <0-65535> A.B.C.D A.B.C.D", + "test pim receive upcall <nocache|wrongvif|wholepkt> (0-65535) A.B.C.D A.B.C.D", "Test\n" "Test PIM protocol\n" "Test PIM message reception\n" @@ -4811,13 +4697,17 @@ DEFUN (test_pim_receive_upcall, "Multicast group address\n" "Multicast source address\n") { + int idx_type = 4; + int idx_number = 5; + int idx_ipv4 = 6; + int idx_ipv4_2 = 7; struct igmpmsg msg; const char *upcall_type; const char *group_str; const char *source_str; int result; - upcall_type = argv[0]; + upcall_type = argv[idx_type]->arg; if (upcall_type[0] == 'n') msg.im_msgtype = IGMPMSG_NOCACHE; @@ -4831,10 +4721,10 @@ DEFUN (test_pim_receive_upcall, return CMD_WARNING; } - msg.im_vif = atoi(argv[1]); + msg.im_vif = atoi(argv[idx_number]->arg); /* Group address */ - group_str = argv[2]; + group_str = argv[idx_ipv4]->arg; result = inet_pton(AF_INET, group_str, &msg.im_dst); if (result <= 0) { vty_out(vty, "Bad group address %s: errno=%d: %s%s", @@ -4843,7 +4733,7 @@ DEFUN (test_pim_receive_upcall, } /* Source address */ - source_str = argv[3]; + source_str = argv[idx_ipv4_2]->arg; result = inet_pton(AF_INET, source_str, &msg.im_src); if (result <= 0) { vty_out(vty, "Bad source address %s: errno=%d: %s%s", @@ -4867,6 +4757,7 @@ void pim_cmd_init() { install_node (&pim_global_node, pim_global_config_write); /* PIM_NODE */ install_node (&interface_node, pim_interface_config_write); /* INTERFACE_NODE */ + if_cmd_init (); install_element (CONFIG_NODE, &ip_multicast_routing_cmd); install_element (CONFIG_NODE, &no_ip_multicast_routing_cmd); @@ -4874,14 +4765,7 @@ void pim_cmd_init() install_element (CONFIG_NODE, &no_ip_pim_rp_cmd); install_element (CONFIG_NODE, &ip_ssmpingd_cmd); install_element (CONFIG_NODE, &no_ip_ssmpingd_cmd); -#if 0 - install_element (CONFIG_NODE, &interface_cmd); /* from if.h */ -#else - install_element (CONFIG_NODE, &pim_interface_cmd); -#endif - install_element (CONFIG_NODE, &no_interface_cmd); /* from if.h */ - - install_default (INTERFACE_NODE); + install_element (INTERFACE_NODE, &interface_ip_igmp_cmd); install_element (INTERFACE_NODE, &interface_no_ip_igmp_cmd); install_element (INTERFACE_NODE, &interface_ip_igmp_join_cmd); @@ -4899,7 +4783,6 @@ void pim_cmd_init() install_element (INTERFACE_NODE, &interface_ip_pim_drprio_cmd); install_element (INTERFACE_NODE, &interface_no_ip_pim_drprio_cmd); install_element (INTERFACE_NODE, &interface_ip_pim_hello_cmd); - install_element (INTERFACE_NODE, &interface_ip_pim_hello_hold_cmd); install_element (INTERFACE_NODE, &interface_no_ip_pim_hello_cmd); // Static mroutes NEB @@ -4958,81 +4841,59 @@ void pim_cmd_init() install_element (ENABLE_NODE, &debug_igmp_cmd); install_element (ENABLE_NODE, &no_debug_igmp_cmd); - install_element (ENABLE_NODE, &undebug_igmp_cmd); install_element (ENABLE_NODE, &debug_igmp_events_cmd); install_element (ENABLE_NODE, &no_debug_igmp_events_cmd); - install_element (ENABLE_NODE, &undebug_igmp_events_cmd); install_element (ENABLE_NODE, &debug_igmp_packets_cmd); install_element (ENABLE_NODE, &no_debug_igmp_packets_cmd); - install_element (ENABLE_NODE, &undebug_igmp_packets_cmd); install_element (ENABLE_NODE, &debug_igmp_trace_cmd); install_element (ENABLE_NODE, &no_debug_igmp_trace_cmd); - install_element (ENABLE_NODE, &undebug_igmp_trace_cmd); install_element (ENABLE_NODE, &debug_mroute_cmd); install_element (ENABLE_NODE, &no_debug_mroute_cmd); install_element (ENABLE_NODE, &debug_static_cmd); install_element (ENABLE_NODE, &no_debug_static_cmd); install_element (ENABLE_NODE, &debug_pim_cmd); install_element (ENABLE_NODE, &no_debug_pim_cmd); - install_element (ENABLE_NODE, &undebug_pim_cmd); install_element (ENABLE_NODE, &debug_pim_events_cmd); install_element (ENABLE_NODE, &no_debug_pim_events_cmd); - install_element (ENABLE_NODE, &undebug_pim_events_cmd); install_element (ENABLE_NODE, &debug_pim_packets_cmd); install_element (ENABLE_NODE, &debug_pim_packets_filter_cmd); install_element (ENABLE_NODE, &no_debug_pim_packets_cmd); install_element (ENABLE_NODE, &no_debug_pim_packets_filter_cmd); - install_element (ENABLE_NODE, &undebug_pim_packets_cmd); install_element (ENABLE_NODE, &debug_pim_packetdump_send_cmd); install_element (ENABLE_NODE, &no_debug_pim_packetdump_send_cmd); - install_element (ENABLE_NODE, &undebug_pim_packetdump_send_cmd); install_element (ENABLE_NODE, &debug_pim_packetdump_recv_cmd); install_element (ENABLE_NODE, &no_debug_pim_packetdump_recv_cmd); - install_element (ENABLE_NODE, &undebug_pim_packetdump_recv_cmd); install_element (ENABLE_NODE, &debug_pim_trace_cmd); install_element (ENABLE_NODE, &no_debug_pim_trace_cmd); - install_element (ENABLE_NODE, &undebug_pim_trace_cmd); install_element (ENABLE_NODE, &debug_ssmpingd_cmd); install_element (ENABLE_NODE, &no_debug_ssmpingd_cmd); - install_element (ENABLE_NODE, &undebug_ssmpingd_cmd); install_element (ENABLE_NODE, &debug_pim_zebra_cmd); install_element (ENABLE_NODE, &no_debug_pim_zebra_cmd); - install_element (ENABLE_NODE, &undebug_pim_zebra_cmd); install_element (CONFIG_NODE, &debug_igmp_cmd); install_element (CONFIG_NODE, &no_debug_igmp_cmd); - install_element (CONFIG_NODE, &undebug_igmp_cmd); install_element (CONFIG_NODE, &debug_igmp_events_cmd); install_element (CONFIG_NODE, &no_debug_igmp_events_cmd); - install_element (CONFIG_NODE, &undebug_igmp_events_cmd); install_element (CONFIG_NODE, &debug_igmp_packets_cmd); install_element (CONFIG_NODE, &no_debug_igmp_packets_cmd); - install_element (CONFIG_NODE, &undebug_igmp_packets_cmd); install_element (CONFIG_NODE, &debug_igmp_trace_cmd); install_element (CONFIG_NODE, &no_debug_igmp_trace_cmd); - install_element (CONFIG_NODE, &undebug_igmp_trace_cmd); install_element (CONFIG_NODE, &debug_mroute_cmd); install_element (CONFIG_NODE, &no_debug_mroute_cmd); install_element (CONFIG_NODE, &debug_static_cmd); install_element (CONFIG_NODE, &no_debug_static_cmd); install_element (CONFIG_NODE, &debug_pim_cmd); install_element (CONFIG_NODE, &no_debug_pim_cmd); - install_element (CONFIG_NODE, &undebug_pim_cmd); install_element (CONFIG_NODE, &debug_pim_events_cmd); install_element (CONFIG_NODE, &no_debug_pim_events_cmd); - install_element (CONFIG_NODE, &undebug_pim_events_cmd); install_element (CONFIG_NODE, &debug_pim_packets_cmd); install_element (CONFIG_NODE, &debug_pim_packets_filter_cmd); install_element (CONFIG_NODE, &no_debug_pim_packets_cmd); install_element (CONFIG_NODE, &no_debug_pim_packets_filter_cmd); - install_element (CONFIG_NODE, &undebug_pim_packets_cmd); install_element (CONFIG_NODE, &debug_pim_trace_cmd); install_element (CONFIG_NODE, &no_debug_pim_trace_cmd); - install_element (CONFIG_NODE, &undebug_pim_trace_cmd); install_element (CONFIG_NODE, &debug_ssmpingd_cmd); install_element (CONFIG_NODE, &no_debug_ssmpingd_cmd); - install_element (CONFIG_NODE, &undebug_ssmpingd_cmd); install_element (CONFIG_NODE, &debug_pim_zebra_cmd); install_element (CONFIG_NODE, &no_debug_pim_zebra_cmd); - install_element (CONFIG_NODE, &undebug_pim_zebra_cmd); } |
