Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_var.h
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | struct if_encap_req { | ||||
int lladdr_off; /* offset from header start (w) */ | int lladdr_off; /* offset from header start (w) */ | ||||
int lladdr_len; /* lladdr length (r) */ | int lladdr_len; /* lladdr length (r) */ | ||||
char *lladdr; /* link-level address pointer (r) */ | char *lladdr; /* link-level address pointer (r) */ | ||||
char *hdata; /* Upper layer header data (rw) */ | char *hdata; /* Upper layer header data (rw) */ | ||||
}; | }; | ||||
#define IFENCAP_FLAG_BROADCAST 0x02 /* Destination is broadcast */ | #define IFENCAP_FLAG_BROADCAST 0x02 /* Destination is broadcast */ | ||||
/* | |||||
* Network interface send tag support. The storage of "struct | |||||
* m_snd_tag" comes from the network driver and it is free to allocate | |||||
* as much additional space as it wants for its own use. | |||||
*/ | |||||
struct m_snd_tag; | |||||
#define IF_SND_TAG_TYPE_RATE_LIMIT 0 | |||||
#define IF_SND_TAG_TYPE_MAX 1 | |||||
struct if_snd_tag_alloc_header { | |||||
uint32_t type; /* send tag type, see IF_SND_TAG_XXX */ | |||||
uint32_t flowid; /* mbuf hash value */ | |||||
uint32_t flowtype; /* mbuf hash type */ | |||||
}; | |||||
struct if_snd_tag_alloc_rate_limit { | |||||
struct if_snd_tag_alloc_header hdr; | |||||
uint64_t max_rate; /* in bytes/s */ | |||||
}; | |||||
struct if_snd_tag_rate_limit_params { | |||||
uint64_t max_rate; /* in bytes/s */ | |||||
}; | |||||
union if_snd_tag_alloc_params { | |||||
struct if_snd_tag_alloc_header hdr; | |||||
struct if_snd_tag_alloc_rate_limit rate_limit; | |||||
}; | |||||
union if_snd_tag_modify_params { | |||||
struct if_snd_tag_rate_limit_params rate_limit; | |||||
}; | |||||
union if_snd_tag_query_params { | |||||
struct if_snd_tag_rate_limit_params rate_limit; | |||||
}; | |||||
typedef int (if_snd_tag_alloc_t)(struct ifnet *, union if_snd_tag_alloc_params *, | |||||
struct m_snd_tag **); | |||||
typedef int (if_snd_tag_modify_t)(struct m_snd_tag *, union if_snd_tag_modify_params *); | |||||
typedef int (if_snd_tag_query_t)(struct m_snd_tag *, union if_snd_tag_query_params *); | |||||
typedef void (if_snd_tag_free_t)(struct m_snd_tag *); | |||||
/* | /* | ||||
* Structure defining a network interface. | * Structure defining a network interface. | ||||
*/ | */ | ||||
struct ifnet { | struct ifnet { | ||||
/* General book keeping of interface lists. */ | /* General book keeping of interface lists. */ | ||||
TAILQ_ENTRY(ifnet) if_link; /* all struct ifnets are chained */ | TAILQ_ENTRY(ifnet) if_link; /* all struct ifnets are chained */ | ||||
LIST_ENTRY(ifnet) if_clones; /* interfaces of a cloner */ | LIST_ENTRY(ifnet) if_clones; /* interfaces of a cloner */ | ||||
TAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if */ | TAILQ_HEAD(, ifg_list) if_groups; /* linked list of groups per if */ | ||||
▲ Show 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | struct ifnet { | ||||
* ensure that the full mbuf chain passed to the network | * ensure that the full mbuf chain passed to the network | ||||
* adapter fits within the given limits. | * adapter fits within the given limits. | ||||
*/ | */ | ||||
u_int if_hw_tsomax; /* TSO maximum size in bytes */ | u_int if_hw_tsomax; /* TSO maximum size in bytes */ | ||||
u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ | u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ | ||||
u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ | u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ | ||||
/* | /* | ||||
* Network adapter send tag support: | |||||
*/ | |||||
if_snd_tag_alloc_t *if_snd_tag_alloc; | |||||
if_snd_tag_modify_t *if_snd_tag_modify; | |||||
if_snd_tag_query_t *if_snd_tag_query; | |||||
if_snd_tag_free_t *if_snd_tag_free; | |||||
/* | |||||
* Spare fields to be added before branching a stable branch, so | * Spare fields to be added before branching a stable branch, so | ||||
* that structure can be enhanced without changing the kernel | * that structure can be enhanced without changing the kernel | ||||
* binary interface. | * binary interface. | ||||
*/ | */ | ||||
void *if_pspare[4]; /* packet pacing / general use */ | int if_ispare[4]; /* general use */ | ||||
int if_ispare[4]; /* packet pacing / general use */ | |||||
}; | }; | ||||
/* for compatibility with other BSDs */ | /* for compatibility with other BSDs */ | ||||
#define if_name(ifp) ((ifp)->if_xname) | #define if_name(ifp) ((ifp)->if_xname) | ||||
/* | /* | ||||
* Locks for address lists on the network interface. | * Locks for address lists on the network interface. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 338 Lines • Show Last 20 Lines |