]> git.proxmox.com Git - mirror_frr.git/blame - eigrpd/eigrp_packet.h
Merge pull request #7676 from ton31337/fix/show_ip_bgp_summary_description_truncate
[mirror_frr.git] / eigrpd / eigrp_packet.h
CommitLineData
7f57883e
DS
1/*
2 * EIGRP General Sending and Receiving of EIGRP Packets.
3 * Copyright (C) 2013-2016
4 * Authors:
5 * Donnie Savage
6 * Jan Janovic
7 * Matej Perina
8 * Peter Orsag
9 * Peter Paluch
10 * Frantisek Gazo
11 * Tomas Hvorkovy
12 * Martin Kontsek
13 * Lukas Koribsky
14 *
15 * This file is part of GNU Zebra.
16 *
17 * GNU Zebra is free software; you can redistribute it and/or modify it
18 * under the terms of the GNU General Public License as published by the
19 * Free Software Foundation; either version 2, or (at your option) any
20 * later version.
21 *
22 * GNU Zebra is distributed in the hope that it will be useful, but
23 * WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * General Public License for more details.
26 *
896014f4
DL
27 * You should have received a copy of the GNU General Public License along
28 * with this program; see the file COPYING; if not, write to the Free Software
29 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
7f57883e
DS
30 */
31
32#ifndef _ZEBRA_EIGRP_PACKET_H
33#define _ZEBRA_EIGRP_PACKET_H
34
35/*Prototypes*/
d62a17ae 36extern int eigrp_read(struct thread *);
37extern int eigrp_write(struct thread *);
38
8e699447
DS
39extern struct eigrp_packet *eigrp_packet_new(size_t size,
40 struct eigrp_neighbor *nbr);
41extern struct eigrp_packet *eigrp_packet_duplicate(struct eigrp_packet *old,
42 struct eigrp_neighbor *nbr);
43extern void eigrp_packet_free(struct eigrp_packet *ep);
44extern void eigrp_packet_delete(struct eigrp_interface *ei);
45extern void eigrp_packet_header_init(int type, struct eigrp *eigrp,
46 struct stream *s, uint32_t flags,
47 uint32_t sequence, uint32_t ack);
48extern void eigrp_packet_checksum(struct eigrp_interface *ei, struct stream *s,
49 uint16_t length);
d62a17ae 50
51extern struct eigrp_fifo *eigrp_fifo_new(void);
8e699447
DS
52extern struct eigrp_packet *eigrp_fifo_next(struct eigrp_fifo *fifo);
53extern struct eigrp_packet *eigrp_fifo_pop(struct eigrp_fifo *fifo);
54extern void eigrp_fifo_push(struct eigrp_fifo *fifo, struct eigrp_packet *ep);
55extern void eigrp_fifo_free(struct eigrp_fifo *fifo);
56extern void eigrp_fifo_reset(struct eigrp_fifo *fifo);
d62a17ae 57
8e699447 58extern void eigrp_send_packet_reliably(struct eigrp_neighbor *nbr);
d62a17ae 59
8e699447 60extern struct TLV_IPv4_Internal_type *eigrp_read_ipv4_tlv(struct stream *s);
dc4accdd
DS
61extern uint16_t
62eigrp_add_internalTLV_to_stream(struct stream *s,
63 struct eigrp_prefix_descriptor *pe);
8e699447
DS
64extern uint16_t eigrp_add_authTLV_MD5_to_stream(struct stream *s,
65 struct eigrp_interface *ei);
66extern uint16_t eigrp_add_authTLV_SHA256_to_stream(struct stream *s,
67 struct eigrp_interface *ei);
d62a17ae 68
8e699447
DS
69extern int eigrp_unack_packet_retrans(struct thread *thread);
70extern int eigrp_unack_multicast_packet_retrans(struct thread *thread);
7f57883e
DS
71
72/*
73 * untill there is reason to have their own header, these externs are found in
74 * eigrp_hello.c
75 */
01cbe587 76extern void eigrp_sw_version_initialize(void);
8e699447
DS
77extern void eigrp_hello_send(struct eigrp_interface *ei, uint8_t flags,
78 struct in_addr *nbr_addr);
79extern void eigrp_hello_send_ack(struct eigrp_neighbor *nbr);
80extern void eigrp_hello_receive(struct eigrp *eigrp, struct ip *iph,
81 struct eigrp_header *eigrph, struct stream *s,
82 struct eigrp_interface *ei, int size);
83extern int eigrp_hello_timer(struct thread *thread);
7f57883e
DS
84
85/*
86 * These externs are found in eigrp_update.c
87 */
71b52ef2 88extern bool eigrp_update_prefix_apply(struct eigrp *eigrp,
996c9314 89 struct eigrp_interface *ei, int in,
71b52ef2 90 struct prefix *prefix);
8e699447
DS
91extern void eigrp_update_send(struct eigrp_interface *ei);
92extern void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
93 struct eigrp_header *eigrph, struct stream *s,
94 struct eigrp_interface *ei, int size);
95extern void eigrp_update_send_all(struct eigrp *eigrp,
96 struct eigrp_interface *exception);
97extern void eigrp_update_send_init(struct eigrp_neighbor *nbr);
98extern void eigrp_update_send_EOT(struct eigrp_neighbor *nbr);
99extern int eigrp_update_send_GR_thread(struct thread *thread);
100extern void eigrp_update_send_GR(struct eigrp_neighbor *nbr,
101 enum GR_type gr_type, struct vty *vty);
102extern void eigrp_update_send_interface_GR(struct eigrp_interface *ei,
103 enum GR_type gr_type,
104 struct vty *vty);
105extern void eigrp_update_send_process_GR(struct eigrp *eigrp,
106 enum GR_type gr_type, struct vty *vty);
7f57883e
DS
107
108/*
109 * These externs are found in eigrp_query.c
110 */
111
8e699447
DS
112extern void eigrp_send_query(struct eigrp_interface *ei);
113extern void eigrp_query_receive(struct eigrp *eigrp, struct ip *iph,
114 struct eigrp_header *eigrph, struct stream *s,
115 struct eigrp_interface *ei, int size);
116extern uint32_t eigrp_query_send_all(struct eigrp *eigrp);
7f57883e
DS
117
118/*
119 * These externs are found in eigrp_reply.c
120 */
8e699447 121extern void eigrp_send_reply(struct eigrp_neighbor *nbr,
dc4accdd 122 struct eigrp_prefix_descriptor *pe);
8e699447
DS
123extern void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
124 struct eigrp_header *eigrph, struct stream *s,
125 struct eigrp_interface *ei, int size);
7f57883e
DS
126
127/*
128 * These externs are found in eigrp_siaquery.c
129 */
8e699447 130extern void eigrp_send_siaquery(struct eigrp_neighbor *nbr,
dc4accdd 131 struct eigrp_prefix_descriptor *pe);
8e699447
DS
132extern void eigrp_siaquery_receive(struct eigrp *eigrp, struct ip *iph,
133 struct eigrp_header *eigrph,
134 struct stream *s, struct eigrp_interface *ei,
135 int size);
7f57883e
DS
136
137/*
138 * These externs are found in eigrp_siareply.c
139 */
8e699447 140extern void eigrp_send_siareply(struct eigrp_neighbor *nbr,
dc4accdd 141 struct eigrp_prefix_descriptor *pe);
8e699447
DS
142extern void eigrp_siareply_receive(struct eigrp *eigrp, struct ip *iph,
143 struct eigrp_header *eigrph,
144 struct stream *s, struct eigrp_interface *ei,
145 int size);
d62a17ae 146
147extern struct TLV_MD5_Authentication_Type *eigrp_authTLV_MD5_new(void);
8e699447 148extern void eigrp_authTLV_MD5_free(struct TLV_MD5_Authentication_Type *authTLV);
d62a17ae 149extern struct TLV_SHA256_Authentication_Type *eigrp_authTLV_SHA256_new(void);
8e699447
DS
150extern void
151eigrp_authTLV_SHA256_free(struct TLV_SHA256_Authentication_Type *authTLV);
152
153extern int eigrp_make_md5_digest(struct eigrp_interface *ei, struct stream *s,
154 uint8_t flags);
155extern int eigrp_check_md5_digest(struct stream *s,
156 struct TLV_MD5_Authentication_Type *authTLV,
157 struct eigrp_neighbor *nbr, uint8_t flags);
158extern int eigrp_make_sha256_digest(struct eigrp_interface *ei,
159 struct stream *s, uint8_t flags);
160extern int
161eigrp_check_sha256_digest(struct stream *s,
162 struct TLV_SHA256_Authentication_Type *authTLV,
163 struct eigrp_neighbor *nbr, uint8_t flags);
164
165
166extern void
167eigrp_IPv4_InternalTLV_free(struct TLV_IPv4_Internal_type *IPv4_InternalTLV);
d62a17ae 168
169extern struct TLV_Sequence_Type *eigrp_SequenceTLV_new(void);
7f57883e
DS
170
171extern const struct message eigrp_packet_type_str[];
172extern const size_t eigrp_packet_type_str_max;
173
174#endif /* _ZEBRA_EIGRP_PACKET_H */