Print this page
dccp: snoop, build system fixes


 282                                 break;
 283                         case IPPROTO_UDP:
 284                                 (void) interpret_udp(flags,
 285                                     (struct udphdr *)data, iplen, fraglen);
 286                                 break;
 287 
 288                         case IPPROTO_IDP:
 289                         case IPPROTO_HELLO:
 290                         case IPPROTO_ND:
 291                         case IPPROTO_RAW:
 292                                 break;
 293                         case IPPROTO_IPV6:      /* IPV6 encap */
 294                                 /* LINTED: alignment */
 295                                 (void) interpret_ipv6(flags, (ip6_t *)data,
 296                                     iplen);
 297                                 break;
 298                         case IPPROTO_SCTP:
 299                                 (void) interpret_sctp(flags,
 300                                     (struct sctp_hdr *)data, iplen, fraglen);
 301                                 break;




 302                         }
 303                 }
 304         }
 305 
 306         encap_levels--;
 307         return (iplen);
 308 }
 309 
 310 int
 311 interpret_ipv6(int flags, const ip6_t *ip6h, int fraglen)
 312 {
 313         uint8_t *data;
 314         int hdrlen, iplen;
 315         int version, flow, class;
 316         uchar_t proto;
 317         boolean_t isfrag = B_FALSE;
 318         uint8_t extmask;
 319         /*
 320          * The print_srcname and print_dstname strings are the hostname
 321          * parts of the verbose IPv6 header output, including the comma


 460                         (void) interpret_udp(flags, (struct udphdr *)data,
 461                             iplen, fraglen);
 462                         break;
 463                 case IPPROTO_IDP:
 464                 case IPPROTO_HELLO:
 465                 case IPPROTO_ND:
 466                 case IPPROTO_RAW:
 467                         break;
 468                 case IPPROTO_IPV6:
 469                         /* LINTED: alignment */
 470                         (void) interpret_ipv6(flags, (const ip6_t *)data,
 471                             iplen);
 472                         break;
 473                 case IPPROTO_SCTP:
 474                         (void) interpret_sctp(flags, (struct sctp_hdr *)data,
 475                             iplen, fraglen);
 476                         break;
 477                 case IPPROTO_OSPF:
 478                         interpret_ospf6(flags, data, iplen, fraglen);
 479                         break;




 480                 }
 481         }
 482 
 483         return (iplen);
 484 }
 485 
 486 /*
 487  * ip_ext: data including the extension header.
 488  * iplen: length of the data remaining in the packet.
 489  * Returns a mask of IPv6 extension headers it processed.
 490  */
 491 uint8_t
 492 print_ipv6_extensions(int flags, uint8_t **hdr, uint8_t *next, int *iplen,
 493     int *fraglen)
 494 {
 495         uint8_t *data_ptr;
 496         uchar_t proto = *next;
 497         boolean_t is_extension_header;
 498         struct ip6_hbh *ipv6ext_hbh;
 499         struct ip6_dest *ipv6ext_dest;




 282                                 break;
 283                         case IPPROTO_UDP:
 284                                 (void) interpret_udp(flags,
 285                                     (struct udphdr *)data, iplen, fraglen);
 286                                 break;
 287 
 288                         case IPPROTO_IDP:
 289                         case IPPROTO_HELLO:
 290                         case IPPROTO_ND:
 291                         case IPPROTO_RAW:
 292                                 break;
 293                         case IPPROTO_IPV6:      /* IPV6 encap */
 294                                 /* LINTED: alignment */
 295                                 (void) interpret_ipv6(flags, (ip6_t *)data,
 296                                     iplen);
 297                                 break;
 298                         case IPPROTO_SCTP:
 299                                 (void) interpret_sctp(flags,
 300                                     (struct sctp_hdr *)data, iplen, fraglen);
 301                                 break;
 302                         case IPPROTO_DCCP:
 303                                 (void) interpret_dccp(flags,
 304                                     (struct dccphdr *)data, iplen, fraglen);
 305                                 break;
 306                         }
 307                 }
 308         }
 309 
 310         encap_levels--;
 311         return (iplen);
 312 }
 313 
 314 int
 315 interpret_ipv6(int flags, const ip6_t *ip6h, int fraglen)
 316 {
 317         uint8_t *data;
 318         int hdrlen, iplen;
 319         int version, flow, class;
 320         uchar_t proto;
 321         boolean_t isfrag = B_FALSE;
 322         uint8_t extmask;
 323         /*
 324          * The print_srcname and print_dstname strings are the hostname
 325          * parts of the verbose IPv6 header output, including the comma


 464                         (void) interpret_udp(flags, (struct udphdr *)data,
 465                             iplen, fraglen);
 466                         break;
 467                 case IPPROTO_IDP:
 468                 case IPPROTO_HELLO:
 469                 case IPPROTO_ND:
 470                 case IPPROTO_RAW:
 471                         break;
 472                 case IPPROTO_IPV6:
 473                         /* LINTED: alignment */
 474                         (void) interpret_ipv6(flags, (const ip6_t *)data,
 475                             iplen);
 476                         break;
 477                 case IPPROTO_SCTP:
 478                         (void) interpret_sctp(flags, (struct sctp_hdr *)data,
 479                             iplen, fraglen);
 480                         break;
 481                 case IPPROTO_OSPF:
 482                         interpret_ospf6(flags, data, iplen, fraglen);
 483                         break;
 484                 case IPPROTO_DCCP:
 485                         (void) interpret_dccp(flags, (struct dccphdr *)data,
 486                             iplen, fraglen);
 487                         break;
 488                 }
 489         }
 490 
 491         return (iplen);
 492 }
 493 
 494 /*
 495  * ip_ext: data including the extension header.
 496  * iplen: length of the data remaining in the packet.
 497  * Returns a mask of IPv6 extension headers it processed.
 498  */
 499 uint8_t
 500 print_ipv6_extensions(int flags, uint8_t **hdr, uint8_t *next, int *iplen,
 501     int *fraglen)
 502 {
 503         uint8_t *data_ptr;
 504         uchar_t proto = *next;
 505         boolean_t is_extension_header;
 506         struct ip6_hbh *ipv6ext_hbh;
 507         struct ip6_dest *ipv6ext_dest;