]> git.sur5r.net Git - ngadmin/blob - lib/src/network.h
534ae31931e9432ac1db74eb3b1b2dfb1781c60e
[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 <poll.h>
9 #include <arpa/inet.h>
10 #include <net/if.h>
11 #include <netinet/ether.h>
12 #include <sys/ioctl.h>
13 //#include <sys/time.h>
14
15 #include "list.h"
16 #include "lib.h"
17 #include "protocol.h"
18
19
20
21
22 // 
23 int startNetwork (struct ngadmin *nga);
24
25 // 
26 int stopNetwork (struct ngadmin *nga);
27
28 // 
29 int forceInterface (struct ngadmin *nga);
30
31 // 
32 int updateTimeout (struct ngadmin *nga);
33
34 // 
35 int sendNgPacket (struct ngadmin *nga, char code, const List *attr);
36
37 // 
38 int recvNgPacket (struct ngadmin *nga, char code, unsigned char *error, unsigned short *attr_error, List *attr);
39
40 // 
41 int readRequest (struct ngadmin *nga, List *attr);
42
43 // 
44 int writeRequest (struct ngadmin *nga, List *attr);
45
46
47
48 #endif
49