OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
opener_error.c File Reference
#include <windows.h>
#include "opener_error.h"
Include dependency graph for opener_error.c:

Go to the source code of this file.

Functions

void FreeErrorMessage (char *error_message)
 Frees the space of the error message generated by GetErrorMessage(int) More...
 
char * GetErrorMessage (int error_number)
 Returns a human readable message for the given error number. More...
 
int GetSocketErrorNumber ()
 Gets the error number or equivalent. More...
 

Function Documentation

void FreeErrorMessage ( char *  error_message)

Frees the space of the error message generated by GetErrorMessage(int)

This function shall implement an appropriate method to free the space allocated by GetErrorMessage(int)

Definition at line 34 of file opener_error.c.

Referenced by CheckAndHandleConsumingUdpSockets(), CheckAndHandleTcpListenerSocket(), CheckAndHandleUdpGlobalBroadcastSocket(), CheckAndHandleUdpUnicastSocket(), CloseEncapsulationSessionBySockAddr(), CloseSocketPlatform(), CreateUdpSocket(), HandleDataOnTcpSocket(), NetworkHandlerInitialize(), NetworkHandlerProcessOnce(), and SendUdpData().

Here is the caller graph for this function:

char* GetErrorMessage ( int  error_number)

Returns a human readable message for the given error number.

Returns a human readable error message to be used in logs and traces. The error message shall not be a shared memory, like the classic strerror function, as such functions are non-reentrant To free the space in which the error message is returned the user shall implement and use the function FreeErrorMessage(char *)

Returns
A human readable error message for the given error number

Definition at line 21 of file opener_error.c.

Referenced by CheckAndHandleConsumingUdpSockets(), CheckAndHandleTcpListenerSocket(), CheckAndHandleUdpGlobalBroadcastSocket(), CheckAndHandleUdpUnicastSocket(), CloseEncapsulationSessionBySockAddr(), CloseSocketPlatform(), CreateUdpSocket(), HandleDataOnTcpSocket(), NetworkHandlerInitialize(), NetworkHandlerProcessOnce(), and SendUdpData().

Here is the caller graph for this function:

int GetSocketErrorNumber ( )

Gets the error number or equivalent.

A delegate which implements how to get the error number from the system

Returns
Error number

Definition at line 17 of file opener_error.c.

Referenced by CheckAndHandleConsumingUdpSockets(), CheckAndHandleTcpListenerSocket(), CheckAndHandleUdpGlobalBroadcastSocket(), CheckAndHandleUdpUnicastSocket(), CloseEncapsulationSessionBySockAddr(), CloseSocketPlatform(), CreateUdpSocket(), HandleDataOnTcpSocket(), NetworkHandlerInitialize(), NetworkHandlerProcessOnce(), and SendUdpData().

Here is the caller graph for this function: