]> git.sur5r.net Git - ngadmin/blob - network.h
Initial commit.
[ngadmin] / network.h
1
2 #ifndef DEF_NETWORK
3 #define DEF_NETWORK
4
5
6 #include <string.h>
7 #include <unistd.h>
8 #include <arpa/inet.h>
9 #include <net/if.h>
10 #include <netinet/ether.h>
11 #include <sys/ioctl.h>
12
13 #include "list.h"
14 #include "protocol.h"
15
16
17
18 int startNetwork (const char *iface);
19
20 int stopNetwork (void);
21
22
23
24 int setTimeout (double sec);
25
26 int getTimeout (double *sec);
27
28
29
30 int sendNgPacket (char code, const struct ether_addr *switch_mac, unsigned int seqnum, const List *attr);
31
32 List* recvNgPacket (char code, const struct ether_addr *switch_mac, unsigned int seqnum);
33
34
35
36 #endif
37