netlink
netlink copied to clipboard
feat(sock_diag): add state filter option to SocketDiag
I want to retrieve all listening sockets, but I've noticed that SocketDiagTCP consumes a lot of memory and works slowly due to the large number of ESTABLISHED sockets on my server. Therefore, I've added a state filter(backward compatibility) to the SocketDiag function to pre-filter the sockets in the OS.
need review, plz @vishvananda
@laushunyu please resolve the conflicts