]> git.sur5r.net Git - ngadmin/blob - raw/include/nsdp/net.h
401a1fbb886a0501a48688530e244b8c04192900
[ngadmin] / raw / include / nsdp / net.h
1
2 #ifndef DEF_NET
3 #define DEF_NET
4
5
6 #include <time.h>
7 #include <arpa/inet.h>
8 #include <netinet/ether.h>
9
10 #include <nsdp/list.h>
11
12
13 struct nsdp_cmd {
14         struct ether_addr client_mac;
15         struct ether_addr switch_mac;
16         struct sockaddr_in remote_addr;
17         unsigned int seqnum;
18         unsigned int ports;
19         unsigned char code;
20         unsigned char error;
21         unsigned short attr_error;
22 };
23
24
25
26 int sendNsdpPacket (int sock, const struct nsdp_cmd *nc, const List *attr);
27
28
29 int recvNsdpPacket (int sock, struct nsdp_cmd *nc, List *attr, const struct timespec *timeout);
30
31
32 #endif
33