mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 01:10:10 +00:00
Fix server ports counter with vlan_id (#7674)
This commit is contained in:
parent
afccbcf812
commit
55df85e4e0
2 changed files with 16 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ class HostsPorts {
|
|||
/* <vlan, port> -> n_hosts */
|
||||
std::unordered_map<u_int32_t, u_int64_t> vlan_ports;
|
||||
u_int32_t protocol;
|
||||
u_int16_t vlan_id;
|
||||
|
||||
public:
|
||||
HostsPorts(){};
|
||||
|
|
@ -39,11 +40,13 @@ class HostsPorts {
|
|||
inline std::unordered_map<u_int16_t, PortDetails*> getSrvPort() { return(server_ports); };
|
||||
inline std::unordered_map<u_int32_t, u_int64_t> getVLANPorts() { return(vlan_ports); };
|
||||
inline u_int32_t get_protocol() { return(protocol); };
|
||||
inline u_int16_t get_vlan_id() { return(vlan_id); };
|
||||
|
||||
/* Setters */
|
||||
void mergeSrvPorts(std::unordered_map<u_int16_t, ndpi_protocol> *new_server_ports);
|
||||
void mergeVLANPorts(std::unordered_map<u_int16_t, ndpi_protocol> *new_server_ports, u_int16_t vlan_id);
|
||||
void set_protocol(u_int32_t _protocol) { protocol = _protocol; };
|
||||
void set_vlan_id(u_int16_t _vlan_id) { vlan_id = _vlan_id; };
|
||||
};
|
||||
|
||||
#endif /* _HOSTS_PORTS_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue