]> git.proxmox.com Git - mirror_frr.git/blob - zebra/irdp_interface.c
Merge pull request #8121 from opensourcerouting/macro-cleanup
[mirror_frr.git] / zebra / irdp_interface.c
1 /*
2 *
3 * Copyright (C) 1997, 2000
4 * Portions:
5 * Swedish University of Agricultural Sciences
6 * Robert Olsson
7 * Kunihiro Ishiguro
8 *
9 * Thanks to Jens Laas at Swedish University of Agricultural Sciences
10 * for reviewing and tests.
11 *
12 * This file is part of GNU Zebra.
13 *
14 * GNU Zebra is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2, or (at your option) any
17 * later version.
18 *
19 * GNU Zebra is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; see the file COPYING; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 */
28
29 #include <zebra.h>
30
31 #include "if.h"
32 #include "vty.h"
33 #include "sockunion.h"
34 #include "prefix.h"
35 #include "command.h"
36 #include "memory.h"
37 #include "zebra_memory.h"
38 #include "stream.h"
39 #include "ioctl.h"
40 #include "connected.h"
41 #include "log.h"
42 #include "zclient.h"
43 #include "thread.h"
44 #include "lib_errors.h"
45 #include "zebra/interface.h"
46 #include "zebra/rtadv.h"
47 #include "zebra/rib.h"
48 #include "zebra/zebra_router.h"
49 #include "zebra/redistribute.h"
50 #include "zebra/irdp.h"
51 #include "zebra/zebra_errors.h"
52 #include <netinet/ip_icmp.h>
53 #include "if.h"
54 #include "sockunion.h"
55 #include "log.h"
56 #include "network.h"
57
58 extern int irdp_sock;
59
60 DEFINE_MTYPE_STATIC(ZEBRA, IRDP_IF, "IRDP interface data");
61
62 #define IRDP_CONFIGED \
63 do { \
64 if (!irdp) { \
65 vty_out(vty, \
66 "Please Configure IRDP before using this command\n"); \
67 return CMD_WARNING_CONFIG_FAILED; \
68 } \
69 } while (0)
70
71 static struct irdp_interface *irdp_if_get(struct interface *ifp)
72 {
73 struct zebra_if *zi = ifp->info;
74
75 if (!zi)
76 return NULL;
77
78 if (!zi->irdp)
79 zi->irdp = XCALLOC(MTYPE_IRDP_IF, sizeof(*zi->irdp));
80
81 if (!zi->irdp->started)
82 return NULL;
83
84 return zi->irdp;
85 }
86
87 static int irdp_if_delete(struct interface *ifp)
88 {
89 struct zebra_if *zi = ifp->info;
90 if (!zi)
91 return 0;
92 XFREE(MTYPE_IRDP_IF, zi->irdp);
93 return 0;
94 }
95
96 static const char *inet_2a(uint32_t a, char *b, size_t b_len)
97 {
98 snprintf(b, b_len, "%u.%u.%u.%u", (a)&0xFF, (a >> 8) & 0xFF,
99 (a >> 16) & 0xFF, (a >> 24) & 0xFF);
100 return b;
101 }
102
103
104 static struct prefix *irdp_get_prefix(struct interface *ifp)
105 {
106 struct listnode *node;
107 struct connected *ifc;
108
109 if (ifp->connected)
110 for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc))
111 return ifc->address;
112
113 return NULL;
114 }
115
116 /* Join to the add/leave multicast group. */
117 static int if_group(struct interface *ifp, int sock, uint32_t group,
118 int add_leave)
119 {
120 struct ip_mreq m;
121 struct prefix *p;
122 int ret;
123 char b1[INET_ADDRSTRLEN];
124
125 memset(&m, 0, sizeof(m));
126 m.imr_multiaddr.s_addr = htonl(group);
127 p = irdp_get_prefix(ifp);
128
129 if (!p) {
130 flog_warn(EC_ZEBRA_NO_IFACE_ADDR,
131 "IRDP: can't get address for %s", ifp->name);
132 return 1;
133 }
134
135 m.imr_interface = p->u.prefix4;
136
137 ret = setsockopt(sock, IPPROTO_IP, add_leave, (char *)&m,
138 sizeof(struct ip_mreq));
139 if (ret < 0)
140 flog_err_sys(EC_LIB_SOCKET, "IRDP: %s can't setsockopt %s: %s",
141 add_leave == IP_ADD_MEMBERSHIP ? "join group"
142 : "leave group",
143 inet_2a(group, b1, sizeof(b1)),
144 safe_strerror(errno));
145
146 return ret;
147 }
148
149 static int if_add_group(struct interface *ifp)
150 {
151 struct zebra_if *zi = ifp->info;
152 struct irdp_interface *irdp = zi->irdp;
153 int ret;
154 char b1[INET_ADDRSTRLEN];
155
156 if (!irdp)
157 return -1;
158
159 ret = if_group(ifp, irdp_sock, INADDR_ALLRTRS_GROUP, IP_ADD_MEMBERSHIP);
160 if (ret < 0) {
161 return ret;
162 }
163
164 if (irdp->flags & IF_DEBUG_MISC)
165 zlog_debug("IRDP: Adding group %s for %s",
166 inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1, sizeof(b1)),
167 ifp->name);
168 return 0;
169 }
170
171 static int if_drop_group(struct interface *ifp)
172 {
173 struct zebra_if *zi = ifp->info;
174 struct irdp_interface *irdp = zi->irdp;
175 int ret;
176 char b1[INET_ADDRSTRLEN];
177
178 if (!irdp)
179 return -1;
180
181 ret = if_group(ifp, irdp_sock, INADDR_ALLRTRS_GROUP,
182 IP_DROP_MEMBERSHIP);
183 if (ret < 0)
184 return ret;
185
186 if (irdp->flags & IF_DEBUG_MISC)
187 zlog_debug("IRDP: Leaving group %s for %s",
188 inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1, sizeof(b1)),
189 ifp->name);
190 return 0;
191 }
192
193 static void if_set_defaults(struct irdp_interface *irdp)
194 {
195 irdp->MaxAdvertInterval = IRDP_MAXADVERTINTERVAL;
196 irdp->MinAdvertInterval = IRDP_MINADVERTINTERVAL;
197 irdp->Preference = IRDP_PREFERENCE;
198 irdp->Lifetime = IRDP_LIFETIME;
199 }
200
201
202 static struct Adv *Adv_new(void)
203 {
204 return XCALLOC(MTYPE_TMP, sizeof(struct Adv));
205 }
206
207 static void Adv_free(struct Adv *adv)
208 {
209 XFREE(MTYPE_TMP, adv);
210 }
211
212 static void irdp_if_start(struct interface *ifp, int multicast,
213 int set_defaults)
214 {
215 struct zebra_if *zi = ifp->info;
216 struct irdp_interface *irdp = zi->irdp;
217 struct listnode *node;
218 struct connected *ifc;
219 uint32_t timer, seed;
220
221 assert(irdp);
222
223 irdp->started = true;
224 if (irdp->flags & IF_ACTIVE) {
225 zlog_debug("IRDP: Interface is already active %s", ifp->name);
226 return;
227 }
228 if ((irdp_sock < 0) && ((irdp_sock = irdp_sock_init()) < 0)) {
229 flog_warn(EC_ZEBRA_IRDP_CANNOT_ACTIVATE_IFACE,
230 "IRDP: Cannot activate interface %s (cannot create IRDP socket)",
231 ifp->name);
232 return;
233 }
234 irdp->flags |= IF_ACTIVE;
235
236 if (!multicast)
237 irdp->flags |= IF_BROADCAST;
238
239 if_add_update(ifp);
240
241 if (!(ifp->flags & IFF_UP)) {
242 flog_warn(EC_ZEBRA_IRDP_IFACE_DOWN,
243 "IRDP: Interface is down %s", ifp->name);
244 }
245
246 /* Shall we cancel if_start if if_add_group fails? */
247
248 if (multicast) {
249 if_add_group(ifp);
250
251 if (!(ifp->flags & (IFF_MULTICAST | IFF_ALLMULTI))) {
252 flog_warn(EC_ZEBRA_IRDP_IFACE_MCAST_DISABLED,
253 "IRDP: Interface not multicast enabled %s",
254 ifp->name);
255 }
256 }
257
258 if (set_defaults)
259 if_set_defaults(irdp);
260
261 irdp->irdp_sent = 0;
262
263 /* The spec suggests this for randomness */
264
265 seed = 0;
266 if (ifp->connected)
267 for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) {
268 seed = ifc->address->u.prefix4.s_addr;
269 break;
270 }
271
272 srandom(seed);
273 timer = (frr_weak_random() % IRDP_DEFAULT_INTERVAL) + 1;
274
275 irdp->AdvPrefList = list_new();
276 irdp->AdvPrefList->del = (void (*)(void *))Adv_free; /* Destructor */
277
278
279 /* And this for startup. Speed limit from 1991 :-). But it's OK*/
280
281 if (irdp->irdp_sent < MAX_INITIAL_ADVERTISEMENTS
282 && timer > MAX_INITIAL_ADVERT_INTERVAL)
283 timer = MAX_INITIAL_ADVERT_INTERVAL;
284
285
286 if (irdp->flags & IF_DEBUG_MISC)
287 zlog_debug("IRDP: Init timer for %s set to %u", ifp->name,
288 timer);
289
290 irdp->t_advertise = NULL;
291 thread_add_timer(zrouter.master, irdp_send_thread, ifp, timer,
292 &irdp->t_advertise);
293 }
294
295 static void irdp_if_stop(struct interface *ifp)
296 {
297 struct zebra_if *zi = ifp->info;
298 struct irdp_interface *irdp = zi->irdp;
299
300 if (irdp == NULL) {
301 zlog_debug("Interface %s structure is NULL", ifp->name);
302 return;
303 }
304
305 if (!(irdp->flags & IF_ACTIVE)) {
306 zlog_debug("Interface is not active %s", ifp->name);
307 return;
308 }
309
310 if (!(irdp->flags & IF_BROADCAST))
311 if_drop_group(ifp);
312
313 irdp_advert_off(ifp);
314
315 list_delete(&irdp->AdvPrefList);
316
317 irdp->flags = 0;
318 }
319
320
321 static void irdp_if_shutdown(struct interface *ifp)
322 {
323 struct zebra_if *zi = ifp->info;
324 struct irdp_interface *irdp = zi->irdp;
325
326 if (!irdp)
327 return;
328
329 if (irdp->flags & IF_SHUTDOWN) {
330 zlog_debug("IRDP: Interface is already shutdown %s", ifp->name);
331 return;
332 }
333
334 irdp->flags |= IF_SHUTDOWN;
335 irdp->flags &= ~IF_ACTIVE;
336
337 if (!(irdp->flags & IF_BROADCAST))
338 if_drop_group(ifp);
339
340 /* Tell the hosts we are out of service */
341 irdp_advert_off(ifp);
342 }
343
344 static void irdp_if_no_shutdown(struct interface *ifp)
345 {
346 struct irdp_interface *irdp = irdp_if_get(ifp);
347
348 if (!irdp)
349 return;
350
351 if (!(irdp->flags & IF_SHUTDOWN)) {
352 zlog_debug("IRDP: Interface is not shutdown %s", ifp->name);
353 return;
354 }
355
356 irdp->flags &= ~IF_SHUTDOWN;
357
358 irdp_if_start(ifp, irdp->flags & IF_BROADCAST ? false : true, false);
359 }
360
361
362 /* Write configuration to user */
363
364 int irdp_config_write(struct vty *vty, struct interface *ifp)
365 {
366 struct zebra_if *zi = ifp->info;
367 struct irdp_interface *irdp = zi->irdp;
368 struct Adv *adv;
369 struct listnode *node;
370 char b1[INET_ADDRSTRLEN];
371
372 if (!irdp)
373 return 0;
374
375 if (irdp->flags & IF_ACTIVE || irdp->flags & IF_SHUTDOWN) {
376
377 if (irdp->flags & IF_SHUTDOWN)
378 vty_out(vty, " ip irdp shutdown \n");
379
380 if (irdp->flags & IF_BROADCAST)
381 vty_out(vty, " ip irdp broadcast\n");
382 else
383 vty_out(vty, " ip irdp multicast\n");
384
385 vty_out(vty, " ip irdp preference %ld\n", irdp->Preference);
386
387 for (ALL_LIST_ELEMENTS_RO(irdp->AdvPrefList, node, adv))
388 vty_out(vty, " ip irdp address %s preference %d\n",
389 inet_2a(adv->ip.s_addr, b1, sizeof(b1)),
390 adv->pref);
391
392 vty_out(vty, " ip irdp holdtime %d\n", irdp->Lifetime);
393
394 vty_out(vty, " ip irdp minadvertinterval %ld\n",
395 irdp->MinAdvertInterval);
396
397 vty_out(vty, " ip irdp maxadvertinterval %ld\n",
398 irdp->MaxAdvertInterval);
399 }
400 return 0;
401 }
402
403
404 DEFUN (ip_irdp_multicast,
405 ip_irdp_multicast_cmd,
406 "ip irdp multicast",
407 IP_STR
408 "ICMP Router discovery on this interface\n"
409 "Use multicast mode\n")
410 {
411 VTY_DECLVAR_CONTEXT(interface, ifp);
412 irdp_if_get(ifp);
413
414 irdp_if_start(ifp, true, true);
415 return CMD_SUCCESS;
416 }
417
418 DEFUN (ip_irdp_broadcast,
419 ip_irdp_broadcast_cmd,
420 "ip irdp broadcast",
421 IP_STR
422 "ICMP Router discovery on this interface\n"
423 "Use broadcast mode\n")
424 {
425 VTY_DECLVAR_CONTEXT(interface, ifp);
426 irdp_if_get(ifp);
427
428 irdp_if_start(ifp, false, true);
429 return CMD_SUCCESS;
430 }
431
432 DEFUN (no_ip_irdp,
433 no_ip_irdp_cmd,
434 "no ip irdp",
435 NO_STR
436 IP_STR
437 "Disable ICMP Router discovery on this interface\n")
438 {
439 VTY_DECLVAR_CONTEXT(interface, ifp);
440
441 irdp_if_stop(ifp);
442 return CMD_SUCCESS;
443 }
444
445 DEFUN (ip_irdp_shutdown,
446 ip_irdp_shutdown_cmd,
447 "ip irdp shutdown",
448 IP_STR
449 "ICMP Router discovery on this interface\n"
450 "ICMP Router discovery shutdown on this interface\n")
451 {
452 VTY_DECLVAR_CONTEXT(interface, ifp);
453
454 irdp_if_shutdown(ifp);
455 return CMD_SUCCESS;
456 }
457
458 DEFUN (no_ip_irdp_shutdown,
459 no_ip_irdp_shutdown_cmd,
460 "no ip irdp shutdown",
461 NO_STR
462 IP_STR
463 "ICMP Router discovery on this interface\n"
464 "ICMP Router discovery no shutdown on this interface\n")
465 {
466 VTY_DECLVAR_CONTEXT(interface, ifp);
467
468 irdp_if_no_shutdown(ifp);
469 return CMD_SUCCESS;
470 }
471
472 DEFUN (ip_irdp_holdtime,
473 ip_irdp_holdtime_cmd,
474 "ip irdp holdtime (0-9000)",
475 IP_STR
476 "ICMP Router discovery on this interface\n"
477 "Set holdtime value\n"
478 "Holdtime value in seconds. Default is 1800 seconds\n")
479 {
480 int idx_number = 3;
481 VTY_DECLVAR_CONTEXT(interface, ifp);
482 struct irdp_interface *irdp = irdp_if_get(ifp);
483
484 IRDP_CONFIGED;
485
486 irdp->Lifetime = atoi(argv[idx_number]->arg);
487 return CMD_SUCCESS;
488 }
489
490 DEFUN (ip_irdp_minadvertinterval,
491 ip_irdp_minadvertinterval_cmd,
492 "ip irdp minadvertinterval (3-1800)",
493 IP_STR
494 "ICMP Router discovery on this interface\n"
495 "Set minimum time between advertisement\n"
496 "Minimum advertisement interval in seconds\n")
497 {
498 int idx_number = 3;
499 VTY_DECLVAR_CONTEXT(interface, ifp);
500 struct irdp_interface *irdp = irdp_if_get(ifp);
501
502 IRDP_CONFIGED;
503
504 if ((unsigned)atoi(argv[idx_number]->arg) <= irdp->MaxAdvertInterval) {
505 irdp->MinAdvertInterval = atoi(argv[idx_number]->arg);
506 return CMD_SUCCESS;
507 } else {
508 vty_out(vty,
509 "%% MinAdvertInterval must be less than or equal to MaxAdvertInterval\n");
510 return CMD_WARNING_CONFIG_FAILED;
511 }
512 }
513
514 DEFUN (ip_irdp_maxadvertinterval,
515 ip_irdp_maxadvertinterval_cmd,
516 "ip irdp maxadvertinterval (4-1800)",
517 IP_STR
518 "ICMP Router discovery on this interface\n"
519 "Set maximum time between advertisement\n"
520 "Maximum advertisement interval in seconds\n")
521 {
522 int idx_number = 3;
523 VTY_DECLVAR_CONTEXT(interface, ifp);
524 struct irdp_interface *irdp = irdp_if_get(ifp);
525
526 IRDP_CONFIGED;
527
528 if (irdp->MinAdvertInterval <= (unsigned)atoi(argv[idx_number]->arg)) {
529 irdp->MaxAdvertInterval = atoi(argv[idx_number]->arg);
530 return CMD_SUCCESS;
531 } else {
532 vty_out(vty,
533 "%% MaxAdvertInterval must be greater than or equal to MinAdvertInterval\n");
534 return CMD_WARNING_CONFIG_FAILED;
535 }
536 }
537
538 /* DEFUN needs to be fixed for negative ranages...
539 * "ip irdp preference <-2147483648-2147483647>",
540 * Be positive for now. :-)
541 */
542
543 DEFUN (ip_irdp_preference,
544 ip_irdp_preference_cmd,
545 "ip irdp preference (0-2147483647)",
546 IP_STR
547 "ICMP Router discovery on this interface\n"
548 "Set default preference level for this interface\n"
549 "Preference level\n")
550 {
551 int idx_number = 3;
552 VTY_DECLVAR_CONTEXT(interface, ifp);
553 struct irdp_interface *irdp = irdp_if_get(ifp);
554
555 IRDP_CONFIGED;
556
557 irdp->Preference = atoi(argv[idx_number]->arg);
558 return CMD_SUCCESS;
559 }
560
561 DEFUN (ip_irdp_address_preference,
562 ip_irdp_address_preference_cmd,
563 "ip irdp address A.B.C.D preference (0-2147483647)",
564 IP_STR
565 "Alter ICMP Router discovery preference on this interface\n"
566 "Set IRDP address for advertise\n"
567 "IPv4 address\n"
568 "Specify IRDP non-default preference to advertise\n"
569 "Preference level\n")
570 {
571 int idx_ipv4 = 3;
572 int idx_number = 5;
573 VTY_DECLVAR_CONTEXT(interface, ifp);
574 struct irdp_interface *irdp = irdp_if_get(ifp);
575 struct listnode *node;
576 struct in_addr ip;
577 int pref;
578 int ret;
579 struct Adv *adv;
580
581 IRDP_CONFIGED;
582
583 ret = inet_aton(argv[idx_ipv4]->arg, &ip);
584 if (!ret)
585 return CMD_WARNING_CONFIG_FAILED;
586
587 pref = atoi(argv[idx_number]->arg);
588
589 for (ALL_LIST_ELEMENTS_RO(irdp->AdvPrefList, node, adv))
590 if (adv->ip.s_addr == ip.s_addr)
591 return CMD_SUCCESS;
592
593 adv = Adv_new();
594 adv->ip = ip;
595 adv->pref = pref;
596 listnode_add(irdp->AdvPrefList, adv);
597
598 return CMD_SUCCESS;
599 }
600
601 DEFUN (no_ip_irdp_address_preference,
602 no_ip_irdp_address_preference_cmd,
603 "no ip irdp address A.B.C.D preference (0-2147483647)",
604 NO_STR
605 IP_STR
606 "Alter ICMP Router discovery preference on this interface\n"
607 "Select IRDP address\n"
608 "IPv4 address\n"
609 "Reset ICMP Router discovery preference on this interface\n"
610 "Old preference level\n")
611 {
612 int idx_ipv4 = 4;
613 VTY_DECLVAR_CONTEXT(interface, ifp);
614 struct irdp_interface *irdp = irdp_if_get(ifp);
615 struct listnode *node, *nnode;
616 struct in_addr ip;
617 int ret;
618 struct Adv *adv;
619
620 IRDP_CONFIGED;
621
622 ret = inet_aton(argv[idx_ipv4]->arg, &ip);
623 if (!ret)
624 return CMD_WARNING_CONFIG_FAILED;
625
626 for (ALL_LIST_ELEMENTS(irdp->AdvPrefList, node, nnode, adv)) {
627 if (adv->ip.s_addr == ip.s_addr) {
628 listnode_delete(irdp->AdvPrefList, adv);
629 break;
630 }
631 }
632
633 return CMD_SUCCESS;
634 }
635
636 DEFUN (ip_irdp_debug_messages,
637 ip_irdp_debug_messages_cmd,
638 "ip irdp debug messages",
639 IP_STR
640 "ICMP Router discovery debug Averts. and Solicits (short)\n"
641 "IRDP debugging options\n"
642 "Enable debugging for IRDP messages\n")
643 {
644 VTY_DECLVAR_CONTEXT(interface, ifp);
645 struct irdp_interface *irdp = irdp_if_get(ifp);
646
647 IRDP_CONFIGED;
648
649 irdp->flags |= IF_DEBUG_MESSAGES;
650
651 return CMD_SUCCESS;
652 }
653
654 DEFUN (ip_irdp_debug_misc,
655 ip_irdp_debug_misc_cmd,
656 "ip irdp debug misc",
657 IP_STR
658 "ICMP Router discovery debug Averts. and Solicits (short)\n"
659 "IRDP debugging options\n"
660 "Enable debugging for miscellaneous IRDP events\n")
661 {
662 VTY_DECLVAR_CONTEXT(interface, ifp);
663 struct irdp_interface *irdp = irdp_if_get(ifp);
664
665 IRDP_CONFIGED;
666
667 irdp->flags |= IF_DEBUG_MISC;
668
669 return CMD_SUCCESS;
670 }
671
672 DEFUN (ip_irdp_debug_packet,
673 ip_irdp_debug_packet_cmd,
674 "ip irdp debug packet",
675 IP_STR
676 "ICMP Router discovery debug Averts. and Solicits (short)\n"
677 "IRDP debugging options\n"
678 "Enable debugging for IRDP packets\n")
679 {
680 VTY_DECLVAR_CONTEXT(interface, ifp);
681 struct irdp_interface *irdp = irdp_if_get(ifp);
682
683 IRDP_CONFIGED;
684
685 irdp->flags |= IF_DEBUG_PACKET;
686
687 return CMD_SUCCESS;
688 }
689
690
691 DEFUN (ip_irdp_debug_disable,
692 ip_irdp_debug_disable_cmd,
693 "ip irdp debug disable",
694 IP_STR
695 "ICMP Router discovery debug Averts. and Solicits (short)\n"
696 "IRDP debugging options\n"
697 "Disable debugging for all IRDP events\n")
698 {
699 VTY_DECLVAR_CONTEXT(interface, ifp);
700 struct irdp_interface *irdp = irdp_if_get(ifp);
701
702 IRDP_CONFIGED;
703
704 irdp->flags &= ~IF_DEBUG_PACKET;
705 irdp->flags &= ~IF_DEBUG_MESSAGES;
706 irdp->flags &= ~IF_DEBUG_MISC;
707
708 return CMD_SUCCESS;
709 }
710
711 void irdp_if_init(void)
712 {
713 hook_register(zebra_if_config_wr, irdp_config_write);
714 hook_register(if_del, irdp_if_delete);
715
716 install_element(INTERFACE_NODE, &ip_irdp_broadcast_cmd);
717 install_element(INTERFACE_NODE, &ip_irdp_multicast_cmd);
718 install_element(INTERFACE_NODE, &no_ip_irdp_cmd);
719 install_element(INTERFACE_NODE, &ip_irdp_shutdown_cmd);
720 install_element(INTERFACE_NODE, &no_ip_irdp_shutdown_cmd);
721 install_element(INTERFACE_NODE, &ip_irdp_holdtime_cmd);
722 install_element(INTERFACE_NODE, &ip_irdp_maxadvertinterval_cmd);
723 install_element(INTERFACE_NODE, &ip_irdp_minadvertinterval_cmd);
724 install_element(INTERFACE_NODE, &ip_irdp_preference_cmd);
725 install_element(INTERFACE_NODE, &ip_irdp_address_preference_cmd);
726 install_element(INTERFACE_NODE, &no_ip_irdp_address_preference_cmd);
727
728 install_element(INTERFACE_NODE, &ip_irdp_debug_messages_cmd);
729 install_element(INTERFACE_NODE, &ip_irdp_debug_misc_cmd);
730 install_element(INTERFACE_NODE, &ip_irdp_debug_packet_cmd);
731 install_element(INTERFACE_NODE, &ip_irdp_debug_disable_cmd);
732 }