]> git.sur5r.net Git - ngadmin/blob - raw/src/encoding_attr.h
NgCli and libngadmin are now optional
[ngadmin] / raw / src / encoding_attr.h
1
2 #ifndef DEF_ENCODING_ATTR
3 #define DEF_ENCODING_ATTR
4
5
6 #include <stdbool.h>
7
8 #include <nsdp/attr.h>
9
10
11
12 struct attr_handler {
13         unsigned short attr;                                    /* attribute code */
14         unsigned int size;                                      /* expected data size */
15         bool (*encode)(struct attr *at, unsigned char ports);   /* encode function */
16         bool (*decode)(struct attr *at, unsigned char ports);   /* decode function */
17 };
18
19
20 const struct attr_handler* getAttrHandler (unsigned short attrcode);
21
22
23 #endif
24