www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


Dev_Get_IP

Get device IP address and netmask.

int Dev_Get_IP( DevUserIfaceHandle DevHandlePtr,
                unsigned long * ipaddr,
                unsigned long * netmask,
                int * errorcode);

Parameters

DevHandlePtr

Device handle

ipaddr

Output parameter:  Pointer to 32 bit location which will receive the IP address in big endian (network) byte order.

netmask

Output parameter:  Pointer to 32 bit location which will receive the net mask in big endian (network) byte order.    (This parameter can be set to NULL if netmask is not desired or does not apply.)

errorcode

Output parameter:  Failure code, 0 on success.

Return Value

0: success
-1: See reported errorcode .

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

On SC1x3/SC2x (RTOS version >=1.13, CLIB version >=2.10) there's also a version of this function which uses dynamic linking instead of a software interrupt, which reduces the function's overhead and thus speeds up your application. This function's name is Dev_Get_IP_Dyn. You should however not use this function directly. Instead you should add the define TCPIP_DYN_LINK_DEV to your program before including the CLIB's header file(s):

    #define TCPIP_DYN_LINK_DEV
    #include <clib.h>


This will map the original function's name to the dynamic linking version. This way you can also easily switch existing programs to dynamic linking.

Related Topics

TCP/IP Device Driver overview

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    V1.20V1.20V1.20V1.05V1.00

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.04

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


End of document