]> git.sur5r.net Git - ngadmin/blob - lib/src/network.h
c9043d2e871be961cbdee163d3706dccd51a3b0e
[ngadmin] / lib / src / 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 "lib.h"
15 #include "protocol.h"
16
17
18
19 // 
20 int startNetwork (struct ngadmin *nga);
21
22 // 
23 int stopNetwork (struct ngadmin *nga);
24
25 // 
26 int forceInterface (struct ngadmin *nga);
27
28 // 
29 int updateTimeout (struct ngadmin *nga);
30
31 // 
32 int sendNgPacket (struct ngadmin *nga, char code, const List *attr);
33
34 // 
35 int recvNgPacket (struct ngadmin *nga, char code, unsigned short *error, unsigned short *attr_error, List *attr);
36
37 // 
38 int readRequest (struct ngadmin *nga, List *attr);
39
40 // 
41 int writeRequest (struct ngadmin *nga, List *attr);
42
43
44
45 #endif
46