Files | |
| file | print_error.c |
| Generic application error printing functions implementation. | |
| file | print_error.h |
| Generic application error printing functions. | |
Modules | |
| Echo Service | |
| Ping | |
| Networking tests | |
Defines | |
| #define | IS_ICMP_ERROR(error_code) ((error_code) > 0) |
| Returns whether the error code may be an ICMP error code. | |
| #define | IS_SOCKET_ERROR(error_code) ((error_code) < 0) |
| Returns whether the error code may be socket error code. | |
Functions | |
| void | icmp_print_error (FILE *output, int error_code, const char *prefix, const char *suffix) |
| Prints the specific ICMP error description. | |
| void | print_error (FILE *output, int error_code, const char *prefix, const char *suffix) |
| Prints the error description. | |
| void | socket_print_error (FILE *output, int error_code, const char *prefix, const char *suffix) |
| Prints the specific socket error description. | |
| #define IS_ICMP_ERROR | ( | error_code | ) | ((error_code) > 0) |
Returns whether the error code may be an ICMP error code.
| [in] | error_code | The error code. |
Definition at line 47 of file print_error.h.
| #define IS_SOCKET_ERROR | ( | error_code | ) | ((error_code) < 0) |
Returns whether the error code may be socket error code.
| [in] | error_code | The error code. |
Definition at line 54 of file print_error.h.
| void icmp_print_error | ( | FILE * | output, | |
| int | error_code, | |||
| const char * | prefix, | |||
| const char * | suffix | |||
| ) |
Prints the specific ICMP error description.
| [in] | output | The description output stream. May be NULL. |
| [in] | error_code | The ICMP error code. |
| [in] | prefix | The error description prefix. May be NULL. |
| [in] | suffix | The error description suffix. May be NULL. |
Definition at line 51 of file print_error.c.
| void print_error | ( | FILE * | output, | |
| int | error_code, | |||
| const char * | prefix, | |||
| const char * | suffix | |||
| ) |
Prints the error description.
Supports ICMP and socket error codes.
| [in] | output | The description output stream. May be NULL. |
| [in] | error_code | The error code. |
| [in] | prefix | The error description prefix. May be NULL. |
| [in] | suffix | The error description suffix. May be NULL. |
Definition at line 113 of file print_error.c.
| void socket_print_error | ( | FILE * | output, | |
| int | error_code, | |||
| const char * | prefix, | |||
| const char * | suffix | |||
| ) |
Prints the specific socket error description.
| [in] | output | The description output stream. May be NULL. |
| [in] | error_code | The socket error code. |
| [in] | prefix | The error description prefix. May be NULL. |
| [in] | suffix | The error description suffix. May be NULL. |
Definition at line 128 of file print_error.c.
1.4.7