diff options
author | Plex <thinkplex@riseup.net> | 2022-06-15 17:22:59 +0200 |
---|---|---|
committer | Plex <thinkplex@riseup.net> | 2022-06-15 17:22:59 +0200 |
commit | 72627d2f6efe3f3297ce466a1fdd208015a19f88 (patch) | |
tree | d73c889a721dd31bc1a31f9532d542279026a665 /mcping.c | |
parent | 28b41ee492805971632e1d65ab9f855ce837767b (diff) |
Diffstat (limited to 'mcping.c')
-rw-r--r-- | mcping.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |