tf4NetmaskToPrefixLen

Jump to: navigation, search

Table of Contents >> IPv6 Programmer's Reference


#include <trsocket.h>


int tf4NetmaskToPrefixLen (ttUserIpAddress netmask);


Function Description

This function only supports IPv4. Convert an IPv4 netmask into a prefix length. This API is provided to facilitate porting of existing code to the tfNg* APIs.


Parameters

  • netMask
    The IPv4 netmask to get the prefix length for.


Returns

  • (int)
    Returns the 8-bit prefix length, which is the number of high-order bits in the netmask that are set to one.


Table of Contents >> IPv6 Programmer's Reference