Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_vlan.c
Context not available. | |||||
static int vlan_snd_tag_query(struct m_snd_tag *, | static int vlan_snd_tag_query(struct m_snd_tag *, | ||||
union if_snd_tag_query_params *); | union if_snd_tag_query_params *); | ||||
static void vlan_snd_tag_free(struct m_snd_tag *); | static void vlan_snd_tag_free(struct m_snd_tag *); | ||||
static struct m_snd_tag *vlan_next_snd_tag(struct m_snd_tag *); | |||||
static void vlan_ratelimit_query(struct ifnet *, | |||||
struct if_ratelimit_query_results *); | |||||
#endif | #endif | ||||
static void vlan_qflush(struct ifnet *ifp); | static void vlan_qflush(struct ifnet *ifp); | ||||
static int vlan_setflag(struct ifnet *ifp, int flag, int status, | static int vlan_setflag(struct ifnet *ifp, int flag, int status, | ||||
Context not available. | |||||
ifp->if_snd_tag_modify = vlan_snd_tag_modify; | ifp->if_snd_tag_modify = vlan_snd_tag_modify; | ||||
ifp->if_snd_tag_query = vlan_snd_tag_query; | ifp->if_snd_tag_query = vlan_snd_tag_query; | ||||
ifp->if_snd_tag_free = vlan_snd_tag_free; | ifp->if_snd_tag_free = vlan_snd_tag_free; | ||||
ifp->if_next_snd_tag = vlan_next_snd_tag; | |||||
ifp->if_ratelimit_query = vlan_ratelimit_query; | |||||
#endif | #endif | ||||
ifp->if_flags = VLAN_IFFLAGS; | ifp->if_flags = VLAN_IFFLAGS; | ||||
ether_ifattach(ifp, eaddr); | ether_ifattach(ifp, eaddr); | ||||
Context not available. | |||||
return (0); | return (0); | ||||
} | } | ||||
static struct m_snd_tag * | |||||
vlan_next_snd_tag(struct m_snd_tag *mst) | |||||
{ | |||||
struct vlan_snd_tag *vst; | |||||
vst = mst_to_vst(mst); | |||||
return (vst->tag); | |||||
} | |||||
static int | static int | ||||
vlan_snd_tag_modify(struct m_snd_tag *mst, | vlan_snd_tag_modify(struct m_snd_tag *mst, | ||||
union if_snd_tag_modify_params *params) | union if_snd_tag_modify_params *params) | ||||
Context not available. | |||||
m_snd_tag_rele(vst->tag); | m_snd_tag_rele(vst->tag); | ||||
free(vst, M_VLAN); | free(vst, M_VLAN); | ||||
} | } | ||||
static void | |||||
vlan_ratelimit_query(struct ifnet *ifp __unused, struct if_ratelimit_query_results *q) | |||||
{ | |||||
/* | |||||
* For vlan, we have an indirect | |||||
* interface. The caller needs to | |||||
* get a ratelimit tag on the actual | |||||
* interface the flow will go on. | |||||
*/ | |||||
q->rate_table = NULL; | |||||
q->flags = RT_IS_INDIRECT; | |||||
q->max_flows = 0; | |||||
q->number_of_rates = 0; | |||||
} | |||||
#endif | #endif | ||||
Context not available. |