Lines Matching defs:stcb

190 sctp_sysctl_copy_out_local_addresses(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sysctl_req *req)
202 if (stcb) {
204 loopback_scope = stcb->asoc.scope.loopback_scope;
205 ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope;
206 local_scope = stcb->asoc.scope.local_scope;
207 site_scope = stcb->asoc.scope.site_scope;
208 ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal;
209 ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal;
241 if (stcb) {
246 if (sctp_is_addr_restricted(stcb, sctp_ifa))
320 if (stcb && sctp_is_addr_restricted(stcb, laddr->ifa))
365 struct sctp_tcb *stcb;
383 LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
386 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
445 LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
446 SCTP_TCB_LOCK(stcb);
447 atomic_add_int(&stcb->asoc.refcnt, 1);
448 SCTP_TCB_UNLOCK(stcb);
451 xstcb.remote_port = ntohs(stcb->rport);
452 if (stcb->asoc.primary_destination != NULL)
453 xstcb.primary_addr = stcb->asoc.primary_destination->ro._l_addr;
454 xstcb.heartbeat_interval = stcb->asoc.heart_beat_delay;
455 xstcb.state = SCTP_GET_STATE(&stcb->asoc); /* FIXME */
457 xstcb.assoc_id = sctp_get_associd(stcb);
458 xstcb.peers_rwnd = stcb->asoc.peers_rwnd;
459 xstcb.in_streams = stcb->asoc.streamincnt;
460 xstcb.out_streams = stcb->asoc.streamoutcnt;
461 xstcb.max_nr_retrans = stcb->asoc.overall_error_count;
464 xstcb.T1_expireries = stcb->asoc.timoinit + stcb->asoc.timocookie;
465 xstcb.T2_expireries = stcb->asoc.timoshutdown + stcb->asoc.timoshutdownack;
466 xstcb.retransmitted_tsns = stcb->asoc.marked_retrans;
467 xstcb.start_time.tv_sec = (uint32_t) stcb->asoc.start_time.tv_sec;
468 xstcb.start_time.tv_usec = (uint32_t) stcb->asoc.start_time.tv_usec;
469 xstcb.discontinuity_time.tv_sec = (uint32_t) stcb->asoc.discontinuity_time.tv_sec;
470 xstcb.discontinuity_time.tv_usec = (uint32_t) stcb->asoc.discontinuity_time.tv_usec;
471 xstcb.total_sends = stcb->total_sends;
472 xstcb.total_recvs = stcb->total_recvs;
473 xstcb.local_tag = stcb->asoc.my_vtag;
474 xstcb.remote_tag = stcb->asoc.peer_vtag;
475 xstcb.initial_tsn = stcb->asoc.init_seq_number;
476 xstcb.highest_tsn = stcb->asoc.sending_seq - 1;
477 xstcb.cumulative_tsn = stcb->asoc.last_acked_seq;
478 xstcb.cumulative_tsn_ack = stcb->asoc.cumulative_tsn;
479 xstcb.mtu = stcb->asoc.smallest_mtu;
480 xstcb.refcnt = stcb->asoc.refcnt;
486 atomic_subtract_int(&stcb->asoc.refcnt, 1);
491 error = sctp_sysctl_copy_out_local_addresses(inp, stcb, req);
494 atomic_subtract_int(&stcb->asoc.refcnt, 1);
497 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
520 atomic_subtract_int(&stcb->asoc.refcnt, 1);
526 atomic_subtract_int(&stcb->asoc.refcnt, 1);