summaryrefslogtreecommitdiffstats
path: root/sys/net/if_var.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r--sys/net/if_var.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index a598d19..0b6e40d 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -77,6 +77,7 @@ struct ether_header;
TAILQ_HEAD(ifnethead, ifnet); /* we use TAILQs so that the order of */
TAILQ_HEAD(ifaddrhead, ifaddr); /* instantiation is preserved in the list */
+TAILQ_HEAD(ifprefixhead, ifprefix);
LIST_HEAD(ifmultihead, ifmultiaddr);
/*
@@ -138,6 +139,7 @@ struct ifnet {
__P((struct ifnet *, struct sockaddr **, struct sockaddr *));
struct ifqueue if_snd; /* output queue */
struct ifqueue *if_poll_slowq; /* input queue for slow devices */
+ struct ifprefixhead if_prefixhead; /* list of prefixes per if */
};
typedef void if_init_f_t __P((void *));
@@ -269,6 +271,20 @@ struct ifaddr {
#define IFA_ROUTE RTF_UP /* route installed */
/*
+ * The prefix structure contains information about one prefix
+ * of an interface. They are maintained by the different address families,
+ * are allocated and attached when an prefix or an address is set,
+ * and are linked together so all prfefixes for an interface can be located.
+ */
+struct ifprefix {
+ struct sockaddr *ifpr_prefix; /* prefix of interface */
+ struct ifnet *ifpr_ifp; /* back-pointer to interface */
+ TAILQ_ENTRY(ifprefix) *ifpr_list; /* queue macro glue */
+ u_char ifpr_plen; /* prefix length in bits */
+ u_char ifpr_type; /* protocol dependent prefix type */
+};
+
+/*
* Multicast address structure. This is analogous to the ifaddr
* structure except that it keeps track of multicast addresses.
* Also, the reference count here is a count of requests for this
@@ -293,6 +309,7 @@ struct ifmultiaddr {
} while (0)
extern struct ifnethead ifnet;
+extern struct ifnet **ifindex2ifnet;
extern int ifqmaxlen;
extern struct ifnet loif[];
extern int if_index;
@@ -318,6 +335,7 @@ void if_up __P((struct ifnet *));
int ifioctl __P((struct socket *, u_long, caddr_t, struct proc *));
int ifpromisc __P((struct ifnet *, int));
struct ifnet *ifunit __P((char *));
+struct ifnet *if_withname __P((struct sockaddr *));
int if_poll_recv_slow __P((struct ifnet *ifp, int *quotap));
void if_poll_xmit_slow __P((struct ifnet *ifp, int *quotap));
OpenPOWER on IntegriCloud