]>
Commit | Line | Data |
---|---|---|
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 | 36 | extern int eigrp_read(struct thread *); |
37 | extern int eigrp_write(struct thread *); | |
38 | ||
907b4303 | 39 | extern struct eigrp_packet *eigrp_packet_new(size_t, struct eigrp_neighbor *); |
d62a17ae | 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 *); | |
996c9314 | 44 | extern void eigrp_packet_header_init(int, struct eigrp *, struct stream *, |
d7c0a89a | 45 | uint32_t, uint32_t, uint32_t); |
d62a17ae | 46 | extern void eigrp_packet_checksum(struct eigrp_interface *, struct stream *, |
d7c0a89a | 47 | uint16_t); |
d62a17ae | 48 | |
49 | extern struct eigrp_fifo *eigrp_fifo_new(void); | |
f90f65a2 | 50 | extern struct eigrp_packet *eigrp_fifo_next(struct eigrp_fifo *); |
d62a17ae | 51 | extern struct eigrp_packet *eigrp_fifo_pop(struct eigrp_fifo *); |
f90f65a2 | 52 | extern void eigrp_fifo_push(struct eigrp_fifo *, struct eigrp_packet *); |
d62a17ae | 53 | extern void eigrp_fifo_free(struct eigrp_fifo *); |
54 | extern void eigrp_fifo_reset(struct eigrp_fifo *); | |
55 | ||
56 | extern void eigrp_send_packet_reliably(struct eigrp_neighbor *); | |
57 | ||
58 | extern struct TLV_IPv4_Internal_type *eigrp_read_ipv4_tlv(struct stream *); | |
d7c0a89a QY |
59 | extern uint16_t eigrp_add_internalTLV_to_stream(struct stream *, |
60 | struct eigrp_prefix_entry *); | |
61 | extern uint16_t eigrp_add_authTLV_MD5_to_stream(struct stream *, | |
62 | struct eigrp_interface *); | |
63 | extern uint16_t eigrp_add_authTLV_SHA256_to_stream(struct stream *, | |
64 | struct eigrp_interface *); | |
d62a17ae | 65 | |
66 | extern int eigrp_unack_packet_retrans(struct thread *); | |
67 | extern int eigrp_unack_multicast_packet_retrans(struct thread *); | |
7f57883e DS |
68 | |
69 | /* | |
70 | * untill there is reason to have their own header, these externs are found in | |
71 | * eigrp_hello.c | |
72 | */ | |
01cbe587 | 73 | extern void eigrp_sw_version_initialize(void); |
d7c0a89a | 74 | extern void eigrp_hello_send(struct eigrp_interface *, uint8_t, |
d62a17ae | 75 | struct in_addr *); |
76 | extern void eigrp_hello_send_ack(struct eigrp_neighbor *); | |
77 | extern void eigrp_hello_receive(struct eigrp *, struct ip *, | |
78 | struct eigrp_header *, struct stream *, | |
79 | struct eigrp_interface *, int); | |
80 | extern int eigrp_hello_timer(struct thread *); | |
7f57883e DS |
81 | |
82 | /* | |
83 | * These externs are found in eigrp_update.c | |
84 | */ | |
71b52ef2 | 85 | extern bool eigrp_update_prefix_apply(struct eigrp *eigrp, |
996c9314 | 86 | struct eigrp_interface *ei, int in, |
71b52ef2 | 87 | struct prefix *prefix); |
d62a17ae | 88 | extern void eigrp_update_send(struct eigrp_interface *); |
89 | extern void eigrp_update_receive(struct eigrp *, struct ip *, | |
90 | struct eigrp_header *, struct stream *, | |
91 | struct eigrp_interface *, int); | |
92 | extern void eigrp_update_send_all(struct eigrp *, struct eigrp_interface *); | |
93 | extern void eigrp_update_send_init(struct eigrp_neighbor *); | |
94 | extern void eigrp_update_send_EOT(struct eigrp_neighbor *); | |
7f57883e | 95 | extern int eigrp_update_send_GR_thread(struct thread *); |
d62a17ae | 96 | extern void eigrp_update_send_GR(struct eigrp_neighbor *, enum GR_type, |
97 | struct vty *); | |
98 | extern void eigrp_update_send_interface_GR(struct eigrp_interface *, | |
99 | enum GR_type, struct vty *); | |
100 | extern void eigrp_update_send_process_GR(struct eigrp *, enum GR_type, | |
101 | struct vty *); | |
7f57883e DS |
102 | |
103 | /* | |
104 | * These externs are found in eigrp_query.c | |
105 | */ | |
106 | ||
d62a17ae | 107 | extern void eigrp_send_query(struct eigrp_interface *); |
108 | extern void eigrp_query_receive(struct eigrp *, struct ip *, | |
109 | struct eigrp_header *, struct stream *, | |
110 | struct eigrp_interface *, int); | |
d7c0a89a | 111 | extern uint32_t eigrp_query_send_all(struct eigrp *); |
7f57883e DS |
112 | |
113 | /* | |
114 | * These externs are found in eigrp_reply.c | |
115 | */ | |
d62a17ae | 116 | extern void eigrp_send_reply(struct eigrp_neighbor *, |
117 | struct eigrp_prefix_entry *); | |
118 | extern void eigrp_reply_receive(struct eigrp *, struct ip *, | |
119 | struct eigrp_header *, struct stream *, | |
120 | struct eigrp_interface *, int); | |
7f57883e DS |
121 | |
122 | /* | |
123 | * These externs are found in eigrp_siaquery.c | |
124 | */ | |
d62a17ae | 125 | extern void eigrp_send_siaquery(struct eigrp_neighbor *, |
126 | struct eigrp_prefix_entry *); | |
127 | extern void eigrp_siaquery_receive(struct eigrp *, struct ip *, | |
128 | struct eigrp_header *, struct stream *, | |
129 | struct eigrp_interface *, int); | |
7f57883e DS |
130 | |
131 | /* | |
132 | * These externs are found in eigrp_siareply.c | |
133 | */ | |
d62a17ae | 134 | extern void eigrp_send_siareply(struct eigrp_neighbor *, |
135 | struct eigrp_prefix_entry *); | |
136 | extern void eigrp_siareply_receive(struct eigrp *, struct ip *, | |
137 | struct eigrp_header *, struct stream *, | |
138 | struct eigrp_interface *, int); | |
139 | ||
140 | extern struct TLV_MD5_Authentication_Type *eigrp_authTLV_MD5_new(void); | |
141 | extern void eigrp_authTLV_MD5_free(struct TLV_MD5_Authentication_Type *); | |
142 | extern struct TLV_SHA256_Authentication_Type *eigrp_authTLV_SHA256_new(void); | |
143 | extern void eigrp_authTLV_SHA256_free(struct TLV_SHA256_Authentication_Type *); | |
144 | ||
145 | extern int eigrp_make_md5_digest(struct eigrp_interface *, struct stream *, | |
d7c0a89a | 146 | uint8_t); |
d62a17ae | 147 | extern int eigrp_check_md5_digest(struct stream *, |
148 | struct TLV_MD5_Authentication_Type *, | |
d7c0a89a | 149 | struct eigrp_neighbor *, uint8_t); |
d62a17ae | 150 | extern int eigrp_make_sha256_digest(struct eigrp_interface *, struct stream *, |
d7c0a89a | 151 | uint8_t); |
d62a17ae | 152 | extern int eigrp_check_sha256_digest(struct stream *, |
153 | struct TLV_SHA256_Authentication_Type *, | |
d7c0a89a | 154 | struct eigrp_neighbor *, uint8_t); |
d62a17ae | 155 | |
156 | ||
d62a17ae | 157 | extern void eigrp_IPv4_InternalTLV_free(struct TLV_IPv4_Internal_type *); |
158 | ||
159 | extern struct TLV_Sequence_Type *eigrp_SequenceTLV_new(void); | |
7f57883e DS |
160 | |
161 | extern const struct message eigrp_packet_type_str[]; | |
162 | extern const size_t eigrp_packet_type_str_max; | |
163 | ||
164 | #endif /* _ZEBRA_EIGRP_PACKET_H */ |