Print this page
*** NO COMMENTS ***

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libdtrace/common/ip.d.in
          +++ new/usr/src/lib/libdtrace/common/ip.d.in
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22      - * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
       22 + * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26   26  #pragma ident   "%Z%%M% %I%     %E% SMI"
  27   27  
  28   28  #pragma D depends_on module ip
  29   29  #pragma D depends_on provider ip
  30   30  
  31   31  inline int IPH_DF = @IPH_DF@;
  32   32  #pragma D binding "1.0" IPH_DF
↓ open down ↓ 143 lines elided ↑ open up ↑
 176  176   */
 177  177  typedef uintptr_t void_ip_t;
 178  178  
 179  179  /*
 180  180   * __dtrace_ipsr_ill_t is used by the translator to take an ill_t plus an
 181  181   * additional arg6 from the ip:::send and ip:::recieve probes, and translate
 182  182   * them to an ifinfo_t.
 183  183   */
 184  184  typedef ill_t __dtrace_ipsr_ill_t;
 185  185  
      186 +/*
      187 + * __dtrace_tcpf_ipinfo_t is used by the translators to construct an
      188 + * ipinfo_t during tcp fusion, from a tcp_t plus an additional arg4 for
      189 + * the payload bytes.
      190 + */
      191 +typedef tcp_t __dtrace_tcpf_ipinfo_t;
      192 +
 186  193  #pragma D binding "1.0" translator
 187  194  translator pktinfo_t < mblk_t *M > {
 188  195          pkt_addr = NULL;
 189  196  };
 190  197  
 191  198  #pragma D binding "1.0" translator
 192  199  translator csinfo_t < conn_t *C > {
 193  200          cs_addr = NULL;
 194  201  };
 195  202  
↓ open down ↓ 23 lines elided ↑ open up ↑
 219  226              *(uint8_t *)I >> 4 == 6 ?
 220  227              ntohs(((ip6_t *)I)->ip6_ctlun.ip6_un1.ip6_un1_plen) : 0) : 0;
 221  228          ip_saddr = I != NULL ? (*(uint8_t *)I >> 4 == 4 ?
 222  229              inet_ntoa(&((ipha_t *)I)->ipha_src) : *(uint8_t *)I >> 4 == 6 ?
 223  230              inet_ntoa6(&((ip6_t *)I)->ip6_src) : "<unknown>") : "<unknown>";
 224  231          ip_daddr = I != NULL ? (*(uint8_t *)I >> 4 == 4 ?
 225  232              inet_ntoa(&((ipha_t *)I)->ipha_dst) : *(uint8_t *)I >> 4 == 6 ?
 226  233              inet_ntoa6(&((ip6_t *)I)->ip6_dst) : "<unknown>") : "<unknown>";
 227  234  };
 228  235  
      236 +#pragma D binding "1.0" translator
      237 +translator ipinfo_t < __dtrace_tcpf_ipinfo_t *T > {
      238 +        ip_ver = T->tcp_ipversion;
      239 +        ip_plength = arg4;              /* probe dependent */
      240 +        ip_saddr = inet_ntoa6(probename == "send" ?
      241 +            &T->tcp_connp->connua_v6addr.connua_laddr :
      242 +            &T->tcp_connp->connua_v6addr.connua_faddr);
      243 +        ip_daddr = inet_ntoa6(probename == "send" ?
      244 +            &T->tcp_connp->connua_v6addr.connua_faddr :
      245 +            &T->tcp_connp->connua_v6addr.connua_laddr);
      246 +};
      247 +
 229  248  #pragma D binding "1.0" translator
 230  249  translator ifinfo_t < __dtrace_ipsr_ill_t *I > {
 231  250          if_name = I != NULL ? stringof(I->ill_name) : "<null>";
 232  251          if_ipstack = I != NULL ? I->ill_ipst->ips_netstack->netstack_stackid
 233  252              : 0;
 234  253          if_local = arg6;                /* probe dependent */
 235  254          if_addr = (uintptr_t)I;
 236  255  };
 237  256  
 238  257  #pragma D binding "1.0" translator
↓ open down ↓ 68 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX