aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/socket/error.h
diff options
context:
space:
mode:
authorLuca Muscariello <lumuscar+fdio@cisco.com>2019-03-23 14:13:53 +0100
committerAngelo Mantellini <manangel@cisco.com>2019-03-24 14:11:17 +0100
commiteb323e056e747d71867cf965434811c1de925de2 (patch)
tree23a6096823d795efe448559cf0409a18ab47932d /hicn-light/src/socket/error.h
parent43562f9f02d35e5d540ab4028a0326c0c7cd4898 (diff)
[HICN-141] Definition of a C API for hicn-light
Change-Id: Id861f0abe58b1e3c9ba8cc76701da0f9c6801748 Signed-off-by: Luca Muscariello <lumuscar+fdio@cisco.com> Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'hicn-light/src/socket/error.h')
-rw-r--r--hicn-light/src/socket/error.h46
1 files changed, 0 insertions, 46 deletions
diff --git a/hicn-light/src/socket/error.h b/hicn-light/src/socket/error.h
deleted file mode 100644
index 8195efd84..000000000
--- a/hicn-light/src/socket/error.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef HICN_SOCKET_ERROR_H
-#define HICN_SOCKET_ERROR_H
-
-// FIXME remove unused errors
-#define foreach_hicn_socket_error \
- _(NONE, 0, "OK") \
- _(UNSPEC, 1, "unspecified error") \
- _(NOT_HICN, 2, "not a hICN paclet") \
- _(UNKNOWN_ADDRESS, 10, "unknown address") \
- _(INVALID_PARAMETER, 20, "invalid parameter") \
- _(INVALID_IP_ADDRESS, 21, "invalid IP address") \
- _(CORRUPTED_PACKET, 22, "corrupted packet") \
- _(UNEXPECTED, 98, "unexpected error") \
- _(NOT_IMPLEMENTED, 99, "not implemented") \
- _(SOCKET_LOCAL_NULL_ADDRESS, 101, "empty local address") \
- _(SOCKET_LOCAL_REPR, 102, "cannot represent local address") \
- _(SOCKET_LOCAL_HEURISTIC, 103, "error finding local address") \
- _(SOCKET_LOCAL_SET_TUN_IP, 104, "cannot set local IP to TUN") \
- _(BIND_SOCKET_NOT_FOUND, 301, "bind: socket not found") \
- _(BIND_SOCKET_ALREADY_BOUND, 302, "bind: socket already bound") \
- _(BIND_REMOTE_INTERFACE, 303, "bind: no interface towards gateway") \
- _(BIND_REMOTE_NETMASK, 304, "bind: no local IP with netmask < 128") \
- _(BIND_REMOTE_REPR, 305, "bind: error representing local IP") \
- _(BIND_REMOTE_LOCAL_NULL_ADDR, 306, "bind: could not set local endpoint") \
- _(BIND_REMOTE_LOCAL_REPR, 307, "bind: error representing remote IP") \
- _(BIND_REMOTE_LOCAL_HEURISTIC, 308, "bind: could not apply heuristic") \
- _(BIND_REMOTE_LOCAL_SET_TUN_IP, 309, "bind: error setting local IP to TUN") \
- _(BIND_NDP, 310, "bind: could not enable NDP proxy") \
- _(BIND_NEIGH_PROXY, 311, "bind: could not neighbour") \
- _(BIND_REPR, 312, "bind: error represeting IP") \
- _(BIND_LO, 313, "bind: could not remove local route") \
- _(BIND_RULE, 314, "bind: could not add rule") \
- _(BIND_ROUTE, 315, "bind: could not add output route")
-
-typedef enum {
-#define _(a, b, c) HICN_SOCKET_ERROR_##a = (-b),
- foreach_hicn_socket_error
-#undef _
- HICN_SOCKET_N_ERROR,
-} hicn_socket_error_t;
-
-extern const char *HICN_SOCKET_ERROR_STRING[];
-
-#define hicn_socket_strerror(errno) (char *)(HICN_SOCKET_ERROR_STRING[-errno])
-
-#endif /* HICN_SOCKET_ERROR_H */