qwf_net_InterfaceData_t

Updated: October 26, 2022

Network interface data

Synopsis:

#include <qwf/qwf_net.h>
typedef struct qwf_net_InterfaceData_s {
    qwf_net_IfName_t name;
    qwf_net_IfType_e ifType;
    bool connected;
    bool physicalUp;
    bool hasIpAddr;
    bool ip4;
    bool ip6;
    uint8_t fib;
    uint16_t mtu;
    qwf_net_IpAddrStr_t ip4Address;
    qwf_net_IpAddrStr_t ip4Netmask;
    qwf_net_IpAddrStr_t ip4Gateway;
    qwf_net_IpAddrStr_t ip6Address;
    uint8_t ip6NetPrefixLen;
    qwf_net_IpAddrStr_t ip6Gateway;
    qwf_net_IpAddrStr_t broadcast;
    char mac[QWF_NET_MAX_MAC_ADDR_LEN+1];
    qwf_net_IpAddrStr_t ip4NameServers[QWF_NET_NUM_DNS_ADDRS];
    qwf_net_IpAddrStr_t ip6NameServers[QWF_NET_NUM_DNS_ADDRS];
    char searchDomain[QWF_NET_MAX_DNS_NAME_LEN+1];
    qwf_net_IpConfigMethod_e ip4ConfigMethod;
    qwf_net_IpConfigMethod_e ip6ConfigMethod;
    bool unmanaged;
} qwf_net_InterfaceData_t;

Data:

qwf_net_IfName_t name

Network interface name

qwf_net_IfType_e ifType

Network interface type

bool connected

Whether the interface is connected

bool physicalUp

Whether the physical interface is up

bool hasIpAddr

Whether the interface has an IP address

bool ip4

Whether the interface has an IPv4 address

bool ip6

Whether the interface has an IPv6 address

uint8_t fib

FIB (Forwarding Information Base) for the network interface

uint16_t mtu

MTU (Maximum Transmission Unit) for the network interface

qwf_net_IpAddrStr_t ip4Address

IPv4 address (if available)

qwf_net_IpAddrStr_t ip4Netmask

IPv4 netmask (if IPv4 is available)

qwf_net_IpAddrStr_t ip4Gateway

IPv4 gateway

qwf_net_IpAddrStr_t ip6Address

IPv6 address (if available)

uint8_t ip6NetPrefixLen

IPv6 network prefix length (if IPv6 is available), as the number of bits used for the mask. The maximum prefix length is 128.

qwf_net_IpAddrStr_t ip6Gateway

IPv6 gateway

qwf_net_IpAddrStr_t broadcast

Broadcast IP address

char mac[QWF_NET_MAX_MAC_ADDR_LEN+1]

MAC address for the interface

qwf_net_IpAddrStr_t ip4NameServers[QWF_NET_NUM_DNS_ADDRS]

IPv4 primary and secondary name servers for the interface, as an array of IP addresses

qwf_net_IpAddrStr_t ip6NameServers[QWF_NET_NUM_DNS_ADDRS]

IPv6 primary and secondary name servers for the interface, as an array of IP addresses

char searchDomain[QWF_NET_MAX_DNS_NAME_LEN+1]

Search domain name(s) for the interface. This field is informational only. Multiple search domain names are delimited by commas in the string.

qwf_net_IpConfigMethod_e ip4ConfigMethod

Whether the IPv4 interface settings are configured manually, DHCP settings are applied, or the interface won't be considered for IPv4 selection.

qwf_net_IpConfigMethod_e ip6ConfigMethod

Whether the IPv6 interface settings are configured manually, DHCPv6 settings are applied, or the interface won't be considered for IPv6 selection.

bool unmanaged

Whether the interface is being managed internally

Library:

qwf_interface