@CHIP-RTOS C Library V2.06 - TCP/IP API
inet_pton
Convert an IP address from standard text representation to binary. int inet_pton( int af,
const char far * source_ptr,
void far * dest_ptr); Parameters
af
- Address family, AF_INET (for IPv4) or AF_INET6 (for IPv6)
src
- Input Parameter: Pointer to the IP address text
(null terminated) to be converted
dst
- Output Parameter: Storage provided by the user which
will receive the converted binary IP address. This buffer must provide
4 bytes for AF_INET and 16 Bytes for AF_INET6.
Return Value
1: Success, the dst buffer contains the converted
binary IP in network byte order.
0: Input string at src was not a valid IP address of
indicated type (IPv4 or IPv6).
-1: The af parameter was set to an invalid
address family.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
n/a | n/a | n/a | V0.90 |
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|