1.2.8.6 WDRV_WINC_IPDefaultGatewaySet Function
C
WDRV_WINC_STATUS WDRV_WINC_IPDefaultGatewaySet ( DRV_HANDLE handle, uint32_t gatewayAddress )
Summary
Configures the default gateway used by the WINC.
Description
Disables DHCP on the WINC and assigns a static default gateway address. The address isn't applied to the WINC until a connection is formed.
Precondition
WDRV_WINC_Initialize should have been called. WDRV_WINC_Open should have been called to obtain a valid handle. The WINC must not be connected.
Parameters
Param | Description |
---|---|
handle | Client handle obtained by a call to WDRV_WINC_Open. |
gatewayAddress | IPv4 address of default gateway. |
Returns
WDRV_WINC_STATUS_OK - The address has been accepted.
WDRV_WINC_STATUS_NOT_OPEN - The driver instance is not open.
WDRV_WINC_STATUS_INVALID_ARG - The parameters were incorrect.
WDRV_WINC_STATUS_REQUEST_ERROR - The request to the WINC was rejected.
Remarks
Only applicable when connected in infrastructure station mode. The top 8 bits of the IPv4 32 bit representation corresponds to the last byte of the IPv4 address, i.e. 192.168.0.1 = 0x0100A8C0