]> git.sur5r.net Git - ngadmin/blobdiff - lib/src/network.h
Use portable way to handle timeouts
[ngadmin] / lib / src / network.h
index 0b895b8c08b053de92da1bcc35a7476a9d1d32ee..ca80cb68f969169a219fca0dca77b2a2880607fb 100644 (file)
@@ -3,34 +3,36 @@
 #define DEF_NETWORK
 
 
-#include <string.h>
-#include <unistd.h>
-#include <arpa/inet.h>
-#include <net/if.h>
-#include <netinet/ether.h>
-#include <sys/ioctl.h>
-
-#include "list.h"
+#include <nsdp/list.h>
+#include <nsdp/net.h>
 #include "lib.h"
-#include "protocol.h"
 
 
-
-// 
 int startNetwork (struct ngadmin *nga);
 
-// 
+
+int setBroadcastType (struct ngadmin *nga, bool value);
+
+
 int stopNetwork (struct ngadmin *nga);
 
-// 
-int updateTimeout (struct ngadmin *nga);
 
-// 
-int sendNgPacket (struct ngadmin *nga, char code, const struct ether_addr *switch_mac, unsigned int seqnum, const List *attr);
+int forceInterface (struct ngadmin *nga);
+
+
+void prepareSend (struct ngadmin *nga, struct nsdp_cmd *nc, unsigned char code);
+
+
+void prepareRecv (struct ngadmin *nga, struct nsdp_cmd *nc, unsigned char code);
+
+
+int readRequest (struct ngadmin *nga, List *attr);
+
+
+int writeRequest (struct ngadmin *nga, List *attr);
 
-// 
-List* recvNgPacket (struct ngadmin *nga, char code, char *error, unsigned short *attr_error, const struct ether_addr *switch_mac, unsigned int seqnum);
 
+void extractSwitchAttributes (struct swi_attr *sa, const List *l);
 
 
 #endif