2 * EIGRP General Sending and Receiving of EIGRP Packets.
3 * Copyright (C) 2013-2016
15 * This file is part of GNU Zebra.
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
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.
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
32 #ifndef _ZEBRA_EIGRP_PACKET_H
33 #define _ZEBRA_EIGRP_PACKET_H
36 extern int eigrp_read(struct thread
*);
37 extern int eigrp_write(struct thread
*);
39 extern struct eigrp_packet
*eigrp_packet_new(size_t, struct eigrp_neighbor
*);
40 extern struct eigrp_packet
*eigrp_packet_duplicate(struct eigrp_packet
*,
41 struct eigrp_neighbor
*);
42 extern void eigrp_packet_free(struct eigrp_packet
*);
43 extern void eigrp_packet_delete(struct eigrp_interface
*);
44 extern void eigrp_packet_header_init(int, struct eigrp
*,
45 struct stream
*, u_int32_t
, u_int32_t
,
47 extern void eigrp_packet_checksum(struct eigrp_interface
*, struct stream
*,
50 extern struct eigrp_fifo
*eigrp_fifo_new(void);
51 extern struct eigrp_packet
*eigrp_fifo_next(struct eigrp_fifo
*);
52 extern struct eigrp_packet
*eigrp_fifo_pop(struct eigrp_fifo
*);
53 extern void eigrp_fifo_push(struct eigrp_fifo
*, struct eigrp_packet
*);
54 extern void eigrp_fifo_free(struct eigrp_fifo
*);
55 extern void eigrp_fifo_reset(struct eigrp_fifo
*);
57 extern void eigrp_send_packet_reliably(struct eigrp_neighbor
*);
59 extern struct TLV_IPv4_Internal_type
*eigrp_read_ipv4_tlv(struct stream
*);
60 extern u_int16_t
eigrp_add_internalTLV_to_stream(struct stream
*,
61 struct eigrp_prefix_entry
*);
62 extern u_int16_t
eigrp_add_authTLV_MD5_to_stream(struct stream
*,
63 struct eigrp_interface
*);
64 extern u_int16_t
eigrp_add_authTLV_SHA256_to_stream(struct stream
*,
65 struct eigrp_interface
*);
67 extern int eigrp_unack_packet_retrans(struct thread
*);
68 extern int eigrp_unack_multicast_packet_retrans(struct thread
*);
71 * untill there is reason to have their own header, these externs are found in
74 extern void eigrp_sw_version_initialize(void);
75 extern void eigrp_hello_send(struct eigrp_interface
*, u_char
,
77 extern void eigrp_hello_send_ack(struct eigrp_neighbor
*);
78 extern void eigrp_hello_receive(struct eigrp
*, struct ip
*,
79 struct eigrp_header
*, struct stream
*,
80 struct eigrp_interface
*, int);
81 extern int eigrp_hello_timer(struct thread
*);
84 * These externs are found in eigrp_update.c
86 extern bool eigrp_update_prefix_apply(struct eigrp
*eigrp
,
87 struct eigrp_interface
*ei
,
89 struct prefix
*prefix
);
90 extern void eigrp_update_send(struct eigrp_interface
*);
91 extern void eigrp_update_receive(struct eigrp
*, struct ip
*,
92 struct eigrp_header
*, struct stream
*,
93 struct eigrp_interface
*, int);
94 extern void eigrp_update_send_all(struct eigrp
*, struct eigrp_interface
*);
95 extern void eigrp_update_send_init(struct eigrp_neighbor
*);
96 extern void eigrp_update_send_EOT(struct eigrp_neighbor
*);
97 extern int eigrp_update_send_GR_thread(struct thread
*);
98 extern void eigrp_update_send_GR(struct eigrp_neighbor
*, enum GR_type
,
100 extern void eigrp_update_send_interface_GR(struct eigrp_interface
*,
101 enum GR_type
, struct vty
*);
102 extern void eigrp_update_send_process_GR(struct eigrp
*, enum GR_type
,
106 * These externs are found in eigrp_query.c
109 extern void eigrp_send_query(struct eigrp_interface
*);
110 extern void eigrp_query_receive(struct eigrp
*, struct ip
*,
111 struct eigrp_header
*, struct stream
*,
112 struct eigrp_interface
*, int);
113 extern u_int32_t
eigrp_query_send_all(struct eigrp
*);
116 * These externs are found in eigrp_reply.c
118 extern void eigrp_send_reply(struct eigrp_neighbor
*,
119 struct eigrp_prefix_entry
*);
120 extern void eigrp_reply_receive(struct eigrp
*, struct ip
*,
121 struct eigrp_header
*, struct stream
*,
122 struct eigrp_interface
*, int);
125 * These externs are found in eigrp_siaquery.c
127 extern void eigrp_send_siaquery(struct eigrp_neighbor
*,
128 struct eigrp_prefix_entry
*);
129 extern void eigrp_siaquery_receive(struct eigrp
*, struct ip
*,
130 struct eigrp_header
*, struct stream
*,
131 struct eigrp_interface
*, int);
134 * These externs are found in eigrp_siareply.c
136 extern void eigrp_send_siareply(struct eigrp_neighbor
*,
137 struct eigrp_prefix_entry
*);
138 extern void eigrp_siareply_receive(struct eigrp
*, struct ip
*,
139 struct eigrp_header
*, struct stream
*,
140 struct eigrp_interface
*, int);
142 extern struct TLV_MD5_Authentication_Type
*eigrp_authTLV_MD5_new(void);
143 extern void eigrp_authTLV_MD5_free(struct TLV_MD5_Authentication_Type
*);
144 extern struct TLV_SHA256_Authentication_Type
*eigrp_authTLV_SHA256_new(void);
145 extern void eigrp_authTLV_SHA256_free(struct TLV_SHA256_Authentication_Type
*);
147 extern int eigrp_make_md5_digest(struct eigrp_interface
*, struct stream
*,
149 extern int eigrp_check_md5_digest(struct stream
*,
150 struct TLV_MD5_Authentication_Type
*,
151 struct eigrp_neighbor
*, u_char
);
152 extern int eigrp_make_sha256_digest(struct eigrp_interface
*, struct stream
*,
154 extern int eigrp_check_sha256_digest(struct stream
*,
155 struct TLV_SHA256_Authentication_Type
*,
156 struct eigrp_neighbor
*, u_char
);
159 extern void eigrp_IPv4_InternalTLV_free(struct TLV_IPv4_Internal_type
*);
161 extern struct TLV_Sequence_Type
*eigrp_SequenceTLV_new(void);
163 extern const struct message eigrp_packet_type_str
[];
164 extern const size_t eigrp_packet_type_str_max
;
166 #endif /* _ZEBRA_EIGRP_PACKET_H */