Print this page
dccp: options and features

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_rport.c
          +++ new/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_rport.c
↓ open down ↓ 135 lines elided ↑ open up ↑
 136  136          { 9900,                 "IUA" },
 137  137          { 0,                    NULL },
 138  138  };
 139  139  
 140  140  char *
 141  141  getportname(int proto, in_port_t port)
 142  142  {
 143  143          const struct porttable *p, *pt;
 144  144  
 145  145          switch (proto) {
 146      -        case IPPROTO_SCTP: /* fallthru */
      146 +        case IPPROTO_DCCP: /* fallthru */
      147 +        case IPPROTO_SCTP:
 147  148          case IPPROTO_TCP: pt = pt_tcp; break;
 148  149          case IPPROTO_UDP: pt = pt_udp; break;
 149  150          default: return (NULL);
 150  151          }
 151  152  
 152  153          for (p = pt; p->pt_num; p++) {
 153  154                  if (port == p->pt_num)
 154  155                          return (p->pt_short);
 155  156          }
 156  157          return (NULL);
↓ open down ↓ 296 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX