-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheigrp_neighbor.h
103 lines (80 loc) · 2.99 KB
/
eigrp_neighbor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* EIGRP Neighbor Handling.
* Copyright (C) 2013-2016
* Authors:
* Donnie Savage
* Jan Janovic
* Matej Perina
* Peter Orsag
* Peter Paluch
* Frantisek Gazo
* Tomas Hvorkovy
* Martin Kontsek
* Lukas Koribsky
*
*/
#ifndef _ZEBRA_EIGRP_NEIGHBOR_H
#define _ZEBRA_EIGRP_NEIGHBOR_H
/* Neighbor Data Structure */
typedef struct eigrp_neighbor {
uint8_t os_rel_major; // system version - just for show
uint8_t os_rel_minor; // system version - just for show
/* TLV decoders for this peer - version dependent */
uint8_t tlv_rel_major; // eigrp version - tells us what TLV format to use
uint8_t tlv_rel_minor; // eigrp version - tells us what TLV format to use
eigrp_tlv_decoder_t tlv_decoder;
eigrp_tlv_encoder_t tlv_encoder;
uint8_t K1;
uint8_t K2;
uint8_t K3;
uint8_t K4;
uint8_t K5;
uint8_t K6;
/* This neighbor's parent eigrp interface. */
eigrp_interface_t *ei;
/* EIGRP neighbor Information */
uint8_t state; /* neigbor status. */
uint32_t recv_sequence_number; /* Last received sequence Number. */
uint32_t init_sequence_number;
/*If packet is unacknowledged, we try to send it again 16 times*/
uint8_t retrans_counter;
eigrp_addr_t src; /* Neighbor Src address. */
/* Timer values. */
uint16_t v_holddown;
/* Events. */
struct event *t_holddown;
struct event *t_nbr_send_gr; /* event for sending multiple GR packet
chunks */
eigrp_packet_queue_t *retrans_queue;
eigrp_packet_queue_t *multicast_queue;
uint32_t crypt_seqnum; /* Cryptographic Sequence Number. */
/* prefixes not received from neighbor during Graceful restart */
struct list *nbr_gr_prefixes;
/* prefixes not yet send to neighbor during Graceful restart */
struct list *nbr_gr_prefixes_send;
/* if packet is first or last during Graceful restart */
enum Packet_part_type nbr_gr_packet_type;
} eigrp_neighbor_t;
/* Prototypes */
extern eigrp_neighbor_t *eigrp_nbr_lookup(eigrp_interface_t *, struct eigrp_header *,
eigrp_addr_t *);
extern eigrp_neighbor_t *eigrp_nbr_create(eigrp_interface_t *, eigrp_addr_t *);
extern void eigrp_nbr_delete(eigrp_neighbor_t *neigh);
extern void holddown_timer_expired(struct event *event);
extern int eigrp_neighborship_check(eigrp_neighbor_t *,
struct TLV_Parameter_Type *tlv);
extern void eigrp_nbr_state_update(eigrp_neighbor_t *);
extern void eigrp_nbr_state_set(eigrp_neighbor_t *, uint8_t state);
extern uint8_t eigrp_nbr_state_get(eigrp_neighbor_t *);
extern int eigrp_nbr_count_get(eigrp_instance_t *);
extern const char *eigrp_nbr_state_str(eigrp_neighbor_t *);
extern eigrp_neighbor_t *eigrp_nbr_lookup_by_addr(eigrp_interface_t *,
struct in_addr *);
extern eigrp_neighbor_t *eigrp_nbr_lookup_by_addr_process(eigrp_instance_t *,
struct in_addr addr);
extern void eigrp_nbr_hard_restart(eigrp_instance_t *, eigrp_neighbor_t *,
struct vty *);
extern int eigrp_nbr_split_horizon_check(eigrp_route_descriptor_t *,
eigrp_interface_t *);
#endif /* _ZEBRA_EIGRP_NEIGHBOR_H */