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