summaryrefslogtreecommitdiff
path: root/ospfd/ospf_neighbor.h
diff options
context:
space:
mode:
authorpaul <paul>2004-05-05 15:27:15 +0000
committerpaul <paul>2004-05-05 15:27:15 +0000
commitd3f0d6210119ff520c286c89bd614838cc6cbf8e (patch)
treedce792feac0f39ebeb463e41224f419258e6a81d /ospfd/ospf_neighbor.h
parent239389ba30e21de22e6c2dd708f44ece11b5807a (diff)
2004-05-05 Paul Jakma <paul@dishone.st>
* ospf_packet.c: (ospf_associate_packet_vl) cleanup, move some of the checks up to ospf_read, return either a virtual link oi, or NULL. (ospf_read) Cleanup, make it responsible for checks. Remove the nbr lookup - moved to ospf_neighbor. Adjust all nbr lookups to use new wrappers exported by ospf_neighbor. * ospf_neighbor.h: Add ospf_neigbour_get and ospf_nbr_lookup. * ospf_neighbor.c: (ospf_neigbour_get) Index ospf_interface neighbour table by router-id for virtual-link ospf_interfaces, not by peer_addr (which breaks for asymmetric vlinks) (ospf_nbr_lookup) add a wrapper for nbr lookups to deal with above.
Diffstat (limited to 'ospfd/ospf_neighbor.h')
-rw-r--r--ospfd/ospf_neighbor.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/ospfd/ospf_neighbor.h b/ospfd/ospf_neighbor.h
index f7b18742..f91ef3f9 100644
--- a/ospfd/ospf_neighbor.h
+++ b/ospfd/ospf_neighbor.h
@@ -23,6 +23,8 @@
#ifndef _ZEBRA_OSPF_NEIGHBOR_H
#define _ZEBRA_OSPF_NEIGHBOR_H
+#include <ospfd/ospf_packet.h>
+
/* Neighbor Data Structure */
struct ospf_neighbor
{
@@ -93,10 +95,16 @@ void ospf_nbr_free (struct ospf_neighbor *);
void ospf_nbr_delete (struct ospf_neighbor *);
int ospf_nbr_bidirectional (struct in_addr *, struct in_addr *, int);
void ospf_nbr_add_self (struct ospf_interface *);
-int ospf_nbr_count (struct route_table *, int);
+int ospf_nbr_count (struct ospf_interface *, int);
#ifdef HAVE_OPAQUE_LSA
-int ospf_opaque_capable_nbr_count (struct route_table *nbrs, int status);
+int ospf_nbr_count_opaque_capable (struct ospf_interface *);
#endif /* HAVE_OPAQUE_LSA */
+struct ospf_neighbor *ospf_nbr_get (struct ospf_interface *,
+ struct ospf_header *,
+ struct ip *,
+ struct prefix *);
+struct ospf_neighbor *ospf_nbr_lookup (struct ospf_interface *, struct ip *,
+ struct ospf_header *);
struct ospf_neighbor *ospf_nbr_lookup_by_addr (struct route_table *,
struct in_addr *);
struct ospf_neighbor *ospf_nbr_lookup_by_routerid (struct route_table *,