Print this page
3903 DTrace SCTP Provider

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/sctp/sctp_bind.c
          +++ new/usr/src/uts/common/inet/sctp/sctp_bind.c
↓ open down ↓ 154 lines elided ↑ open up ↑
 155  155          }
 156  156  
 157  157          /* Cache things in the ixa without any refhold */
 158  158          ASSERT(!(connp->conn_ixa->ixa_free_flags & IXA_FREE_CRED));
 159  159          connp->conn_ixa->ixa_cred = connp->conn_cred;
 160  160          connp->conn_ixa->ixa_cpid = connp->conn_cpid;
 161  161          if (is_system_labeled())
 162  162                  connp->conn_ixa->ixa_tsl = crgetlabel(connp->conn_cred);
 163  163  
 164  164          sctp->sctp_state = SCTPS_LISTEN;
      165 +        DTRACE_SCTP6(state__change, void, NULL, ip_xmit_attr_t *,
      166 +            connp->conn_ixa, void, NULL, sctp_t *, sctp, void, NULL,
      167 +            int32_t, SCTPS_BOUND);
 165  168          (void) random_get_pseudo_bytes(sctp->sctp_secret, SCTP_SECRET_LEN);
 166  169          sctp->sctp_last_secret_update = ddi_get_lbolt64();
 167  170          bzero(sctp->sctp_old_secret, SCTP_SECRET_LEN);
 168  171  
 169  172          /*
 170  173           * If there is an association limit, allocate and initialize
 171  174           * the counter struct.  Note that since listen can be called
 172  175           * multiple times, the struct may have been allready allocated.
 173  176           */
 174  177          if (!list_is_empty(&sctps->sctps_listener_conf) &&
↓ open down ↓ 526 lines elided ↑ open up ↑
 701  704                                          }
 702  705                                          connp->conn_mlp_type = mlptype;
 703  706                                  }
 704  707                          }
 705  708                          /*
 706  709                           * This port is ours. Insert in fanout and mark as
 707  710                           * bound to prevent others from getting the port
 708  711                           * number.
 709  712                           */
 710  713                          sctp->sctp_state = SCTPS_BOUND;
      714 +                        DTRACE_SCTP6(state__change, void, NULL,
      715 +                            ip_xmit_attr_t *, connp->conn_ixa, void, NULL,
      716 +                            scpt_t *, sctp, void, NULL,
      717 +                            int32_t, SCTPS_IDLE);
 711  718                          connp->conn_lport = lport;
 712  719  
 713  720                          ASSERT(&sctps->sctps_bind_fanout[
 714  721                              SCTP_BIND_HASH(port)] == tbf);
 715  722                          sctp_bind_hash_insert(tbf, sctp, 1);
 716  723  
 717  724                          mutex_exit(&tbf->tf_lock);
 718  725  
 719  726                          /*
 720  727                           * We don't want sctp_next_port_to_try to "inherit"
↓ open down ↓ 93 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX