summaryrefslogtreecommitdiff
path: root/lib/if.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/if.h')
-rw-r--r--lib/if.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/if.h b/lib/if.h
index 603c9c3780..e3ec278f9f 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -383,16 +383,12 @@ struct connected {
/* N.B. the ZEBRA_IFA_PEER flag should be set if and only if
a peer address has been configured. If this flag is set,
the destination field must contain the peer address.
- Otherwise, if this flag is not set, the destination address
- will either contain a broadcast address or be NULL.
*/
/* Address of connected network. */
struct prefix *address;
- /* Peer or Broadcast address, depending on whether ZEBRA_IFA_PEER is
- set.
- Note: destination may be NULL if ZEBRA_IFA_PEER is not set. */
+ /* Peer address, if ZEBRA_IFA_PEER is set, otherwise NULL */
struct prefix *destination;
/* Label for Linux 2.2.X and upper. */
@@ -478,7 +474,9 @@ extern int if_cmp_name_func(const char *p1, const char *p2);
*/
extern void if_update_to_new_vrf(struct interface *, vrf_id_t vrf_id);
extern struct interface *if_create(const char *name, vrf_id_t vrf_id);
+extern struct interface *if_create_ifindex(ifindex_t ifindex, vrf_id_t vrf_id);
extern struct interface *if_lookup_by_index(ifindex_t, vrf_id_t vrf_id);
+extern struct interface *if_lookup_by_index_all_vrf(ifindex_t);
extern struct interface *if_lookup_exact_address(void *matchaddr, int family,
vrf_id_t vrf_id);
extern struct connected *if_lookup_address(void *matchaddr, int family,
@@ -493,6 +491,7 @@ size_t if_lookup_by_hwaddr(const uint8_t *hw_addr, size_t addrsz,
extern struct interface *if_lookup_by_name_all_vrf(const char *ifname);
extern struct interface *if_lookup_by_name(const char *ifname, vrf_id_t vrf_id);
extern struct interface *if_get_by_name(const char *ifname, vrf_id_t vrf_id);
+extern struct interface *if_get_by_ifindex(ifindex_t ifindex, vrf_id_t vrf_id);
extern void if_set_index(struct interface *ifp, ifindex_t ifindex);
/* Delete the interface, but do not free the structure, and leave it in the