www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


inet_addr_bsd

Converts a dotted decimal IPv4 address string to an unsigned long..

unsigned long far inet_addr_bsd (
                 const char * IPAddressStringPtr ) ;

Parameters

IPAddressStringPtr

IPv4 dotted string IPv4 address

Return Value

The IPv4 address in network byte order.
An invalid dotted decimal string will yield -1, same as would the string:
     "255.255.255.255"

Comments

This function applies only to IPv4 addresses.   The inet_pton API can be used for either IPv4 or IPv6 address conversions.

If the compilation switch

     #define BSD44_SOCKET_API_STYLE

is set as a global define in the user application prior to including the Beck C-library header files, the inet_addr() call can be used in BSD 4.4 compatible style with the parameters specified above.   Using this switch the CLIB TCPIP_Socket.H redefines inet_addr() to inet_addr_bsd() .

See Also

RTOS API

On the first call, this library function invokes a software interrupt which modifies the code at the calling site inside your application program.   A direct FAR JMP into the @CHIP-RTOS-x86 implementation for this function is installed so that on return and on any subsequent calls to this API this dynamic link reaches the function's implementation directly.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV1.36V1.36

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.20

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document