Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nmi_inet_addr

Synchronous function which returns a BSD socket compliant Internet Protocol (IPv4) socket address.

This IPv4 address in the input string parameter could either be specified as a host name, or as a numeric string representation like n.n.n.n known as the IPv4 dotted-decimal format (i.e. "192.168.10.1"). This function is used whenever an ip address needs to be set in the proper format (i.e. for the tstrM2MIPConfig structure).

Functions

NMI_API uint32 nmi_inet_addr (char *pcIpAddr)
 

NMI_API uint32 nmi_inet_addr ( char *  pcIpAddr)
Parameters
[in]pcIpAddrA null terminated string containing the IP address in IPv4 dotted-decimal address.
Returns
Unsigned 32-bit integer representing the IP address in Network byte order (eg. "192.168.10.1" will be expressed as 0x010AA8C0).

References i, j, and m2m_memcpy().

Referenced by connect_cmd_handler(), and http_client_send_request().