diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2018-08-12 12:41:17 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-08-12 12:41:17 +0200 |
commit | e265035809d6d839b259edec8ac8b197ccce3249 (patch) | |
tree | 5c0670fbf89eb3601027be00e24e704b17762a13 /client.c | |
parent | 0acc3047af9eef460e90adaa3e0e59b602adbb0a (diff) |
Remove old client and server
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/client.c b/client.c deleted file mode 100644 index aa9b13c..0000000 --- a/client.c +++ /dev/null @@ -1,36 +0,0 @@ -#include <stdio.h> -#include <stddef.h> -#include <string.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <netinet/ip_icmp.h> -#include <arpa/inet.h> -#include <unistd.h> -#include "icmp_client.h" -#include "util.h" - -int main(void) { - int sock = icmp_client_open_socket(); - if (sock < 0) { - perror("icmp_client_open_socket"); - return 1; - } - - const char *ip_address = "127.0.0.1"; - // const char *ip_address = "192.168.43.220"; - // const char *ip_address = "198.211.118.67"; // tomsmeding.com - - if (icmp_client_send(sock, inet_addr(ip_address), 1234, "kaashandel", 10) < 0) { - perror("icmp_client_send"); - return 1; - } - - struct icmp_incoming reply = icmp_client_receive(sock); - if (reply.data == NULL) { - perror("icmp_client_receive"); - return 1; - } - - printf("Received length: %zd payload:\n", reply.length); - xxd(reply.data, reply.length); -} |