]> git.proxmox.com Git - mirror_frr.git/blame - eigrpd/eigrp_dump.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / eigrpd / eigrp_dump.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
7f57883e
DS
2/*
3 * EIGRP Dump Functions and Debbuging.
4 * Copyright (C) 2013-2014
5 * Authors:
6 * Donnie Savage
7 * Jan Janovic
8 * Matej Perina
9 * Peter Orsag
10 * Peter Paluch
7f57883e
DS
11 */
12
13#ifndef _ZEBRA_EIGRPD_DUMP_H_
14#define _ZEBRA_EIGRPD_DUMP_H_
15
16#define EIGRP_TIME_DUMP_SIZE 16
17
18/* general debug flags */
19extern unsigned long term_debug_eigrp;
20#define EIGRP_DEBUG_EVENT 0x01
21#define EIGRP_DEBUG_DETAIL 0x02
22#define EIGRP_DEBUG_TIMERS 0x04
23
24/* neighbor debug flags */
25extern unsigned long term_debug_eigrp_nei;
26#define EIGRP_DEBUG_NEI 0x01
27
28/* packet debug flags */
29extern unsigned long term_debug_eigrp_packet[];
30#define EIGRP_DEBUG_UPDATE 0x01
31#define EIGRP_DEBUG_REQUEST 0x02
32#define EIGRP_DEBUG_QUERY 0x04
33#define EIGRP_DEBUG_REPLY 0x08
34#define EIGRP_DEBUG_HELLO 0x10
35#define EIGRP_DEBUG_PROBE 0x40
36#define EIGRP_DEBUG_ACK 0x80
37#define EIGRP_DEBUG_SIAQUERY 0x200
38#define EIGRP_DEBUG_SIAREPLY 0x400
39#define EIGRP_DEBUG_STUB 0x800
40#define EIGRP_DEBUG_PACKETS_ALL 0xfff
41
42extern unsigned long term_debug_eigrp_transmit;
43#define EIGRP_DEBUG_SEND 0x01
44#define EIGRP_DEBUG_RECV 0x02
45#define EIGRP_DEBUG_SEND_RECV 0x03
46#define EIGRP_DEBUG_PACKET_DETAIL 0x04
47
48/* zebra debug flags */
49extern unsigned long term_debug_eigrp_zebra;
50#define EIGRP_DEBUG_ZEBRA_INTERFACE 0x01
51#define EIGRP_DEBUG_ZEBRA_REDISTRIBUTE 0x02
52#define EIGRP_DEBUG_ZEBRA 0x03
53
54/* Macro for setting debug option. */
55#define CONF_DEBUG_NEI_ON(a, b) conf_debug_eigrp_nei[a] |= (b)
56#define CONF_DEBUG_NEI_OFF(a, b) conf_debug_eigrp_nei[a] &= ~(b)
57#define TERM_DEBUG_NEI_ON(a, b) term_debug_eigrp_nei[a] |= (b)
58#define TERM_DEBUG_NEI_OFF(a, b) term_debug_eigrp_nei[a] &= ~(b)
d62a17ae 59#define DEBUG_NEI_ON(a, b) \
60 do { \
61 CONF_DEBUG_NEI_ON(a, b); \
62 TERM_DEBUG_NEI_ON(a, b); \
63 } while (0)
64#define DEBUG_NEI_OFF(a, b) \
65 do { \
66 CONF_DEBUG_NEI_OFF(a, b); \
67 TERM_DEBUG_NEI_OFF(a, b); \
68 } while (0)
7f57883e
DS
69
70#define CONF_DEBUG_PACKET_ON(a, b) conf_debug_eigrp_packet[a] |= (b)
71#define CONF_DEBUG_PACKET_OFF(a, b) conf_debug_eigrp_packet[a] &= ~(b)
72#define TERM_DEBUG_PACKET_ON(a, b) term_debug_eigrp_packet[a] |= (b)
73#define TERM_DEBUG_PACKET_OFF(a, b) term_debug_eigrp_packet[a] &= ~(b)
d62a17ae 74#define DEBUG_PACKET_ON(a, b) \
75 do { \
76 CONF_DEBUG_PACKET_ON(a, b); \
77 TERM_DEBUG_PACKET_ON(a, b); \
78 } while (0)
79#define DEBUG_PACKET_OFF(a, b) \
80 do { \
81 CONF_DEBUG_PACKET_OFF(a, b); \
82 TERM_DEBUG_PACKET_OFF(a, b); \
83 } while (0)
7f57883e
DS
84
85#define CONF_DEBUG_TRANSMIT_ON(a, b) conf_debug_eigrp_transmit |= (b)
86#define CONF_DEBUG_TRANSMIT_OFF(a, b) conf_debug_eigrp_transmit &= ~(b)
87#define TERM_DEBUG_TRANSMIT_ON(a, b) term_debug_eigrp_transmit |= (b)
88#define TERM_DEBUG_TRANSMIT_OFF(a, b) term_debug_eigrp_transmit &= ~(b)
d62a17ae 89#define DEBUG_TRANSMIT_ON(a, b) \
90 do { \
91 CONF_DEBUG_TRANSMIT_ON(a, b); \
92 TERM_DEBUG_TRANSMIT_ON(a, b); \
93 } while (0)
94#define DEBUG_TRANSMIT_OFF(a, b) \
95 do { \
96 CONF_DEBUG_TRANSMIT_OFF(a, b); \
97 TERM_DEBUG_TRANSMIT_OFF(a, b); \
98 } while (0)
7f57883e
DS
99
100#define CONF_DEBUG_ON(a, b) conf_debug_eigrp_ ## a |= (EIGRP_DEBUG_ ## b)
101#define CONF_DEBUG_OFF(a, b) conf_debug_eigrp_ ## a &= ~(EIGRP_DEBUG_ ## b)
102#define TERM_DEBUG_ON(a, b) term_debug_eigrp_ ## a |= (EIGRP_DEBUG_ ## b)
103#define TERM_DEBUG_OFF(a, b) term_debug_eigrp_ ## a &= ~(EIGRP_DEBUG_ ## b)
d62a17ae 104#define DEBUG_ON(a, b) \
105 do { \
106 CONF_DEBUG_ON(a, b); \
107 TERM_DEBUG_ON(a, b); \
108 } while (0)
109#define DEBUG_OFF(a, b) \
110 do { \
111 CONF_DEBUG_OFF(a, b); \
112 TERM_DEBUG_OFF(a, b); \
113 } while (0)
7f57883e
DS
114
115/* Macro for checking debug option. */
d62a17ae 116#define IS_DEBUG_EIGRP_PACKET(a, b) \
117 (term_debug_eigrp_packet[a] & EIGRP_DEBUG_##b)
118#define IS_DEBUG_EIGRP_TRANSMIT(a, b) \
119 (term_debug_eigrp_transmit & EIGRP_DEBUG_##b)
120#define IS_DEBUG_EIGRP_NEI(a, b) (term_debug_eigrp_nei & EIGRP_DEBUG_##b)
121#define IS_DEBUG_EIGRP(a, b) (term_debug_eigrp & EIGRP_DEBUG_##b)
7f57883e
DS
122#define IS_DEBUG_EIGRP_EVENT IS_DEBUG_EIGRP(event, EVENT)
123
7f57883e 124/* Prototypes. */
d62a17ae 125extern const char *eigrp_if_name_string(struct eigrp_interface *);
7f57883e
DS
126
127extern void eigrp_ip_header_dump(struct ip *);
128extern void eigrp_header_dump(struct eigrp_header *);
129
d62a17ae 130extern void show_ip_eigrp_interface_header(struct vty *, struct eigrp *);
131extern void show_ip_eigrp_neighbor_header(struct vty *, struct eigrp *);
132extern void show_ip_eigrp_topology_header(struct vty *, struct eigrp *);
133extern void show_ip_eigrp_interface_detail(struct vty *, struct eigrp *,
134 struct eigrp_interface *);
135extern void show_ip_eigrp_interface_sub(struct vty *, struct eigrp *,
136 struct eigrp_interface *);
137extern void show_ip_eigrp_neighbor_sub(struct vty *, struct eigrp_neighbor *,
138 int);
dc4accdd
DS
139extern void show_ip_eigrp_prefix_descriptor(struct vty *vty,
140 struct eigrp_prefix_descriptor *tn);
141extern void show_ip_eigrp_route_descriptor(struct vty *vty, struct eigrp *eigrp,
142 struct eigrp_route_descriptor *ne,
143 bool *first);
d62a17ae 144
145extern void eigrp_debug_init(void);
7f57883e
DS
146
147#endif /* _ZEBRA_EIGRPD_DUMP_H_ */