]> git.proxmox.com Git - mirror_frr.git/blob - zebra/irdp_interface.c
Merge pull request #1295 from donaldsharp/more_1270
[mirror_frr.git] / zebra / irdp_interface.c
1 /*
2 *
3 * Copyright (C) 2000 Robert Olsson.
4 * Swedish University of Agricultural Sciences
5 *
6 * This file is part of GNU Zebra.
7 *
8 * GNU Zebra is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
11 * later version.
12 *
13 * GNU Zebra is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 /*
24 * This work includes work with the following copywrite:
25 *
26 * Copyright (C) 1997, 2000 Kunihiro Ishiguro
27 *
28 */
29
30 /*
31 * Thanks to Jens Låås at Swedish University of Agricultural Sciences
32 * for reviewing and tests.
33 */
34
35
36 #include <zebra.h>
37
38 #include "if.h"
39 #include "vty.h"
40 #include "sockunion.h"
41 #include "prefix.h"
42 #include "command.h"
43 #include "memory.h"
44 #include "zebra_memory.h"
45 #include "stream.h"
46 #include "ioctl.h"
47 #include "connected.h"
48 #include "log.h"
49 #include "zclient.h"
50 #include "thread.h"
51 #include "zebra/interface.h"
52 #include "zebra/rtadv.h"
53 #include "zebra/rib.h"
54 #include "zebra/zserv.h"
55 #include "zebra/redistribute.h"
56 #include "zebra/irdp.h"
57 #include <netinet/ip_icmp.h>
58 #include "if.h"
59 #include "sockunion.h"
60 #include "log.h"
61
62 extern int irdp_sock;
63
64 DEFINE_MTYPE_STATIC(ZEBRA, IRDP_IF, "IRDP interface data")
65
66 #define IRDP_CONFIGED \
67 do { \
68 if (!irdp) { \
69 vty_out(vty, "Please Configure IRDP before using this command\n"); \
70 return CMD_WARNING_CONFIG_FAILED; \
71 } \
72 } \
73 while (0)
74
75 static struct irdp_interface *irdp_if_get(struct interface *ifp)
76 {
77 struct zebra_if *zi = ifp->info;
78
79 if (!zi)
80 return NULL;
81
82 if (!zi->irdp)
83 zi->irdp = XCALLOC(MTYPE_IRDP_IF, sizeof(*zi->irdp));
84
85 if (!zi->irdp->started)
86 return NULL;
87
88 return zi->irdp;
89 }
90
91 static int irdp_if_delete(struct interface *ifp)
92 {
93 struct zebra_if *zi = ifp->info;
94 if (!zi)
95 return 0;
96 XFREE(MTYPE_IRDP_IF, zi->irdp);
97 return 0;
98 }
99
100 static const char *inet_2a(u_int32_t a, char *b)
101 {
102 sprintf(b, "%u.%u.%u.%u", (a)&0xFF, (a >> 8) & 0xFF, (a >> 16) & 0xFF,
103 (a >> 24) & 0xFF);
104 return b;
105 }
106
107
108 static struct prefix *irdp_get_prefix(struct interface *ifp)
109 {
110 struct listnode *node;
111 struct connected *ifc;
112
113 if (ifp->connected)
114 for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc))
115 return ifc->address;
116
117 return NULL;
118 }
119
120 /* Join to the add/leave multicast group. */
121 static int if_group(struct interface *ifp, int sock, u_int32_t group,
122 int add_leave)
123 {
124 struct ip_mreq m;
125 struct prefix *p;
126 int ret;
127 char b1[INET_ADDRSTRLEN];
128
129 memset(&m, 0, sizeof(m));
130 m.imr_multiaddr.s_addr = htonl(group);
131 p = irdp_get_prefix(ifp);
132
133 if (!p) {
134 zlog_warn("IRDP: can't get address for %s", ifp->name);
135 return 1;
136 }
137
138 m.imr_interface = p->u.prefix4;
139
140 ret = setsockopt(sock, IPPROTO_IP, add_leave, (char *)&m,
141 sizeof(struct ip_mreq));
142 if (ret < 0)
143 zlog_warn("IRDP: %s can't setsockopt %s: %s",
144 add_leave == IP_ADD_MEMBERSHIP ? "join group"
145 : "leave group",
146 inet_2a(group, b1), safe_strerror(errno));
147
148 return ret;
149 }
150
151 static int if_add_group(struct interface *ifp)
152 {
153 struct zebra_if *zi = ifp->info;
154 struct irdp_interface *irdp = zi->irdp;
155 int ret;
156 char b1[INET_ADDRSTRLEN];
157
158 if (!irdp)
159 return -1;
160
161 ret = if_group(ifp, irdp_sock, INADDR_ALLRTRS_GROUP, IP_ADD_MEMBERSHIP);
162 if (ret < 0) {
163 return ret;
164 }
165
166 if (irdp->flags & IF_DEBUG_MISC)
167 zlog_debug("IRDP: Adding group %s for %s",
168 inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1), ifp->name);
169 return 0;
170 }
171
172 static int if_drop_group(struct interface *ifp)
173 {
174 struct zebra_if *zi = ifp->info;
175 struct irdp_interface *irdp = zi->irdp;
176 int ret;
177 char b1[INET_ADDRSTRLEN];
178
179 if (!irdp)
180 return -1;
181
182 ret = if_group(ifp, irdp_sock, INADDR_ALLRTRS_GROUP,
183 IP_DROP_MEMBERSHIP);
184 if (ret < 0)
185 return ret;
186
187 if (irdp->flags & IF_DEBUG_MISC)
188 zlog_debug("IRDP: Leaving group %s for %s",
189 inet_2a(htonl(INADDR_ALLRTRS_GROUP), b1), 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 u_int32_t timer, seed;
220
221 assert(irdp);
222
223 irdp->started = true;
224 if (irdp->flags & IF_ACTIVE) {
225 zlog_warn("IRDP: Interface is already active %s", ifp->name);
226 return;
227 }
228 if ((irdp_sock < 0) && ((irdp_sock = irdp_sock_init()) < 0)) {
229 zlog_warn(
230 "IRDP: Cannot activate interface %s (cannot create "
231 "IRDP socket)",
232 ifp->name);
233 return;
234 }
235 irdp->flags |= IF_ACTIVE;
236
237 if (!multicast)
238 irdp->flags |= IF_BROADCAST;
239
240 if_add_update(ifp);
241
242 if (!(ifp->flags & IFF_UP)) {
243 zlog_warn("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 zlog_warn("IRDP: Interface not multicast enabled %s",
253 ifp->name);
254 }
255 }
256
257 if (set_defaults)
258 if_set_defaults(irdp);
259
260 irdp->irdp_sent = 0;
261
262 /* The spec suggests this for randomness */
263
264 seed = 0;
265 if (ifp->connected)
266 for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) {
267 seed = ifc->address->u.prefix4.s_addr;
268 break;
269 }
270
271 srandom(seed);
272 timer = (random() % IRDP_DEFAULT_INTERVAL) + 1;
273
274 irdp->AdvPrefList = list_new();
275 irdp->AdvPrefList->del = (void (*)(void *))Adv_free; /* Destructor */
276
277
278 /* And this for startup. Speed limit from 1991 :-). But it's OK*/
279
280 if (irdp->irdp_sent < MAX_INITIAL_ADVERTISEMENTS
281 && timer > MAX_INITIAL_ADVERT_INTERVAL)
282 timer = MAX_INITIAL_ADVERT_INTERVAL;
283
284
285 if (irdp->flags & IF_DEBUG_MISC)
286 zlog_debug("IRDP: Init timer for %s set to %u", ifp->name,
287 timer);
288
289 irdp->t_advertise = NULL;
290 thread_add_timer(zebrad.master, irdp_send_thread, ifp, timer,
291 &irdp->t_advertise);
292 }
293
294 static void irdp_if_stop(struct interface *ifp)
295 {
296 struct zebra_if *zi = ifp->info;
297 struct irdp_interface *irdp = zi->irdp;
298
299 if (irdp == NULL) {
300 zlog_warn("Interface %s structure is NULL", ifp->name);
301 return;
302 }
303
304 if (!(irdp->flags & IF_ACTIVE)) {
305 zlog_warn("Interface is not active %s", ifp->name);
306 return;
307 }
308
309 if (!(irdp->flags & IF_BROADCAST))
310 if_drop_group(ifp);
311
312 irdp_advert_off(ifp);
313
314 list_delete_and_null(&irdp->AdvPrefList);
315
316 irdp->flags = 0;
317 }
318
319
320 static void irdp_if_shutdown(struct interface *ifp)
321 {
322 struct zebra_if *zi = ifp->info;
323 struct irdp_interface *irdp = zi->irdp;
324
325 if (!irdp)
326 return;
327
328 if (irdp->flags & IF_SHUTDOWN) {
329 zlog_warn("IRDP: Interface is already shutdown %s", ifp->name);
330 return;
331 }
332
333 irdp->flags |= IF_SHUTDOWN;
334 irdp->flags &= ~IF_ACTIVE;
335
336 if (!(irdp->flags & IF_BROADCAST))
337 if_drop_group(ifp);
338
339 /* Tell the hosts we are out of service */
340 irdp_advert_off(ifp);
341 }
342
343 static void irdp_if_no_shutdown(struct interface *ifp)
344 {
345 struct irdp_interface *irdp = irdp_if_get(ifp);
346
347 if (!irdp)
348 return;
349
350 if (!(irdp->flags & IF_SHUTDOWN)) {
351 zlog_warn("IRDP: Interface is not shutdown %s", ifp->name);
352 return;
353 }
354
355 irdp->flags &= ~IF_SHUTDOWN;
356
357 irdp_if_start(ifp, irdp->flags & IF_BROADCAST ? FALSE : TRUE, FALSE);
358 }
359
360
361 /* Write configuration to user */
362
363 int irdp_config_write(struct vty *vty, struct interface *ifp)
364 {
365 struct zebra_if *zi = ifp->info;
366 struct irdp_interface *irdp = zi->irdp;
367 struct Adv *adv;
368 struct listnode *node;
369 char b1[INET_ADDRSTRLEN];
370
371 if (!irdp)
372 return 0;
373
374 if (irdp->flags & IF_ACTIVE || irdp->flags & IF_SHUTDOWN) {
375
376 if (irdp->flags & IF_SHUTDOWN)
377 vty_out(vty, " ip irdp shutdown \n");
378
379 if (irdp->flags & IF_BROADCAST)
380 vty_out(vty, " ip irdp broadcast\n");
381 else
382 vty_out(vty, " ip irdp multicast\n");
383
384 vty_out(vty, " ip irdp preference %ld\n", irdp->Preference);
385
386 for (ALL_LIST_ELEMENTS_RO(irdp->AdvPrefList, node, adv))
387 vty_out(vty, " ip irdp address %s preference %d\n",
388 inet_2a(adv->ip.s_addr, b1), adv->pref);
389
390 vty_out(vty, " ip irdp holdtime %d\n", irdp->Lifetime);
391
392 vty_out(vty, " ip irdp minadvertinterval %ld\n",
393 irdp->MinAdvertInterval);
394
395 vty_out(vty, " ip irdp maxadvertinterval %ld\n",
396 irdp->MaxAdvertInterval);
397 }
398 return 0;
399 }
400
401
402 DEFUN (ip_irdp_multicast,
403 ip_irdp_multicast_cmd,
404 "ip irdp multicast",
405 IP_STR
406 "ICMP Router discovery on this interface\n"
407 "Use multicast mode\n")
408 {
409 VTY_DECLVAR_CONTEXT(interface, ifp);
410 irdp_if_get(ifp);
411
412 irdp_if_start(ifp, TRUE, TRUE);
413 return CMD_SUCCESS;
414 }
415
416 DEFUN (ip_irdp_broadcast,
417 ip_irdp_broadcast_cmd,
418 "ip irdp broadcast",
419 IP_STR
420 "ICMP Router discovery on this interface\n"
421 "Use broadcast mode\n")
422 {
423 VTY_DECLVAR_CONTEXT(interface, ifp);
424 irdp_if_get(ifp);
425
426 irdp_if_start(ifp, FALSE, TRUE);
427 return CMD_SUCCESS;
428 }
429
430 DEFUN (no_ip_irdp,
431 no_ip_irdp_cmd,
432 "no ip irdp",
433 NO_STR
434 IP_STR
435 "Disable ICMP Router discovery on this interface\n")
436 {
437 VTY_DECLVAR_CONTEXT(interface, ifp);
438
439 irdp_if_stop(ifp);
440 return CMD_SUCCESS;
441 }
442
443 DEFUN (ip_irdp_shutdown,
444 ip_irdp_shutdown_cmd,
445 "ip irdp shutdown",
446 IP_STR
447 "ICMP Router discovery on this interface\n"
448 "ICMP Router discovery shutdown on this interface\n")
449 {
450 VTY_DECLVAR_CONTEXT(interface, ifp);
451
452 irdp_if_shutdown(ifp);
453 return CMD_SUCCESS;
454 }
455
456 DEFUN (no_ip_irdp_shutdown,
457 no_ip_irdp_shutdown_cmd,
458 "no ip irdp shutdown",
459 NO_STR
460 IP_STR
461 "ICMP Router discovery on this interface\n"
462 "ICMP Router discovery no shutdown on this interface\n")
463 {
464 VTY_DECLVAR_CONTEXT(interface, ifp);
465
466 irdp_if_no_shutdown(ifp);
467 return CMD_SUCCESS;
468 }
469
470 DEFUN (ip_irdp_holdtime,
471 ip_irdp_holdtime_cmd,
472 "ip irdp holdtime (0-9000)",
473 IP_STR
474 "ICMP Router discovery on this interface\n"
475 "Set holdtime value\n"
476 "Holdtime value in seconds. Default is 1800 seconds\n")
477 {
478 int idx_number = 3;
479 VTY_DECLVAR_CONTEXT(interface, ifp);
480 struct irdp_interface *irdp = irdp_if_get(ifp);
481
482 IRDP_CONFIGED;
483
484 irdp->Lifetime = atoi(argv[idx_number]->arg);
485 return CMD_SUCCESS;
486 }
487
488 DEFUN (ip_irdp_minadvertinterval,
489 ip_irdp_minadvertinterval_cmd,
490 "ip irdp minadvertinterval (3-1800)",
491 IP_STR
492 "ICMP Router discovery on this interface\n"
493 "Set minimum time between advertisement\n"
494 "Minimum advertisement interval in seconds\n")
495 {
496 int idx_number = 3;
497 VTY_DECLVAR_CONTEXT(interface, ifp);
498 struct irdp_interface *irdp = irdp_if_get(ifp);
499
500 IRDP_CONFIGED;
501
502 if ((unsigned)atoi(argv[idx_number]->arg) <= irdp->MaxAdvertInterval) {
503 irdp->MinAdvertInterval = atoi(argv[idx_number]->arg);
504 return CMD_SUCCESS;
505 } else {
506 vty_out(vty,
507 "%% MinAdvertInterval must be less than or equal to "
508 "MaxAdvertInterval\n");
509 return CMD_WARNING_CONFIG_FAILED;
510 }
511 }
512
513 DEFUN (ip_irdp_maxadvertinterval,
514 ip_irdp_maxadvertinterval_cmd,
515 "ip irdp maxadvertinterval (4-1800)",
516 IP_STR
517 "ICMP Router discovery on this interface\n"
518 "Set maximum time between advertisement\n"
519 "Maximum advertisement interval in seconds\n")
520 {
521 int idx_number = 3;
522 VTY_DECLVAR_CONTEXT(interface, ifp);
523 struct irdp_interface *irdp = irdp_if_get(ifp);
524
525 IRDP_CONFIGED;
526
527 if (irdp->MinAdvertInterval <= (unsigned)atoi(argv[idx_number]->arg)) {
528 irdp->MaxAdvertInterval = atoi(argv[idx_number]->arg);
529 return CMD_SUCCESS;
530 } else {
531 vty_out(vty,
532 "%% MaxAdvertInterval must be greater than or equal to "
533 "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()
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 }