Choco OS  V.0.16.9.0
Join to the chocolate world
oc_netif.h File Reference

Contains interface for netif object. More...

#include <oc_net.h>
#include <oc_driver.h>
#include <oc_thread.h>

Go to the source code of this file.

Typedefs

typedef struct Netif_toC_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 *Address, const char *NetMaskAddress, 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...
 

Detailed Description


Author
Patryk Kubiak
Note
Copyright (C) 2016 Patryk Kubiak patry.nosp@m.k.ku.nosp@m.biak9.nosp@m.0@gm.nosp@m.ail.c.nosp@m.om

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Definition in file oc_netif.h.