Choco OS
V.0.16.9.0
Join to the chocolate world
|
stores informations about the network interface More...
Typedefs | |
typedef struct Netif_t * | oC_Netif_t |
Netif main object. More... | |
typedef oC_Net_FriendlyInterfaceName_t | oC_Netif_FriendlyName_t |
type for storing friendly name string More... | |
Functions | |
oC_Netif_t | oC_Netif_New (oC_Netif_FriendlyName_t FriendlyName, const char *AddressString, const char *NetMaskAddressString, oC_Driver_t Driver, const void *Config) |
Creates Netif object. More... | |
bool | oC_Netif_Delete (oC_Netif_t *outNetif) |
deletes netif object More... | |
bool | oC_Netif_IsCorrect (oC_Netif_t Netif) |
checks if the Netif object is correct More... | |
bool | oC_Netif_IsConfigured (oC_Netif_t Netif) |
checks if the driver is configured More... | |
const char * | oC_Netif_GetFriendlyName (oC_Netif_t Netif) |
returns friendly name of the network interface More... | |
oC_Driver_t | oC_Netif_GetDriver (oC_Netif_t Netif) |
returns driver related with the Netif More... | |
oC_ErrorCode_t | oC_Netif_Configure (oC_Netif_t Netif) |
configures network driver to work with netif More... | |
oC_ErrorCode_t | oC_Netif_Unconfigure (oC_Netif_t Netif) |
unconfigures network driver related with the Netif More... | |
oC_ErrorCode_t | oC_Netif_ReadNetInfo (oC_Netif_t Netif, oC_Net_Info_t *outInfo) |
reads informations about network interface More... | |
oC_ErrorCode_t | oC_Netif_SendPacket (oC_Netif_t Netif, oC_Net_Packet_t *Packet, oC_Time_t Timeout) |
sends packet by using the network interface More... | |
oC_ErrorCode_t | oC_Netif_ReceivePacket (oC_Netif_t Netif, oC_Net_Packet_t *Packet, oC_MemorySize_t PacketSize, oC_Time_t Timeout) |
receives packet by using the interface More... | |
oC_ErrorCode_t | oC_Netif_SetWakeOnLanEvent (oC_Netif_t Netif, oC_Event_t WolEvent) |
sets wake on LAN event More... | |
oC_ErrorCode_t | oC_Netif_Flush (oC_Netif_t Netif) |
flushes Network interface More... | |
oC_ErrorCode_t | oC_Netif_SetLoopback (oC_Netif_t Netif, oC_Net_Layer_t Layer, bool Enabled) |
enables or disables loopback More... | |
oC_ErrorCode_t | oC_Netif_PerformDiagnostics (oC_Netif_t Netif, oC_Diag_t *outDiags, uint32_t *NumberOfDiags) |
performs diagnostics of the network interface More... | |
oC_Net_LinkStatus_t | oC_Netif_GetLinkStatus (oC_Netif_t Netif) |
returns last known link status of the network interface More... | |
oC_BaudRate_t | oC_Netif_GetBaudRate (oC_Netif_t Netif) |
returns baud rate of the network interface More... | |
oC_Net_HardwareType_t | oC_Netif_GetHardwareType (oC_Netif_t Netif) |
returns hardware type of the network interface More... | |
oC_ErrorCode_t | oC_Netif_ReadHardwareAddress (oC_Netif_t Netif, oC_Net_HardwareAddress_t *outHardwareAddress) |
reads hardware address of the interface More... | |
oC_ErrorCode_t | oC_Netif_ReadHardwareAddressOf (oC_Netif_t Netif, oC_Net_HardwareAddress_t *outHardwareAddress, const oC_Net_Address_t *Address, oC_Time_t Timeout) |
reads hardware address of the given IP address in LAN More... | |
oC_ErrorCode_t | oC_Netif_SetIpv4Info (oC_Netif_t Netif, const oC_Net_Ipv4Info_t *Info) |
sets informations about IPv4 More... | |
oC_ErrorCode_t | oC_Netif_ReadIpv4Info (oC_Netif_t Netif, oC_Net_Ipv4Info_t *outInfo) |
reads IPv4 informations More... | |
oC_ErrorCode_t | oC_Netif_SetIpv6Info (oC_Netif_t Netif, const oC_Net_Ipv6Info_t *Info) |
sets informations about IPv6 More... | |
oC_ErrorCode_t | oC_Netif_ReadIpv6Info (oC_Netif_t Netif, oC_Net_Ipv6Info_t *outInfo) |
reads IPv6 informations More... | |
bool | oC_Netif_IsAddressInSubnet (oC_Netif_t Netif, const oC_Net_Address_t *Address) |
checks if the given address belongs to the given subnet More... | |
oC_Net_Ipv4_t | oC_Netif_GetIpv4Address (oC_Netif_t Netif) |
returns address of the network interface | |
bool | oC_Netif_ReadIpv6Address (oC_Netif_t Netif, oC_Net_Ipv6_t *outAddress) |
reads IPv6 address of the network interface | |
oC_ErrorCode_t | oC_Netif_UpdateLinkStatus (oC_Netif_t Netif) |
updates link status in the network interface object More... | |
bool | oC_Netif_IsIpAssigned (oC_Netif_t Netif) |
returns true if IP is assigned | |
oC_ErrorCode_t | oC_Netif_WaitOnLink (oC_Netif_t Netif, oC_Time_t Timeout) |
waits for the link and updates IP More... | |
oC_ErrorCode_t | oC_Netif_UpdateIp (oC_Netif_t Netif, oC_Time_t Timeout) |
updates IP in the given network interface More... | |
oC_ErrorCode_t | oC_Netif_SetReceiveThread (oC_Netif_t Netif, oC_Thread_t Thread) |
sets thread for receiving packets More... | |
oC_ErrorCode_t | oC_Netif_SetListenMode (oC_Netif_t Netif, bool Enabled) |
enables listen mode More... | |
bool | oC_Netif_GetListenMode (oC_Netif_t Netif) |
returns true if listen mode is enabled | |
oC_ErrorCode_t | oC_Netif_ReadReceiveThread (oC_Netif_t Netif, oC_Thread_t *outThread) |
sets thread for receiving packets More... | |
oC_ErrorCode_t | oC_Netif_SendAddressProbe (oC_Netif_t Netif, oC_Time_t Timeout) |
sends frame that probes the address More... | |
The type is for storing friendly name string of the network interface (the string that is easy to understand and remember for human).
Definition at line 68 of file oc_netif.h.
typedef struct Netif_t* oC_Netif_t |
The type is for storing Netif object. All data inside are private, you can only use it for identify the instance for Netif functions. The object cannot be copied.
Please use oC_Netif_New function to create the object and oC_Netif_Delete to destroy it.
Definition at line 59 of file oc_netif.h.
oC_ErrorCode_t oC_Netif_Configure | ( | oC_Netif_t | Netif | ) |
The function is for configuration of the network driver related with the network interface by using configuration structure given to the oC_Netif_New function.
Netif | Netif object from the oC_Netif_New function |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_AlreadyConfigured | Network interface was configured before |
Definition at line 438 of file oc_netif.c.
bool oC_Netif_Delete | ( | oC_Netif_t * | outNetif | ) |
The function is for deleting the Netif object. It release all memory and unconfigures the related driver if it is possible.
outNetif | Netif object from the oC_Netif_New function |
Definition at line 284 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_Flush | ( | oC_Netif_t | Netif | ) |
When this function is called, the transmit FIFO controller logic is reset to its default values and thus all data in the Tx FIFO are lost/flushed.
Netif | Netif object from the oC_Netif_New function |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif or WolEvent is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
Definition at line 836 of file oc_netif.c.
oC_BaudRate_t oC_Netif_GetBaudRate | ( | oC_Netif_t | Netif | ) |
The function returns baud rate of the network interface.
Netif | Netif object from the oC_Netif_New function |
Definition at line 1049 of file oc_netif.c.
oC_Driver_t oC_Netif_GetDriver | ( | oC_Netif_t | Netif | ) |
The function returns the network driver related with the Netif object or NULL in case of error.
Netif | Netif object from the oC_Netif_New function |
Definition at line 407 of file oc_netif.c.
const char* oC_Netif_GetFriendlyName | ( | oC_Netif_t | Netif | ) |
The function is to read friendly name of the network interface
Netif | Netif object from the oC_Netif_New function |
Definition at line 383 of file oc_netif.c.
oC_Net_HardwareType_t oC_Netif_GetHardwareType | ( | oC_Netif_t | Netif | ) |
The function returns hardware type of the network interface
Netif | Netif object from the oC_Netif_New function |
Definition at line 1072 of file oc_netif.c.
oC_Net_LinkStatus_t oC_Netif_GetLinkStatus | ( | oC_Netif_t | Netif | ) |
The function returns link status of the network interface.
Netif | Netif object from the oC_Netif_New function |
Definition at line 1026 of file oc_netif.c.
bool oC_Netif_IsAddressInSubnet | ( | oC_Netif_t | Netif, |
const oC_Net_Address_t * | Address | ||
) |
The function checks if the given address belongs to the network interface subnet.
Netif | Netif object from the oC_Netif_New function |
Address | Pointer to the network address to check (IPv4 or IPv6) |
Definition at line 1393 of file oc_netif.c.
bool oC_Netif_IsConfigured | ( | oC_Netif_t | Netif | ) |
The function is for checking if a driver related with the object was configured before by function oC_Netif_Configure
Netif | Netif object from the oC_Netif_New function |
Definition at line 367 of file oc_netif.c.
bool oC_Netif_IsCorrect | ( | oC_Netif_t | Netif | ) |
The function is for checking if the #Netif object is correct
Netif | Netif object from the oC_Netif_New function |
Definition at line 351 of file oc_netif.c.
oC_Netif_t oC_Netif_New | ( | oC_Netif_FriendlyName_t | FriendlyName, |
const char * | AddressString, | ||
const char * | NetMaskAddressString, | ||
oC_Driver_t | Driver, | ||
const void * | Config | ||
) |
The function is for creating new #Netif object. It allocates memory and initializes variables to work. The function does not configure the related network driver, to do it, you have to call oC_Netif_Configure function.
FriendlyName | String with friendly name |
Address | String with IPv4 or IPv6 address of the network interface or NULL if DHCP should be used |
NetMaskAddress | String with IPv4 or IPv6 address of the network mask or NULL if DHCP should be used |
Driver | Network driver to use for the #Netif object |
Config | Pointer to the configuration of the network driver |
Definition at line 189 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_PerformDiagnostics | ( | oC_Netif_t | Netif, |
oC_Diag_t * | outDiags, | ||
uint32_t * | NumberOfDiags | ||
) |
The function is for performing diagnostics on the selected network interface. The feature has to be handled by the related network driver.
outDiags
field to NULL and NumberOfDiags
to 0, if you want to know count of diagnostics supported by the driver.Netif | Netif object from the oC_Netif_New function |
outDiags | Pointer to the allocated array for diagnostics, or NULL if only number of diagnostics is required |
NumberOfDiags | As input - size of the outDiags array. As output - number of performed diagnostics or diagnostics, that can be performed (if the outDiags is NULL) |
Example:
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_OutputAddressNotInRAM | NumberOfDiags address does not point to the RAM section |
oC_ErrorCode_NotHandledByDriver | The associated network driver does not handle diagnostics |
Definition at line 986 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_ReadHardwareAddress | ( | oC_Netif_t | Netif, |
oC_Net_HardwareAddress_t * | outHardwareAddress | ||
) |
The function reads hardware address of the network interface
Netif | Netif object from the oC_Netif_New function |
outHardwareAddress | Destination for the hardware address |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_OutputAddressNotInRAM | outHardwareAddress address does not point to the RAM section |
Definition at line 1105 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_ReadHardwareAddressOf | ( | oC_Netif_t | Netif, |
oC_Net_HardwareAddress_t * | outHardwareAddress, | ||
const oC_Net_Address_t * | Address, | ||
oC_Time_t | Timeout | ||
) |
The function is for reading hardware address of the machine with the given IP address. It uses ARP protocol to receive it from the Local Area Network (LAN).
Netif | Netif object from the oC_Netif_New function |
outHardwareAddress | Destination for the hardware address |
Address | IP address to find |
Timeout | Maximum time for operation |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_OutputAddressNotInRAM | outHardwareAddress address does not point to the RAM section |
Definition at line 1147 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_ReadIpv4Info | ( | oC_Netif_t | Netif, |
oC_Net_Ipv4Info_t * | outInfo | ||
) |
The function reads IPv4 informations from the given network interface.
Netif | Netif object from the oC_Netif_New function |
outInfo | Destination for the IPv4 informations |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_OutputAddressNotInRAM | The outInfo pointer is not storred in the RAM section |
Definition at line 1288 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_ReadIpv6Info | ( | oC_Netif_t | Netif, |
oC_Net_Ipv6Info_t * | outInfo | ||
) |
The function reads IPv6 informations from the given network interface.
Netif | Netif object from the oC_Netif_New function |
outInfo | Destination for the IPv4 informations |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_OutputAddressNotInRAM | The outInfo pointer is not storred in the RAM section |
Definition at line 1364 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_ReadNetInfo | ( | oC_Netif_t | Netif, |
oC_Net_Info_t * | outInfo | ||
) |
The function is for read informations about the network interface. The network driver related with this object has to be configured before by using the function oC_Netif_Configure.
Netif | Netif object from the oC_Netif_New function |
outInfo | Destination address for the network interface informations |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_OutputAddressNotInRAM | outInfo pointer is not valid RAM pointer |
Definition at line 519 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_ReadReceiveThread | ( | oC_Netif_t | Netif, |
oC_Thread_t * | outThread | ||
) |
The function reads the thread for receiving packet of the Netif.
Netif | Netif object from the oC_Netif_New function |
Thread | Thread object to set |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_ThreadNotSet | Receive thread has not been set yet |
oC_ErrorCode_OutputAddressNotInRAM | outThread does not point to the RAM section |
Definition at line 1723 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_ReceivePacket | ( | oC_Netif_t | Netif, |
oC_Net_Packet_t * | Packet, | ||
oC_MemorySize_t | PacketSize, | ||
oC_Time_t | Timeout | ||
) |
The function receives packet from the network by using the network interface. The interface has to be configured by the function oC_Netif_Configure before.
Netif | Netif object from the oC_Netif_New function |
outPacket | Destination pointer for the packet to receive. It will points to the memory allocated by using the PacketAllocator and it should be released by #kfree when it is not needed anymore |
PacketSize | Size of the packet buffer |
Timeout | Maximum time to wait for the packet |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_OutputAddressNotInRAM | Packet address does not point to the RAM section |
oC_ErrorCode_SizeNotCorrect | PacketSize is too small |
Definition at line 697 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_SendAddressProbe | ( | oC_Netif_t | Netif, |
oC_Time_t | Timeout | ||
) |
The function sends address probe packet - the special packet that confirms the selected IP address and that prevents address conflicts
Netif | Netif object from the oC_Netif_New function |
Timeout | Maximum time to wait for the packet sending |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_TimeNotCorrect | Time is lower than 0 |
Definition at line 1761 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_SendPacket | ( | oC_Netif_t | Netif, |
oC_Net_Packet_t * | Packet, | ||
oC_Time_t | Timeout | ||
) |
Allows for sending a packet to the network location by using the interface. The interface has to be configured by calling the function oC_Netif_Configure before.
Netif | Netif object from the oC_Netif_New function |
Packet | Packet to send |
Timeout | Maximum time to wait for the packet sending |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_WrongAddress | Packet address is not correct |
Definition at line 572 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_SetIpv4Info | ( | oC_Netif_t | Netif, |
const oC_Net_Ipv4Info_t * | Info | ||
) |
The function sets informations about the IPv4.
Netif | Netif object from the oC_Netif_New function |
Info | Pointer to the IPv4 info structure |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_WrongAddress | The Info pointer is not correct |
Definition at line 1252 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_SetIpv6Info | ( | oC_Netif_t | Netif, |
const oC_Net_Ipv6Info_t * | Info | ||
) |
The function sets informations about the IPv6.
Netif | Netif object from the oC_Netif_New function |
Info | Pointer to the IPv4 info structure |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_WrongAddress | The Info pointer is not correct |
Definition at line 1328 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_SetListenMode | ( | oC_Netif_t | Netif, |
bool | Enabled | ||
) |
In listen mode packets are not followed to the upper layer. Thanks to that it is possible to listen all packets send to the netif. Only root user can call this function.
Netif | Netif object from the oC_Netif_New function |
Enabled | true if enabled, false if disabled |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_PermissionDenied | You are not root user |
Definition at line 1674 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_SetLoopback | ( | oC_Netif_t | Netif, |
oC_Net_Layer_t | Layer, | ||
bool | Enabled | ||
) |
The function enables or disables loopback mode at the given network layer.
If the Layer
is set to the oC_Net_Layer_Netif, the loopback will be set in this object. Note, that this will be only software loopback, and the performance of it can be very low.
Netif | Netif object from the oC_Netif_New function |
Layer | Target layer for the loopback |
Enabled | true if loopback should be enabled |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif or WolEvent is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
Definition at line 879 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_SetReceiveThread | ( | oC_Netif_t | Netif, |
oC_Thread_t | Thread | ||
) |
The function sets the thread for receiving packet of the Netif.
Netif | Netif object from the oC_Netif_New function |
Thread | Thread object to set |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_ThreadNotCorrect | Thread is not correct |
Definition at line 1634 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_SetWakeOnLanEvent | ( | oC_Netif_t | Netif, |
oC_Event_t | WolEvent | ||
) |
The function sets the "Wake on LAN" event. This the event, that should be activated when some packet will be available to receive during sleep mode.
Netif | Netif object from the oC_Netif_New function |
WolEvent | Wake on LAN event |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif or WolEvent is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
Definition at line 796 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_Unconfigure | ( | oC_Netif_t | Netif | ) |
The function unconfigures the network driver related with the network interface.
Netif | Netif object from the oC_Netif_New function |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
Definition at line 477 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_UpdateIp | ( | oC_Netif_t | Netif, |
oC_Time_t | Timeout | ||
) |
The function is for updating IP of the given network interface.
Netif | Netif object from the oC_Netif_New function |
Timeout | Maximum time for the operation |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
oC_ErrorCode_LinkNotDetected | The given network interface has not link up status |
Definition at line 1583 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_UpdateLinkStatus | ( | oC_Netif_t | Netif | ) |
The function is for updating link status of the network interface for the function oC_Netif_GetLinkStatus. It reads current link status from the driver and saves it for later.
Netif | Netif object from the oC_Netif_New function |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
Definition at line 1477 of file oc_netif.c.
oC_ErrorCode_t oC_Netif_WaitOnLink | ( | oC_Netif_t | Netif, |
oC_Time_t | Timeout | ||
) |
The function waits for the link (oC_Net_LinkStatus_Up), and updates IP address if it is needed
Netif | Netif object from the oC_Netif_New function |
Timeout | Maximum time to wait on the link |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The configuration function was not called before |
Definition at line 1524 of file oc_netif.c.