Channels
  • manikant singh

    manikant singh

    1 year ago
    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.
  • sundsta

    sundsta

    1 year ago
  • CptOfEvilMinions

    CptOfEvilMinions

    1 year ago
    select REPLACE(REPLACE(protocol,17,'UDP'),6,"TCP") from listening_ports WHERE protocol !=0 LIMIT 50;

    Replaces 6 with
    TCP
    and 17 with
    UDP