24 #include <interface/interface_info.h>
25 #include <interface/interface.h>
26 #include <utils/misc/strndup.h>
48 unsigned int serial,
bool has_writer,
unsigned int num_readers)
50 __type = strndup(type, __INTERFACE_TYPE_SIZE);
51 __id = strndup(
id, __INTERFACE_ID_SIZE);
52 __hash = (
unsigned char *)malloc(__INTERFACE_HASH_SIZE);
53 memcpy(__hash, hash, __INTERFACE_HASH_SIZE);
65 __type = strndup(i.__type, __INTERFACE_TYPE_SIZE);
66 __id = strndup(i.__id, __INTERFACE_ID_SIZE);
67 __hash = (
unsigned char *)malloc(__INTERFACE_HASH_SIZE);
68 memcpy(__hash, i.__hash, __INTERFACE_HASH_SIZE);
69 __has_writer = i.__has_writer;
70 __num_readers = i.__num_readers;
71 __serial = i.__serial;
107 const unsigned char *
130 return __num_readers;
155 int td = strncmp(__type, ii.__type, __INTERFACE_TYPE_SIZE);
161 return (strncmp(__id, ii.__id, __INTERFACE_ID_SIZE) < 0);
182 unsigned int serial,
bool has_writer,
unsigned int num_readers)
184 push_back(
InterfaceInfo(type,
id, hash, serial, has_writer, num_readers));