Update Mar 21th.

This commit is contained in:
Yajun Xia
2024-03-21 21:41:04 +08:00
parent da7c4d4b96
commit df1e6ced06
2 changed files with 68 additions and 2 deletions

View File

@@ -1543,6 +1543,20 @@ In MSRP module of NetxDuo, following functionalities are provided:
- Management of the registration and deregistration processes for a domain, as well as handling the indications of these events.
### Multiple vlan registration protocol (MVRP)
The Multiple VLAN Registration Protocol (MVRP) is a protocol that provides dynamic VLAN registration service. It is an MRP (Multiple Registration Protocol) application that makes use of MRP Attribute Declaration (MAD) and MRP Attribute Propagation (MAP) to provide common state machine descriptions and attribute propagation mechanisms.
MVRP provides a mechanism for dynamic maintenance of the contents of Dynamic VLAN Registration Entries for each VLAN and propagates the information they contain to other Bridges. This information allows MVRP-aware devices to dynamically establish and update their knowledge of the set of VLANs that currently have active members, and through which Ports those members can be reached.
In MVRP module of NetxDuo, following functionalities are provided to SRP/MRP components:
- Initialization of an MVRP instance.
- Parsing and packing of MRP Data Units (MRPDUs).
- Process the join or leave a VLAN request command from SRP, and trigger the corresponding VLAN registration or deregistration process.
- Handling of indications for a stream's registration and deregistration events from MRP.
### Multiple registration protocol (MRP)
The Multiple Registration Protocol (MRP) is a protocol that provides dynamic registration and deregistration of attributes in a network. It is used to manage resources in a network, such as VLANs, multicast addresses, and streams. MRP operates uses a common state machine and attribute propagation mechanisms to provide a consistent view of the network resources. MRP is used by other protocols, such as MVRP (Multiple VLAN Registration Protocol) and MSRP (Multiple Stream Registration Protocol), to provide dynamic registration of VLANs and streams, respectively.
In MRP module of NetxDuo, following functionalities are provided to MRP applications:
- Provide the interface of MRP initialization.
- Maintaining state machine for MRP applications.
- Process the event triggered by receiving different MRP messages.
- Receiveing the message from ethernet, and destribute the MRP messages to the corresponding MRP applications.
- Handle the timer event for MRP applications.

View File

@@ -12050,4 +12050,56 @@ status = nxd_udp_source_extract(&packet_ptr, &ip_address, &port);
- nx_udp_source_extract
- nxd_udp_packet_info_extract
- nxd_udp_socket_send
- nxd_udp_socket_source_send
- nxd_udp_socket_source_send
## nx_link_vlan_set
Sets VLAN tag to interface.
### Prototype
```c
UINT nx_link_vlan_set(NX_IP *ip_ptr, UINT interface_index, UINT vlan_tag)
```
### Description
This function sets VLAN tag to interface. VLAN tag is comprised the PCP and VLAN ID, encoded in host byte order. The PCP is the 3 most significant bits and the VLAN ID is the 12 least significant bits. The PCP is used to prioritize the packet and the VLAN ID is used to identify the VLAN.
### Parameters
- *ip_ptr*: Pointer to previously created IP instance.
- *interface_index*: Index of the network interface to set the VLAN tag.
- *vlan_tag*: VLAN tag to set to the interface.
### Return Values
- **NX_SUCCESS** (0x00) Successful socket checksum disable.
- **NX_PTR_ERROR** (0x07) Invalid IP instance.
- **NX_INVALID_INTERFACE** (0x4C) Invalid interface index.
### Preemption Possible
No
### Example
```c
UINT vlan_tag = 0x810;
UINT interface_index = 0;
/* Set VLAN tag to interface. */
status = nx_link_vlan_set(&ip_0, interface_index, vlan_tag);
```
### See Also
- nx_link_vlan_get
- nx_link_vlan_clear
- nx_link_multicast_join
- nx_link_multicast_leave
- nx_link_ethernet_packet_send
- nx_link_raw_packet_send
- nx_link_packet_receive_callback_add
- nx_link_packet_receive_callback_remove
- nx_link_ethernet_header_parse
- nx_link_vlan_interface_create