Inet_pton – Zilog EZ80F91GA User Manual

Page 113

Advertising
background image

UM024502-1012

ZGATE Logging Page

ZGATE Embedded Security Development Kit

User Manual

101

inet_pton

Function Prototype

INT8 inet_pton( INT8 af, const char *src, unsigned char *dst );

Parameters

af

Address family; only AF_INET (1) is supported.

src

A pointer to the IP address string in dotted decimal format.

dst

A pointer to an INT32 where the network format of the IP address
will be stored.

Return Value

TRUE

src

was successfully converted to network format.

FALSE

src

contains an invalid address.

Description

This function converts an IP address in presentation (printable string) format into network
format.

ZTP applications can also use the

UINT32 name2ip( char * pAddrString )

API to

obtain the 32-bit IPv4 address corresponding to the dotted decimal

(pAddrString

parameter (or domain name).

Advertising