summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorroot <root@aquarius.(none)>2010-09-25 18:09:38 +0200
committerroot <root@aquarius.(none)>2010-09-25 18:09:38 +0200
commit61809b4cf7467ae3988a2f6832c94d4d211552c8 (patch)
tree9bc72d5b9da2f4fd27f45ba5cbbfe2d87bf64761 /main.c
parent7d9e514c276648b1db2286e780649f08c17225ca (diff)
downloadMAC-Telnet-61809b4cf7467ae3988a2f6832c94d4d211552c8.tar.gz
MAC-Telnet-61809b4cf7467ae3988a2f6832c94d4d211552c8.zip
Done splitting files
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;
}