Home
last modified time | relevance | path

Searched full:vlan (Results 1 – 25 of 95) sorted by relevance

1234

/Zephyr-latest/samples/net/vlan/
DREADME.rst1 .. zephyr:code-sample:: vlan
10 The VLAN sample application for Zephyr will setup two virtual LAN networks.
11 The application sample enables net-shell and allows users to view VLAN settings.
14 :zephyr_file:`samples/net/vlan`.
24 A good way to run this VLAN application is with QEMU as described in
25 :ref:`networking_with_eth_qemu`. You can use :file:`zeth-vlan.conf` configuration
30 ./net-setup.sh -c zeth-vlan.conf
32 Note that VLAN is only supported for boards that have an ethernet port or
35 Follow these steps to build the VLAN sample application:
38 :zephyr-app: samples/net/vlan
[all …]
Dsample.yaml5 - vlan
7 description: Test VLAN functionality
8 name: VLAN sample app
10 sample.net.vlan:
Dprj.conf28 # Ethernet is needed for VLAN
44 # Second VLAN supported network interface will have these settings
49 # VLAN tag for the second interface
52 # Settings for the third VLAN supported network interface
57 # VLAN tag for the second interface
63 # VLAN settings.
DKconfig1 # Private config options for VLAN sample app
6 mainmenu "Networking VLAN sample application"
24 int "VLAN tag for second interface"
29 Set VLAN (virtual LAN) tag (id) that is used in the sample
48 int "VLAN tag for third interface"
53 Set VLAN (virtual LAN) tag (id) that is used in the sample
Dvlan-setup-linux.sh17 # Setup virtual lan (VLAN) in Linux side that would work with this sample.
21 echo "This is the network interface where the VLAN will be running."
33 VLAN_NAME_PREFIX="vlan"
46 ip link add link ${IFACE} name ${VLAN_NAME_PREFIX}.100 type vlan id 100
47 ip link add link ${IFACE} name ${VLAN_NAME_PREFIX}.200 type vlan id 200
68 # ip link del link eth0 dev vlan.100
69 # ip link del link eth0 dev vlan.200
73 # ip neigh flush dev vlan.100
74 # ip neigh flush dev vlan.200
/Zephyr-latest/doc/connectivity/networking/api/
Dvlan.rst3 Virtual LAN (VLAN) Support
13 `Virtual LAN <https://wikipedia.org/wiki/Virtual_LAN>`_ (VLAN) is a
18 In Zephyr, each individual VLAN is modeled as a virtual network interface.
21 created for each VLAN, and this virtual network interface connects to the
26 VLAN support must be enabled at compile time by setting option
29 one network interface without VLAN support, and two with VLAN support, the
32 Even if VLAN is enabled in a :file:`prj.conf` file, the VLAN needs to be
33 activated at runtime by the application. The VLAN API provides a
35 to give the network interface and desired VLAN tag as a parameter to that
36 function. The VLAN tagging for a given network interface can be disabled by a
[all …]
Dethernet_mgmt.rst17 * raise ``VLAN enabled`` or ``VLAN disabled`` management events
24 Currently the VLAN events are generated by the Ethernet L2 layer when a
25 specific VLAN tag is either enabled or disabled.
/Zephyr-latest/include/zephyr/net/
Dethernet_vlan.h2 * @brief VLAN specific definitions.
17 * @brief VLAN definitions and helpers
31 /** Unspecified VLAN tag value */
35 * @brief Get VLAN identifier from TCI.
37 * @param tci VLAN tag control information.
39 * @return VLAN identifier.
49 * @param tci VLAN tag control information.
61 * @param tci VLAN tag control information.
71 * @brief Set VLAN identifier to TCI.
73 * @param tci VLAN tag control information.
[all …]
/Zephyr-latest/samples/net/gptp/
DKconfig7 # gPTP protocol will run in the non-VLAN interface and then there
8 # will be two VLAN interface for other use. This is just an example
9 # how to do this kind of setup. See also VLAN sample application
10 # for vlan-setup-linux.sh script that can be used to setup the
11 # VLAN IP addressing in Linux side (if that is desired).
28 int "VLAN tag for second interface"
33 Set VLAN (virtual LAN) tag (id) that is used in the sample
47 int "VLAN tag for third interface"
52 Set VLAN (virtual LAN) tag (id) that is used in the sample
/Zephyr-latest/subsys/net/l2/ethernet/
Dvlan.c29 #define MAX_VLAN_NAME_LEN MIN(sizeof("VLAN-<#####>"), \
162 /* If the interface is NULL, then get the VLAN that has the tag */ in get_vlan()
192 /* If the interface is virtual, then it should be the VLAN one. in get_vlan()
256 snprintk(name, sizeof(name), "VLAN-%d", ctx->tag); in enable_vlan_iface()
259 snprintk(name, sizeof(name), "VLAN to %d", in enable_vlan_iface()
279 snprintk(name, sizeof(name), "VLAN-<free>"); in disable_vlan_iface()
387 struct vlan_context *vlan; in net_eth_vlan_enable() local
399 NET_DBG("Interface %d does not support VLAN", in net_eth_vlan_enable()
412 vlan = get_vlan(iface, tag); in net_eth_vlan_enable()
413 if (vlan != NULL) { in net_eth_vlan_enable()
[all …]
/Zephyr-latest/samples/net/vlan/src/
Dmain.c39 static int setup_iface(struct net_if *iface, struct net_if *vlan, in setup_iface() argument
50 LOG_ERR("Cannot enable VLAN for tag %d (%d)", vlan_tag, ret); in setup_iface()
59 ifaddr = net_if_ipv6_addr_add(vlan, &addr6, in setup_iface()
63 ipv6_addr, vlan); in setup_iface()
71 if (!net_if_ipv6_prefix_add(vlan, &netaddr6, in setup_iface()
77 vlan); in setup_iface()
88 ifaddr = net_if_ipv4_addr_add(vlan, &addr4, in setup_iface()
92 ipv4_addr, vlan); in setup_iface()
104 net_if_ipv4_set_netmask_by_addr(vlan, &addr4, &nm); in setup_iface()
108 LOG_DBG("Interface %p VLAN tag %d setup done.", vlan, vlan_tag); in setup_iface()
[all …]
/Zephyr-latest/subsys/net/lib/shell/
Dvlan.c32 PR_WARNING("Cannot delete VLAN tag %d from " in iface_vlan_del_cb()
42 PR("VLAN tag %d removed from interface %d (%p)\n", vlan_tag, in iface_vlan_del_cb()
86 PR_INFO("Set %s to enable %s support.\n", "CONFIG_NET_VLAN", "VLAN"); in cmd_net_vlan()
102 /* vlan add <tag> <interface index> */ in cmd_net_vlan_add()
104 PR_WARNING("VLAN tag missing.\n"); in cmd_net_vlan_add()
144 PR_WARNING("Cannot set VLAN tag (%d)\n", ret); in cmd_net_vlan_add()
151 PR("VLAN tag %d set to interface %d (%p)\n", tag, in cmd_net_vlan_add()
160 PR_INFO("Set %s to enable %s support.\n", "CONFIG_NET_VLAN", "VLAN"); in cmd_net_vlan_add()
174 /* vlan del <tag> */ in cmd_net_vlan_del()
176 PR_WARNING("VLAN tag missing.\n"); in cmd_net_vlan_del()
[all …]
/Zephyr-latest/samples/net/sockets/echo_server/
Doverlay-vlan.conf3 # Allow useful interface assigned to VLAN interface
6 # We have one non-vlan interface and two VLAN interfaces
24 # VLAN tag for the second interface
32 # VLAN tag for the second interface
/Zephyr-latest/samples/net/sockets/echo_server/src/
Dvlan.c45 static int setup_iface(struct net_if *iface, struct net_if *vlan, in setup_iface() argument
56 LOG_ERR("Cannot enable VLAN for tag %d (%d)", vlan_tag, ret); in setup_iface()
65 ifaddr = net_if_ipv6_addr_add(vlan, &addr6, in setup_iface()
69 ipv6_addr, vlan); in setup_iface()
80 ifaddr = net_if_ipv4_addr_add(vlan, &addr4, in setup_iface()
84 ipv4_addr, vlan); in setup_iface()
96 net_if_ipv4_set_netmask_by_addr(vlan, &addr4, &nm); in setup_iface()
100 LOG_DBG("Interface %p VLAN tag %d setup done.", vlan, vlan_tag); in setup_iface()
115 * create IP address for this test. But first the VLAN needs to be in init_vlan()
/Zephyr-latest/samples/net/sockets/txtime/
Doverlay-vlan.conf3 # We have one non-vlan interface and two VLAN interfaces
18 # VLAN tag for the second interface
25 # VLAN tag for the second interface
/Zephyr-latest/tests/net/vlan/src/
Dmain.c69 /* VLAN Interface 3 addresses */
152 "Invalid VLAN tag (%d vs %d) in TX pkt", in eth_tx()
157 net_eth_vlan_get_vid(ntohs(hdr->vlan.tci)), in eth_tx()
158 "Invalid VLAN tag in ethernet header"); in eth_tx()
377 "Too many VLAN interfaces"); in iface_cb()
401 /* One extra eth interface without vlan support */ in test_vlan_setup()
419 iface1 = eth_interfaces[1]; /* This has VLAN enabled */ in test_address_setup()
421 iface3 = vlan_interfaces[0]; /* and this is the virtual VLAN interface */ in test_address_setup()
495 "invalid VLAN tag unspec"); in ZTEST()
497 "invalid VLAN priority"); in ZTEST()
[all …]
/Zephyr-latest/tests/net/vlan/
Dtestcase.yaml6 - vlan
8 net.vlan.separate_net_buf:
11 net.vlan.header_reserved:
/Zephyr-latest/samples/net/sockets/echo_client/
Doverlay-vlan.conf3 # We have one non-vlan interface and two VLAN interfaces
19 # VLAN tag for the second interface
26 # VLAN tag for the second interface
DKconfig19 int "VLAN tag for second interface"
24 Set VLAN (virtual LAN) tag (id) that is used in the sample
38 int "VLAN tag for third interface"
43 Set VLAN (virtual LAN) tag (id) that is used in the sample
/Zephyr-latest/samples/net/lldp/
DKconfig25 int "VLAN tag for second interface"
30 Set VLAN (virtual LAN) tag (id) that is used in the sample
44 int "VLAN tag for third interface"
49 Set VLAN (virtual LAN) tag (id) that is used in the sample
DREADME.rst41 If you need VLAN support in your network, then the
42 :zephyr_file:`samples/net/vlan/vlan-setup-linux.sh` provides a script that can be
/Zephyr-latest/samples/net/mdns_responder/
Doverlay-vlan.conf3 # We have one non-vlan interface and two VLAN interfaces
19 # VLAN tag for the second interface
27 # VLAN tag for the second interface
DKconfig24 int "VLAN tag for second interface"
29 Set VLAN (virtual LAN) tag (id) that is used in the sample
48 int "VLAN tag for third interface"
53 Set VLAN (virtual LAN) tag (id) that is used in the sample
/Zephyr-latest/samples/net/sockets/txtime/src/
Dvlan.c51 LOG_DBG("VLAN interface not set"); in setup_iface()
57 LOG_ERR("Cannot enable VLAN for tag %d (%d)", vlan_tag, ret); in setup_iface()
90 LOG_DBG("Interface %p VLAN tag %d setup done.", iface, vlan_tag); in setup_iface()
114 LOG_DBG("Interface %p does not support %s", iface, "VLAN"); in init_vlan()
134 /* Bring up the VLAN interface automatically */ in init_vlan()
/Zephyr-latest/drivers/ethernet/
DKconfig.xmc4xxx40 bool "Hardware filter VLAN frames"
44 Hardware filter VLAN frames in hardware. Only ethernet frames with
46 The filtering can only be done on one vlan tag. If vlan_setup() is

1234