30
30
u_int16_t family_id;
34
ValueTrend bytes_thpt_trend;
35
u_int64_t queriesReceived;
37
void computeHostSerial();
33
40
StringHost(NetworkInterface *_iface, char *_key, u_int16_t _family_id);
36
inline char* host_key() { return(keyname); };
37
inline u_int16_t get_family_id() { return(family_id); };
43
inline AggregationType get_aggregation_mode() { return(mode); };
44
inline void set_aggregation_mode(AggregationType m) { mode = m; };
45
inline void set_tracked_host(bool tracked) { tracked_host = tracked; if(!host_serial) computeHostSerial(); };
46
inline bool is_tracked_host() { return(tracked_host); };
47
inline char* host_key() { return(keyname); };
48
inline u_int16_t get_family_id() { return(family_id); };
39
50
void lua(lua_State* vm, bool returnHost);
40
inline u_int32_t key() { return(Utils::hashString(keyname)); };
51
inline u_int32_t key() { return( Utils::hashString(keyname) ); };
52
inline void inc_num_queries_rcvd() { queriesReceived++; };
41
53
char* get_string_key(char *buf, u_int buf_len);
42
54
void updateStats(struct timeval *tv);
45
ValueTrend bytes_thpt_trend;
55
void flushContacts(bool freeHost);
56
bool addIfMatching(lua_State* vm, char *key);
48
59
#endif /* _STRING_HOST_H_ */