summaryrefslogtreecommitdiff
path: root/icmp_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'icmp_server.h')
-rw-r--r--icmp_server.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/icmp_server.h b/icmp_server.h
index fbf4158..f1f4e9f 100644
--- a/icmp_server.h
+++ b/icmp_server.h
@@ -2,28 +2,13 @@
#include "icmp.h"
-#ifndef ICMP_ECHO
-#define ICMP_ECHO 8
-#endif
-#ifndef ICMP_ECHOREPLY
-#define ICMP_ECHOREPLY 0
-#endif
-
-
-struct icmp_server_incoming {
- const uint8_t *data; // points to internal buffer
- size_t length; // length of 'data'
-
- int type; // ICMP_ECHO or ICMP_ECHOREPLY
- int id, seqnum;
- uint32_t source_addr;
-};
// Returns -1 on error with errno.
int icmp_server_open_socket(void);
// Returns {.data=NULL} on error with errno.
-struct icmp_server_incoming icmp_server_receive(int sock);
+// Receives only ECHO.
+struct icmp_incoming icmp_server_receive(int sock);
// Returns -1 on error with errno.
int icmp_server_send_reply(