StringToIPAddress Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
StringToIPAddress Function
C
BOOL StringToIPAddress(
    BYTE* str, 
    IP_ADDR* IPAddress
);
Description

This function parses a dotted-quad decimal IP address string into an IP_ADDR struct. The output result is big-endian.

Preconditions

None

Parameters
Parameters 
Description 
str 
Pointer to a dotted-quad IP address string 
IPAddress 
Pointer to IP_ADDR in which to store the result 
Return Values
Return Values 
Description 
TRUE 
an IP address was successfully decoded 
FALSE 
no IP address could be found, or the format was incorrect 
Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.