www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


AddDefaultGatewayEx

Add the default gateway (Extended).

int AddDefaultGatewayEx ( IP_INTERFACE which_interface,
                          unsigned long far *Gateway,
                          void far *userIfaceHandle,
                          int *error );

Parameters

which_interface

Enumeration type:
  • II_ETHERNET = 0:   Ethernet
  • II_PPP_SERVER = 1:   PPP server
  • II_PPP_CLIENT = 2:   PPP client
  • II_USER_DEVICE = 3:   user device driver

Gateway

Pointer to gateway IPv4 address in network byte order.

userIfaceHandle

If which_interface==3, user device handle. (Otherwise not used.)

error

Output parameter:  Failure code, 0 on success.

Return Value

0: success
-1: See reported error code.

Comments

If this function is used, the gateway entry in the CHIP.INI becomes invalidated, but unchanged.   If the PPP server or PPP client is specified by the which_interface parameter, then the gateway is set to the remote peer IP address.

See Also

RTOS API

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

Related Topics

IP Gateway CHIP.INI Configuration
PPP server Gateway CHIP.INI Configuration

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    V1.00V1.00V1.00V0.90V1.00

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


End of document