31 #ifndef SYSTEM_CORE_INC_NET_OC_NETIF_H_ 32 #define SYSTEM_CORE_INC_NET_OC_NETIF_H_ 43 #define _________________________________________TYPES_SECTION______________________________________________________________________________ 70 #undef _________________________________________TYPES_SECTION______________________________________________________________________________ 78 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________ 110 extern oC_ErrorCode_t
oC_Netif_UpdateIp ( oC_Netif_t Netif , oC_Time_t Timeout );
117 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
oC_ErrorCode_t oC_Netif_ReadHardwareAddress(oC_Netif_t Netif, oC_Net_HardwareAddress_t *outHardwareAddress)
reads hardware address of the interface
bool oC_Netif_GetListenMode(oC_Netif_t Netif)
returns true if listen mode is enabled
oC_Driver_t oC_Netif_GetDriver(oC_Netif_t Netif)
returns driver related with the Netif
const char * oC_Netif_GetFriendlyName(oC_Netif_t Netif)
returns friendly name of the network interface
The file with interface for thread managing.
oC_ErrorCode_t oC_Netif_SendAddressProbe(oC_Netif_t Netif, oC_Time_t Timeout)
sends frame that probes the address
oC_ErrorCode_t oC_Netif_ReadReceiveThread(oC_Netif_t Netif, oC_Thread_t *outThread)
sets thread for receiving packets
stores network interface informations
oC_ErrorCode_t oC_Netif_PerformDiagnostics(oC_Netif_t Netif, oC_Diag_t *outDiags, uint32_t *NumberOfDiags)
performs diagnostics of the network interface
oC_ErrorCode_t oC_Netif_Unconfigure(oC_Netif_t Netif)
unconfigures network driver related with the Netif
char oC_Net_FriendlyInterfaceName_t[MAXIMUM_FRIENDLY_INTERFACE_NAME]
type for storing friendly name string
oC_ErrorCode_t oC_Netif_Flush(oC_Netif_t Netif)
flushes Network interface
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
uint32_t oC_Net_Ipv4_t
stores IPv4 address
bool oC_Netif_IsCorrect(oC_Netif_t Netif)
checks if the Netif object is correct
oC_Net_HardwareType_t
stores hardware type of the network interface
oC_BaudRate_t oC_Netif_GetBaudRate(oC_Netif_t Netif)
returns baud rate of the network interface
The file with interface for driver creating.
oC_ErrorCode_t oC_Netif_UpdateLinkStatus(oC_Netif_t Netif)
updates link status in the network interface object
struct Netif_t * oC_Netif_t
Netif main object.
oC_ErrorCode_t oC_Netif_SetLoopback(oC_Netif_t Netif, oC_Net_Layer_t Layer, bool Enabled)
enables or disables loopback
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.
oC_ErrorCode_t oC_Netif_SetIpv6Info(oC_Netif_t Netif, const oC_Net_Ipv6Info_t *Info)
sets informations about IPv6
oC_ErrorCode_t oC_Netif_ReadIpv6Info(oC_Netif_t Netif, oC_Net_Ipv6Info_t *outInfo)
reads IPv6 informations
oC_Net_Ipv4_t oC_Netif_GetIpv4Address(oC_Netif_t Netif)
returns address of the network interface
oC_ErrorCode_t oC_Netif_Configure(oC_Netif_t Netif)
configures network driver to work with netif
oC_ErrorCode_t oC_Netif_SetReceiveThread(oC_Netif_t Netif, oC_Thread_t Thread)
sets thread for receiving packets
oC_ErrorCode_t oC_Netif_SetWakeOnLanEvent(oC_Netif_t Netif, oC_Event_t WolEvent)
sets wake on LAN event
oC_ErrorCode_t oC_Netif_SetIpv4Info(oC_Netif_t Netif, const oC_Net_Ipv4Info_t *Info)
sets informations about IPv4
bool oC_Netif_Delete(oC_Netif_t *outNetif)
deletes netif object
oC_ErrorCode_t oC_Netif_ReadNetInfo(oC_Netif_t Netif, oC_Net_Info_t *outInfo)
reads informations about network interface
oC_ErrorCode_t oC_Netif_SetListenMode(oC_Netif_t Netif, bool Enabled)
enables listen mode
oC_ErrorCode_t oC_Netif_WaitOnLink(oC_Netif_t Netif, oC_Time_t Timeout)
waits for the link and updates IP
bool oC_Netif_IsAddressInSubnet(oC_Netif_t Netif, const oC_Net_Address_t *Address)
checks if the given address belongs to the given subnet
bool oC_Netif_IsIpAssigned(oC_Netif_t Netif)
returns true if IP is assigned
bool oC_Netif_IsConfigured(oC_Netif_t Netif)
checks if the driver is configured
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
oC_Net_FriendlyInterfaceName_t oC_Netif_FriendlyName_t
type for storing friendly name string
oC_Net_HardwareType_t oC_Netif_GetHardwareType(oC_Netif_t Netif)
returns hardware type of the network interface
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
oC_ErrorCode_t oC_Netif_ReadIpv4Info(oC_Netif_t Netif, oC_Net_Ipv4Info_t *outInfo)
reads IPv4 informations
File with interface for the NET module.
oC_Net_LinkStatus_t oC_Netif_GetLinkStatus(oC_Netif_t Netif)
returns last known link status of the network interface
bool oC_Netif_ReadIpv6Address(oC_Netif_t Netif, oC_Net_Ipv6_t *outAddress)
reads IPv6 address of the network interface
stores network interface IPv4 informations
stores network interface IPv6 informations
oC_Net_LinkStatus_t
stores network interface link status
oC_ErrorCode_t oC_Netif_UpdateIp(oC_Netif_t Netif, oC_Time_t Timeout)
updates IP in the given network interface
oC_Net_Layer_t
stores layer of the OSI model