Title
#general
manikant singh

manikant singh

10/15/2020, 7:33 PM
Hi Guys, Can some tell what number represents what protocol in "listening_ports" table. For example here protocols value is 6. what does it mean? TCP/UDP or any other protocol if any. Here state "ESTABLISHED" suggest TCP connection. But I would to know if protocol number can be mapped to protocol name. Can anyone please either give reference to a document or list its type.
{
  "family": 2,
  "fd": 3,
  "local_address": "45.55.41.97",
  "local_port": 22,
  "net_namespace": 4026531957,
  "path": "",
  "pid": 29831,
  "protocol": 6,
  "remote_address": "128.199.169.146",
  "remote_port": 42266,
  "socket": 32357509,
  "state": "ESTABLISHED"
}
Thanks for your help.
CptOfEvilMinions

CptOfEvilMinions

10/15/2020, 8:21 PM
select REPLACE(REPLACE(protocol,17,'UDP'),6,"TCP") from listening_ports WHERE protocol !=0 LIMIT 50;
8:21 PM
Replaces 6 with
TCP
and 17 with
UDP
manikant singh

manikant singh

10/15/2020, 10:31 PM
Thanks a lot. 🙂