# PDL_GetNetInfo

## Description

Gets information about a network interface such as 'eth0' (first ethernet card). On success, returns `PDL_NOERROR` and a populated `NETinfo` struct field. The `interfaceInfo` fields (ipaddress, netmask, and broadcast) are set in network byte order.

Note:

This API was formerly known as PDLNet_Get_Info, which has been deprecated, but still works.

In Windows builds, only `interfaceInfo->ipaddress` is populated.

## Syntax

>     PDL_Err PDL_GetNetInfo(const char *interfaceName, PDL_NetInfo * interfaceInfo);

## Returns

>     PDL_INVALIDINPUT - `interfaceName` is `NULL` or empty or `interfaceInfo` is `NULL`.
>     PDL_SYSTEMERROR_NET - Could not access network information.
>     PDL_NOERROR - Success.