| /freebsd-12-stable/sys/netinet/ |
| D | tcp_timer.c | 254 struct tcpcb *tp = xtp; in tcp_timer_delack() local 256 CURVNET_SET(tp->t_vnet); in tcp_timer_delack() 258 inp = tp->t_inpcb; in tcp_timer_delack() 259 KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); in tcp_timer_delack() 261 if (callout_pending(&tp->t_timers->tt_delack) || in tcp_timer_delack() 262 !callout_active(&tp->t_timers->tt_delack)) { in tcp_timer_delack() 267 callout_deactivate(&tp->t_timers->tt_delack); in tcp_timer_delack() 273 tp->t_flags |= TF_ACKNOW; in tcp_timer_delack() 275 (void) tp->t_fb->tfb_tcp_output(tp); in tcp_timer_delack() 281 tcp_inpinfo_lock_del(struct inpcb *inp, struct tcpcb *tp) in tcp_inpinfo_lock_del() argument [all …]
|
| D | tcp_input.c | 279 hhook_run_tcp_est_in(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) in hhook_run_tcp_est_in() argument 284 hhook_data.tp = tp; in hhook_run_tcp_est_in() 289 tp->osd); in hhook_run_tcp_est_in() 298 cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t nsegs, in cc_ack_received() argument 301 INP_WLOCK_ASSERT(tp->t_inpcb); in cc_ack_received() 303 tp->ccv->nsegs = nsegs; in cc_ack_received() 304 tp->ccv->bytes_this_ack = BYTES_THIS_ACK(tp, th); in cc_ack_received() 305 if (tp->snd_cwnd <= tp->snd_wnd) in cc_ack_received() 306 tp->ccv->flags |= CCF_CWND_LIMITED; in cc_ack_received() 308 tp->ccv->flags &= ~CCF_CWND_LIMITED; in cc_ack_received() [all …]
|
| D | tcp_output.c | 140 #define TCP_XMIT_TIMER_ASSERT(tp, len, th_flags) \ argument 142 tcp_timer_active((tp), TT_REXMT) || \ 143 tcp_timer_active((tp), TT_PERSIST), \ 146 static void inline cc_after_idle(struct tcpcb *tp); 153 hhook_run_tcp_est_out(struct tcpcb *tp, struct tcphdr *th, in hhook_run_tcp_est_out() argument 159 hhook_data.tp = tp; in hhook_run_tcp_est_out() 166 tp->osd); in hhook_run_tcp_est_out() 175 cc_after_idle(struct tcpcb *tp) in cc_after_idle() argument 177 INP_WLOCK_ASSERT(tp->t_inpcb); in cc_after_idle() 179 if (CC_ALGO(tp)->after_idle != NULL) in cc_after_idle() [all …]
|
| D | tcp_sack.c | 158 tcp_update_dsack_list(struct tcpcb *tp, tcp_seq rcv_start, tcp_seq rcv_end) in tcp_update_dsack_list() argument 164 INP_WLOCK_ASSERT(tp->t_inpcb); in tcp_update_dsack_list() 168 if (SEQ_LT(rcv_end, tp->rcv_nxt) || in tcp_update_dsack_list() 169 ((rcv_end == tp->rcv_nxt) && in tcp_update_dsack_list() 170 (tp->rcv_numsacks > 0 ) && in tcp_update_dsack_list() 171 (tp->sackblks[0].end == tp->rcv_nxt))) { in tcp_update_dsack_list() 183 for (i = 0; i < tp->rcv_numsacks; i++) { in tcp_update_dsack_list() 184 start = tp->sackblks[i].start; in tcp_update_dsack_list() 185 end = tp->sackblks[i].end; in tcp_update_dsack_list() 194 if (SEQ_GT(tp->rcv_nxt, end)) { in tcp_update_dsack_list() [all …]
|
| D | tcp_usrreq.c | 127 #define TCPDEBUG1() ostate = tp ? tp->t_state : 0 128 #define TCPDEBUG2(req) if (tp && (so->so_options & SO_DEBUG)) \ 129 tcp_trace(TA_USER, ostate, tp, 0, 0, req) 154 struct tcpcb *tp = NULL; in tcp_usr_attach() local 167 tp = intotcpcb(inp); in tcp_usr_attach() 170 TCP_PROBE2(debug__user, tp, PRU_ATTACH); in tcp_usr_attach() 186 struct tcpcb *tp; in tcp_detach() local 194 tp = intotcpcb(inp); in tcp_detach() 229 if (__predict_true(tp == NULL)) { in tcp_detach() 263 tp->t_state < TCPS_SYN_SENT) { in tcp_detach() [all …]
|
| D | tcp_offload.c | 95 tcp_offload_listen_start(struct tcpcb *tp) in tcp_offload_listen_start() argument 98 INP_WLOCK_ASSERT(tp->t_inpcb); in tcp_offload_listen_start() 100 EVENTHANDLER_INVOKE(tcp_offload_listen_start, tp); in tcp_offload_listen_start() 104 tcp_offload_listen_stop(struct tcpcb *tp) in tcp_offload_listen_stop() argument 107 INP_WLOCK_ASSERT(tp->t_inpcb); in tcp_offload_listen_stop() 109 EVENTHANDLER_INVOKE(tcp_offload_listen_stop, tp); in tcp_offload_listen_stop() 113 tcp_offload_input(struct tcpcb *tp, struct mbuf *m) in tcp_offload_input() argument 115 struct toedev *tod = tp->tod; in tcp_offload_input() 117 KASSERT(tod != NULL, ("%s: tp->tod is NULL, tp %p", __func__, tp)); in tcp_offload_input() 118 INP_WLOCK_ASSERT(tp->t_inpcb); in tcp_offload_input() [all …]
|
| /freebsd-12-stable/sys/kern/ |
| D | tty_ttydisc.c | 61 #define CMP_CC(v,c) (tp->t_termios.c_cc[v] != _POSIX_VDISABLE && \ 62 tp->t_termios.c_cc[v] == (c)) 63 #define CMP_FLAG(field,opt) (tp->t_termios.c_ ## field ## flag & (opt)) 87 ttydisc_open(struct tty *tp) in ttydisc_open() argument 89 ttydisc_optimize(tp); in ttydisc_open() 93 ttydisc_close(struct tty *tp) in ttydisc_close() argument 97 tp->t_flags &= ~(TF_STOPPED|TF_HIWAT|TF_ZOMBIE); in ttydisc_close() 103 tty_flush(tp, FREAD | FWRITE); in ttydisc_close() 105 if (ttyhook_hashook(tp, close)) in ttydisc_close() 106 ttyhook_close(tp); in ttydisc_close() [all …]
|
| D | tty.c | 73 static void tty_rel_free(struct tty *tp); 97 #define TTY_CALLOUT(tp,d) (dev2unit(d) & TTYUNIT_CALLOUT) argument 116 tty_watermarks(struct tty *tp) in tty_watermarks() argument 122 if (tp->t_termios.c_cflag & CREAD) in tty_watermarks() 123 bs = MIN(tp->t_termios.c_ispeed / 5, TTYBUF_MAX); in tty_watermarks() 124 error = ttyinq_setsize(&tp->t_inq, tp, bs); in tty_watermarks() 129 tp->t_inlow = (ttyinq_getallocatedsize(&tp->t_inq) * 9) / 10; in tty_watermarks() 132 bs = MIN(tp->t_termios.c_ospeed / 5, TTYBUF_MAX); in tty_watermarks() 133 error = ttyoutq_setsize(&tp->t_outq, tp, bs); in tty_watermarks() 138 tp->t_outlow = (ttyoutq_getallocatedsize(&tp->t_outq) * 9) / 10; in tty_watermarks() [all …]
|
| D | tty_pts.c | 117 struct tty *tp = fp->f_data; in ptsdev_read() local 118 struct pts_softc *psc = tty_softc(tp); in ptsdev_read() 125 tty_lock(tp); in ptsdev_read() 136 tty_unlock(tp); in ptsdev_read() 150 if (ttydisc_getc_poll(tp)) { in ptsdev_read() 157 tty_unlock(tp); in ptsdev_read() 161 tty_lock(tp); in ptsdev_read() 164 error = ttydisc_getc_uio(tp, uio); in ptsdev_read() 177 error = cv_wait_sig(&psc->pts_outwait, tp->t_mtx); in ptsdev_read() 182 tty_unlock(tp); in ptsdev_read() [all …]
|
| /freebsd-12-stable/contrib/gdb/gdb/ |
| D | thread.c | 72 struct thread_info *tp; in delete_step_resume_breakpoint() local 77 for (tp = thread_list; tp; tp = tp->next) in delete_step_resume_breakpoint() 78 if (tp->step_resume_breakpoint == *breakpointp) in delete_step_resume_breakpoint() 79 tp->step_resume_breakpoint = NULL; in delete_step_resume_breakpoint() 86 free_thread (struct thread_info *tp) in free_thread() argument 90 if (tp->step_resume_breakpoint) in free_thread() 91 delete_breakpoint (tp->step_resume_breakpoint); in free_thread() 95 if (tp->private) in free_thread() 96 xfree (tp->private); in free_thread() 98 xfree (tp); in free_thread() [all …]
|
| /freebsd-12-stable/contrib/nvi/vi/ |
| D | v_txt.c | 224 #define UPDATE_POSITION(sp, tp) do { \ argument 225 (sp)->lno = (tp)->lno; \ 226 (sp)->cno = (tp)->cno; \ 251 TEXT *ntp, *tp; /* Input text structures. */ in v_txt() local 293 tp = TAILQ_FIRST(tiqh); in v_txt() 294 if (TAILQ_NEXT(tp, q) != NULL || in v_txt() 295 tp->lb_len < (len + 32) * sizeof(CHAR_T)) { in v_txt() 299 tp->ai = tp->insert = tp->offset = tp->owrite = 0; in v_txt() 301 tp->len = len; in v_txt() 302 BINC_RETW(sp, tp->lb, tp->lb_len, len); in v_txt() [all …]
|
| /freebsd-12-stable/sys/sys/ |
| D | ttydevsw.h | 45 typedef int tsw_open_t(struct tty *tp); 46 typedef void tsw_close_t(struct tty *tp); 47 typedef void tsw_outwakeup_t(struct tty *tp); 48 typedef void tsw_inwakeup_t(struct tty *tp); 49 typedef int tsw_ioctl_t(struct tty *tp, u_long cmd, caddr_t data, 51 typedef int tsw_cioctl_t(struct tty *tp, int unit, u_long cmd, caddr_t data, 53 typedef int tsw_param_t(struct tty *tp, struct termios *t); 54 typedef int tsw_modem_t(struct tty *tp, int sigon, int sigoff); 55 typedef int tsw_mmap_t(struct tty *tp, vm_ooffset_t offset, 57 typedef void tsw_pktnotify_t(struct tty *tp, char event); [all …]
|
| D | ttyhook.h | 45 typedef int th_rint_t(struct tty *tp, char c, int flags); 46 typedef size_t th_rint_bypass_t(struct tty *tp, const void *buf, size_t len); 47 typedef void th_rint_done_t(struct tty *tp); 48 typedef size_t th_rint_poll_t(struct tty *tp); 50 typedef size_t th_getc_inject_t(struct tty *tp, void *buf, size_t len); 51 typedef void th_getc_capture_t(struct tty *tp, const void *buf, size_t len); 52 typedef size_t th_getc_poll_t(struct tty *tp); 54 typedef void th_close_t(struct tty *tp); 74 #define ttyhook_softc(tp) ((tp)->t_hooksoftc) argument 75 #define ttyhook_hashook(tp,hook) ((tp)->t_hook != NULL && \ argument [all …]
|
| D | tty.h | 166 void tty_rel_pgrp(struct tty *tp, struct pgrp *pgrp); 167 void tty_rel_sess(struct tty *tp, struct session *sess); 168 void tty_rel_gone(struct tty *tp); 170 #define tty_lock(tp) mtx_lock((tp)->t_mtx) argument 171 #define tty_unlock(tp) mtx_unlock((tp)->t_mtx) argument 172 #define tty_lock_owned(tp) mtx_owned((tp)->t_mtx) argument 173 #define tty_assert_locked(tp) mtx_assert((tp)->t_mtx, MA_OWNED) argument 174 #define tty_getlock(tp) ((tp)->t_mtx) argument 177 #define tty_lock_assert(tp, ma) mtx_assert((tp)->t_mtx, (ma)) argument 180 int tty_makedevf(struct tty *tp, struct ucred *cred, int flags, [all …]
|
| /freebsd-12-stable/sys/netinet/tcp_stacks/ |
| D | rack.c | 265 rack_log_progress_event(struct tcp_rack *rack, struct tcpcb *tp, uint32_t tick, int event, int lin… 269 struct socket *so, struct tcpcb *tp, struct tcpopt *to, 273 struct socket *so, struct tcpcb *tp, int32_t drop_hdrlen, int32_t tlen, 276 rack_ack_received(struct tcpcb *tp, struct tcp_rack *rack, 282 rack_check_recovery_mode(struct tcpcb *tp, 285 rack_cong_signal(struct tcpcb *tp, struct tcphdr *th, 290 struct inpcb *inp, struct tcpcb *tp); 294 struct socket *so, struct tcpcb *tp, int32_t drop_hdrlen, int32_t tlen, 298 rack_earlier_retran(struct tcpcb *tp, struct rack_sendmap *rsm, 305 static void rack_fini(struct tcpcb *tp, int32_t tcb_is_purged); [all …]
|
| D | rack_bbr_common.c | 163 ctf_process_inbound_raw(struct tcpcb *tp, struct socket *so, struct mbuf *m, int has_pkt) in ctf_process_inbound_raw() argument 370 retval = (*tp->t_fb->tfb_do_segment_nounlock)(m, th, so, tp, drop_hdrlen, tlen, in ctf_process_inbound_raw() 396 ctf_do_queued_segments(struct socket *so, struct tcpcb *tp, int have_pkt) in ctf_do_queued_segments() argument 401 if (tp->t_in_pkt) { in ctf_do_queued_segments() 402 m = tp->t_in_pkt; in ctf_do_queued_segments() 403 tp->t_in_pkt = NULL; in ctf_do_queued_segments() 404 tp->t_tail_pkt = NULL; in ctf_do_queued_segments() 405 if (ctf_process_inbound_raw(tp, so, m, have_pkt)) { in ctf_do_queued_segments() 414 ctf_outstanding(struct tcpcb *tp) in ctf_outstanding() argument 416 return (tp->snd_max - tp->snd_una); in ctf_outstanding() [all …]
|
| /freebsd-12-stable/contrib/tcpdump/ |
| D | addrtoname.c | 364 struct enamemem *tp; in lookup_emem() local 370 tp = &enametable[(i ^ j) & (HASHNAMESIZE-1)]; in lookup_emem() 371 while (tp->e_nxt) in lookup_emem() 372 if (tp->e_addr0 == i && in lookup_emem() 373 tp->e_addr1 == j && in lookup_emem() 374 tp->e_addr2 == k) in lookup_emem() 375 return tp; in lookup_emem() 377 tp = tp->e_nxt; in lookup_emem() 378 tp->e_addr0 = i; in lookup_emem() 379 tp->e_addr1 = j; in lookup_emem() [all …]
|
| D | print-dhcp6.c | 284 const u_char *tp; in dhcp6opt_print() local 316 tp = (const u_char *)(dh6o + 1); in dhcp6opt_print() 317 switch (EXTRACT_16BITS(tp)) { in dhcp6opt_print() 321 EXTRACT_16BITS(&tp[2]), in dhcp6opt_print() 322 EXTRACT_32BITS(&tp[4]))); in dhcp6opt_print() 324 ND_PRINT((ndo, "%02x", tp[i])); in dhcp6opt_print() 336 ND_PRINT((ndo, "%02x", tp[i])); in dhcp6opt_print() 347 EXTRACT_16BITS(&tp[2]))); in dhcp6opt_print() 349 ND_PRINT((ndo, "%02x", tp[i])); in dhcp6opt_print() 358 ND_PRINT((ndo, " type %d)", EXTRACT_16BITS(tp))); in dhcp6opt_print() [all …]
|
| /freebsd-12-stable/sys/net/ |
| D | if_tuntap.c | 141 #define TUN_LOCK(tp) mtx_lock(&(tp)->tun_mtx) argument 142 #define TUN_UNLOCK(tp) mtx_unlock(&(tp)->tun_mtx) argument 143 #define TUN_LOCK_ASSERT(tp) mtx_assert(&(tp)->tun_mtx, MA_OWNED); argument 191 static int tun_busy_locked(struct tuntap_softc *tp); 192 static void tun_unbusy_locked(struct tuntap_softc *tp); 193 static int tun_busy(struct tuntap_softc *tp); 194 static void tun_unbusy(struct tuntap_softc *tp); 322 tun_busy_locked(struct tuntap_softc *tp) in tun_busy_locked() argument 325 TUN_LOCK_ASSERT(tp); in tun_busy_locked() 326 if ((tp->tun_flags & TUN_DYING) != 0) { in tun_busy_locked() [all …]
|
| /freebsd-12-stable/contrib/nvi/ex/ |
| D | ex_txt.c | 57 TEXT ait, *ntp, *tp; in ex_txt() local 71 tp = TAILQ_FIRST(tiqh); in ex_txt() 72 if (TAILQ_NEXT(tp, q) != NULL || tp->lb_len < 32) { in ex_txt() 76 tp->len = 0; in ex_txt() 78 newtp: if ((tp = text_init(sp, NULL, 0, 32)) == NULL) in ex_txt() 80 TAILQ_INSERT_HEAD(tiqh, tp, q); in ex_txt() 84 tp->lno = sp->lno + 1; in ex_txt() 104 if (v_txt_auto(sp, sp->lno, NULL, 0, tp)) in ex_txt() 107 txt_prompt(sp, tp, prompt, flags); in ex_txt() 144 BINC_GOTOW(sp, tp->lb, tp->lb_len, tp->len + 1); in ex_txt() [all …]
|
| /freebsd-12-stable/contrib/mandoc/ |
| D | tbl_term.c | 162 term_tbl(struct termp *tp, const struct tbl_span *sp) in term_tbl() argument 174 tp->flags |= TERMP_NOSPACE | TERMP_NONOSPACE; in term_tbl() 175 save_offset = tp->tcol->offset; in term_tbl() 182 if (tp->tbl.cols == NULL) { in term_tbl() 183 borders_locale = tp->enc == TERMENC_UTF8 ? in term_tbl() 186 tp->tbl.len = term_tbl_len; in term_tbl() 187 tp->tbl.slen = term_tbl_strlen; in term_tbl() 188 tp->tbl.sulen = term_tbl_sulen; in term_tbl() 189 tp->tbl.arg = tp; in term_tbl() 191 tblcalc(&tp->tbl, sp, tp->tcol->offset, tp->tcol->rmargin); in term_tbl() [all …]
|
| /freebsd-12-stable/contrib/ncurses/include/ |
| D | term_entry.h | 91 #define NUM_BOOLEANS(tp) (tp)->num_Booleans argument 92 #define NUM_NUMBERS(tp) (tp)->num_Numbers argument 93 #define NUM_STRINGS(tp) (tp)->num_Strings argument 94 #define EXT_NAMES(tp,i,limit,index,table) (i >= limit) ? tp->ext_Names[index] : table[i] argument 96 #define NUM_BOOLEANS(tp) BOOLCOUNT argument 97 #define NUM_NUMBERS(tp) NUMCOUNT argument 98 #define NUM_STRINGS(tp) STRCOUNT argument 99 #define EXT_NAMES(tp,i,limit,index,table) table[i] argument 102 #define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings) argument 104 #define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++) argument [all …]
|
| /freebsd-12-stable/contrib/ncurses/ncurses/trace/ |
| D | trace_xnames.c | 41 _nc_trace_xnames(TERMTYPE *tp GCC_UNUSED) in NCURSES_EXPORT() 45 int limit = tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings; in NCURSES_EXPORT() 48 int begin_num = tp->ext_Booleans; in NCURSES_EXPORT() 49 int begin_str = tp->ext_Booleans + tp->ext_Numbers; in NCURSES_EXPORT() 52 tp->term_names, in NCURSES_EXPORT() 54 tp->ext_Booleans, tp->ext_Numbers, tp->ext_Strings, in NCURSES_EXPORT() 55 tp->num_Booleans, tp->num_Numbers, tp->num_Strings); in NCURSES_EXPORT() 59 tp->ext_Names[n], in NCURSES_EXPORT() 60 _nc_visbuf(tp->Strings[tp->num_Strings + m - tp->ext_Strings])); in NCURSES_EXPORT() 63 tp->ext_Names[n], in NCURSES_EXPORT() [all …]
|
| /freebsd-12-stable/contrib/unbound/validator/ |
| D | autotrust.c | 335 struct trust_anchor* tp = (struct trust_anchor*)calloc(1, sizeof(*tp)); in autr_tp_create() local 336 if(!tp) return NULL; in autr_tp_create() 337 tp->name = memdup(own, own_len); in autr_tp_create() 338 if(!tp->name) { in autr_tp_create() 339 free(tp); in autr_tp_create() 342 tp->namelen = own_len; in autr_tp_create() 343 tp->namelabs = dname_count_labels(tp->name); in autr_tp_create() 344 tp->node.key = tp; in autr_tp_create() 345 tp->dclass = dc; in autr_tp_create() 346 tp->autr = (struct autr_point_data*)calloc(1, sizeof(*tp->autr)); in autr_tp_create() [all …]
|
| /freebsd-12-stable/contrib/ncurses/ncurses/tinfo/ |
| D | alloc_ttype.c | 154 _nc_first_ext_name(TERMTYPE *tp, int token_type) in _nc_first_ext_name() argument 163 first = tp->ext_Booleans; in _nc_first_ext_name() 166 first = (unsigned) (tp->ext_Booleans + tp->ext_Numbers); in _nc_first_ext_name() 179 _nc_last_ext_name(TERMTYPE *tp, int token_type) in _nc_last_ext_name() argument 185 last = tp->ext_Booleans; in _nc_last_ext_name() 188 last = (unsigned) (tp->ext_Booleans + tp->ext_Numbers); in _nc_last_ext_name() 192 last = NUM_EXT_NAMES(tp); in _nc_last_ext_name() 202 _nc_find_ext_name(TERMTYPE *tp, char *name, int token_type) in _nc_find_ext_name() argument 205 unsigned first = _nc_first_ext_name(tp, token_type); in _nc_find_ext_name() 206 unsigned last = _nc_last_ext_name(tp, token_type); in _nc_find_ext_name() [all …]
|