Structure for socket metadata associated with read event.

The structure holds the metadata information for the socket's read event. It includes the following details such as: IP version, socket ID, length of data received, offset within the buffer, destination port, and the IP address of the sender device. The IP address can be either IPv4 or IPv6, determined by the ip_version field.

Public Attributes#

uint16_t

Two bytes for the IP version of the IP address, four bytes for the IPv4, and six bytes for the IPv6.

uint16_t

The socket number associated with the read event is two bytes.

uint32_t

Four bytes. Length of received data.

uint16_t

Two bytes. Offset data from the start of the buffer.

uint16_t

Two bytes. Port number of the device which sends data to the destination.

uint8_t

Four bytes. IPv4 address of the device which sends data. Used if ip_version is four.

uint8_t

16 bytes. IPv6 address of the device which sends data. Used if ip_version is six.

union sl_si91x_socket_metadata_t::@0

Union for IPv4 or IPv6 address, depending on ip_version.

Public Attribute Documentation#

ip_version#

uint16_t sl_si91x_socket_metadata_t::ip_version

Two bytes for the IP version of the IP address, four bytes for the IPv4, and six bytes for the IPv6.


Definition at line 55 of file components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h

socket_id#

uint16_t sl_si91x_socket_metadata_t::socket_id

The socket number associated with the read event is two bytes.


Definition at line 57 of file components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h

length#

uint32_t sl_si91x_socket_metadata_t::length

Four bytes. Length of received data.


Definition at line 59 of file components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h

offset#

uint16_t sl_si91x_socket_metadata_t::offset

Two bytes. Offset data from the start of the buffer.


Definition at line 61 of file components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h

dest_port#

uint16_t sl_si91x_socket_metadata_t::dest_port

Two bytes. Port number of the device which sends data to the destination.


Definition at line 63 of file components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h

ipv4_address#

uint8_t sl_si91x_socket_metadata_t::ipv4_address[4]

Four bytes. IPv4 address of the device which sends data. Used if ip_version is four.


Definition at line 66 of file components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h

ipv6_address#

uint8_t sl_si91x_socket_metadata_t::ipv6_address[16]

16 bytes. IPv6 address of the device which sends data. Used if ip_version is six.


Definition at line 68 of file components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h

dest_ip_addr#

union sl_si91x_socket_metadata_t::@0 sl_si91x_socket_metadata_t::dest_ip_addr

Union for IPv4 or IPv6 address, depending on ip_version.


Definition at line 69 of file components/device/silabs/si91x/wireless/socket/inc/sl_si91x_socket_types.h