Print this page
dccp: snoop, build system fixes

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_ip.c
          +++ new/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_ip.c
↓ open down ↓ 291 lines elided ↑ open up ↑
 292  292                                  break;
 293  293                          case IPPROTO_IPV6:      /* IPV6 encap */
 294  294                                  /* LINTED: alignment */
 295  295                                  (void) interpret_ipv6(flags, (ip6_t *)data,
 296  296                                      iplen);
 297  297                                  break;
 298  298                          case IPPROTO_SCTP:
 299  299                                  (void) interpret_sctp(flags,
 300  300                                      (struct sctp_hdr *)data, iplen, fraglen);
 301  301                                  break;
      302 +                        case IPPROTO_DCCP:
      303 +                                (void) interpret_dccp(flags,
      304 +                                    (struct dccphdr *)data, iplen, fraglen);
      305 +                                break;
 302  306                          }
 303  307                  }
 304  308          }
 305  309  
 306  310          encap_levels--;
 307  311          return (iplen);
 308  312  }
 309  313  
 310  314  int
 311  315  interpret_ipv6(int flags, const ip6_t *ip6h, int fraglen)
↓ open down ↓ 158 lines elided ↑ open up ↑
 470  474                          (void) interpret_ipv6(flags, (const ip6_t *)data,
 471  475                              iplen);
 472  476                          break;
 473  477                  case IPPROTO_SCTP:
 474  478                          (void) interpret_sctp(flags, (struct sctp_hdr *)data,
 475  479                              iplen, fraglen);
 476  480                          break;
 477  481                  case IPPROTO_OSPF:
 478  482                          interpret_ospf6(flags, data, iplen, fraglen);
 479  483                          break;
      484 +                case IPPROTO_DCCP:
      485 +                        (void) interpret_dccp(flags, (struct dccphdr *)data,
      486 +                            iplen, fraglen);
      487 +                        break;
 480  488                  }
 481  489          }
 482  490  
 483  491          return (iplen);
 484  492  }
 485  493  
 486  494  /*
 487  495   * ip_ext: data including the extension header.
 488  496   * iplen: length of the data remaining in the packet.
 489  497   * Returns a mask of IPv6 extension headers it processed.
↓ open down ↓ 233 lines elided ↑ open up ↑
 723  731          case IPPROTO_TCP:       return ("TCP");
 724  732          case IPPROTO_EGP:       return ("EGP");
 725  733          case IPPROTO_PUP:       return ("PUP");
 726  734          case IPPROTO_UDP:       return ("UDP");
 727  735          case IPPROTO_IDP:       return ("IDP");
 728  736          case IPPROTO_HELLO:     return ("HELLO");
 729  737          case IPPROTO_ND:        return ("ND");
 730  738          case IPPROTO_EON:       return ("EON");
 731  739          case IPPROTO_RAW:       return ("RAW");
 732  740          case IPPROTO_OSPF:      return ("OSPF");
      741 +        case IPPROTO_DCCP:      return ("DCCP");
 733  742          default:                return ("");
 734  743          }
 735  744  }
 736  745  
 737  746  static void
 738  747  prt_routing_hdr(int flags, const struct ip6_rthdr *ipv6ext_rthdr)
 739  748  {
 740  749          uint8_t nxt_hdr;
 741  750          uint8_t type;
 742  751          uint32_t len;
↓ open down ↓ 747 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX