~ubuntu-branches/ubuntu/wily/ntopng/wily-proposed

« back to all changes in this revision

Viewing changes to StringHost.h

  • Committer: Package Import Robot
  • Author(s): Ludovico Cavedon
  • Date: 2014-07-27 16:13:47 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140727161347-0i8n5upu69ibq5d2
Tags: 1.2.0+dfsg1-1
* Imported Upstream version 1.2.0+dfsg1
* Update watch rule for new upstream naming convention.
* get-roig-source: Support both +svn and ~svn in version.
* Remove external hiredis from orig tarball.
* Remove Rickshaw from orig tarball.
* Remove documentation without source from orig tarball and insert an http
* Remove corrupted unused serializeCFJSON-0.1.js from orig tarball.
  link to it in README.Debian.
* Remove nDPI from orig tarball.
* Remove all debian/missing-sources files that are now included not-minified
  by upstream. Remove build-deps on node-uglify and cleancss.
* Remove references to third-party/redis-lua (removed upstream).
* Update copyright.
* Refresh patches and remove those merged upstream.
* Add external-hiredis.patch to use system libhiredis.
* Add rickshaw-keep-one.patch to remove references to additional rickshaw
  library.
* Add no-svn.patch to drop requirement on SVN.
* Add manpage.patch to fix usage of minus signs, hyphens, and dashes,
  missing space and line breaks.
* Add rickshaw.patch to use single rickshaw.{css,js} files.
* Split library removing part of build-flags.patch into remove-libs.patch.
* Rename debian-defaults.patch to path-defaults.patch and use installation
  path from configure.
* Use dh-autoreconf instead of autotools-dev.
* Add build-dep on libsqlite3-dev.
* Update build-dep on newer libndpi-dev.
* Cleanup of dh_install rules.
* Fix typo in font-awesome symlink path and remove and updates symlink links
  in ntopng-data/
* Remove executable bit to non executable files.
* Use system linjs-jquery tablesorter and form.
* Add Build-Dep on libhiredis-dev.
* Remove empty httpdocs/ssl directory.
* Add systemd support.
* Stop supporting ENABLED in /etc/default/ntopng and debian/NEWS to notify
  users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *
3
 
 * (C) 2013 - ntop.org
 
3
 * (C) 2013-14 - ntop.org
4
4
 *
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or modify
28
28
 private:
29
29
  char *keyname;
30
30
  u_int16_t family_id;
 
31
  bool tracked_host;
 
32
  /* Throughput */
 
33
  float bytes_thpt;
 
34
  ValueTrend bytes_thpt_trend;
 
35
  u_int64_t queriesReceived;
 
36
  AggregationType mode;
 
37
  void computeHostSerial();
31
38
 
32
39
 public:
33
40
  StringHost(NetworkInterface *_iface, char *_key, u_int16_t _family_id);
34
41
  ~StringHost();
35
 
 
36
 
  inline char* host_key()          { return(keyname);   };
37
 
  inline u_int16_t get_family_id() { return(family_id); };
 
42
  
 
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);         };
38
49
  bool idle();
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);
43
 
  /* Throughput */
44
 
  float bytes_thpt;
45
 
  ValueTrend bytes_thpt_trend;
 
55
  void flushContacts(bool freeHost);
 
56
  bool addIfMatching(lua_State* vm, char *key);
46
57
};
47
58
 
48
59
#endif /* _STRING_HOST_H_ */