Namespaces | |
| namespace | anonymous_namespace{SockDiag.cpp} |
| namespace | anonymous_namespace{SocketSnapshot.cpp} |
Classes | |
| class | DnsResolver |
| class | SocketSnapshot |
| struct | SockInfo |
Functions | |
| std::optional< SockInfo > | sockdiag_lookup_tcp (const std::string &src_ip, std::uint16_t src_port, const std::string &dst_ip, std::uint16_t dst_port) |
| std::optional< SockInfo > | sockdiag_lookup_udp (const std::string &src_ip, std::uint16_t src_port, const std::string &dst_ip, std::uint16_t dst_port) |
| std::optional< SockInfo > bsc::net::sockdiag_lookup_tcp | ( | const std::string & | src_ip, |
| std::uint16_t | src_port, | ||
| const std::string & | dst_ip, | ||
| std::uint16_t | dst_port ) |
Risolve un flow TCP (saddr:sport → daddr:dport) al suo inode + uid tramite NETLINK_SOCK_DIAG.
| src_ip/src_port | Endpoint locale (stringa IPv4 o IPv6) |
| dst_ip/dst_port | Endpoint remoto |
Thread-safe. Ogni chiamata crea/chiude il proprio netlink socket (operazione molto leggera).
Definition at line 118 of file SockDiag.cpp.
References AF_INET, AF_INET6, IPPROTO_TCP, and sockdiag_lookup_tcp().
Referenced by bsc::net::SocketSnapshot::enrich_connection(), and sockdiag_lookup_tcp().
| std::optional< SockInfo > bsc::net::sockdiag_lookup_udp | ( | const std::string & | src_ip, |
| std::uint16_t | src_port, | ||
| const std::string & | dst_ip, | ||
| std::uint16_t | dst_port ) |
Definition at line 130 of file SockDiag.cpp.
References AF_INET, AF_INET6, IPPROTO_UDP, and sockdiag_lookup_udp().
Referenced by bsc::net::SocketSnapshot::enrich_connection(), and sockdiag_lookup_udp().