u_int64_t ifi_omcasts; /* packets sent via multicast */
u_int64_t ifi_iqdrops; /* dropped on input, this interface */
u_int64_t ifi_noproto; /* destined for unsupported protocol */
u_int64_t ifi_omcasts; /* packets sent via multicast */
u_int64_t ifi_iqdrops; /* dropped on input, this interface */
u_int64_t ifi_noproto; /* destined for unsupported protocol */
u_int32_t ifi_recvtiming; /* usec spent receiving when timing */
u_int32_t ifi_xmittiming; /* usec spent xmitting when timing */
#define IF_LASTCHANGEUPTIME 1 /* lastchange: 1-uptime 0-calendar time */
u_int32_t ifi_recvtiming; /* usec spent receiving when timing */
u_int32_t ifi_xmittiming; /* usec spent xmitting when timing */
#define IF_LASTCHANGEUPTIME 1 /* lastchange: 1-uptime 0-calendar time */
#define if_omcasts if_data.ifi_omcasts
#define if_iqdrops if_data.ifi_iqdrops
#define if_noproto if_data.ifi_noproto
#define if_omcasts if_data.ifi_omcasts
#define if_iqdrops if_data.ifi_iqdrops
#define if_noproto if_data.ifi_noproto
#define if_lastchange if_data.ifi_lastchange
#define if_recvquota if_data.ifi_recvquota
#define if_xmitquota if_data.ifi_xmitquota
#define if_lastchange if_data.ifi_lastchange
#define if_recvquota if_data.ifi_recvquota
#define if_xmitquota if_data.ifi_xmitquota
LIST_ENTRY(if_clone) ifc_list; /* on list of cloners */
const char *ifc_name; /* name of device, e.g. `vlan' */
size_t ifc_namelen; /* length of name */
LIST_ENTRY(if_clone) ifc_list; /* on list of cloners */
const char *ifc_name; /* name of device, e.g. `vlan' */
size_t ifc_namelen; /* length of name */
- int ifc_minifs; /* minimum number of interfaces */
- int ifc_maxunit; /* maximum unit number */
+ u_int32_t ifc_minifs; /* minimum number of interfaces */
+ u_int32_t ifc_maxunit; /* maximum unit number */
- int (*ifc_create)(struct if_clone *, int);
- void (*ifc_destroy)(struct ifnet *);
+ int (*ifc_create)(struct if_clone *, u_int32_t, void *);
+ int (*ifc_destroy)(struct ifnet *);
};
#define IF_CLONE_INITIALIZER(name, create, destroy, minifs, maxunit) \
{ { NULL, NULL }, name, sizeof(name) - 1, minifs, maxunit, NULL, 0, create, destroy }
};
#define IF_CLONE_INITIALIZER(name, create, destroy, minifs, maxunit) \
{ { NULL, NULL }, name, sizeof(name) - 1, minifs, maxunit, NULL, 0, create, destroy }
void ifnet_lock_assert(struct ifnet *ifp, int what);
void ifnet_lock_shared(struct ifnet *ifp);
void ifnet_lock_assert(struct ifnet *ifp, int what);
void ifnet_lock_shared(struct ifnet *ifp);