aboutsummaryrefslogtreecommitdiff
path: root/mcping.c
diff options
context:
space:
mode:
Diffstat (limited to 'mcping.c')
-rw-r--r--mcping.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mcping.c b/mcping.c
index 037dcc5..cc43e73 100644
--- a/mcping.c
+++ b/mcping.c
@@ -1,3 +1,4 @@
+#include <netinet/in.h>
#include <string.h>
#include <getopt.h>
#include <stdlib.h>
@@ -55,9 +56,9 @@ int main(int argc, char *argv[])
if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0)
perror("bad socket\n");
- connect_mc_server_ping(s, address, port);
- send_handshake(s, protocol_ver, address, port, 1);
- send_packet(s, 0x0, 0, NULL); // request packet (0x0 with no fields)
+ connect_mc_server(s, address, port, PING);
+ send_ping_handshake(s, protocol_ver, address, port, 1);
+ send_ping_packet(s, 0x0, 0, NULL); // request packet (0x0 with no fields)
packet response = recv_packet(s);
#ifdef _DEBUG