]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/irdp.h
isisd: implement the 'lsp-too-large' notification
[mirror_frr.git] / zebra / irdp.h
index 975e378b72a08ce821e8d54f4542101f492547e0..4800e75be378213f162e24f64eabf7e1231ed468 100644 (file)
@@ -18,7 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-/* 
+/*
  * This file is modified and completed for the Zebra IRDP implementation
  * by Robert Olsson, Swedish University of Agricultural Sciences
  */
@@ -68,8 +68,8 @@
 
 #define IRDP_RX_BUF 1500
 
-/* 
-     Comments comes from RFC1256 ICMP Router Discovery Messages. 
+/*
+     Comments comes from RFC1256 ICMP Router Discovery Messages.
 
      The IP destination address to be used for multicast Router
      Advertisements sent from the interface.  The only permissible
      all listening hosts support IP multicast.)
 
      Default: 224.0.0.1 if the router supports IP multicast on the
-     interface, else 255.255.255.255 
+     interface, else 255.255.255.255
 
      The maximum time allowed between sending multicast Router
      Advertisements from the interface, in seconds.  Must be no less
      than 4 seconds and no greater than 1800 seconds.
 
-     Default: 600 seconds 
+     Default: 600 seconds
 
      The minimum time allowed between sending unsolicited multicast
      Router Advertisements from the interface, in seconds.  Must be no
      less than 3 seconds and no greater than MaxAdvertisementInterval.
 
-     Default: 0.75 * MaxAdvertisementInterval 
+     Default: 0.75 * MaxAdvertisementInterval
 
      The value to be placed in the Lifetime field of Router
      Advertisements sent from the interface, in seconds.  Must be no
      less than MaxAdvertisementInterval and no greater than 9000
      seconds.
 
-     Default: 3 * MaxAdvertisementInterval 
+     Default: 3 * MaxAdvertisementInterval
 
      The preferability of the address as a default router address,
      relative to other router addresses on the same subnet.  A 32-bit,
      that the address, even though it may be advertised, is not to be
      used by neighboring hosts as a default router address.
 
-     Default: 0 
+     Default: 0
 */
 
-struct irdp_interface 
-{
-  unsigned long MaxAdvertInterval;
-  unsigned long MinAdvertInterval;
-  unsigned long Preference;
+struct irdp_interface {
+       bool started;
 
-  u_int32_t flags;
+       unsigned long MaxAdvertInterval;
+       unsigned long MinAdvertInterval;
+       unsigned long Preference;
+
+       uint32_t flags;
 
 #define IF_ACTIVE               (1<<0) /* ICMP Active */
 #define IF_BROADCAST            (1<<1) /* 255.255.255.255 */
@@ -126,31 +127,28 @@ struct irdp_interface
 #define IF_DEBUG_MISC           (1<<5) 
 #define IF_SHUTDOWN             (1<<6) 
 
-  struct interface *ifp;
-  struct thread *t_advertise;
-  unsigned long irdp_sent;
-  u_int16_t Lifetime;
-
- struct list *AdvPrefList;
+       struct interface *ifp;
+       struct thread *t_advertise;
+       unsigned long irdp_sent;
+       uint16_t Lifetime;
 
+       struct list *AdvPrefList;
 };
 
-struct Adv 
-{
-  struct in_addr ip;
-  int pref;
+struct Adv {
+       struct in_addr ip;
+       int pref;
 };
 
-extern void irdp_init(void);
+extern void irdp_if_init(void);
 extern int irdp_sock_init(void);
-extern void irdp_finish(void);
-extern void irdp_config_write (struct vty *, struct interface *);
+extern int irdp_config_write(struct vty *, struct interface *);
 extern int irdp_send_thread(struct thread *t_advert);
 extern void irdp_advert_off(struct interface *ifp);
-extern void process_solicit (struct interface *ifp);
+extern void process_solicit(struct interface *ifp);
 extern int irdp_read_raw(struct thread *r);
-extern void send_packet(struct interface *ifp, struct stream *s,
-                       u_int32_t dst, struct prefix *p, u_int32_t ttl);
+extern void send_packet(struct interface *ifp, struct stream *s, uint32_t dst,
+                       struct prefix *p, uint32_t ttl);
 
 
 #endif /* _IRDP_H */