lib/sw_apps/img_rcvry/src/xbir_nw.c
static int Xbir_NwSetDefaultIp (ip_addr_t *Ip, ip_addr_t *Mask, ip_addr_t *Gw)
{
	int Status = XST_FAILURE;
	int Error;
	int InvalidCfg = FALSE;

	Xbir_Printf("Configuring default IP %s\r\n", XBIR_NW_DEFAULT_IP_ADDRESS);

	Error = inet_aton(XBIR_NW_DEFAULT_IP_ADDRESS, Ip);
	if (Error == 0) {
		InvalidCfg = TRUE;
		Xbir_Printf("ERROR: Invalid default IP address: %d\r\n", Error);
	}

	Error = inet_aton(XBIR_NW_DEFAULT_IP_MASK, Mask);
	if (Error == 0) {
		InvalidCfg = TRUE;
		Xbir_Printf("ERROR: Invalid default IP MASK: %d\r\n", Error);
	}

	Error = inet_aton(XBIR_NW_DEFAULT_GW_ADDRESS, Gw);
	if (Error == 0) {
		InvalidCfg = TRUE;
		Xbir_Printf("ERROR: Invalid default gateway address: %d\r\n",
			Error);
	}

	if (FALSE == InvalidCfg) {
		Status = XST_SUCCESS;
	}

	return Status;
}
/*****************************************************************************/
/**
 * @brief
 * This function sets the default fixed IP address for the SysBoard.
 *
 * @param	Ip	Pointer to IP address
 * @param	Mask	Pointer to network mask
 * @param	Gw	Pointer to gateway address
 *
 * @return	XST_SUCCESS if initialization is successful
 *		XST_FAILURE if initialization is failed
 *
 *****************************************************************************/
@brief
This function sets the default fixed IP address for the SysBoard.

@param       Ip      Pointer to IP address
@param       Mask    Pointer to network mask
@param       Gw      Pointer to gateway address

@return      XST_SUCCESS if initialization is successful
XST_FAILURE if initialization is failed
@brief This function sets the default fixed IP address for the SysBoard . @param Ip Pointer to IP address @param Mask Pointer to network mask @param Gw Pointer to gateway address @return XST_SUCCESS if initialization is successful XST_FAILURE if initialization is failed
static int Xbir_NwSetDefaultIp (ip_addr_t *Ip, ip_addr_t *Mask, ip_addr_t *Gw)
{
	int Status = XST_FAILURE;
	int Error;
	int InvalidCfg = FALSE;
	Xbir_Printf("Configuring default IP %s\r\n", XBIR_NW_DEFAULT_IP_ADDRESS);
	Error = inet_aton(XBIR_NW_DEFAULT_IP_ADDRESS, Ip);
	if (Error == 0) {
		InvalidCfg = TRUE;
		Xbir_Printf("ERROR: Invalid default IP address: %d\r\n", Error);
	}
	Error = inet_aton(XBIR_NW_DEFAULT_IP_MASK, Mask);
	if (Error == 0) {
		InvalidCfg = TRUE;
		Xbir_Printf("ERROR: Invalid default IP MASK: %d\r\n", Error);
	}
	Error = inet_aton(XBIR_NW_DEFAULT_GW_ADDRESS, Gw);
	if (Error == 0) {
		InvalidCfg = TRUE;
		Xbir_Printf("ERROR: Invalid default gateway address: %d\r\n",
			Error);
	}
	if (FALSE == InvalidCfg) {
		Status = XST_SUCCESS;
	}
	return Status;
}
static int Xbir_NwSetDefaultIp ( ip_addr_t * Ip , ip_addr_t * Mask , ip_addr_t * Gw ) { int Status = XST_FAILURE ; int Error ; int InvalidCfg = FALSE ; Xbir_Printf ( " \r \n " , XBIR_NW_DEFAULT_IP_ADDRESS ) ; Error = inet_aton ( XBIR_NW_DEFAULT_IP_ADDRESS , Ip ) ; if ( Error == 0 ) { InvalidCfg = TRUE ; Xbir_Printf ( " \r \n " , Error ) ; } Error = inet_aton ( XBIR_NW_DEFAULT_IP_MASK , Mask ) ; if ( Error == 0 ) { InvalidCfg = TRUE ; Xbir_Printf ( " \r \n " , Error ) ; } Error = inet_aton ( XBIR_NW_DEFAULT_GW_ADDRESS , Gw ) ; if ( Error == 0 ) { InvalidCfg = TRUE ; Xbir_Printf ( " \r \n " , Error ) ; } if ( FALSE == InvalidCfg ) { Status = XST_SUCCESS ; } return Status ; }
@brief
 This function sets the default fixed IP address for the SysBoard.
@brief This function sets the default fixed IP address for the SysBoard .