/freebsd/contrib/wpa/src/ap/ |
H A D | vlan_init.c | 22 static int vlan_if_add(struct hostapd_data *hapd, struct hostapd_vlan *vlan, in vlan_if_add() argument 34 vlan->ifname); in vlan_if_add() 39 if (!iface_exists(vlan->ifname)) in vlan_if_add() 40 ret = hostapd_vlan_if_add(hapd, vlan->ifname); in vlan_if_add() 49 ifconfig_up(vlan->ifname); /* else wpa group will fail fatal */ in vlan_if_add() 52 ret = wpa_auth_ensure_group(hapd->wpa_auth, vlan->vlan_id); in vlan_if_add() 58 vlan->vlan_id, ret); in vlan_if_add() 59 if (wpa_auth_release_group(hapd->wpa_auth, vlan->vlan_id)) in vlan_if_add() 60 wpa_printf(MSG_ERROR, "WPA deinit of %s failed", vlan->ifname); in vlan_if_add() 63 if (hostapd_vlan_if_remove(hapd, vlan->ifname)) in vlan_if_add() [all …]
|
H A D | vlan_full.c | 421 struct hostapd_vlan *vlan, int vid) in vlan_bridge_name() argument 426 if (vlan->bridge[0]) { in vlan_bridge_name() 427 os_strlcpy(br_name, vlan->bridge, IFNAMSIZ); in vlan_bridge_name() 464 struct hostapd_vlan *vlan; in vlan_newlink() local 469 for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) { in vlan_newlink() 470 if (vlan->configured || in vlan_newlink() 471 os_strcmp(ifname, vlan->ifname) != 0) in vlan_newlink() 475 if (!vlan) in vlan_newlink() 478 vlan->configured = 1; in vlan_newlink() 480 notempty = vlan->vlan_desc.notempty; in vlan_newlink() [all …]
|
H A D | sta_info.c | 1141 struct hostapd_vlan *vlan; in ap_sta_get_free_vlan_id() local 1145 for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) { in ap_sta_get_free_vlan_id() 1146 if (vlan->vlan_id == vlan_id) { in ap_sta_get_free_vlan_id() 1158 struct hostapd_vlan *vlan = NULL, *wildcard_vlan = NULL; in ap_sta_set_vlan() local 1177 for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) { in ap_sta_set_vlan() 1178 if (vlan->vlan_id == VLAN_ID_WILDCARD) in ap_sta_set_vlan() 1181 if (!vlan) { in ap_sta_set_vlan() 1191 for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) { in ap_sta_set_vlan() 1192 if (!vlan_compare(&vlan->vlan_desc, vlan_desc)) in ap_sta_set_vlan() 1194 if (vlan->vlan_id == VLAN_ID_WILDCARD) in ap_sta_set_vlan() [all …]
|
H A D | wpa_auth_ft.c | 229 struct vlan_description *vlan) in wpa_ft_rrb_get_tlv_vlan() argument 240 os_memset(vlan, 0, sizeof(*vlan)); in wpa_ft_rrb_get_tlv_vlan() 285 vlan->untagged = vlan_id; in wpa_ft_rrb_get_tlv_vlan() 289 vlan->tagged[taggedidx] = vlan_id; in wpa_ft_rrb_get_tlv_vlan() 302 qsort(vlan->tagged, taggedidx, sizeof(int), cmp_int); in wpa_ft_rrb_get_tlv_vlan() 304 vlan->notempty = vlan->untagged || vlan->tagged[0]; in wpa_ft_rrb_get_tlv_vlan() 362 static size_t wpa_ft_vlan_len(const struct vlan_description *vlan) in wpa_ft_vlan_len() argument 367 if (!vlan || !vlan->notempty) in wpa_ft_vlan_len() 370 if (vlan->untagged) { in wpa_ft_vlan_len() 374 if (vlan->tagged[0]) in wpa_ft_vlan_len() [all …]
|
H A D | vlan_init.h | 17 struct hostapd_vlan *vlan, 32 vlan_add_dynamic(struct hostapd_data *hapd, struct hostapd_vlan *vlan, in vlan_add_dynamic() argument
|
/freebsd/tests/sys/net/ |
H A D | if_vlan.sh | 20 vlan0=$(jexec alcatraz ifconfig vlan create vlandev ${epair_vlan}a \ 21 vlan 42) 25 vlan1=$(jexec singsing ifconfig vlan create) 29 jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42 38 jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 43 44 jexec singsing ifconfig ${vlan1} vlan 42 vlandev ${epair_vlan}b 71 vlan5a=$(jexec jqinq0 ifconfig vlan create \ 72 vlandev ${epair_qinq}a vlan 5 vlanproto 802.1ad) 73 vlan42a=$(jexec jqinq0 ifconfig vlan create \ 74 vlandev ${vlan5a} vlan 42 vlanproto 802.1q) [all …]
|
H A D | pcp.py | 40 vlan = packet.getlayer(sp.Dot1Q) 42 if vlan is None: 48 if vlan.prio == int(args.expect_pcp[0]):
|
/freebsd/tests/sys/netgraph/ |
H A D | vlan_rotate.c | 45 struct vlan struct 55 struct vlan vlan[10]; argument 61 .vlan[0] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(1, 0, 0))}, 62 .vlan[1] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(2, 0, 0))}, 63 .vlan[2] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(3, 0, 0))}, 64 .vlan[3] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(4, 0, 0))}, 65 .vlan[4] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(5, 0, 0))}, 66 .vlan[5] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(6, 0, 0))}, 67 .vlan[6] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(7, 0, 0))}, 68 .vlan[7] = {htons(ETHERTYPE_VLAN), htons(EVL_MAKETAG(8, 0, 0))}, [all …]
|
/freebsd/sys/dev/etherswitch/ip17x/ |
H A D | ip17x_vlans.c | 69 memset(sc->vlan, 0, sizeof(sc->vlan)); in ip17x_reset_vlans() 78 v = &sc->vlan[i]; in ip17x_reset_vlans() 94 v = &sc->vlan[0]; in ip17x_reset_vlans() 119 vg->es_vid = sc->vlan[vg->es_vlangroup].vlanid; in ip17x_getvgroup() 126 if ((sc->vlan[vg->es_vlangroup].ports & (1 << i)) == 0) in ip17x_getvgroup() 162 sc->vlan[i].vlanid & ETHERSWITCH_VID_VALID && in ip17x_setvgroup() 163 (sc->vlan[i].vlanid & ETHERSWITCH_VID_MASK) == in ip17x_setvgroup() 167 sc->vlan[vg->es_vlangroup].vlanid = vg->es_vid & in ip17x_setvgroup() 170 if (sc->vlan[vg->es_vlangroup].vlanid == 0) { in ip17x_setvgroup() 171 sc->vlan[vg->es_vlangroup].ports = 0; in ip17x_setvgroup() [all …]
|
/freebsd/sys/dev/cxgbe/ |
H A D | t4_l2t.c | 111 find_or_alloc_l2e(struct l2t_data *d, uint16_t vlan, uint8_t port, uint8_t *dmac) in find_or_alloc_l2e() argument 122 e->vlan == vlan && e->lport == port) in find_or_alloc_l2e() 161 req->vlan = htons(e->vlan); in mk_write_l2e() 212 int *ndesc, uint16_t vlan, uint8_t port, uint8_t *eth_addr) in t4_l2t_alloc_tls() argument 230 if (e->vlan == vlan && e->lport == port && in t4_l2t_alloc_tls() 265 e->vlan = vlan; in t4_l2t_alloc_tls() 287 t4_l2t_alloc_switching(struct adapter *sc, uint16_t vlan, uint8_t port, in t4_l2t_alloc_switching() argument 298 e = find_or_alloc_l2e(d, vlan, port, eth_addr); in t4_l2t_alloc_switching() 305 e->vlan = vlan; in t4_l2t_alloc_switching() 315 MPASS(e->vlan == vlan); in t4_l2t_alloc_switching() [all …]
|
H A D | t4_iov.c | 368 uint16_t vlan = nvlist_get_number(config, "vlan"); in t4iov_add_vf() local 371 if (vlan == DOT1Q_VID_NULL) in t4iov_add_vf() 374 if (vlan == VF_VLAN_TRUNK) in t4iov_add_vf() 375 vlan = DOT1Q_VID_NULL; in t4iov_add_vf() 380 rc = t4_set_vlan_acl(adap, sc->pf, vfnum + 1, vlan); in t4iov_add_vf() 385 vfnum, vlan, rc); in t4iov_add_vf()
|
/freebsd/sys/kern/ |
H A D | uipc_mbufhash.c | 159 struct ether_vlan_header vlan; in m_ether_tcpip_hash() member 162 const struct ether_vlan_header *vlan; in m_ether_tcpip_hash() local 180 vlan = m_common_hash_gethdr(m, off, sizeof(*vlan), &buf); in m_ether_tcpip_hash() 181 if (vlan == NULL) in m_ether_tcpip_hash() 185 p = fnv_32_buf(&vlan->evl_tag, sizeof(vlan->evl_tag), p); in m_ether_tcpip_hash() 186 etype = ntohs(vlan->evl_proto); in m_ether_tcpip_hash() 187 off += sizeof(*vlan) - sizeof(*eh); in m_ether_tcpip_hash()
|
/freebsd/tests/sys/netpfil/pf/ |
H A D | altq.sh | 104 vlan=$(vnet_mkvlan) 105 ifconfig ${vlan} vlan 42 vlandev ${epair}a 106 ifconfig ${vlan} 192.0.2.1/24 up 109 vlanj=$(jexec altq_cbq_vlan ifconfig vlan create) 113 jexec altq_cbq_vlan ifconfig ${vlanj} vlan 42 vlandev ${epair}b 306 va=$(jexec ${j}a ifconfig vlan create) 308 jexec ${j}a ifconfig ${va} vlan 42 vlandev ${epair}a up 312 vb=$(jexec ${j}b ifconfig vlan create) 314 jexec ${j}b ifconfig ${vb} vlan 42 vlandev ${epair}b up
|
H A D | prio.sh | 44 ifconfig ${epair}a.42 vlandev ${epair}a vlan 42 51 jexec alcatraz ifconfig ${epair}b.42 vlandev ${epair}b vlan 42 53 jexec alcatraz sysctl net.link.vlan.mtag_pcp=1
|
/freebsd/contrib/netbsd-tests/net/if_vlan/ |
H A D | t_vlan.sh | 47 rump_server_start $SOCK_LOCAL vlan 75 rump_server_start $SOCK_LOCAL vlan 77 rump_server_start $SOCK_REMOTE vlan 87 atf_check -s exit:0 rump.ifconfig vlan0 vlan 10 vlanif shmif0 94 atf_check -s exit:0 rump.ifconfig vlan0 vlan 10 vlanif shmif0
|
/freebsd/sys/dev/enic/ |
H A D | cq_enet_desc.h | 39 __le16 vlan; member 52 __le16 vlan; member 114 u16 vlan, u16 checksum, u8 fcoe_sof, u8 fcoe_fc_crc_ok, in cq_enet_rq_desc_enc() argument 139 desc->vlan = cpu_to_le16(vlan); in cq_enet_rq_desc_enc() 210 *vlan_tci = le16_to_cpu(desc->vlan); in cq_enet_rq_desc_dec()
|
/freebsd/sys/dev/mlx5/mlx5_core/ |
H A D | mlx5_eswitch.c | 133 u16 *vlan, u8 *qos) in query_esw_vport_cvlan() argument 140 *vlan = 0; in query_esw_vport_cvlan() 158 *vlan = MLX5_GET(query_esw_vport_context_out, out, in query_esw_vport_cvlan() 165 vport, *vlan, *qos); in query_esw_vport_cvlan() 186 u16 vlan, u8 qos, bool set) in modify_esw_vport_cvlan() argument 195 vport, vlan, qos, set); in modify_esw_vport_cvlan() 200 /* insert only if no vlan in packet */ in modify_esw_vport_cvlan() 206 esw_vport_context.cvlan_id, vlan); in modify_esw_vport_cvlan() 797 if (!vport->vlan && !vport->qos) in esw_vport_ingress_config() 801 "vport[%d] configure ingress rules, vlan( in esw_vport_ingress_config() 1244 u16 vlan; mlx5_eswitch_get_vport_config() local 1268 mlx5_eswitch_set_vport_vlan(struct mlx5_eswitch * esw,int vport,u16 vlan,u8 qos) mlx5_eswitch_set_vport_vlan() argument [all...] |
H A D | mlx5_mpfs.c | 44 u8 vlan_valid, u16 vlan) in mlx5_mpfs_add_mac() argument 71 MLX5_SET(set_l2_table_entry_in, in, vlan, vlan); in mlx5_mpfs_add_mac()
|
H A D | eswitch.h | 109 u16 vlan; 146 __u32 vlan; 165 int vport, u16 vlan, u8 qos); 107 u16 vlan; global() member 144 __u32 vlan; global() member
|
/freebsd/contrib/wpa/src/drivers/ |
H A D | driver_roboswitch.c | 361 u16 vlan = 0, _read[2]; in wpa_driver_roboswitch_init() local 387 vlan *= 10; in wpa_driver_roboswitch_init() 388 vlan += *sep - '0'; in wpa_driver_roboswitch_init() 389 if (vlan > ROBO_VLAN_MAX) { in wpa_driver_roboswitch_init() 430 vlan |= 1 << 13; in wpa_driver_roboswitch_init() 434 &vlan, 1); in wpa_driver_roboswitch_init() 439 "VLAN %d", __func__, vlan & ~(1 << 13)); in wpa_driver_roboswitch_init()
|
/freebsd/sys/dev/mlx5/mlx5_en/ |
H A D | mlx5_en_flow_table.c | 619 int vlan; in mlx5e_vport_context_update_vlans() local 624 for_each_set_bit(vlan, priv->vlan.active_vlans, VLAN_N_VID) in mlx5e_vport_context_update_vlans() 641 for_each_set_bit(vlan, priv->vlan.active_vlans, VLAN_N_VID) { in mlx5e_vport_context_update_vlans() 644 vlans[i++] = vlan; in mlx5e_vport_context_update_vlans() 668 struct mlx5_flow_table *ft = priv->fts.vlan.t; in mlx5e_add_vlan_rule_sub() 690 rule_p = &priv->vlan.untagged_ft_rule; in mlx5e_add_vlan_rule_sub() 694 rule_p = &priv->vlan.any_cvlan_ft_rule; in mlx5e_add_vlan_rule_sub() 699 rule_p = &priv->vlan.any_svlan_ft_rule; in mlx5e_add_vlan_rule_sub() 704 rule_p = &priv->vlan.active_vlans_ft_rule[vid]; in mlx5e_add_vlan_rule_sub() 751 mlx5_del_flow_rules(&priv->vlan.untagged_ft_rule); in mlx5e_del_vlan_rule() [all …]
|
/freebsd/sys/dev/pci/ |
H A D | pci_iov_schema.c | 355 uint16_t vlan; in pci_iov_schema_validate_vlan() local 360 vlan = nvlist_get_number(config, name); in pci_iov_schema_validate_vlan() 362 if (vlan > 4095 && vlan != VF_VLAN_TRUNK) in pci_iov_schema_validate_vlan() 452 uint16_t vlan; in pci_iov_validate_vlan_default() local 457 vlan = nvlist_get_number(param, DEFAULT_SCHEMA_NAME); in pci_iov_validate_vlan_default() 458 if (vlan > 4095 && vlan != VF_VLAN_TRUNK) in pci_iov_validate_vlan_default()
|
/freebsd/sys/dev/mlx4/mlx4_core/ |
H A D | mlx4_port.c | 577 int __mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, in __mlx4_register_vlan() argument 591 vlan, port, in __mlx4_register_vlan() 617 if (vlan == (MLX4_VLAN_MASK & be32_to_cpu(table->entries[i]))) in __mlx4_register_vlan() 619 if (vlan == (MLX4_VLAN_MASK & be32_to_cpu(dup_table->entries[i]))) in __mlx4_register_vlan() 643 (vlan == (MLX4_VLAN_MASK & be32_to_cpu(dup_table->entries[index_at_dup_port])))) in __mlx4_register_vlan() 661 (vlan == (MLX4_VLAN_MASK & in __mlx4_register_vlan() 664 mlx4_dbg(dev, "vlan %u is already registered.\n", vlan); in __mlx4_register_vlan() 670 if (dup_vlan != vlan || !dup_table->is_dup[i]) { in __mlx4_register_vlan() 672 vlan, dup_port, i); in __mlx4_register_vlan() 699 table->entries[free] = cpu_to_be32(vlan | MLX4_VLAN_VALID); in __mlx4_register_vlan() [all …]
|
/freebsd/sys/netgraph/ |
H A D | ng_vlan.c | 193 NETGRAPH_INIT(vlan, &ng_vlan_typestruct); 277 if (vf->vid == 0 && vf->vid != vf->vlan) { in ng_vlan_rcvmsg() 278 vf->vid = vf->vlan; in ng_vlan_rcvmsg() 279 } else if (vf->vid != 0 && vf->vlan != 0 && in ng_vlan_rcvmsg() 280 vf->vid != vf->vlan) { in ng_vlan_rcvmsg() 415 vf->vlan = i; in ng_vlan_rcvmsg()
|
/freebsd/sys/arm/ti/cpsw/ |
H A D | if_cpswvar.h | 84 int vlan; member 136 int vlan; member
|