IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page

int SetDefaultGateway ( void *  InterfaceHandle,
unsigned long  ipAddress 

This function is used to add the system default gateway for all interfaces.

InterfaceHandle Device handle to specify the interface.
ipAddress The default gateway IP address in Network Byte Order.
0 on success, else failure code
If this function is used, the Gateway entry in the CHIP.INI becomes invalidated, but unchanged.
DefaultGateway() returns the current gateway IP address.
The device handle pointer (InterfaceHandle) is retrievable by Dev_Find_Iface_By_Name().
A list of all installed device drivers is retrievable by Dev_Get_IfaceEntries().
Before setting a new gateway, the old gateway entry must be removed as shown below.

 unsigned long ipAddress;
 void * deviceHandle;
 deviceHandle = Dev_Find_Iface_By_Name("FEC");
SC2x3 V1.00 - CLIB V1.00
See also:
RemoveDefaultGateway() , DefaultGateway(), SetStaticRoute()

Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Thu Nov 1 13:20:17 2018 by Doxygen 1.6.1