libicmp/includes/internal/icmp_internal.h

24 lines
507 B
C

#ifndef ICMP_INTERNAL_H
#define ICMP_INTERNAL_H
/* Internal handle structure */
struct icmp_handle {
int fd;
int last_error;
char error_msg[256];
};
/* Error codes */
#define ICMP_OK 0
#define ICMP_ERR_PERMISSION -1
#define ICMP_ERR_SOCKET -2
#define ICMP_ERR_SEND -3
#define ICMP_ERR_RECV -4
#define ICMP_ERR_INVALID -5
#define ICMP_ERR_ENOMEM -6
#define ICMP_ERR_AGAIN -7
/* Internal error handling functions */
void icmp_set_error(struct icmp_handle *h, int code, const char *msg);
#endif