Jump to main content

##

# TCPIP_STACK_NetMask Function

## C

    uint32_t TCPIP_STACK_NetMask(
        TCPIP_NET_HANDLE netH
    );

## Description

This function returns the IPv4 address mask of the specified interface. If the interface is enabled then it returns the IP address mask of that 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

Parameters | Description
--- | ---
netH | Interface handle to get mask of.

## Returns

- IPv4 address mask of that interface.
- 0 if interface is disabled/non-existent.

## Remarks

None.

## Example

    TCPIP_NET_HANDLE netH = TCPIP_STACK_NetHandleGet("PIC32INT");
    uint32_t subMask = TCPIP_STACK_NetMask(netH);