OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
networkhandler.h File Reference
#include "typedefs.h"
Include dependency graph for networkhandler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OPENER_SOCKET_WOULD_BLOCK   WSAEWOULDBLOCK
 

Typedefs

typedef unsigned long socklen_t
 

Functions

void CloseSocketPlatform (int socket_handle)
 Platform dependent code to close a socket. More...
 
MicroSeconds GetMicroSeconds (void)
 This function shall return the current time in microseconds relative to epoch, and shall be implemented in a port specific networkhandler. More...
 
MilliSeconds GetMilliSeconds (void)
 This function shall return the current time in milliseconds relative to epoch, and shall be implemented in a port specific networkhandler. More...
 
EipStatus NetworkHandlerInitializePlatform (void)
 Executes platform dependent network handler initialization code. More...
 
int SetQosOnSocket (int socket, CipUsint qos_value)
 
int SetSocketToNonBlocking (int socket_handle)
 

Macro Definition Documentation

#define OPENER_SOCKET_WOULD_BLOCK   WSAEWOULDBLOCK

Definition at line 11 of file networkhandler.h.

Typedef Documentation

typedef unsigned long socklen_t

Definition at line 13 of file networkhandler.h.

Function Documentation

void CloseSocketPlatform ( int  socket_handle)

Platform dependent code to close a socket.

Parameters
socket_handleThe socket handle to be closed

Definition at line 40 of file networkhandler.c.

References FreeErrorMessage(), GetErrorMessage(), GetSocketErrorNumber(), and OPENER_TRACE_ERR.

Referenced by CloseSocket().

Here is the call graph for this function:

Here is the caller graph for this function:

MicroSeconds GetMicroSeconds ( void  )

This function shall return the current time in microseconds relative to epoch, and shall be implemented in a port specific networkhandler.

Returns
Current time relative to epoch as MicroSeconds

Definition at line 18 of file networkhandler.c.

References OPENER_ASSERT.

Referenced by GetMilliSeconds().

Here is the caller graph for this function:

MilliSeconds GetMilliSeconds ( void  )

This function shall return the current time in milliseconds relative to epoch, and shall be implemented in a port specific networkhandler.

Returns
Current time relative to epoch as MilliSeconds

Definition at line 28 of file networkhandler.c.

References getMicroSeconds(), and GetMicroSeconds().

Referenced by NetworkHandlerInitialize(), and NetworkHandlerProcessOnce().

Here is the call graph for this function:

Here is the caller graph for this function:

EipStatus NetworkHandlerInitializePlatform ( void  )

Executes platform dependent network handler initialization code.

Returns
EipStatusOk if initialization was successful, otherwise EipStatusError

Definition at line 32 of file networkhandler.c.

References kEipStatusOk.

Referenced by NetworkHandlerInitialize().

Here is the caller graph for this function:

int SetQosOnSocket ( int  socket,
CipUsint  qos_value 
)

Definition at line 49 of file networkhandler.c.

Referenced by CheckAndHandleTcpListenerSocket(), and CreateUdpSocket().

Here is the caller graph for this function:

int SetSocketToNonBlocking ( int  socket_handle)

Definition at line 44 of file networkhandler.c.

Referenced by CreateUdpSocket(), and NetworkHandlerInitialize().

Here is the caller graph for this function: