OpENer - Open Source EtherNet/IP(TM) I/O Target Stack
2.1
|
This file includes the prototypes for error resolution functions like strerror_r or WSAGetLastError. More...
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... | |
This file includes the prototypes for error resolution functions like strerror_r or WSAGetLastError.
Definition in file opener_error.h.
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().
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 *)
Definition at line 21 of file opener_error.c.
References kErrorMessageBufferSize.
Referenced by CheckAndHandleConsumingUdpSockets(), CheckAndHandleTcpListenerSocket(), CheckAndHandleUdpGlobalBroadcastSocket(), CheckAndHandleUdpUnicastSocket(), CloseEncapsulationSessionBySockAddr(), CloseSocketPlatform(), CreateUdpSocket(), HandleDataOnTcpSocket(), NetworkHandlerInitialize(), NetworkHandlerProcessOnce(), and SendUdpData().
int GetSocketErrorNumber | ( | ) |
Gets the error number or equivalent.
A delegate which implements how to get the error number from the system
Definition at line 17 of file opener_error.c.
Referenced by CheckAndHandleConsumingUdpSockets(), CheckAndHandleTcpListenerSocket(), CheckAndHandleUdpGlobalBroadcastSocket(), CheckAndHandleUdpUnicastSocket(), CloseEncapsulationSessionBySockAddr(), CloseSocketPlatform(), CreateUdpSocket(), HandleDataOnTcpSocket(), NetworkHandlerInitialize(), NetworkHandlerProcessOnce(), and SendUdpData().