TCPIP_STACK_NetMACIdGet Function

C

TCPIP_STACK_MODULE TCPIP_STACK_NetMACIdGet(
    TCPIP_NET_HANDLE netH
);

Description

This function returns the module ID of the MAC that's attached to the specified network interface.

Preconditions

The TCP/IP stack should have been initialized by TCPIP_STACK_Initialize() and the TCPIP_STACK_Status() returned SYS_STATUS_READY. The network interface should be up and running.

Parameters

ParametersDescription
netHHandle of the interface to use.

Returns

  • A TCPIP_STACK_MODULE ID that belongs to the MAC of that network interface.

Remarks

If the netH refers to an alias interface, the MAC statistics of the primary interface are returned.

Example

TCPIP_NET_HANDLE netH = TCPIP_STACK_NetHandleGet("PIC32INT");
TCPIP_STACK_MODULE modId = TCPIP_STACK_NetMACIdGet(netH);
if(modId == TCPIP_MODULE_MAC_PIC32INT)
{
    // an internal PIC32 MAC attached to this interface
}