Remove ethsock.h
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Fri, 5 Feb 2016 18:23:56 +0000 (20:23 +0200)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Fri, 5 Feb 2016 18:27:48 +0000 (20:27 +0200)
ethsock.c
main.c
nmrp.c
nmrpd.h

index bebf7f6faf559009ece153491f0f8916b7c36ddd..cd3d26a86acb1bff8eaa2eb81c9e69b3103f5e09 100644 (file)
--- a/ethsock.c
+++ b/ethsock.c
@@ -3,7 +3,6 @@
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include "ethsock.h"
 #include "nmrpd.h"
 
 #if defined(NMRPFLASH_WINDOWS)
diff --git a/main.c b/main.c
index 2dfc1670f5778c0d447119032772a0613a697b15..41bc08b22872be86769e1d9bbf03a9e6b0364688 100644 (file)
--- a/main.c
+++ b/main.c
@@ -21,7 +21,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include "nmrpd.h"
-#include "ethsock.h"
 
 int verbosity = 0;
 
diff --git a/nmrp.c b/nmrp.c
index 1f31e0162aa2ef5300558b1d94cb94337f49cce7..781a0d2adbbfb4532dca25748e1ae3c388de7e23 100644 (file)
--- a/nmrp.c
+++ b/nmrp.c
@@ -24,7 +24,6 @@
 #include <errno.h>
 #include <stdio.h>
 #include <time.h>
-#include "ethsock.h"
 #include "nmrpd.h"
 
 #define NMRP_HDR_LEN 6
diff --git a/nmrpd.h b/nmrpd.h
index 3105b956f82dc44eeea4525a8e418ef79cbc0df4..1794e5f4c4d51546518c019e28f2ceabb001c8f2 100644 (file)
--- a/nmrpd.h
+++ b/nmrpd.h
@@ -79,4 +79,14 @@ void sock_perror(const char *msg);
 
 extern int verbosity;
 
+struct ethsock;
+
+struct ethsock *ethsock_create(const char *intf, uint16_t protocol);
+int ethsock_close(struct ethsock *sock);
+int ethsock_send(struct ethsock *sock, void *buf, size_t len);
+ssize_t ethsock_recv(struct ethsock *sock, void *buf, size_t len);
+int ethsock_set_timeout(struct ethsock *sock, unsigned msec);
+uint8_t *ethsock_get_hwaddr(struct ethsock *sock);
+int ethsock_list_all(void);
+
 #endif