2 * Copyright (C) 1999 Yasuhiro Ohara
4 * This file is part of GNU Zebra.
6 * GNU Zebra is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Zebra; see the file COPYING. If not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef OSPF6_NEIGHBOR_H
23 #define OSPF6_NEIGHBOR_H
25 /* Neighbor structure */
28 /* Neighbor Router ID String */
31 /* OSPFv3 Interface this neighbor belongs to */
32 struct ospf6_interface
*ospf6_interface
;
36 struct timeval last_changed
;
38 /* Neighbor Router ID */
41 /* Router Priority of this neighbor */
50 /* Link-LSA's options field */
53 /* IPaddr of I/F on our side link */
54 struct in6_addr hisaddr
;
57 struct ospf6_lsdb
*summary_list
;
58 struct ospf6_lsdb
*request_list
;
59 struct ospf6_lsdb
*retrans_list
;
61 /* For Database Exchange */
63 u_int32_t dbdesc_seqnum
;
64 struct ospf6_dbdesc
*dbdesc_previous
;
66 /* last received DD , including OSPF capability of this neighbor */
67 struct ospf6_dbdesc last_dd
;
69 /* LSAs to retransmit to this neighbor */
72 /* placeholder for DbDesc */
73 struct iovec dbdesc_last_send
[1024];
75 struct thread
*inactivity_timer
;
78 struct thread
*thread_send_dbdesc
;
79 struct thread
*thread_rxmt_dbdesc
;
81 struct ospf6_lsdb
*dbdesc_list
;
84 struct thread
*thread_send_lsreq
;
85 struct thread
*thread_rxmt_lsreq
;
88 struct thread
*send_update
;
89 struct thread
*thread_send_update
;
90 struct thread
*thread_rxmt_update
;
93 u_int message_send
[OSPF6_MESSAGE_TYPE_MAX
];
94 u_int message_receive
[OSPF6_MESSAGE_TYPE_MAX
];
95 u_int lsa_send
[OSPF6_MESSAGE_TYPE_MAX
];
96 u_int lsa_receive
[OSPF6_MESSAGE_TYPE_MAX
];
98 u_int ospf6_stat_state_changed
;
99 u_int ospf6_stat_seqnum_mismatch
;
100 u_int ospf6_stat_bad_lsreq
;
101 u_int ospf6_stat_oneway_received
;
102 u_int ospf6_stat_inactivity_timer
;
103 u_int ospf6_stat_dr_election
;
104 u_int ospf6_stat_retrans_dbdesc
;
105 u_int ospf6_stat_retrans_lsreq
;
106 u_int ospf6_stat_retrans_lsupdate
;
107 u_int ospf6_stat_received_lsa
;
108 u_int ospf6_stat_received_lsupdate
;
110 struct timeval tv_last_hello_received
;
113 extern char *ospf6_neighbor_state_string
[];
116 /* Function Prototypes */
118 ospf6_neighbor_last_dbdesc_release (struct thread
*);
121 ospf6_neighbor_lslist_clear (struct ospf6_neighbor
*);
124 ospf6_neighbor_summary_add (struct ospf6_lsa
*, struct ospf6_neighbor
*);
126 ospf6_neighbor_summary_remove (struct ospf6_lsa
*, struct ospf6_neighbor
*);
129 ospf6_neighbor_request_add (struct ospf6_lsa
*, struct ospf6_neighbor
*);
131 ospf6_neighbor_request_remove (struct ospf6_lsa
*, struct ospf6_neighbor
*);
134 ospf6_neighbor_retrans_add (struct ospf6_lsa
*, struct ospf6_neighbor
*);
136 ospf6_neighbor_retrans_remove (struct ospf6_lsa
*, struct ospf6_neighbor
*);
139 ospf6_neighbor_dbdesc_add (struct ospf6_lsa
*lsa
,
140 struct ospf6_neighbor
*nei
);
142 ospf6_neighbor_dbdesc_remove (struct ospf6_lsa
*lsa
,
143 struct ospf6_neighbor
*nei
);
146 ospf6_neighbor_dbex_init (struct ospf6_neighbor
*nei
);
149 ospf6_neighbor_thread_cancel_all (struct ospf6_neighbor
*);
151 struct ospf6_neighbor
*
152 ospf6_neighbor_create (u_int32_t
, struct ospf6_interface
*);
154 ospf6_neighbor_delete (struct ospf6_neighbor
*);
155 struct ospf6_neighbor
*
156 ospf6_neighbor_lookup (u_int32_t
, struct ospf6_interface
*);
158 void ospf6_neighbor_init ();
160 #endif /* OSPF6_NEIGHBOR_H */