On a specified interface return the single
neighbor on that interface.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
return 0;
}
+/*
+ * Find the *one* interface out
+ * this interface. If more than
+ * one return NULL
+ */
+struct pim_neighbor *
+pim_neighbor_find_if (struct interface *ifp)
+{
+ struct pim_interface *pim_ifp = ifp->info;
+
+ if (pim_ifp->pim_neighbor_list->count != 1)
+ return NULL;
+
+ return listnode_head (pim_ifp->pim_neighbor_list);
+}
+
struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
struct in_addr source_addr,
pim_hello_options hello_options,
struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
struct in_addr source_addr);
+struct pim_neighbor *pim_neighbor_find_if (struct interface *ifp);
+
#define PIM_NEIGHBOR_SEND_DELAY 0
#define PIM_NEIGHBOR_SEND_NOW 1