Ethernet Management

Overview

Ethernet management API provides functions to manage the Ethernet network interface low level status. The caller of these functions can:

  • raise carrier ON or carrier OFF management events

  • raise VLAN enabled or VLAN disabled management events

Typically the carrier OFF event would be generated by the Ethernet device driver when it notices that the Ethernet cable is disconnected. The carrier ON event would be generated if the Ethernet device driver notices that the Ethernet cable is re-connected.

Currently the VLAN events are generated by the Ethernet L2 layer when a specific VLAN tag is either enabled or disabled.

The user application can monitor these events if it needs to act when the corresponding status changes.

API Reference

group ethernet_mgmt

Ethernet library.

Functions

void ethernet_mgmt_raise_carrier_on_event(struct net_if *iface)

Raise CARRIER_ON event when Ethernet is connected.

Parameters
  • iface: Ethernet network interface.

void ethernet_mgmt_raise_carrier_off_event(struct net_if *iface)

Raise CARRIER_OFF event when Ethernet is disconnected.

Parameters
  • iface: Ethernet network interface.

void ethernet_mgmt_raise_vlan_enabled_event(struct net_if *iface, uint16_t tag)

Raise VLAN_ENABLED event when VLAN is enabled.

Parameters
  • iface: Ethernet network interface.

  • tag: VLAN tag which is enabled.

void ethernet_mgmt_raise_vlan_disabled_event(struct net_if *iface, uint16_t tag)

Raise VLAN_DISABLED event when VLAN is disabled.

Parameters
  • iface: Ethernet network interface.

  • tag: VLAN tag which is disabled.