8 #include <netinet/ether.h>
10 #include <nsdp/protocol.h>
12 #include <nsdp/list.h>
17 unsigned char *buffer;
18 struct nsdp_header *nh;
21 struct attr_header *ah;
26 void initNsdpHeader (struct nsdp_header *nh, const struct nsdp_cmd *nc);
29 bool extractNsdpHeader (const struct nsdp_header *nh, struct nsdp_cmd *nc);
32 static inline void initNsdpPacket (struct nsdp_packet *np)
34 np->ah = (struct attr_header*)np->nh->data;
38 static inline int getPacketTotalSize (const struct nsdp_packet *np)
40 return ((unsigned char*)np->ah) - np->buffer;
44 int addPacketAttributes (struct nsdp_packet *np, const List* attr);
47 int extractPacketAttributes (struct nsdp_packet *np, List *attr);