]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_debug.h
Merge pull request #3367 from karamalla0406/frr3333
[mirror_frr.git] / bgpd / bgp_debug.h
index 11ab4dbd657b83acf600b6a587524dc8fbe4e3f5..d5d8fbb505e444e5e74b70e4a2d5ef0b47b60c67 100644 (file)
@@ -57,10 +57,10 @@ extern int Debug_Radix;
 #define        DETAIL   6
 
 /* Prototypes. */
-extern void bgp_debug_init (void);
-extern void bgp_packet_dump (struct stream *);
+extern void bgp_debug_init(void);
+extern void bgp_packet_dump(struct stream *);
 
-extern int debug (unsigned int option);
+extern int debug(unsigned int option);
 
 extern unsigned long conf_bgp_debug_as4;
 extern unsigned long conf_bgp_debug_neighbor_events;
@@ -72,6 +72,10 @@ extern unsigned long conf_bgp_debug_zebra;
 extern unsigned long conf_bgp_debug_allow_martians;
 extern unsigned long conf_bgp_debug_nht;
 extern unsigned long conf_bgp_debug_update_groups;
+extern unsigned long conf_bgp_debug_vpn;
+extern unsigned long conf_bgp_debug_flowspec;
+extern unsigned long conf_bgp_debug_labelpool;
+extern unsigned long conf_bgp_debug_pbr;
 
 extern unsigned long term_bgp_debug_as4;
 extern unsigned long term_bgp_debug_neighbor_events;
@@ -83,6 +87,10 @@ extern unsigned long term_bgp_debug_zebra;
 extern unsigned long term_bgp_debug_allow_martians;
 extern unsigned long term_bgp_debug_nht;
 extern unsigned long term_bgp_debug_update_groups;
+extern unsigned long term_bgp_debug_vpn;
+extern unsigned long term_bgp_debug_flowspec;
+extern unsigned long term_bgp_debug_labelpool;
+extern unsigned long term_bgp_debug_pbr;
 
 extern struct list *bgp_debug_neighbor_events_peers;
 extern struct list *bgp_debug_keepalive_peers;
@@ -92,10 +100,9 @@ extern struct list *bgp_debug_update_prefixes;
 extern struct list *bgp_debug_bestpath_prefixes;
 extern struct list *bgp_debug_zebra_prefixes;
 
-struct bgp_debug_filter
-{
-  char *host;
-  struct prefix *p;
+struct bgp_debug_filter {
+       char *host;
+       struct prefix *p;
 };
 
 #define BGP_DEBUG_AS4                 0x01
@@ -112,6 +119,14 @@ struct bgp_debug_filter
 #define BGP_DEBUG_ALLOW_MARTIANS      0x01
 #define BGP_DEBUG_NHT                 0x01
 #define BGP_DEBUG_UPDATE_GROUPS       0x01
+#define BGP_DEBUG_VPN_LEAK_FROM_VRF   0x01
+#define BGP_DEBUG_VPN_LEAK_TO_VRF     0x02
+#define BGP_DEBUG_VPN_LEAK_RMAP_EVENT 0x04
+#define BGP_DEBUG_VPN_LEAK_LABEL      0x08
+#define BGP_DEBUG_FLOWSPEC            0x01
+#define BGP_DEBUG_LABELPOOL           0x01
+#define BGP_DEBUG_PBR                 0x01
+#define BGP_DEBUG_PBR_ERROR           0x02
 
 #define BGP_DEBUG_PACKET_SEND         0x01
 #define BGP_DEBUG_PACKET_SEND_DETAIL  0x02
@@ -122,40 +137,43 @@ struct bgp_debug_filter
 #define TERM_DEBUG_ON(a, b)    (term_bgp_debug_ ## a |= (BGP_DEBUG_ ## b))
 #define TERM_DEBUG_OFF(a, b)   (term_bgp_debug_ ## a &= ~(BGP_DEBUG_ ## b))
 
-#define DEBUG_ON(a, b) \
-    do { \
-       CONF_DEBUG_ON(a, b); \
-       TERM_DEBUG_ON(a, b); \
-    } while (0)
-#define DEBUG_OFF(a, b) \
-    do { \
-       CONF_DEBUG_OFF(a, b); \
-       TERM_DEBUG_OFF(a, b); \
-    } while (0)
+#define DEBUG_ON(a, b)                                                         \
+       do {                                                                   \
+               CONF_DEBUG_ON(a, b);                                           \
+               TERM_DEBUG_ON(a, b);                                           \
+       } while (0)
+#define DEBUG_OFF(a, b)                                                        \
+       do {                                                                   \
+               CONF_DEBUG_OFF(a, b);                                          \
+               TERM_DEBUG_OFF(a, b);                                          \
+       } while (0)
 
 #define BGP_DEBUG(a, b)                (term_bgp_debug_ ## a & BGP_DEBUG_ ## b)
 #define CONF_BGP_DEBUG(a, b)    (conf_bgp_debug_ ## a & BGP_DEBUG_ ## b)
 
 extern const char *bgp_type_str[];
+extern const char *pmsi_tnltype_str[];
 
-extern int bgp_dump_attr (struct attr *, char *, size_t);
+extern int bgp_dump_attr(struct attr *, char *, size_t);
 extern int bgp_debug_peer_updout_enabled(char *host);
 extern const char *bgp_notify_code_str(char);
 extern const char *bgp_notify_subcode_str(char, char);
-extern void bgp_notify_print (struct peer *, struct bgp_notify *, const char *);
+extern void bgp_notify_print(struct peer *, struct bgp_notify *, const char *);
 
 extern const struct message bgp_status_msg[];
 extern int bgp_debug_neighbor_events(struct peer *peer);
 extern int bgp_debug_keepalive(struct peer *peer);
 extern int bgp_debug_update(struct peer *peer, struct prefix *p,
-                            struct update_group *updgrp, unsigned int inbound);
+                           struct update_group *updgrp, unsigned int inbound);
 extern int bgp_debug_bestpath(struct prefix *p);
 extern int bgp_debug_zebra(struct prefix *p);
 
 extern int bgp_debug_count(void);
-extern const char *bgp_debug_rdpfxpath2str (afi_t, safi_t, struct prefix_rd *,
-                                            union prefixconstptr, mpls_label_t *,
-                                            int, u_int32_t, char *, int);
-const char *bgp_notify_admin_message(char *buf, size_t bufsz, u_char *data, size_t datalen);
+extern const char *bgp_debug_rdpfxpath2str(afi_t, safi_t, struct prefix_rd *,
+                                          union prefixconstptr, mpls_label_t *,
+                                          uint32_t, int, uint32_t, char *,
+                                          int);
+const char *bgp_notify_admin_message(char *buf, size_t bufsz, uint8_t *data,
+                                    size_t datalen);
 
 #endif /* _QUAGGA_BGP_DEBUG_H */