summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.c b/main.c
index 402b676..3020db6 100644
--- a/main.c
+++ b/main.c
@@ -1,7 +1,17 @@
#include <stdio.h>
+#include <sys/socket.h>
+#include <linux/if_ether.h>
#include "udp.h"
int main (int argc, char **argv) {
+ int sockfd;
+ int result;
+ char data[11] = "1234567890";
+
+ sockfd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ result = sendCustomUDP(sockfd, "00:19:db:66:e5::bf", "04:1e:64:ea:e5:15", "10.0.0.100", 20561, "255.255.255.255", 20561, data, 10);
+ printf("Send result: %d\n", result);
+ close(sockfd);
return 0;
}