| /netbsd-src/sys/netinet/ |
| H A D | tcp_congctl.c | 201 static void tcp_reno_congestion_exp(struct tcpcb *tp); 209 static void tcp_cubic_slow_retransmit(struct tcpcb *tp); 318 tcp_congctl_select(struct tcpcb *tp, const char *name) in tcp_congctl_select() argument 325 old_found = (tp == NULL || tp->t_congctl == NULL); in tcp_congctl_select() 331 if (!old_found && tccp->congctl_ctl == tp->t_congctl) { in tcp_congctl_select() 342 if (tp) { in tcp_congctl_select() 346 tp->t_congctl = new_tccp->congctl_ctl; in tcp_congctl_select() 363 tcp_congctl_release(struct tcpcb *tp) in tcp_congctl_release() argument 367 KASSERT(tp->t_congctl); in tcp_congctl_release() 370 if (tccp->congctl_ctl == tp->t_congctl) { in tcp_congctl_release() [all …]
|
| H A D | tcp_timer.c | 226 struct tcpcb *tp = arg; in tcp_delack() local 235 if ((tp->t_flags & (TF_DEAD | TF_DELACK)) != TF_DELACK) { in tcp_delack() 239 if (!callout_expired(&tp->t_delack_ch)) { in tcp_delack() 244 tp->t_flags |= TF_ACKNOW; in tcp_delack() 246 (void) tcp_output(tp); in tcp_delack() 283 tcp_canceltimers(struct tcpcb *tp) in tcp_canceltimers() argument 288 TCP_TIMER_DISARM(tp, i); in tcp_canceltimers() 303 struct tcpcb *tp = arg; in tcp_timer_rexmt() local 311 if ((tp->t_flags & TF_DEAD) != 0) { in tcp_timer_rexmt() 315 if (!callout_expired(&tp->t_timer[TCPT_REXMT])) { in tcp_timer_rexmt() [all …]
|
| H A D | tcp_output.c | 226 tcp_segsize(struct tcpcb *tp, int *txsegsizep, int *rxsegsizep, in tcp_segsize() argument 229 struct inpcb *inp = tp->t_inpcb; in tcp_segsize() 240 switch (tp->t_family) { in tcp_segsize() 262 if (tp->t_mtudisc && rt->rt_rmx.rmx_mtu != 0) { in tcp_segsize() 279 else if (inp->inp_af == AF_INET && tp->t_mtudisc) in tcp_segsize() 289 if (tp->t_mtudisc || in_localaddr(d)) in tcp_segsize() 296 size = tp->t_mtudisc ? ifp->if_mtu : IPV6_MMTU; in tcp_segsize() 307 optlen = tcp_optlen(tp); in tcp_segsize() 310 * XXX tp->t_ourmss should have the right size, but without this code in tcp_segsize() 318 optlen += ipsec4_hdrsiz_tcp(tp); in tcp_segsize() 401 tcp_build_datapkt(struct tcpcb * tp,struct socket * so,int off,long len,int hdrlen,struct mbuf ** mp) tcp_build_datapkt() argument 505 tcp_output(struct tcpcb * tp) tcp_output() argument 1661 tcp_setpersist(struct tcpcb * tp) tcp_setpersist() argument [all...] |
| H A D | tcp_input.c | 251 nd_hint(struct tcpcb *tp) in nd_hint() 256 if (tp == NULL) in nd_hint() 259 ro = &tp->t_inpcb->inp_route; in nd_hint() 267 switch (tp->t_family) { in nd_hint() 290 tcp_setup_ack(struct tcpcb *tp, const struct tcphdr *th) in tcp_setup_ack() 293 if (tp->t_flags & TF_DELACK || in tcp_setup_ack() 295 tp->t_flags |= TF_ACKNOW; in tcp_setup_ack() 297 TCP_SET_DELACK(tp); 301 icmp_check(struct tcpcb *tp, const struct tcphdr *th, int acked) in icmp_check() 308 if ((tp in icmp_check() 249 nd_hint(struct tcpcb * tp) nd_hint() argument 288 tcp_setup_ack(struct tcpcb * tp,const struct tcphdr * th) tcp_setup_ack() argument 299 icmp_check(struct tcpcb * tp,const struct tcphdr * th,int acked) icmp_check() argument 453 tcp_reass(struct tcpcb * tp,const struct tcphdr * th,struct mbuf * m,int tlen) tcp_reass() argument 1188 struct tcpcb *tp = NULL; tcp_input() local 3077 tcp_dooptions(struct tcpcb * tp,const u_char * cp,int cnt,struct tcphdr * th,struct mbuf * m,int toff,struct tcp_opt_info * oi) tcp_dooptions() argument 3265 struct tcpcb *tp = sototcpcb(so); tcp_pulloutofband() local 3289 tcp_xmit_timer(struct tcpcb * tp,uint32_t rtt) tcp_xmit_timer() argument [all...] |
| H A D | tcp_subr.c | 448 tcp_template(struct tcpcb *tp) in tcp_template() argument 450 struct inpcb *inp = tp->t_inpcb; in tcp_template() 455 switch (tp->t_family) { in tcp_template() 484 m = tp->t_template; in tcp_template() 489 m = tp->t_template = NULL; in tcp_template() 508 switch (tp->t_family) { in tcp_template() 604 tcp_respond(struct tcpcb *tp, struct mbuf *mtemplate, struct mbuf *m, in tcp_respond() argument 617 if (tp != NULL && (flags & TH_RST) == 0) { in tcp_respond() 618 KASSERT(tp->t_inpcb != NULL); in tcp_respond() 620 win = sbspace(&tp->t_inpcb->inp_socket->so_rcv); in tcp_respond() [all …]
|
| /netbsd-src/external/bsd/nvi/dist/vi/ |
| H A D | v_txt.c | 235 #define UPDATE_POSITION(sp, tp) { \ argument 236 (sp)->lno = (tp)->lno; \ 237 (sp)->cno = (tp)->cno; \ 262 TEXT *ntp, *tp; /* Input text structures. */ in v_txt() local 306 tp = TAILQ_FIRST(tiqh); in v_txt() 307 if (TAILQ_NEXT(tp, q) != NULL || tp->lb_len < len + 32) { in v_txt() 311 tp->ai = tp->insert = tp->offset = tp->owrite = 0; in v_txt() 313 tp->len = len; in v_txt() 314 BINC_RETW(sp, tp->lb, tp->lb_len, len); in v_txt() 315 MEMMOVEW(tp->lb, lp, len); in v_txt() [all …]
|
| /netbsd-src/sys/kern/ |
| H A D | tty.c | 129 #define CONNECTED(tp) (ISSET(tp->t_state, TS_CARR_ON) || \ argument 130 ISSET(tp->t_cflag, CLOCAL | MDMBUF)) 244 tty_set_qsize(struct tty *tp, int newsize) in tty_set_qsize() argument 255 if (tp->t_outq.c_cc != 0) { in tty_set_qsize() 263 orawq = tp->t_rawq; in tty_set_qsize() 264 ocanq = tp->t_canq; in tty_set_qsize() 265 ooutq = tp->t_outq; in tty_set_qsize() 267 tp->t_qsize = newsize; in tty_set_qsize() 268 tp->t_rawq = rawq; in tty_set_qsize() 269 tp->t_canq = canq; in tty_set_qsize() [all …]
|
| H A D | tty_pty.c | 373 struct tty *tp; in ptsopen() local 382 tp = pti->pt_tty; in ptsopen() 383 if (!ISSET(tp->t_state, TS_ISOPEN)) { in ptsopen() 384 tp->t_dev = dev; in ptsopen() 385 ttychars(tp); /* Set up default chars */ in ptsopen() 386 tp->t_iflag = TTYDEF_IFLAG; in ptsopen() 387 tp->t_oflag = TTYDEF_OFLAG; in ptsopen() 388 tp->t_lflag = TTYDEF_LFLAG; in ptsopen() 389 tp->t_cflag = TTYDEF_CFLAG; in ptsopen() 390 tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; in ptsopen() [all …]
|
| /netbsd-src/external/ibm-public/postfix/dist/src/global/ |
| H A D | tok822_parse.c | 161 #define SKIP(tp, cond) { \ argument 162 while (tp->type && (cond)) \ 163 tp = tp->prev; \ 166 #define MOVE_COMMENT_AND_CONTINUE(tp, right) { \ argument 167 TOK822 *prev = tok822_unlink(tp); \ 168 right = tok822_prepend(right, tp); \ 169 tp = prev; \ 173 #define SKIP_MOVE_COMMENT(tp, cond, right) { \ argument 174 while (tp->type && (cond)) { \ 175 if (tp->type == TOK822_COMMENT) \ [all …]
|
| /netbsd-src/sys/net/ |
| H A D | if_tun.c | 166 * Returns with tp locked (if found). 171 struct tun_softc *tp; in tun_find_unit() local 175 LIST_FOREACH(tp, &tun_softc_list, tun_list) in tun_find_unit() 176 if (unit == tp->tun_unit) in tun_find_unit() 178 if (tp) in tun_find_unit() 179 mutex_enter(&tp->tun_lock); in tun_find_unit() 182 return tp; in tun_find_unit() 187 * Remove tp from list and return it unlocked (if found). 192 struct tun_softc *tp; in tun_find_zunit() local 195 LIST_FOREACH(tp, in tun_find_zunit() 208 tun_init(struct tun_softc * tp,int unit) tun_init() argument 222 tun_fini(struct tun_softc * tp) tun_fini() argument 237 struct tun_softc *tp; tun_alloc() local 246 tun_recycle(struct tun_softc * tp) tun_recycle() argument 253 tun_free(struct tun_softc * tp) tun_free() argument 263 struct tun_softc *tp; tun_clone_create() local 283 tunattach0(struct tun_softc * tp) tunattach0() argument 309 struct tun_softc *tp = (void *)ifp; tun_clone_destroy() local 350 struct tun_softc *tp; tunopen() local 391 struct tun_softc *tp; tunclose() local 444 tun_enable(struct tun_softc * tp,const struct ifaddr * ifa) tun_enable() argument 500 struct tun_softc *tp = (struct tun_softc *)(ifp->if_softc); tun_ioctl() local 557 struct tun_softc *tp = ifp->if_softc; tun_output() local 660 struct tun_softc *tp = cookie; tun_i_softintr() local 670 struct tun_softc *tp = cookie; tun_o_softintr() local 683 struct tun_softc *tp; tunioctl() local 788 struct tun_softc *tp; tunread() local 854 struct tun_softc *tp; tunwrite() local 1007 struct tun_softc *tp = ifp->if_softc; tunstart() local 1031 struct tun_softc *tp; tunpoll() local 1066 struct tun_softc *tp = kn->kn_hook; filt_tunrdetach() local 1076 struct tun_softc *tp = kn->kn_hook; filt_tunread() local 1109 struct tun_softc *tp; tunkqfilter() local [all...] |
| /netbsd-src/external/ibm-public/postfix/dist/src/bounce/ |
| H A D | bounce_template.c | 236 BOUNCE_TEMPLATE *tp; in bounce_template_create() local 238 tp = (BOUNCE_TEMPLATE *) mymalloc(sizeof(*tp)); in bounce_template_create() 239 *tp = *prototype; in bounce_template_create() 240 return (tp); in bounce_template_create() 245 void bounce_template_free(BOUNCE_TEMPLATE *tp) in bounce_template_free() argument 247 if (tp->buffer) { in bounce_template_free() 248 myfree(tp->buffer); in bounce_template_free() 249 myfree((void *) tp->origin); in bounce_template_free() 251 myfree((void *) tp); in bounce_template_free() 256 static void bounce_template_reset(BOUNCE_TEMPLATE *tp) in bounce_template_reset() argument [all …]
|
| /netbsd-src/share/examples/refuse/virtdir/ |
| H A D | virtdir.c | 68 mkdirs(virtdir_t *tp, const char *path, size_t size) in mkdirs() argument 77 if ((ep = virtdir_find(tp, name, strlen(name))) == NULL) { in mkdirs() 78 virtdir_add(tp, name, strlen(name), 'd', NULL, 0); in mkdirs() 115 virtdir_init(virtdir_t *tp, const char *rootdir, struct stat *d, struct stat *f, struct stat *l) in virtdir_init() argument 117 (void) memcpy(&tp->dir, d, sizeof(tp->dir)); in virtdir_init() 118 tp->dir.st_mode = S_IFDIR | 0755; in virtdir_init() 119 tp->dir.st_nlink = 2; in virtdir_init() 120 (void) memcpy(&tp->file, f, sizeof(tp->file)); in virtdir_init() 121 tp->file.st_mode = S_IFREG | 0644; in virtdir_init() 122 tp->file.st_nlink = 1; in virtdir_init() [all …]
|
| /netbsd-src/external/bsd/iscsi/dist/src/initiator/ |
| H A D | virtdir.c | 68 mkdirs(virtdir_t *tp, const char *path, size_t size) in mkdirs() argument 77 if ((ep = virtdir_find(tp, name, strlen(name))) == NULL) { in mkdirs() 78 virtdir_add(tp, name, strlen(name), 'd', NULL, 0); in mkdirs() 117 virtdir_init(virtdir_t *tp, const char *rootdir, struct stat *d, struct stat *f, struct stat *l) in virtdir_init() argument 119 (void) memcpy(&tp->dir, d, sizeof(tp->dir)); in virtdir_init() 120 tp->dir.st_mode = S_IFDIR | 0755; in virtdir_init() 121 tp->dir.st_nlink = 2; in virtdir_init() 122 (void) memcpy(&tp->file, f, sizeof(tp->file)); in virtdir_init() 123 tp->file.st_mode = S_IFREG | 0644; in virtdir_init() 124 tp->file.st_nlink = 1; in virtdir_init() [all …]
|
| /netbsd-src/external/lgpl3/gmp/dist/mpq/ |
| H A D | set_d.c | 50 mp_limb_t tp[LIMBS_PER_DOUBLE]; in mpq_set_d() local 62 exp = __gmp_extract_double (tp, d); in mpq_set_d() 67 if (exp <= 1 || (exp == 2 && (tp[0] | tp[1]) != 0)) in mpq_set_d() 70 if (exp <= 1 || (exp == 2 && tp[0] != 0)) in mpq_set_d() 86 if ((tp[0] | tp[1] | tp[2]) == 0) in mpq_set_d() 87 np[0] = tp[3], nn = 1; in mpq_set_d() 88 else if ((tp[0] | tp[1]) == 0) in mpq_set_d() 89 np[1] = tp[3], np[0] = tp[2], nn = 2; in mpq_set_d() 90 else if (tp[0] == 0) in mpq_set_d() 91 np[2] = tp[3], np[1] = tp[2], np[0] = tp[1], nn = 3; in mpq_set_d() [all …]
|
| /netbsd-src/sys/dev/hpc/ |
| H A D | biconsdev.c | 117 struct tty *tp = &biconsdev_tty[0]; in biconsdevattach() local 124 clalloc(&tp->t_rawq, 1024, 1); in biconsdevattach() 125 clalloc(&tp->t_canq, 1024, 1); in biconsdevattach() 127 clalloc(&tp->t_outq, 1024, 0); in biconsdevattach() 129 tp->t_linesw = ttyldisc_default(); in biconsdevattach() 132 tp->t_dev = makedev(maj, 0); in biconsdevattach() 133 tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; in biconsdevattach() 134 tp->t_param = (int (*)(struct tty *, struct termios *))nullop; in biconsdevattach() 135 tp->t_winsize.ws_row = bicons_height; in biconsdevattach() 136 tp->t_winsize.ws_col = bicons_width; in biconsdevattach() [all …]
|
| /netbsd-src/external/bsd/nvi/dist/ex/ |
| H A D | ex_txt.c | 67 TEXT ait, *ntp, *tp; in ex_txt() local 80 if ((tp = TAILQ_FIRST(tiqh)) != NULL) { in ex_txt() 81 if (TAILQ_NEXT(tp, q) != NULL || tp->lb_len < 32) { in ex_txt() 85 tp->len = 0; in ex_txt() 87 newtp: if ((tp = text_init(sp, NULL, 0, 32)) == NULL) in ex_txt() 89 TAILQ_INSERT_HEAD(tiqh, tp, q); in ex_txt() 93 tp->lno = sp->lno + 1; in ex_txt() 113 if (v_txt_auto(sp, sp->lno, NULL, 0, tp)) in ex_txt() 116 txt_prompt(sp, tp, prompt, flags); in ex_txt() 153 BINC_GOTOW(sp, tp->lb, tp->lb_len, tp->len + 1); in ex_txt() [all …]
|
| /netbsd-src/sbin/mount_qemufwcfg/ |
| H A D | virtdir.c | 55 mkdirs(virtdir_t *tp, const char *path, size_t size) in mkdirs() argument 64 if ((ep = virtdir_find(tp, name, strlen(name))) == NULL) { in mkdirs() 65 virtdir_add(tp, name, strlen(name), 'd', NULL, 0, 0); in mkdirs() 104 virtdir_init(virtdir_t *tp, const char *rootdir, const struct stat *d, in virtdir_init() argument 107 tp->dir = *d; in virtdir_init() 108 tp->dir.st_mode = S_IFDIR | 0755; in virtdir_init() 109 tp->dir.st_nlink = 2; in virtdir_init() 110 tp->file = *f; in virtdir_init() 111 tp->file.st_mode = S_IFREG | 0644; in virtdir_init() 112 tp->file.st_nlink = 1; in virtdir_init() [all …]
|
| /netbsd-src/sys/dev/arcbios/ |
| H A D | arcbios_tty.c | 85 struct tty *tp; in arcbios_ttyopen() local 99 tp = arcbios_tty[unit] = tty_alloc(); in arcbios_ttyopen() 100 tty_attach(tp); in arcbios_ttyopen() 102 tp = arcbios_tty[unit]; in arcbios_ttyopen() 104 tp->t_oproc = arcbios_tty_start; in arcbios_ttyopen() 105 tp->t_param = arcbios_tty_param; in arcbios_ttyopen() 106 tp->t_dev = dev; in arcbios_ttyopen() 108 if (kauth_authorize_device_tty(l->l_cred, KAUTH_DEVICE_TTY_OPEN, tp)) { in arcbios_ttyopen() 113 if ((tp->t_state & TS_ISOPEN) == 0) { in arcbios_ttyopen() 114 tp->t_state |= TS_CARR_ON; in arcbios_ttyopen() [all …]
|
| /netbsd-src/external/bsd/mdocml/dist/ |
| H A D | tbl_term.c | 161 term_tbl(struct termp *tp, const struct tbl_span *sp) in term_tbl() argument 173 tp->flags |= TERMP_NOSPACE | TERMP_NONOSPACE; in term_tbl() 174 save_offset = tp->tcol->offset; in term_tbl() 181 if (tp->tbl.cols == NULL) { in term_tbl() 182 borders_locale = tp->enc == TERMENC_UTF8 ? in term_tbl() 185 tp->tbl.len = term_tbl_len; in term_tbl() 186 tp->tbl.slen = term_tbl_strlen; in term_tbl() 187 tp->tbl.sulen = term_tbl_sulen; in term_tbl() 188 tp->tbl.arg = tp; in term_tbl() 190 tblcalc(&tp->tbl, sp, tp->tcol->offset, tp->tcol->rmargin); in term_tbl() [all …]
|
| /netbsd-src/external/bsd/nsd/dist/ |
| H A D | xfrd-tcp.c | 81 setup_ssl(struct xfrd_tcp_pipeline* tp, struct xfrd_tcp_set* tcp_set, in setup_ssl() argument 90 tp->ssl = SSL_new((SSL_CTX*)tcp_set->ssl_ctx); in setup_ssl() 91 if(!tp->ssl) { in setup_ssl() 95 SSL_set_connect_state(tp->ssl); in setup_ssl() 96 (void)SSL_set_mode(tp->ssl, SSL_MODE_AUTO_RETRY); in setup_ssl() 97 if(!SSL_set_fd(tp->ssl, tp->tcp_w->fd)) { in setup_ssl() 99 SSL_free(tp->ssl); in setup_ssl() 100 tp->ssl = NULL; in setup_ssl() 104 SSL_set_verify(tp->ssl, SSL_VERIFY_PEER, tls_verify_callback); in setup_ssl() 105 if(!SSL_set1_host(tp->ssl, auth_domain_name)) { in setup_ssl() [all …]
|
| /netbsd-src/sys/arch/alpha/alpha/ |
| H A D | promcons.c | 99 struct tty *tp; in promopen() local 115 tp = prom_tty[unit] = tty_alloc(); in promopen() 116 tty_attach(tp); in promopen() 118 tp = prom_tty[unit]; in promopen() 120 tp->t_oproc = promstart; in promopen() 121 tp->t_param = promparam; in promopen() 122 tp->t_dev = dev; in promopen() 124 if (kauth_authorize_device_tty(l->l_cred, KAUTH_DEVICE_TTY_OPEN, tp)) { in promopen() 129 if ((tp->t_state & TS_ISOPEN) == 0) { in promopen() 130 tp->t_state |= TS_CARR_ON; in promopen() [all …]
|
| /netbsd-src/sys/arch/sun3/dev/ |
| H A D | kd.c | 118 struct tty *tp; in kd_init() local 120 tp = tty_alloc(); in kd_init() 121 callout_setfunc(&tp->t_rstrt_ch, kd_later, tp); in kd_init() 123 tp->t_oproc = kdstart; in kd_init() 124 tp->t_param = kdparam; in kd_init() 125 tp->t_dev = makedev(cdevsw_lookup_major(&kd_cdevsw), 0); in kd_init() 127 tty_attach(tp); in kd_init() 128 kd->kd_tty = tp; in kd_init() 147 struct tty *tp; in kdopen() local 198 struct tty *tp; kdclose() local 219 struct tty *tp; kdread() local 231 struct tty *tp; kdwrite() local 243 struct tty *tp; kdpoll() local 255 struct tty *tp; kdioctl() local 277 kdparam(struct tty * tp,struct termios * t) kdparam() argument 290 kdstart(struct tty * tp) kdstart() argument 336 struct tty *tp = tpaddr; kd_later() local 353 kd_putfb(struct tty * tp) kd_putfb() argument 409 struct tty *tp; kd_cons_input() local [all...] |
| /netbsd-src/bin/ksh/ |
| H A D | table.c | 17 static void texpand ARGS((struct table *tp, int nsize)); 33 tinit(tp, ap, tsize) in tinit() argument 34 struct table *tp; in tinit() 38 tp->areap = ap; 39 tp->tbls = NULL; 40 tp->size = tp->nfree = 0; 42 texpand(tp, tsize); 46 texpand(tp, nsize) in texpand() argument 47 struct table *tp; in texpand() 52 struct tbl **ntblp, **otblp = tp->tbls; [all …]
|
| /netbsd-src/sys/dev/ir/ |
| H A D | irframe_tty.c | 267 irframetopen(dev_t dev, struct tty *tp) in irframetopen() argument 279 KAUTH_DEVICE_TTY_OPEN, tp))) in irframetopen() 284 DPRINTF(("%s: linesw=%p disc=%s\n", __func__, tp->t_linesw, in irframetopen() 285 tp->t_linesw->l_name)); in irframetopen() 286 if (tp->t_linesw == &irframet_disc) { in irframetopen() 287 sc = (struct irframet_softc *)tp->t_sc; in irframetopen() 306 ia.ia_handle = tp; in irframetopen() 309 tp->t_sc = sc; in irframetopen() 310 sc->sc_tp = tp; in irframetopen() 312 (int)minor(tp->t_dev)); in irframetopen() [all …]
|
| /netbsd-src/sys/arch/sparc/dev/ |
| H A D | kd.c | 133 struct tty *tp; in kd_init() local 135 tp = tty_alloc(); in kd_init() 136 callout_setfunc(&tp->t_rstrt_ch, kd_later, tp); in kd_init() 137 tp->t_oproc = kdstart; in kd_init() 138 tp->t_param = kdparam; in kd_init() 139 tp->t_dev = makedev(cdevsw_lookup_major(&kd_cdevsw), 0); in kd_init() 141 tty_attach(tp); in kd_init() 142 kd->kd_tty = tp; in kd_init() 151 rcons_ttyinit(tp); in kd_init() 199 struct tty *tp; in kdopen() local [all …]
|