IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page

int Dev_Config_Iface ( DevIpv4IfaceCfg devIPv4CfgData,
int *  error 

This API sets the IPv4 configuration of an interface for particular multihome index.

[in] devIPv4CfgData DevIpv4IfaceCfg filled by the caller.
Contains the device handle pointer, IPv4 configuration and the multihome index number.
[out] error Error code on failure, 0 on success.
-1: Failed
0: Success
This functions provides the possibility to configure a device interface (e.g. the standard internal Ethernet interface) with multiple IP addresses. A multihome index is specified to designate which IP address is being configured.

DHCP configuration of a device is only possible at multihome index 0.
This function does not affect the IP settings in the CHIP.INI file.

Here is an example for adding an IP address to the Ethernet device at multihome index 1:

  int error ;
  DevIpv4IfaceCfg    devcfg;
  // Get the driver handle by name.
  DevUserIfaceHandle IfaceHandle = Dev_Find_Iface_By_Name("FEC") ;
  if (IfaceHandle == NULL))
    printf("\r\nCannot detect driver handle");
  // Setup IP configuration
  devcfg.IfaceHandle    = IfaceHandle;
  devcfg.flags          = 0; 
  devcfg.multiHomeIndex = 1;  // Configure specific multihome index 1.
  if(-1==Dev_Config_Iface( &devcfg, &error))
      printf("Error %d\r\n",error);
SC2x3 V1.00 - CLIB V1.00

Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:39 2017 by Doxygen 1.6.1