summaryrefslogtreecommitdiff
path: root/ripd/rip_interface.c
diff options
context:
space:
mode:
authorpaul <paul>2002-12-13 21:07:36 +0000
committerpaul <paul>2002-12-13 21:07:36 +0000
commit00df0c1e80811f3cf5eca0b28e720bf1bcc84a53 (patch)
treed03bbabe82d8526b1f5472d38a59ed24f9c8c42b /ripd/rip_interface.c
parent8bd9c714365883e405af7c7c4257e404a1053469 (diff)
[zebra 14631] Generic PtP and RFC3021 interface addressing support
Diffstat (limited to 'ripd/rip_interface.c')
-rw-r--r--ripd/rip_interface.c100
1 files changed, 0 insertions, 100 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index bdfca575..9432717e 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -391,106 +391,6 @@ rip_if_ipv4_address_check (struct interface *ifp)
return count;
}
-
-
-
-
-/* Does this address belongs to me ? */
-int
-if_check_address (struct in_addr addr)
-{
- listnode node;
-
- for (node = listhead (iflist); node; nextnode (node))
- {
- listnode cnode;
- struct interface *ifp;
-
- ifp = getdata (node);
-
- for (cnode = listhead (ifp->connected); cnode; nextnode (cnode))
- {
- struct connected *connected;
- struct prefix_ipv4 *p;
-
- connected = getdata (cnode);
- p = (struct prefix_ipv4 *) connected->address;
-
- if (p->family != AF_INET)
- continue;
-
- if (IPV4_ADDR_CMP (&p->prefix, &addr) == 0)
- return 1;
- }
- }
- return 0;
-}
-
-/* is this address from a valid neighbor? (RFC2453 - Sec. 3.9.2) */
-int
-if_valid_neighbor (struct in_addr addr)
-{
- listnode node;
- struct connected *connected = NULL;
- struct prefix_ipv4 *p;
-
- for (node = listhead (iflist); node; nextnode (node))
- {
- listnode cnode;
- struct interface *ifp;
-
- ifp = getdata (node);
-
- for (cnode = listhead (ifp->connected); cnode; nextnode (cnode))
- {
- struct prefix *pxn = NULL; /* Prefix of the neighbor */
- struct prefix *pxc = NULL; /* Prefix of the connected network */
-
- connected = getdata (cnode);
-
- if (if_is_pointopoint (ifp))
- {
- p = (struct prefix_ipv4 *) connected->address;
-
- if (p && p->family == AF_INET)
- {
- if (IPV4_ADDR_SAME (&p->prefix, &addr))
- return 1;
-
- p = (struct prefix_ipv4 *) connected->destination;
- if (p && IPV4_ADDR_SAME (&p->prefix, &addr))
- return 1;
- }
- }
- else
- {
- p = (struct prefix_ipv4 *) connected->address;
-
- if (p->family != AF_INET)
- continue;
-
- pxn = prefix_new();
- pxn->family = AF_INET;
- pxn->prefixlen = 32;
- pxn->u.prefix4 = addr;
-
- pxc = prefix_new();
- prefix_copy(pxc, (struct prefix *) p);
- apply_mask(pxc);
-
- if (prefix_match (pxc, pxn))
- {
- prefix_free (pxn);
- prefix_free (pxc);
- return 1;
- }
- prefix_free(pxc);
- prefix_free(pxn);
- }
- }
- }
- return 0;
-}
/* Inteface link down message processing. */
int