tp                485 arch/i386/isa/pccom.c 	struct tty *tp;
tp                505 arch/i386/isa/pccom.c 		tp = sc->sc_tty = ttymalloc();
tp                507 arch/i386/isa/pccom.c 		tp = sc->sc_tty;
tp                510 arch/i386/isa/pccom.c 	tp->t_oproc = comstart;
tp                511 arch/i386/isa/pccom.c 	tp->t_param = comparam;
tp                512 arch/i386/isa/pccom.c 	tp->t_hwiflow = comhwiflow;
tp                513 arch/i386/isa/pccom.c 	tp->t_dev = dev;
tp                514 arch/i386/isa/pccom.c 	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                515 arch/i386/isa/pccom.c 		SET(tp->t_state, TS_WOPEN);
tp                516 arch/i386/isa/pccom.c 		ttychars(tp);
tp                517 arch/i386/isa/pccom.c 		tp->t_iflag = TTYDEF_IFLAG;
tp                518 arch/i386/isa/pccom.c 		tp->t_oflag = TTYDEF_OFLAG;
tp                520 arch/i386/isa/pccom.c 			tp->t_cflag = comconscflag;
tp                522 arch/i386/isa/pccom.c 			tp->t_cflag = TTYDEF_CFLAG;
tp                524 arch/i386/isa/pccom.c 			SET(tp->t_cflag, CLOCAL);
tp                526 arch/i386/isa/pccom.c 			SET(tp->t_cflag, CRTSCTS);
tp                528 arch/i386/isa/pccom.c 			SET(tp->t_cflag, MDMBUF);
tp                529 arch/i386/isa/pccom.c 		tp->t_lflag = TTYDEF_LFLAG;
tp                530 arch/i386/isa/pccom.c 		tp->t_ispeed = tp->t_ospeed = comdefaultrate;
tp                558 arch/i386/isa/pccom.c 		comparam(tp, &tp->t_termios);
tp                559 arch/i386/isa/pccom.c 		ttsetwater(tp);
tp                569 arch/i386/isa/pccom.c 				if (tp->t_ispeed <= 1200)
tp                575 arch/i386/isa/pccom.c 				if (tp->t_ispeed <= 1200)
tp                583 arch/i386/isa/pccom.c 				if (tp->t_ispeed <= 1200)
tp                594 arch/i386/isa/pccom.c 				if (tp->t_ispeed <= 1200)
tp                639 arch/i386/isa/pccom.c 		    ISSET(sc->sc_msr, MSR_DCD) || ISSET(tp->t_cflag, MDMBUF))
tp                640 arch/i386/isa/pccom.c 			SET(tp->t_state, TS_CARR_ON);
tp                642 arch/i386/isa/pccom.c 			CLR(tp->t_state, TS_CARR_ON);
tp                643 arch/i386/isa/pccom.c 	} else if (ISSET(tp->t_state, TS_XCLUDE) && p->p_ucred->cr_uid != 0)
tp                649 arch/i386/isa/pccom.c 		if (ISSET(tp->t_state, TS_ISOPEN)) {
tp                665 arch/i386/isa/pccom.c 			       (!ISSET(tp->t_cflag, CLOCAL) &&
tp                666 arch/i386/isa/pccom.c 				!ISSET(tp->t_state, TS_CARR_ON))) {
tp                667 arch/i386/isa/pccom.c 				SET(tp->t_state, TS_WOPEN);
tp                668 arch/i386/isa/pccom.c 				error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, ttopen, 0);
tp                674 arch/i386/isa/pccom.c 				if (error && ISSET(tp->t_state, TS_WOPEN)) {
tp                675 arch/i386/isa/pccom.c 					CLR(tp->t_state, TS_WOPEN);
tp                676 arch/i386/isa/pccom.c 					if (!sc->sc_cua && !ISSET(tp->t_state, TS_ISOPEN))
tp                685 arch/i386/isa/pccom.c 	return (*linesw[tp->t_line].l_open)(dev, tp);
tp                695 arch/i386/isa/pccom.c 	struct tty *tp = sc->sc_tty;
tp                699 arch/i386/isa/pccom.c 	if (!ISSET(tp->t_state, TS_ISOPEN))
tp                702 arch/i386/isa/pccom.c 	(*linesw[tp->t_line].l_close)(tp, flag);
tp                704 arch/i386/isa/pccom.c 	if (ISSET(tp->t_state, TS_WOPEN)) {
tp                713 arch/i386/isa/pccom.c 	CLR(tp->t_state, TS_BUSY | TS_FLUSH);
tp                716 arch/i386/isa/pccom.c 	ttyclose(tp);
tp                720 arch/i386/isa/pccom.c 		ttyfree(tp);
tp                732 arch/i386/isa/pccom.c 	struct tty *tp = sc->sc_tty;
tp                737 arch/i386/isa/pccom.c 	if (ISSET(tp->t_cflag, HUPCL) &&
tp                784 arch/i386/isa/pccom.c 	struct tty *tp = sc->sc_tty;
tp                786 arch/i386/isa/pccom.c 	return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
tp                793 arch/i386/isa/pccom.c 	struct tty *tp = sc->sc_tty;
tp                795 arch/i386/isa/pccom.c 	return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
tp                802 arch/i386/isa/pccom.c 	struct tty *tp = sc->sc_tty;
tp                804 arch/i386/isa/pccom.c 	return (tp);
tp                824 arch/i386/isa/pccom.c 	struct tty *tp = sc->sc_tty;
tp                829 arch/i386/isa/pccom.c 	error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
tp                832 arch/i386/isa/pccom.c 	error = ttioctl(tp, cmd, data, flag, p);
tp                931 arch/i386/isa/pccom.c comparam(struct tty *tp, struct termios *t)
tp                933 arch/i386/isa/pccom.c 	struct com_softc *sc = pccom_cd.cd_devs[DEVUNIT(tp->t_dev)];
tp                982 arch/i386/isa/pccom.c 	if (sc->sc_initialize || (tp->t_ispeed != t->c_ispeed)) {
tp                994 arch/i386/isa/pccom.c 			while (ISSET(tp->t_state, TS_BUSY)) {
tp                998 arch/i386/isa/pccom.c 				error = ttysleep(tp, &tp->t_outq,
tp               1003 arch/i386/isa/pccom.c 					comstart(tp);
tp               1073 arch/i386/isa/pccom.c 	tp->t_ispeed = t->c_ispeed;
tp               1074 arch/i386/isa/pccom.c 	tp->t_ospeed = t->c_ospeed;
tp               1075 arch/i386/isa/pccom.c 	oldcflag = tp->t_cflag;
tp               1076 arch/i386/isa/pccom.c 	tp->t_cflag = t->c_cflag;
tp               1084 arch/i386/isa/pccom.c 	    ISSET(oldcflag, MDMBUF) != ISSET(tp->t_cflag, MDMBUF) &&
tp               1085 arch/i386/isa/pccom.c 	    (*linesw[tp->t_line].l_modem)(tp, 0) == 0) {
tp               1092 arch/i386/isa/pccom.c 	comstart(tp);
tp               1100 arch/i386/isa/pccom.c comhwiflow(struct tty *tp, int block)
tp               1102 arch/i386/isa/pccom.c 	struct com_softc *sc = pccom_cd.cd_devs[DEVUNIT(tp->t_dev)];
tp               1114 arch/i386/isa/pccom.c 		if (ISSET(tp->t_cflag, MDMBUF)) {
tp               1125 arch/i386/isa/pccom.c 		if (ISSET(tp->t_cflag, MDMBUF)) {
tp               1139 arch/i386/isa/pccom.c comstart(struct tty *tp)
tp               1141 arch/i386/isa/pccom.c 	struct com_softc *sc = pccom_cd.cd_devs[DEVUNIT(tp->t_dev)];
tp               1147 arch/i386/isa/pccom.c 	if (ISSET(tp->t_state, TS_BUSY))
tp               1149 arch/i386/isa/pccom.c 	if (ISSET(tp->t_state, TS_TIMEOUT | TS_TTSTOP) || sc->sc_halt > 0)
tp               1151 arch/i386/isa/pccom.c 	if (ISSET(tp->t_cflag, CRTSCTS) && !ISSET(sc->sc_msr, MSR_CTS))
tp               1153 arch/i386/isa/pccom.c 	if (tp->t_outq.c_cc <= tp->t_lowat) {
tp               1154 arch/i386/isa/pccom.c 		if (ISSET(tp->t_state, TS_ASLEEP)) {
tp               1155 arch/i386/isa/pccom.c 			CLR(tp->t_state, TS_ASLEEP);
tp               1156 arch/i386/isa/pccom.c 			wakeup((caddr_t)&tp->t_outq);
tp               1158 arch/i386/isa/pccom.c 		selwakeup(&tp->t_wsel);
tp               1160 arch/i386/isa/pccom.c 	count = ndqb(&tp->t_outq, 0);
tp               1165 arch/i386/isa/pccom.c 		SET(tp->t_state, TS_BUSY);
tp               1173 arch/i386/isa/pccom.c 		sc->sc_tba = tp->t_outq.c_cf;
tp               1195 arch/i386/isa/pccom.c comstop(struct tty *tp, int flag)
tp               1198 arch/i386/isa/pccom.c 	struct com_softc *sc = pccom_cd.cd_devs[DEVUNIT(tp->t_dev)];
tp               1201 arch/i386/isa/pccom.c 	if (ISSET(tp->t_state, TS_BUSY)) {
tp               1203 arch/i386/isa/pccom.c 		if (!ISSET(tp->t_state, TS_TTSTOP))
tp               1204 arch/i386/isa/pccom.c 			SET(tp->t_state, TS_FLUSH);
tp               1235 arch/i386/isa/pccom.c 	struct tty *tp;
tp               1250 arch/i386/isa/pccom.c 		tp = sc->sc_tty;
tp               1254 arch/i386/isa/pccom.c 		if (tp == NULL || !ISSET(tp->t_state, TS_ISOPEN | TS_WOPEN))
tp               1256 arch/i386/isa/pccom.c 	 	line = &linesw[tp->t_line];
tp               1276 arch/i386/isa/pccom.c 				line->l_rint(c, tp);
tp               1279 arch/i386/isa/pccom.c 				CLR(tp->t_state, TS_BUSY);
tp               1280 arch/i386/isa/pccom.c 				if (ISSET(tp->t_state, TS_FLUSH))
tp               1281 arch/i386/isa/pccom.c 					CLR(tp->t_state, TS_FLUSH);
tp               1283 arch/i386/isa/pccom.c 					ndflush(&tp->t_outq,
tp               1284 arch/i386/isa/pccom.c 				 	(int)(sc->sc_tba - tp->t_outq.c_cf));
tp               1286 arch/i386/isa/pccom.c 					wakeup(&tp->t_outq);
tp               1287 arch/i386/isa/pccom.c 				line->l_start(tp);
tp               1297 arch/i386/isa/pccom.c 						line->l_modem(tp, 1);
tp               1298 arch/i386/isa/pccom.c 					else if (line->l_modem(tp, 0) == 0) {
tp               1308 arch/i386/isa/pccom.c 				    ISSET(tp->t_cflag, CRTSCTS))
tp               1309 arch/i386/isa/pccom.c 					line->l_start(tp);
tp               1379 arch/i386/isa/pccom.c 	struct tty *tp = sc->sc_tty;
tp               1419 arch/i386/isa/pccom.c 		ttytstamp(tp, sc->sc_msr & MSR_CTS, msr & MSR_CTS,
tp               1430 arch/i386/isa/pccom.c 		if (ISSET(tp->t_cflag, CRTSCTS) && ISSET(msr, MSR_DCTS)) {
tp               1451 arch/i386/isa/pccom.c 		else if (ISSET(tp->t_state, TS_BUSY)) {
tp                 90 compat/common/tty_43.c ttcompat(tp, com, data, flag, p)
tp                 91 compat/common/tty_43.c 	register struct tty *tp;
tp                101 compat/common/tty_43.c 		register u_char *cc = tp->t_cc;
tp                104 compat/common/tty_43.c 		speed = ttspeedtab(tp->t_ospeed, compatspeeds);
tp                106 compat/common/tty_43.c 		if (tp->t_ispeed == 0)
tp                109 compat/common/tty_43.c 			speed = ttspeedtab(tp->t_ispeed, compatspeeds);
tp                114 compat/common/tty_43.c 		sg->sg_flags = ttcompatgetflags(tp);
tp                124 compat/common/tty_43.c 		term = tp->t_termios;
tp                135 compat/common/tty_43.c 		tp->t_flags = (ttcompatgetflags(tp)&0xffff0000) | (sg->sg_flags&0xffff);
tp                136 compat/common/tty_43.c 		ttcompatsetflags(tp, &term);
tp                137 compat/common/tty_43.c 		return (ttioctl(tp, com == TIOCSETP ? TIOCSETAF : TIOCSETA,
tp                143 compat/common/tty_43.c 		register u_char *cc = tp->t_cc;
tp                155 compat/common/tty_43.c 		register u_char *cc = tp->t_cc;
tp                169 compat/common/tty_43.c 		register u_char *cc = tp->t_cc;
tp                181 compat/common/tty_43.c 		register u_char *cc = tp->t_cc;
tp                197 compat/common/tty_43.c 		term = tp->t_termios;
tp                198 compat/common/tty_43.c 		flags = ttcompatgetflags(tp);
tp                201 compat/common/tty_43.c 			tp->t_flags = (flags&0xffff) | (*(int *)data<<16);
tp                204 compat/common/tty_43.c 			tp->t_flags = flags | (*(int *)data<<16);
tp                207 compat/common/tty_43.c 			tp->t_flags = flags & ~(*(int *)data<<16);
tp                210 compat/common/tty_43.c 		ttcompatsetlflags(tp, &term);
tp                211 compat/common/tty_43.c 		return (ttioctl(tp, TIOCSETA, (caddr_t)&term, flag, p));
tp                214 compat/common/tty_43.c 		*(int *)data = ttcompatgetflags(tp)>>16;
tp                220 compat/common/tty_43.c 		*(int *)data = tp->t_line ? tp->t_line : 2;
tp                226 compat/common/tty_43.c 		return (ttioctl(tp, TIOCSETD,
tp                233 compat/common/tty_43.c 		return (ttioctl(tp, TIOCCONS, data, flag, p));
tp                236 compat/common/tty_43.c 		SET(tp->t_cflag, HUPCL);
tp                240 compat/common/tty_43.c 		if (tp->t_session == NULL)
tp                243 compat/common/tty_43.c 		if (tp->t_session->s_leader == NULL)
tp                246 compat/common/tty_43.c 		*(int *) data =  tp->t_session->s_leader->p_pid;
tp                256 compat/common/tty_43.c ttcompatgetflags(tp)
tp                257 compat/common/tty_43.c 	register struct tty *tp;
tp                259 compat/common/tty_43.c 	register tcflag_t iflag = tp->t_iflag;
tp                260 compat/common/tty_43.c 	register tcflag_t lflag = tp->t_lflag;
tp                261 compat/common/tty_43.c 	register tcflag_t oflag = tp->t_oflag;
tp                262 compat/common/tty_43.c 	register tcflag_t cflag = tp->t_cflag;
tp                289 compat/common/tty_43.c 		SET(flags, ISSET(tp->t_flags, LITOUT|PASS8));
tp                322 compat/common/tty_43.c ttcompatsetflags(tp, t)
tp                323 compat/common/tty_43.c 	register struct tty *tp;
tp                326 compat/common/tty_43.c 	register int flags = tp->t_flags;
tp                422 compat/common/tty_43.c ttcompatsetlflags(tp, t)
tp                423 compat/common/tty_43.c 	register struct tty *tp;
tp                426 compat/common/tty_43.c 	register int flags = tp->t_flags;
tp                127 compat/hpux/hppa/hpux_syscallargs.h 	syscallarg(struct hpux_timeb *) tp;
tp               1232 compat/hpux/hpux_compat.c 	return (copyout((caddr_t)&tb, (caddr_t)SCARG(uap, tp), sizeof (tb)));
tp                137 compat/hpux/m68k/hpux_syscallargs.h 	syscallarg(struct hpux_timeb *) tp;
tp                635 compat/ibcs2/ibcs2_misc.c 	return copyout((caddr_t)&itb, (caddr_t)SCARG(uap, tp),
tp                652 compat/ibcs2/ibcs2_misc.c 	if (SCARG(uap, tp))
tp                653 compat/ibcs2/ibcs2_misc.c 		return copyout((caddr_t)&tv.tv_sec, (caddr_t)SCARG(uap, tp),
tp                879 compat/ibcs2/ibcs2_misc.c 	return copyout((caddr_t)&tms, (caddr_t)SCARG(uap, tp),
tp                922 compat/ibcs2/ibcs2_misc.c 	struct timeval *tp;
tp                925 compat/ibcs2/ibcs2_misc.c 	tp = stackgap_alloc(&sg, 2 * sizeof(struct timeval *));
tp                935 compat/ibcs2/ibcs2_misc.c 		tp[0].tv_sec = ubuf.actime;
tp                936 compat/ibcs2/ibcs2_misc.c 		tp[0].tv_usec = 0;
tp                937 compat/ibcs2/ibcs2_misc.c 		tp[1].tv_sec = ubuf.modtime;
tp                938 compat/ibcs2/ibcs2_misc.c 		tp[1].tv_usec = 0;
tp                939 compat/ibcs2/ibcs2_misc.c 		SCARG(&sa, tptr) = tp;
tp                 63 compat/ibcs2/ibcs2_syscallargs.h 	syscallarg(ibcs2_time_t *) tp;
tp                159 compat/ibcs2/ibcs2_syscallargs.h 	syscallarg(struct tms *) tp;
tp                300 compat/ibcs2/ibcs2_syscallargs.h 	syscallarg(struct xenix_timeb *) tp;
tp                323 compat/linux/linux_file.c 	struct tty *tp, *(*d_tty)(dev_t);
tp                411 compat/linux/linux_file.c 		if (!d_tty || (!(tp = (*d_tty)(va.va_rdev))))
tp                414 compat/linux/linux_file.c 			retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
tp                428 compat/linux/linux_file.c 		tp->t_pgrp = pgrp;
tp                183 compat/osf1/osf1_syscallargs.h 	syscallarg(struct osf1_timeval *) tp;
tp                 62 compat/osf1/osf1_time.c 	if (SCARG(uap, tp) == NULL)
tp                 63 compat/osf1/osf1_time.c 		SCARG(&a, tp) = NULL;
tp                 65 compat/osf1/osf1_time.c 		SCARG(&a, tp) = stackgap_alloc(&sg, sizeof tv);
tp                 73 compat/osf1/osf1_time.c 	if (error == 0 && SCARG(uap, tp) != NULL) {
tp                 74 compat/osf1/osf1_time.c 		error = copyin((caddr_t)SCARG(&a, tp),
tp                 82 compat/osf1/osf1_time.c 			    (caddr_t)SCARG(uap, tp), sizeof otv);
tp               1211 compat/sunos/sunos_misc.c 	return copyout(&tms, SCARG(uap, tp), sizeof(*(SCARG(uap, tp))));
tp                 83 compat/sunos/sunos_syscallargs.h 	syscallarg(struct tms *) tp;
tp                756 compat/svr4/svr4_misc.c 	return copyout(&tms, SCARG(uap, tp), sizeof(tms));
tp               1284 compat/svr4/svr4_misc.c         struct itimerval *ntp, *otp, tp;
tp               1291 compat/svr4/svr4_misc.c         timerclear(&tp.it_interval);
tp               1292 compat/svr4/svr4_misc.c         tp.it_value.tv_sec = SCARG(uap, sec);
tp               1293 compat/svr4/svr4_misc.c         tp.it_value.tv_usec = 0;
tp               1295 compat/svr4/svr4_misc.c 	if ((error = copyout(&tp, ntp, sizeof(tp))) != 0)
tp               1305 compat/svr4/svr4_misc.c 	if ((error = copyin(otp, &tp, sizeof(tp))) != 0)
tp               1308 compat/svr4/svr4_misc.c         if (tp.it_value.tv_usec)
tp               1309 compat/svr4/svr4_misc.c                 tp.it_value.tv_sec++;
tp               1311 compat/svr4/svr4_misc.c         *retval = (register_t) tp.it_value.tv_sec;
tp               1325 compat/svr4/svr4_misc.c 	if (SCARG(uap, tp)) {
tp               1329 compat/svr4/svr4_misc.c 		return copyout(&atv, SCARG(uap, tp), sizeof (atv));
tp                100 compat/svr4/svr4_syscallargs.h 	syscallarg(struct tms *) tp;
tp                339 compat/svr4/svr4_syscallargs.h 	syscallarg(struct timeval *) tp;
tp                831 dev/cardbus/cardbus.c 	u_int8_t *tp = tuple;
tp                838 dev/cardbus/cardbus.c 	while ((tp = decode_tuple(tp, tuple + buflen, func, data)) != NULL)
tp                149 dev/cons.c     cnstop(struct tty *tp, int flag)
tp                273 dev/ic/com.c   	struct tty *tp;
tp                293 dev/ic/com.c   		tp = sc->sc_tty = ttymalloc();
tp                295 dev/ic/com.c   		tp = sc->sc_tty;
tp                298 dev/ic/com.c   	tp->t_oproc = comstart;
tp                299 dev/ic/com.c   	tp->t_param = comparam;
tp                300 dev/ic/com.c   	tp->t_dev = dev;
tp                301 dev/ic/com.c   	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                302 dev/ic/com.c   		SET(tp->t_state, TS_WOPEN);
tp                303 dev/ic/com.c   		ttychars(tp);
tp                304 dev/ic/com.c   		tp->t_iflag = TTYDEF_IFLAG;
tp                305 dev/ic/com.c   		tp->t_oflag = TTYDEF_OFLAG;
tp                308 dev/ic/com.c   			tp->t_cflag = comconscflag;
tp                311 dev/ic/com.c   			tp->t_cflag = TTYDEF_CFLAG;
tp                313 dev/ic/com.c   			SET(tp->t_cflag, CLOCAL);
tp                315 dev/ic/com.c   			SET(tp->t_cflag, CRTSCTS);
tp                317 dev/ic/com.c   			SET(tp->t_cflag, MDMBUF);
tp                318 dev/ic/com.c   		tp->t_lflag = TTYDEF_LFLAG;
tp                319 dev/ic/com.c   		tp->t_ispeed = tp->t_ospeed = comdefaultrate;
tp                324 dev/ic/com.c   		comparam(tp, &tp->t_termios);
tp                325 dev/ic/com.c   		ttsetwater(tp);
tp                362 dev/ic/com.c   			if (tp->t_ispeed <= 1200)
tp                416 dev/ic/com.c   		    ISSET(sc->sc_msr, MSR_DCD) || ISSET(tp->t_cflag, MDMBUF))
tp                417 dev/ic/com.c   			SET(tp->t_state, TS_CARR_ON);
tp                419 dev/ic/com.c   			CLR(tp->t_state, TS_CARR_ON);
tp                429 dev/ic/com.c   	} else if (ISSET(tp->t_state, TS_XCLUDE) && p->p_ucred->cr_uid != 0)
tp                435 dev/ic/com.c   		if (ISSET(tp->t_state, TS_ISOPEN)) {
tp                451 dev/ic/com.c   			    (!ISSET(tp->t_cflag, CLOCAL) &&
tp                452 dev/ic/com.c   				!ISSET(tp->t_state, TS_CARR_ON))) {
tp                453 dev/ic/com.c   				SET(tp->t_state, TS_WOPEN);
tp                454 dev/ic/com.c   				error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, ttopen, 0);
tp                460 dev/ic/com.c   				if (error && ISSET(tp->t_state, TS_WOPEN)) {
tp                461 dev/ic/com.c   					CLR(tp->t_state, TS_WOPEN);
tp                462 dev/ic/com.c   					if (!sc->sc_cua && !ISSET(tp->t_state, TS_ISOPEN))
tp                472 dev/ic/com.c   	return (*linesw[tp->t_line].l_open)(dev, tp);
tp                482 dev/ic/com.c   	struct tty *tp = sc->sc_tty;
tp                487 dev/ic/com.c   	if (!ISSET(tp->t_state, TS_ISOPEN))
tp                494 dev/ic/com.c   	(*linesw[tp->t_line].l_close)(tp, flag);
tp                496 dev/ic/com.c   	if (ISSET(tp->t_state, TS_WOPEN)) {
tp                505 dev/ic/com.c   	CLR(tp->t_state, TS_BUSY | TS_FLUSH);
tp                511 dev/ic/com.c   	ttyclose(tp);
tp                516 dev/ic/com.c   		ttyfree(tp);
tp                529 dev/ic/com.c   	struct tty *tp = sc->sc_tty;
tp                534 dev/ic/com.c   	if (ISSET(tp->t_cflag, HUPCL) &&
tp                587 dev/ic/com.c   	struct tty *tp = sc->sc_tty;
tp                589 dev/ic/com.c   	return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
tp                596 dev/ic/com.c   	struct tty *tp = sc->sc_tty;
tp                598 dev/ic/com.c   	return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
tp                605 dev/ic/com.c   	struct tty *tp = sc->sc_tty;
tp                607 dev/ic/com.c   	return (tp);
tp                627 dev/ic/com.c   	struct tty *tp = sc->sc_tty;
tp                632 dev/ic/com.c   	error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
tp                635 dev/ic/com.c   	error = ttioctl(tp, cmd, data, flag, p);
tp                739 dev/ic/com.c   comparam(struct tty *tp, struct termios *t)
tp                741 dev/ic/com.c   	struct com_softc *sc = com_cd.cd_devs[DEVUNIT(tp->t_dev)];
tp                787 dev/ic/com.c   	if (sc->sc_initialize || (tp->t_ispeed != t->c_ispeed)) {
tp                799 dev/ic/com.c   			while (ISSET(tp->t_state, TS_BUSY)) {
tp                803 dev/ic/com.c   				error = ttysleep(tp, &tp->t_outq,
tp                807 dev/ic/com.c   					comstart(tp);
tp                855 dev/ic/com.c   	tp->t_ispeed = t->c_ispeed;
tp                856 dev/ic/com.c   	tp->t_ospeed = t->c_ospeed;
tp                857 dev/ic/com.c   	oldcflag = tp->t_cflag;
tp                858 dev/ic/com.c   	tp->t_cflag = t->c_cflag;
tp                866 dev/ic/com.c   	    ISSET(oldcflag, MDMBUF) != ISSET(tp->t_cflag, MDMBUF) &&
tp                867 dev/ic/com.c   	    (*linesw[tp->t_line].l_modem)(tp, 0) == 0) {
tp                873 dev/ic/com.c   	comstart(tp);
tp                878 dev/ic/com.c   comstart(struct tty *tp)
tp                880 dev/ic/com.c   	struct com_softc *sc = com_cd.cd_devs[DEVUNIT(tp->t_dev)];
tp                886 dev/ic/com.c   	if (ISSET(tp->t_state, TS_BUSY))
tp                888 dev/ic/com.c   	if (ISSET(tp->t_state, TS_TIMEOUT | TS_TTSTOP) || sc->sc_halt > 0)
tp                890 dev/ic/com.c   	if (ISSET(tp->t_cflag, CRTSCTS) && !ISSET(sc->sc_msr, MSR_CTS))
tp                892 dev/ic/com.c   	if (tp->t_outq.c_cc <= tp->t_lowat) {
tp                893 dev/ic/com.c   		if (ISSET(tp->t_state, TS_ASLEEP)) {
tp                894 dev/ic/com.c   			CLR(tp->t_state, TS_ASLEEP);
tp                895 dev/ic/com.c   			wakeup(&tp->t_outq);
tp                897 dev/ic/com.c   		if (tp->t_outq.c_cc == 0)
tp                899 dev/ic/com.c   		selwakeup(&tp->t_wsel);
tp                901 dev/ic/com.c   	SET(tp->t_state, TS_BUSY);
tp                919 dev/ic/com.c   		int n = q_to_b(&tp->t_outq, buffer, sc->sc_fifolen);
tp                925 dev/ic/com.c   	} else if (tp->t_outq.c_cc != 0)
tp                926 dev/ic/com.c   		bus_space_write_1(iot, ioh, com_data, getc(&tp->t_outq));
tp                957 dev/ic/com.c   comstop(struct tty *tp, int flag)
tp                962 dev/ic/com.c   	if (ISSET(tp->t_state, TS_BUSY))
tp                963 dev/ic/com.c   		if (!ISSET(tp->t_state, TS_TTSTOP))
tp                964 dev/ic/com.c   			SET(tp->t_state, TS_FLUSH);
tp                993 dev/ic/com.c   	struct tty *tp;
tp               1008 dev/ic/com.c   	tp = sc->sc_tty;
tp               1025 dev/ic/com.c   	if (tp == NULL || !ISSET(tp->t_state, TS_ISOPEN)) {
tp               1030 dev/ic/com.c   	if (ISSET(tp->t_cflag, CRTSCTS) &&
tp               1049 dev/ic/com.c   		(*linesw[tp->t_line].l_rint)(c, tp);
tp               1121 dev/ic/com.c   	struct tty *tp;
tp               1130 dev/ic/com.c   	tp = sc->sc_tty;
tp               1162 dev/ic/com.c   					    ISSET(tp->t_cflag, CRTSCTS)) {
tp               1182 dev/ic/com.c   			ttytstamp(tp, sc->sc_msr & MSR_CTS, msr & MSR_CTS,
tp               1188 dev/ic/com.c   				    (*linesw[tp->t_line].l_modem)(tp, ISSET(msr, MSR_DCD)) == 0) {
tp               1194 dev/ic/com.c   			    ISSET(tp->t_cflag, CRTSCTS)) {
tp               1196 dev/ic/com.c   				(*linesw[tp->t_line].l_start)(tp);
tp               1200 dev/ic/com.c   		if (ISSET(lsr, LSR_TXRDY) && ISSET(tp->t_state, TS_BUSY)) {
tp               1201 dev/ic/com.c   			CLR(tp->t_state, TS_BUSY | TS_FLUSH);
tp               1203 dev/ic/com.c   				wakeup(&tp->t_outq);
tp               1204 dev/ic/com.c   			(*linesw[tp->t_line].l_start)(tp);
tp                286 dev/ic/cy.c    	struct tty *tp;
tp                307 dev/ic/cy.c    	tp = cy->cy_tty;
tp                308 dev/ic/cy.c    	tp->t_oproc = cystart;
tp                309 dev/ic/cy.c    	tp->t_param = cyparam;
tp                310 dev/ic/cy.c    	tp->t_dev = dev;
tp                312 dev/ic/cy.c    	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                313 dev/ic/cy.c    		SET(tp->t_state, TS_WOPEN);
tp                314 dev/ic/cy.c    		ttychars(tp);
tp                315 dev/ic/cy.c    		tp->t_iflag = TTYDEF_IFLAG;
tp                316 dev/ic/cy.c    		tp->t_oflag = TTYDEF_OFLAG;
tp                317 dev/ic/cy.c    		tp->t_cflag = TTYDEF_CFLAG;
tp                319 dev/ic/cy.c    			SET(tp->t_cflag, CLOCAL);
tp                321 dev/ic/cy.c    			SET(tp->t_cflag, CRTSCTS);
tp                323 dev/ic/cy.c    			SET(tp->t_cflag, MDMBUF);
tp                324 dev/ic/cy.c    		tp->t_lflag = TTYDEF_LFLAG;
tp                325 dev/ic/cy.c    		tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
tp                360 dev/ic/cy.c    		cyparam(tp, &tp->t_termios);
tp                362 dev/ic/cy.c    		ttsetwater(tp);
tp                375 dev/ic/cy.c    		    ISSET(tp->t_cflag, MDMBUF) ||
tp                377 dev/ic/cy.c    			SET(tp->t_state, TS_CARR_ON);
tp                379 dev/ic/cy.c    			CLR(tp->t_state, TS_CARR_ON);
tp                380 dev/ic/cy.c    	} else if (ISSET(tp->t_state, TS_XCLUDE) && p->p_ucred->cr_uid != 0) {
tp                388 dev/ic/cy.c    		while (!ISSET(tp->t_cflag, CLOCAL) &&
tp                389 dev/ic/cy.c    		    !ISSET(tp->t_state, TS_CARR_ON)) {
tp                390 dev/ic/cy.c    			SET(tp->t_state, TS_WOPEN);
tp                391 dev/ic/cy.c    			error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
tp                395 dev/ic/cy.c    				CLR(tp->t_state, TS_WOPEN);
tp                403 dev/ic/cy.c    	return (*linesw[tp->t_line].l_open)(dev, tp);
tp                419 dev/ic/cy.c    	struct tty *tp = cy->cy_tty;
tp                427 dev/ic/cy.c    	(*linesw[tp->t_line].l_close)(tp, flag);
tp                430 dev/ic/cy.c    	if (ISSET(tp->t_cflag, HUPCL) &&
tp                441 dev/ic/cy.c    	CLR(tp->t_state, TS_BUSY | TS_FLUSH);
tp                444 dev/ic/cy.c    	ttyclose(tp);
tp                462 dev/ic/cy.c    	struct tty *tp = cy->cy_tty;
tp                469 dev/ic/cy.c    	return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
tp                485 dev/ic/cy.c    	struct tty *tp = cy->cy_tty;
tp                492 dev/ic/cy.c    	return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
tp                506 dev/ic/cy.c    	struct tty *tp = cy->cy_tty;
tp                508 dev/ic/cy.c    	return (tp);
tp                526 dev/ic/cy.c    	struct tty *tp = cy->cy_tty;
tp                534 dev/ic/cy.c    	error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
tp                538 dev/ic/cy.c    	error = ttioctl(tp, cmd, data, flag, p);
tp                605 dev/ic/cy.c    cystart(tp)
tp                606 dev/ic/cy.c    	struct tty *tp;
tp                608 dev/ic/cy.c    	int card = CY_CARD(tp->t_dev);
tp                609 dev/ic/cy.c    	int port = CY_PORT(tp->t_dev);
tp                615 dev/ic/cy.c    	printf("%s port %d start, tty 0x%x\n", sc->sc_dev.dv_xname, port, tp);
tp                624 dev/ic/cy.c    	if (!ISSET(tp->t_state, TS_TTSTOP | TS_TIMEOUT | TS_BUSY)) {
tp                625 dev/ic/cy.c    		if (tp->t_outq.c_cc <= tp->t_lowat) {
tp                626 dev/ic/cy.c    			if (ISSET(tp->t_state, TS_ASLEEP)) {
tp                627 dev/ic/cy.c    				CLR(tp->t_state, TS_ASLEEP);
tp                628 dev/ic/cy.c    				wakeup(&tp->t_outq);
tp                631 dev/ic/cy.c    			selwakeup(&tp->t_wsel);
tp                633 dev/ic/cy.c    			if (tp->t_outq.c_cc == 0)
tp                637 dev/ic/cy.c    		SET(tp->t_state, TS_BUSY);
tp                649 dev/ic/cy.c    cystop(tp, flag)
tp                650 dev/ic/cy.c    	struct tty *tp;
tp                653 dev/ic/cy.c    	int card = CY_CARD(tp->t_dev);
tp                654 dev/ic/cy.c    	int port = CY_PORT(tp->t_dev);
tp                661 dev/ic/cy.c    	    port, tp, flag);
tp                666 dev/ic/cy.c    	if (ISSET(tp->t_state, TS_BUSY)) {
tp                667 dev/ic/cy.c    		if (!ISSET(tp->t_state, TS_TTSTOP))
tp                668 dev/ic/cy.c    			SET(tp->t_state, TS_FLUSH);
tp                685 dev/ic/cy.c    cyparam(tp, t)
tp                686 dev/ic/cy.c    	struct tty *tp;
tp                689 dev/ic/cy.c    	int card = CY_CARD(tp->t_dev);
tp                690 dev/ic/cy.c    	int port = CY_PORT(tp->t_dev);
tp                698 dev/ic/cy.c    	    port, tp, t);
tp                940 dev/ic/cy.c    	struct tty *tp;
tp                965 dev/ic/cy.c    		if ((tp = cy->cy_tty) == NULL || cy->cy_ibuf == NULL ||
tp                966 dev/ic/cy.c    		    !ISSET(tp->t_state, TS_ISOPEN | TS_WOPEN))
tp                995 dev/ic/cy.c    			(*linesw[tp->t_line].l_rint)(chr, tp);
tp               1014 dev/ic/cy.c    		if (ISSET(tp->t_cflag, CRTSCTS)) {
tp               1049 dev/ic/cy.c    			if (CY_DIALIN(tp->t_dev) &&
tp               1050 dev/ic/cy.c    			    !(*linesw[tp->t_line].l_modem)(tp, carrier))
tp               1065 dev/ic/cy.c    			(*linesw[tp->t_line].l_start)(tp);
tp               1262 dev/ic/cy.c    			struct tty *tp;
tp               1281 dev/ic/cy.c    			tp = cy->cy_tty;
tp               1282 dev/ic/cy.c    			if (tp == NULL || ISSET(cy->cy_flags, CYF_STOP))
tp               1293 dev/ic/cy.c    			if (tp->t_outq.c_cc > 0) {
tp               1294 dev/ic/cy.c    				SET(tp->t_state, TS_BUSY);
tp               1295 dev/ic/cy.c    				while (tp->t_outq.c_cc > 0 &&
tp               1297 dev/ic/cy.c    					ch = getc(&tp->t_outq);
tp               1333 dev/ic/cy.c    			if (tp->t_outq.c_cc == 0) {
tp               1343 dev/ic/cy.c    				CLR(tp->t_state, TS_BUSY);
tp               1346 dev/ic/cy.c    			if (tp->t_outq.c_cc <= tp->t_lowat) {
tp                 99 dev/ic/oosiop.c 	u_int8_t	tp;
tp                124 dev/ic/oosiop.c #define	oosiop_period(sc, tp, scf)					\
tp                125 dev/ic/oosiop.c 	    (((1000000000 / (sc)->sc_freq) * (tp) * (scf)) / 40)
tp                688 dev/ic/oosiop.c 				p = oosiop_period(sc, synctbl[i].tp + 4,
tp                699 dev/ic/oosiop.c 			sc->sc_tgt[id].sxfer = (synctbl[i].tp << 4) | offset;
tp                217 dev/ic/z8530tty.c 	struct tty *tp;
tp                257 dev/ic/z8530tty.c 	tp = ttymalloc();
tp                258 dev/ic/z8530tty.c 	tp->t_dev = dev;
tp                259 dev/ic/z8530tty.c 	tp->t_oproc = zsstart;
tp                260 dev/ic/z8530tty.c 	tp->t_param = zsparam;
tp                261 dev/ic/z8530tty.c 	tp->t_hwiflow = zshwiflow;
tp                263 dev/ic/z8530tty.c 	zst->zst_tty = tp;
tp                277 dev/ic/z8530tty.c 		tp->t_ispeed = cs->cs_defspeed;
tp                278 dev/ic/z8530tty.c 		tp->t_ospeed = cs->cs_defspeed;
tp                279 dev/ic/z8530tty.c 		tp->t_cflag = ZSTTY_DEF_CFLAG;
tp                280 dev/ic/z8530tty.c 		(void) zsparam(tp, &tp->t_termios);
tp                330 dev/ic/z8530tty.c 	register struct tty *tp;
tp                341 dev/ic/z8530tty.c 	tp = zst->zst_tty;
tp                345 dev/ic/z8530tty.c 	if (tp == NULL)
tp                349 dev/ic/z8530tty.c 	if (((tp->t_state & (TS_ISOPEN | TS_XCLUDE))
tp                358 dev/ic/z8530tty.c 	if ((tp->t_state & TS_ISOPEN) == 0) {
tp                360 dev/ic/z8530tty.c 		ttychars(tp);
tp                361 dev/ic/z8530tty.c 		tp->t_iflag = TTYDEF_IFLAG;
tp                362 dev/ic/z8530tty.c 		tp->t_oflag = TTYDEF_OFLAG;
tp                363 dev/ic/z8530tty.c 		tp->t_cflag = ZSTTY_DEF_CFLAG;
tp                365 dev/ic/z8530tty.c 			tp->t_cflag |= CLOCAL;
tp                367 dev/ic/z8530tty.c 			tp->t_cflag |= CRTSCTS;
tp                369 dev/ic/z8530tty.c 			tp->t_cflag |= MDMBUF;
tp                370 dev/ic/z8530tty.c 		tp->t_lflag = TTYDEF_LFLAG;
tp                371 dev/ic/z8530tty.c 		tp->t_ispeed = tp->t_ospeed = cs->cs_defspeed;
tp                372 dev/ic/z8530tty.c 		(void) zsparam(tp, &tp->t_termios);
tp                373 dev/ic/z8530tty.c 		ttsetwater(tp);
tp                380 dev/ic/z8530tty.c 			tp->t_state |= TS_CARR_ON;
tp                391 dev/ic/z8530tty.c 			tp->t_state |= TS_CARR_ON;
tp                395 dev/ic/z8530tty.c 		if ((tp->t_state & TS_CARR_ON) ||
tp                396 dev/ic/z8530tty.c 		    (tp->t_cflag & CLOCAL) ||
tp                402 dev/ic/z8530tty.c 		tp->t_state |= TS_WOPEN;
tp                403 dev/ic/z8530tty.c 		error = ttysleep(tp, (caddr_t)&tp->t_rawq,
tp                406 dev/ic/z8530tty.c 			if ((tp->t_state & TS_ISOPEN) == 0) {
tp                409 dev/ic/z8530tty.c 				tp->t_state &= ~TS_WOPEN;
tp                410 dev/ic/z8530tty.c 				ttwakeup(tp);
tp                419 dev/ic/z8530tty.c 		error = linesw[tp->t_line].l_open(dev, tp);
tp                436 dev/ic/z8530tty.c 	register struct tty *tp;
tp                441 dev/ic/z8530tty.c 	tp = zst->zst_tty;
tp                444 dev/ic/z8530tty.c 	if ((tp->t_state & TS_ISOPEN) == 0)
tp                447 dev/ic/z8530tty.c 	(*linesw[tp->t_line].l_close)(tp, flags);
tp                448 dev/ic/z8530tty.c 	hup = tp->t_cflag & HUPCL;
tp                461 dev/ic/z8530tty.c 	ttyclose(tp);
tp                475 dev/ic/z8530tty.c 	register struct tty *tp;
tp                478 dev/ic/z8530tty.c 	tp = zst->zst_tty;
tp                479 dev/ic/z8530tty.c 	return (linesw[tp->t_line].l_read(tp, uio, flags));
tp                489 dev/ic/z8530tty.c 	register struct tty *tp;
tp                492 dev/ic/z8530tty.c 	tp = zst->zst_tty;
tp                493 dev/ic/z8530tty.c 	return (linesw[tp->t_line].l_write(tp, uio, flags));
tp                509 dev/ic/z8530tty.c 	register struct tty *tp;
tp                514 dev/ic/z8530tty.c 	tp = zst->zst_tty;
tp                516 dev/ic/z8530tty.c 	error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
tp                519 dev/ic/z8530tty.c 	error = ttioctl(tp, cmd, data, flag, p);
tp                574 dev/ic/z8530tty.c zsstart(tp)
tp                575 dev/ic/z8530tty.c 	register struct tty *tp;
tp                581 dev/ic/z8530tty.c 	zst = zstty_cd.cd_devs[minor(tp->t_dev)];
tp                589 dev/ic/z8530tty.c 	if (tp->t_state & (TS_TIMEOUT | TS_BUSY | TS_TTSTOP))
tp                595 dev/ic/z8530tty.c 	if (tp->t_cflag & CRTSCTS)
tp                603 dev/ic/z8530tty.c 	if (tp->t_outq.c_cc <= tp->t_lowat) {
tp                604 dev/ic/z8530tty.c 		if (tp->t_state & TS_ASLEEP) {
tp                605 dev/ic/z8530tty.c 			tp->t_state &= ~TS_ASLEEP;
tp                606 dev/ic/z8530tty.c 			wakeup((caddr_t)&tp->t_outq);
tp                608 dev/ic/z8530tty.c 		selwakeup(&tp->t_wsel);
tp                611 dev/ic/z8530tty.c 	nch = ndqb(&tp->t_outq, 0);	/* XXX */
tp                615 dev/ic/z8530tty.c 		register char *p = tp->t_outq.c_cf;
tp                618 dev/ic/z8530tty.c 		tp->t_state |= TS_BUSY;
tp                643 dev/ic/z8530tty.c zsstop(tp, flag)
tp                644 dev/ic/z8530tty.c 	struct tty *tp;
tp                651 dev/ic/z8530tty.c 	zst = zstty_cd.cd_devs[minor(tp->t_dev)];
tp                655 dev/ic/z8530tty.c 	if (tp->t_state & TS_BUSY) {
tp                663 dev/ic/z8530tty.c 		if ((tp->t_state & TS_TTSTOP) == 0)
tp                664 dev/ic/z8530tty.c 			tp->t_state |= TS_FLUSH;
tp                677 dev/ic/z8530tty.c zsparam(tp, t)
tp                678 dev/ic/z8530tty.c 	register struct tty *tp;
tp                686 dev/ic/z8530tty.c 	zst = zstty_cd.cd_devs[minor(tp->t_dev)];
tp                706 dev/ic/z8530tty.c 	tp->t_ispeed = tp->t_ospeed = bps;
tp                709 dev/ic/z8530tty.c 	tp->t_cflag = cflag;
tp                797 dev/ic/z8530tty.c 	struct tty *tp;
tp                801 dev/ic/z8530tty.c 	tp = zst->zst_tty;
tp                832 dev/ic/z8530tty.c zshwiflow(tp, stop)
tp                833 dev/ic/z8530tty.c 	struct tty *tp;
tp                839 dev/ic/z8530tty.c 	zst = zstty_cd.cd_devs[minor(tp->t_dev)];
tp                873 dev/ic/z8530tty.c 	register struct tty *tp;
tp                877 dev/ic/z8530tty.c 	tp = zst->zst_tty;
tp               1036 dev/ic/z8530tty.c 	register struct tty *tp;
tp               1040 dev/ic/z8530tty.c 	tp  = zst->zst_tty;
tp               1063 dev/ic/z8530tty.c 	if (((rr0 & ZSRR0_CTS) == 0) && (tp->t_cflag & CRTSCTS)) {
tp               1078 dev/ic/z8530tty.c 	ttytstamp(tp, cs->cs_rr0 & ZSRR0_CTS, rr0 & ZSRR0_CTS,
tp               1123 dev/ic/z8530tty.c 	register struct tty *tp;
tp               1130 dev/ic/z8530tty.c 	tp   = zst->zst_tty;
tp               1131 dev/ic/z8530tty.c 	line = &linesw[tp->t_line];
tp               1162 dev/ic/z8530tty.c 		line->l_rint(c, tp);
tp               1181 dev/ic/z8530tty.c 	if (zst->zst_rx_blocked && ((tp->t_state & TS_TBLOCK) == 0)) {
tp               1201 dev/ic/z8530tty.c 			if (line->l_modem(tp, c) == 0)
tp               1204 dev/ic/z8530tty.c 		if ((delta & ZSRR0_CTS) && (tp->t_cflag & CRTSCTS)) {
tp               1211 dev/ic/z8530tty.c 				tp->t_state &= ~TS_TTSTOP;
tp               1212 dev/ic/z8530tty.c 				(*line->l_start)(tp);
tp               1219 dev/ic/z8530tty.c 		tp->t_state &= ~TS_BUSY;
tp               1220 dev/ic/z8530tty.c 		if (tp->t_state & TS_FLUSH)
tp               1221 dev/ic/z8530tty.c 			tp->t_state &= ~TS_FLUSH;
tp               1223 dev/ic/z8530tty.c 			ndflush(&tp->t_outq, zst->zst_tba -
tp               1224 dev/ic/z8530tty.c 				(caddr_t) tp->t_outq.c_cf);
tp               1225 dev/ic/z8530tty.c 		line->l_start(tp);
tp               1227 dev/isa/pss.c  pss_get_treble(sc, tp)
tp               1229 dev/isa/pss.c      u_char *tp;
tp               1231 dev/isa/pss.c      *tp = sc->monitor_treble;
tp                492 dev/isa/spkr.c 	tone_t *tp, ttp;
tp                504 dev/isa/spkr.c 		tp = (tone_t *)data;
tp                506 dev/isa/spkr.c 		if (tp->frequency == 0)
tp                507 dev/isa/spkr.c 			rest(tp->duration);
tp                509 dev/isa/spkr.c 			tone(tp->frequency, tp->duration);
tp                512 dev/isa/spkr.c 		tp = (tone_t *)(*(caddr_t *)data);
tp                514 dev/isa/spkr.c 		for (; ; tp++) {
tp                515 dev/isa/spkr.c 			error = copyin(tp, &ttp, sizeof(tone_t));
tp                188 dev/pci/cz.c   void    czttystart(struct tty *tp);
tp                189 dev/pci/cz.c   int	czttyparam(struct tty *tp, struct termios *t);
tp                300 dev/pci/cz.c   	struct tty *tp;
tp                423 dev/pci/cz.c   		tp = ttymalloc();
tp                424 dev/pci/cz.c   		tp->t_dev = makedev(cztty_major,
tp                426 dev/pci/cz.c   		tp->t_oproc = czttystart;
tp                427 dev/pci/cz.c   		tp->t_param = czttyparam;
tp                429 dev/pci/cz.c   		sc->sc_tty = tp;
tp                692 dev/pci/cz.c   	struct	tty *tp;
tp                715 dev/pci/cz.c   		tp = sc->sc_tty;
tp                722 dev/pci/cz.c   			if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                730 dev/pci/cz.c   			if (cztty_transmit(sc, tp)) {
tp                734 dev/pci/cz.c   				ttwakeup(tp);
tp                735 dev/pci/cz.c   				wakeup(tp);
tp                745 dev/pci/cz.c   			if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                751 dev/pci/cz.c   			if (cztty_receive(sc, tp)) {
tp                755 dev/pci/cz.c   				ttwakeup(tp);
tp                756 dev/pci/cz.c   				wakeup(tp);
tp                761 dev/pci/cz.c   			if (!ISSET(tp->t_state, TS_ISOPEN))
tp                764 dev/pci/cz.c   			(void) (*linesw[tp->t_line].l_modem)(tp,
tp                794 dev/pci/cz.c   			if (!ISSET(tp->t_state, TS_ISOPEN))
tp                801 dev/pci/cz.c   			(*linesw[tp->t_line].l_rint)(TTY_FE, tp);
tp                802 dev/pci/cz.c   			ttwakeup(tp);
tp                803 dev/pci/cz.c   			wakeup(tp);
tp                912 dev/pci/cz.c   	struct tty *tp = sc->sc_tty;
tp                924 dev/pci/cz.c   	if (ISSET(tp->t_cflag, HUPCL)) {
tp                926 dev/pci/cz.c   		(void) tsleep(tp, TTIPRI, ttclos, hz);
tp                955 dev/pci/cz.c   	struct tty *tp;
tp                965 dev/pci/cz.c   	tp = sc->sc_tty;
tp                967 dev/pci/cz.c   	if (ISSET(tp->t_state, TS_ISOPEN) &&
tp                968 dev/pci/cz.c   	    ISSET(tp->t_state, TS_XCLUDE) &&
tp                977 dev/pci/cz.c   	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                980 dev/pci/cz.c   		tp->t_dev = dev;
tp               1022 dev/pci/cz.c   		tp->t_ospeed = 0;
tp               1023 dev/pci/cz.c   		(void) czttyparam(tp, &t);
tp               1024 dev/pci/cz.c   		tp->t_iflag = TTYDEF_IFLAG;
tp               1025 dev/pci/cz.c   		tp->t_oflag = TTYDEF_OFLAG;
tp               1026 dev/pci/cz.c   		tp->t_lflag = TTYDEF_LFLAG;
tp               1027 dev/pci/cz.c   		ttychars(tp);
tp               1028 dev/pci/cz.c   		ttsetwater(tp);
tp               1042 dev/pci/cz.c   	error = ttyopen(CZTTY_DIALOUT(dev), tp);
tp               1046 dev/pci/cz.c   	error = (*linesw[tp->t_line].l_open)(dev, tp);
tp               1053 dev/pci/cz.c   	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp               1073 dev/pci/cz.c   	struct tty *tp = sc->sc_tty;
tp               1076 dev/pci/cz.c   	if (!ISSET(tp->t_state, TS_ISOPEN))
tp               1079 dev/pci/cz.c   	(*linesw[tp->t_line].l_close)(tp, flags);
tp               1080 dev/pci/cz.c   	ttyclose(tp);
tp               1082 dev/pci/cz.c   	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp               1103 dev/pci/cz.c   	struct tty *tp = sc->sc_tty;
tp               1105 dev/pci/cz.c   	return ((*linesw[tp->t_line].l_read)(tp, uio, flags));
tp               1117 dev/pci/cz.c   	struct tty *tp = sc->sc_tty;
tp               1119 dev/pci/cz.c   	return ((*linesw[tp->t_line].l_write)(tp, uio, flags));
tp               1132 dev/pci/cz.c   	struct tty *tp = sc->sc_tty;
tp               1134 dev/pci/cz.c   	return ((*linesw[tp->t_line].l_poll)(tp, events, p));
tp               1147 dev/pci/cz.c   	struct tty *tp = sc->sc_tty;
tp               1150 dev/pci/cz.c   	error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
tp               1154 dev/pci/cz.c   	error = ttioctl(tp, cmd, data, flag, p);
tp               1337 dev/pci/cz.c   czttyparam(struct tty *tp, struct termios *t)
tp               1339 dev/pci/cz.c   	struct cztty_softc *sc = CZTTY_SOFTC(tp->t_dev);
tp               1363 dev/pci/cz.c   	if (tp->t_ospeed == ospeed &&
tp               1364 dev/pci/cz.c   	    tp->t_cflag == cflag)
tp               1433 dev/pci/cz.c   	tp->t_ispeed =  0;
tp               1434 dev/pci/cz.c   	tp->t_ospeed = t->c_ospeed;
tp               1435 dev/pci/cz.c   	tp->t_cflag = t->c_cflag;
tp               1465 dev/pci/cz.c   	(void) (*linesw[tp->t_line].l_modem)(tp, ISSET(rs_status, C_RS_DCD));
tp               1476 dev/pci/cz.c   czttystart(struct tty *tp)
tp               1478 dev/pci/cz.c   	struct cztty_softc *sc = CZTTY_SOFTC(tp->t_dev);
tp               1482 dev/pci/cz.c   	if (ISSET(tp->t_state, TS_BUSY | TS_TIMEOUT | TS_TTSTOP))
tp               1485 dev/pci/cz.c   	if (tp->t_outq.c_cc <= tp->t_lowat) {
tp               1486 dev/pci/cz.c   		if (ISSET(tp->t_state, TS_ASLEEP)) {
tp               1487 dev/pci/cz.c   			CLR(tp->t_state, TS_ASLEEP);
tp               1488 dev/pci/cz.c   			wakeup(&tp->t_outq);
tp               1490 dev/pci/cz.c   		selwakeup(&tp->t_wsel);
tp               1491 dev/pci/cz.c   		if (tp->t_outq.c_cc == 0)
tp               1495 dev/pci/cz.c   	cztty_transmit(sc, tp);
tp               1506 dev/pci/cz.c   czttystop(struct tty *tp, int flag)
tp               1577 dev/pci/cz.c   cztty_transmit(struct cztty_softc *sc, struct tty *tp)
tp               1592 dev/pci/cz.c   	while ((tp->t_outq.c_cc > 0) && ((move = TX_MOVEABLE(get, put, size)))){
tp               1595 dev/pci/cz.c   			move = min(tp->t_outq.c_cc, move);
tp               1596 dev/pci/cz.c   			error = q_to_b(&tp->t_outq, 0, move);
tp               1605 dev/pci/cz.c   			move = min(ndqb(&tp->t_outq, 0), move);
tp               1607 dev/pci/cz.c   			    address + put, tp->t_outq.c_cf, move);
tp               1608 dev/pci/cz.c   			ndflush(&tp->t_outq, move);
tp               1623 dev/pci/cz.c   cztty_receive(struct cztty_softc *sc, struct tty *tp)
tp               1634 dev/pci/cz.c   	while ((get != put) && ((tp->t_canq.c_cc + tp->t_rawq.c_cc) < tp->t_hiwat)) {
tp               1645 dev/pci/cz.c   		(*linesw[tp->t_line].l_rint)(ch, tp);
tp                587 dev/sbus/magma.c 			struct tty *tp;
tp                591 dev/sbus/magma.c 			tp = mtty->mp_tty;
tp                689 dev/sbus/magma.c 			struct tty *tp = mp->mp_tty;
tp                691 dev/sbus/magma.c 			if (!ISSET(tp->t_state, TS_ISOPEN))
tp                713 dev/sbus/magma.c 				(*linesw[tp->t_line].l_rint)(data, tp);
tp                724 dev/sbus/magma.c 				(*linesw[tp->t_line].l_modem)(tp, mp->mp_carrier);
tp                734 dev/sbus/magma.c 				ndflush(&tp->t_outq, mp->mp_txp - tp->t_outq.c_cf);
tp                735 dev/sbus/magma.c 				CLR(tp->t_state, TS_BUSY);
tp                736 dev/sbus/magma.c 				(*linesw[tp->t_line].l_start)(tp);	/* might be some more */
tp                805 dev/sbus/magma.c 		struct tty *tp;
tp                814 dev/sbus/magma.c 		tp = ttymalloc();
tp                815 dev/sbus/magma.c 		tp->t_oproc = mtty_start;
tp                816 dev/sbus/magma.c 		tp->t_param = mtty_param;
tp                818 dev/sbus/magma.c 		mp->mp_tty = tp;
tp                845 dev/sbus/magma.c 	struct tty *tp;
tp                854 dev/sbus/magma.c 	tp = mp->mp_tty;
tp                855 dev/sbus/magma.c 	tp->t_dev = dev;
tp                857 dev/sbus/magma.c 	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                858 dev/sbus/magma.c 		SET(tp->t_state, TS_WOPEN);
tp                861 dev/sbus/magma.c 		ttychars(tp);
tp                862 dev/sbus/magma.c 		tp->t_iflag = TTYDEF_IFLAG;
tp                863 dev/sbus/magma.c 		tp->t_oflag = TTYDEF_OFLAG;
tp                864 dev/sbus/magma.c 		tp->t_cflag = TTYDEF_CFLAG;
tp                866 dev/sbus/magma.c 			SET(tp->t_cflag, CLOCAL);
tp                868 dev/sbus/magma.c 			SET(tp->t_cflag, CRTSCTS);
tp                870 dev/sbus/magma.c 			SET(tp->t_cflag, MDMBUF);
tp                871 dev/sbus/magma.c 		tp->t_lflag = TTYDEF_LFLAG;
tp                872 dev/sbus/magma.c 		tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
tp                888 dev/sbus/magma.c 		(void)mtty_param(tp, &tp->t_termios);
tp                891 dev/sbus/magma.c 		ttsetwater(tp);
tp                898 dev/sbus/magma.c 			SET(tp->t_state, TS_CARR_ON);
tp                900 dev/sbus/magma.c 			CLR(tp->t_state, TS_CARR_ON);
tp                901 dev/sbus/magma.c 	} else if (ISSET(tp->t_state, TS_XCLUDE) && p->p_ucred->cr_uid != 0) {
tp                909 dev/sbus/magma.c 		while (!ISSET(tp->t_cflag, CLOCAL) && !ISSET(tp->t_state, TS_CARR_ON)) {
tp                912 dev/sbus/magma.c 			SET(tp->t_state, TS_WOPEN);
tp                913 dev/sbus/magma.c 			error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, "mttydcd", 0);
tp                916 dev/sbus/magma.c 				CLR(tp->t_state, TS_WOPEN);
tp                924 dev/sbus/magma.c 	return ((*linesw[tp->t_line].l_open)(dev, tp));
tp                935 dev/sbus/magma.c 	struct tty *tp = mp->mp_tty;
tp                938 dev/sbus/magma.c 	(*linesw[tp->t_line].l_close)(tp, flag);
tp                944 dev/sbus/magma.c 	if (ISSET(tp->t_cflag, HUPCL) || !ISSET(tp->t_state, TS_ISOPEN)) {
tp                959 dev/sbus/magma.c 	ttyclose(tp);
tp                972 dev/sbus/magma.c 	struct tty *tp = mp->mp_tty;
tp                974 dev/sbus/magma.c 	return ((*linesw[tp->t_line].l_read)(tp, uio, flags));
tp                985 dev/sbus/magma.c 	struct tty *tp = mp->mp_tty;
tp                987 dev/sbus/magma.c 	return ((*linesw[tp->t_line].l_write)(tp, uio, flags));
tp               1010 dev/sbus/magma.c 	struct tty *tp = mp->mp_tty;
tp               1013 dev/sbus/magma.c 	error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flags, p);
tp               1017 dev/sbus/magma.c 	error = ttioctl(tp, cmd, data, flags, p);
tp               1082 dev/sbus/magma.c mttystop(struct tty *tp, int flags)
tp               1084 dev/sbus/magma.c 	struct mtty_softc *ms = mtty_cd.cd_devs[MAGMA_CARD(tp->t_dev)];
tp               1085 dev/sbus/magma.c 	struct mtty_port *mp = &ms->ms_port[MAGMA_PORT(tp->t_dev)];
tp               1090 dev/sbus/magma.c 	if (ISSET(tp->t_state, TS_BUSY)) {
tp               1091 dev/sbus/magma.c 		if (!ISSET(tp->t_state, TS_TTSTOP))
tp               1092 dev/sbus/magma.c 			SET(tp->t_state, TS_FLUSH);
tp               1109 dev/sbus/magma.c mtty_start(struct tty *tp)
tp               1111 dev/sbus/magma.c 	struct mtty_softc *ms = mtty_cd.cd_devs[MAGMA_CARD(tp->t_dev)];
tp               1112 dev/sbus/magma.c 	struct mtty_port *mp = &ms->ms_port[MAGMA_PORT(tp->t_dev)];
tp               1120 dev/sbus/magma.c 	if (!ISSET(tp->t_state, TS_TTSTOP | TS_TIMEOUT | TS_BUSY)) {
tp               1125 dev/sbus/magma.c 		if (tp->t_outq.c_cc <= tp->t_lowat) {
tp               1126 dev/sbus/magma.c 			if (ISSET(tp->t_state, TS_ASLEEP)) {
tp               1127 dev/sbus/magma.c 				CLR(tp->t_state, TS_ASLEEP);
tp               1128 dev/sbus/magma.c 				wakeup(&tp->t_outq);
tp               1131 dev/sbus/magma.c 			selwakeup(&tp->t_wsel);
tp               1136 dev/sbus/magma.c 		if (tp->t_outq.c_cc) {
tp               1137 dev/sbus/magma.c 			mp->mp_txc = ndqb(&tp->t_outq, 0);
tp               1138 dev/sbus/magma.c 			mp->mp_txp = tp->t_outq.c_cf;
tp               1139 dev/sbus/magma.c 			SET(tp->t_state, TS_BUSY);
tp               1161 dev/sbus/magma.c 	struct tty *tp = mp->mp_tty;
tp               1193 dev/sbus/magma.c 		if (!ISSET(tp->t_cflag, CRTSCTS))
tp               1203 dev/sbus/magma.c 		if ((bits & TIOCM_RTS) && !ISSET(tp->t_cflag, CRTSCTS))
tp               1212 dev/sbus/magma.c 		if ((bits & TIOCM_RTS) && !ISSET(tp->t_cflag, CRTSCTS))
tp               1229 dev/sbus/magma.c mtty_param(struct tty *tp, struct termios *t)
tp               1231 dev/sbus/magma.c 	struct mtty_softc *ms = mtty_cd.cd_devs[MAGMA_CARD(tp->t_dev)];
tp               1232 dev/sbus/magma.c 	struct mtty_port *mp = &ms->ms_port[MAGMA_PORT(tp->t_dev)];
tp                303 dev/sbus/spif.c 		struct tty *tp;
tp                307 dev/sbus/spif.c 		tp = ttymalloc();
tp                309 dev/sbus/spif.c 		tp->t_oproc = stty_start;
tp                310 dev/sbus/spif.c 		tp->t_param = stty_param;
tp                312 dev/sbus/spif.c 		sp->sp_tty = tp;
tp                338 dev/sbus/spif.c 	struct tty *tp;
tp                355 dev/sbus/spif.c 	tp = sp->sp_tty;
tp                356 dev/sbus/spif.c 	tp->t_dev = dev;
tp                358 dev/sbus/spif.c 	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                359 dev/sbus/spif.c 		SET(tp->t_state, TS_WOPEN);
tp                361 dev/sbus/spif.c 		ttychars(tp);
tp                362 dev/sbus/spif.c 		tp->t_iflag = TTYDEF_IFLAG;
tp                363 dev/sbus/spif.c 		tp->t_oflag = TTYDEF_OFLAG;
tp                364 dev/sbus/spif.c 		tp->t_cflag = TTYDEF_CFLAG;
tp                366 dev/sbus/spif.c 			SET(tp->t_cflag, CLOCAL);
tp                368 dev/sbus/spif.c 			SET(tp->t_cflag, CRTSCTS);
tp                370 dev/sbus/spif.c 			SET(tp->t_cflag, MDMBUF);
tp                371 dev/sbus/spif.c 		tp->t_lflag = TTYDEF_LFLAG;
tp                372 dev/sbus/spif.c 		tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
tp                382 dev/sbus/spif.c 		stty_param(tp, &tp->t_termios);
tp                384 dev/sbus/spif.c 		ttsetwater(tp);
tp                389 dev/sbus/spif.c 			SET(tp->t_state, TS_CARR_ON);
tp                391 dev/sbus/spif.c 			CLR(tp->t_state, TS_CARR_ON);
tp                393 dev/sbus/spif.c 	else if (ISSET(tp->t_state, TS_XCLUDE) && p->p_ucred->cr_uid != 0) {
tp                400 dev/sbus/spif.c 		while (!ISSET(tp->t_cflag, CLOCAL) &&
tp                401 dev/sbus/spif.c 		    !ISSET(tp->t_state, TS_CARR_ON)) {
tp                404 dev/sbus/spif.c 			SET(tp->t_state, TS_WOPEN);
tp                405 dev/sbus/spif.c 			error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
tp                409 dev/sbus/spif.c 				CLR(tp->t_state, TS_WOPEN);
tp                417 dev/sbus/spif.c 	return ((*linesw[tp->t_line].l_open)(dev, tp));
tp                430 dev/sbus/spif.c 	struct tty *tp = sp->sp_tty;
tp                434 dev/sbus/spif.c 	(*linesw[tp->t_line].l_close)(tp, flags);
tp                437 dev/sbus/spif.c 	if (ISSET(tp->t_cflag, HUPCL) || !ISSET(tp->t_state, TS_ISOPEN)) {
tp                445 dev/sbus/spif.c 	ttyclose(tp);
tp                460 dev/sbus/spif.c 	struct tty *tp = sp->sp_tty;
tp                463 dev/sbus/spif.c 	error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flags, p);
tp                467 dev/sbus/spif.c 	error = ttioctl(tp, cmd, data, flags, p);
tp                528 dev/sbus/spif.c 	struct tty *tp = sp->sp_tty;
tp                561 dev/sbus/spif.c 		if (ISSET(bits, TIOCM_RTS) && !ISSET(tp->t_cflag, CRTSCTS))
tp                579 dev/sbus/spif.c stty_param(tp, t)
tp                580 dev/sbus/spif.c 	struct tty *tp;
tp                583 dev/sbus/spif.c 	struct stty_softc *st = stty_cd.cd_devs[SPIF_CARD(tp->t_dev)];
tp                584 dev/sbus/spif.c 	struct stty_port *sp = &st->sc_port[SPIF_PORT(tp->t_dev)];
tp                684 dev/sbus/spif.c 	struct tty *tp = sp->sp_tty;
tp                686 dev/sbus/spif.c 	return ((*linesw[tp->t_line].l_read)(tp, uio, flags));
tp                697 dev/sbus/spif.c 	struct tty *tp = sp->sp_tty;
tp                699 dev/sbus/spif.c 	return ((*linesw[tp->t_line].l_write)(tp, uio, flags));
tp                713 dev/sbus/spif.c sttystop(tp, flags)
tp                714 dev/sbus/spif.c 	struct tty *tp;
tp                717 dev/sbus/spif.c 	struct stty_softc *sc = stty_cd.cd_devs[SPIF_CARD(tp->t_dev)];
tp                718 dev/sbus/spif.c 	struct stty_port *sp = &sc->sc_port[SPIF_PORT(tp->t_dev)];
tp                722 dev/sbus/spif.c 	if (ISSET(tp->t_state, TS_BUSY)) {
tp                723 dev/sbus/spif.c 		if (!ISSET(tp->t_state, TS_TTSTOP))
tp                724 dev/sbus/spif.c 			SET(tp->t_state, TS_FLUSH);
tp                732 dev/sbus/spif.c stty_start(tp)
tp                733 dev/sbus/spif.c 	struct tty *tp;
tp                735 dev/sbus/spif.c 	struct stty_softc *stc = stty_cd.cd_devs[SPIF_CARD(tp->t_dev)];
tp                736 dev/sbus/spif.c 	struct stty_port *sp = &stc->sc_port[SPIF_PORT(tp->t_dev)];
tp                742 dev/sbus/spif.c 	if (!ISSET(tp->t_state, TS_TTSTOP | TS_TIMEOUT | TS_BUSY)) {
tp                743 dev/sbus/spif.c 		if (tp->t_outq.c_cc <= tp->t_lowat) {
tp                744 dev/sbus/spif.c 			if (ISSET(tp->t_state, TS_ASLEEP)) {
tp                745 dev/sbus/spif.c 				CLR(tp->t_state, TS_ASLEEP);
tp                746 dev/sbus/spif.c 				wakeup(&tp->t_outq);
tp                748 dev/sbus/spif.c 			selwakeup(&tp->t_wsel);
tp                750 dev/sbus/spif.c 		if (tp->t_outq.c_cc) {
tp                751 dev/sbus/spif.c 			sp->sp_txc = ndqb(&tp->t_outq, 0);
tp                752 dev/sbus/spif.c 			sp->sp_txp = tp->t_outq.c_cf;
tp                753 dev/sbus/spif.c 			SET(tp->t_state, TS_BUSY);
tp                940 dev/sbus/spif.c 	struct tty *tp;
tp                945 dev/sbus/spif.c 			tp = sp->sp_tty;
tp                947 dev/sbus/spif.c 			if (!ISSET(tp->t_state, TS_ISOPEN))
tp                963 dev/sbus/spif.c 				(*linesw[tp->t_line].l_rint)(data, tp);
tp                980 dev/sbus/spif.c 				(*linesw[tp->t_line].l_modem)(tp,
tp                992 dev/sbus/spif.c 				ndflush(&tp->t_outq,
tp                993 dev/sbus/spif.c 				    sp->sp_txp - tp->t_outq.c_cf);
tp                994 dev/sbus/spif.c 				CLR(tp->t_state, TS_BUSY);
tp                995 dev/sbus/spif.c 				(*linesw[tp->t_line].l_start)(tp);
tp                 83 dev/usb/ucom.c #define LINESW(tp, func)	(linesw[(tp)->t_line].func)
tp                194 dev/usb/ucom.c 	struct tty *tp;
tp                213 dev/usb/ucom.c 	tp = ttymalloc();
tp                214 dev/usb/ucom.c 	tp->t_oproc = ucomstart;
tp                215 dev/usb/ucom.c 	tp->t_param = ucomparam;
tp                216 dev/usb/ucom.c 	sc->sc_tty = tp;
tp                228 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp                233 dev/usb/ucom.c 		 sc, flags, tp, sc->sc_bulkin_no, sc->sc_bulkout_no));
tp                245 dev/usb/ucom.c 		if (tp != NULL) {
tp                246 dev/usb/ucom.c 			CLR(tp->t_state, TS_CARR_ON);
tp                247 dev/usb/ucom.c 			CLR(tp->t_cflag, CLOCAL | MDMBUF);
tp                248 dev/usb/ucom.c 			ttyflush(tp, FREAD|FWRITE);
tp                267 dev/usb/ucom.c 	if (tp != NULL) {
tp                268 dev/usb/ucom.c 		ttyfree(tp);
tp                296 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp                303 dev/usb/ucom.c 	if (ISSET(tp->t_cflag, HUPCL)) {
tp                315 dev/usb/ucom.c 	struct tty *tp;
tp                421 dev/usb/ucom.c 	tp = sc->sc_tty;
tp                424 dev/usb/ucom.c 	DPRINTF(("ucomopen: unit=%d, tp=%p\n", unit, tp));
tp                426 dev/usb/ucom.c 	tp->t_dev = dev;
tp                427 dev/usb/ucom.c 	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                428 dev/usb/ucom.c 		SET(tp->t_state, TS_WOPEN);
tp                429 dev/usb/ucom.c 		ttychars(tp);
tp                446 dev/usb/ucom.c 		tp->t_ospeed = 0;
tp                447 dev/usb/ucom.c 		(void) ucomparam(tp, &t);
tp                448 dev/usb/ucom.c 		tp->t_iflag = TTYDEF_IFLAG;
tp                449 dev/usb/ucom.c 		tp->t_oflag = TTYDEF_OFLAG;
tp                450 dev/usb/ucom.c 		tp->t_lflag = TTYDEF_LFLAG;
tp                453 dev/usb/ucom.c 		ttsetwater(tp);
tp                468 dev/usb/ucom.c 		    ISSET(sc->sc_msr, UMSR_DCD) || ISSET(tp->t_cflag, MDMBUF))
tp                469 dev/usb/ucom.c 			SET(tp->t_state, TS_CARR_ON);
tp                471 dev/usb/ucom.c 			CLR(tp->t_state, TS_CARR_ON);
tp                472 dev/usb/ucom.c 	} else if (ISSET(tp->t_state, TS_XCLUDE) && p->p_ucred->cr_uid != 0) {
tp                479 dev/usb/ucom.c 		if (ISSET(tp->t_state, TS_ISOPEN)) {
tp                493 dev/usb/ucom.c 			while (sc->sc_cua || (!ISSET(tp->t_cflag, CLOCAL) &&
tp                494 dev/usb/ucom.c 			    !ISSET(tp->t_state, TS_CARR_ON))) {
tp                495 dev/usb/ucom.c 				SET(tp->t_state, TS_WOPEN);
tp                496 dev/usb/ucom.c 				error = ttysleep(tp, &tp->t_rawq,
tp                504 dev/usb/ucom.c 				if (error && ISSET(tp->t_state, TS_WOPEN)) {
tp                505 dev/usb/ucom.c 					CLR(tp->t_state, TS_WOPEN);
tp                513 dev/usb/ucom.c 	error = ttyopen(UCOMUNIT(dev), tp);
tp                517 dev/usb/ucom.c 	error = (*LINESW(tp, l_open))(dev, tp);
tp                555 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp                558 dev/usb/ucom.c 	if (!ISSET(tp->t_state, TS_ISOPEN))
tp                564 dev/usb/ucom.c 	(*LINESW(tp, l_close))(tp, flag);
tp                566 dev/usb/ucom.c 	CLR(tp->t_state, TS_BUSY | TS_FLUSH);
tp                568 dev/usb/ucom.c 	ttyclose(tp);
tp                584 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp                591 dev/usb/ucom.c 	error = (*LINESW(tp, l_read))(tp, uio, flag);
tp                601 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp                608 dev/usb/ucom.c 	error = (*LINESW(tp, l_write))(tp, uio, flag);
tp                618 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp                620 dev/usb/ucom.c 	return (tp);
tp                640 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp                649 dev/usb/ucom.c 	error = (*LINESW(tp, l_ioctl))(tp, cmd, data, flag, p);
tp                653 dev/usb/ucom.c 	error = ttioctl(tp, cmd, data, flag, p);
tp                819 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp                827 dev/usb/ucom.c 		ttytstamp(tp, old_msr & UMSR_CTS, sc->sc_msr & UMSR_CTS,
tp                831 dev/usb/ucom.c 			(*LINESW(tp, l_modem))(tp,
tp                840 dev/usb/ucom.c ucomparam(struct tty *tp, struct termios *t)
tp                842 dev/usb/ucom.c 	struct ucom_softc *sc = ucom_cd.cd_devs[UCOMUNIT(tp->t_dev)];
tp                866 dev/usb/ucom.c 	if (tp->t_ospeed == t->c_ospeed &&
tp                867 dev/usb/ucom.c 	    tp->t_cflag == t->c_cflag)
tp                873 dev/usb/ucom.c 	tp->t_ispeed = 0;
tp                874 dev/usb/ucom.c 	tp->t_ospeed = t->c_ospeed;
tp                875 dev/usb/ucom.c 	tp->t_cflag = t->c_cflag;
tp                892 dev/usb/ucom.c 	(void) (*LINESW(tp, l_modem))(tp, 1 /* XXX carrier */ );
tp                899 dev/usb/ucom.c 			ucomstart(tp);
tp                934 dev/usb/ucom.c ucomstart(struct tty *tp)
tp                936 dev/usb/ucom.c 	struct ucom_softc *sc = ucom_cd.cd_devs[UCOMUNIT(tp->t_dev)];
tp                946 dev/usb/ucom.c 	if (ISSET(tp->t_state, TS_BUSY | TS_TIMEOUT | TS_TTSTOP)) {
tp                947 dev/usb/ucom.c 		DPRINTFN(4,("ucomstart: no go, state=0x%x\n", tp->t_state));
tp                953 dev/usb/ucom.c 	if (tp->t_outq.c_cc <= tp->t_lowat) {
tp                954 dev/usb/ucom.c 		if (ISSET(tp->t_state, TS_ASLEEP)) {
tp                955 dev/usb/ucom.c 			CLR(tp->t_state, TS_ASLEEP);
tp                956 dev/usb/ucom.c 			wakeup(&tp->t_outq);
tp                958 dev/usb/ucom.c 		selwakeup(&tp->t_wsel);
tp                959 dev/usb/ucom.c 		if (tp->t_outq.c_cc == 0)
tp                964 dev/usb/ucom.c 	data = tp->t_outq.c_cf;
tp                965 dev/usb/ucom.c 	cnt = ndqb(&tp->t_outq, 0);
tp                972 dev/usb/ucom.c 	SET(tp->t_state, TS_BUSY);
tp               1012 dev/usb/ucom.c ucomstop(struct tty *tp, int flag)
tp               1020 dev/usb/ucom.c 	if (ISSET(tp->t_state, TS_BUSY)) {
tp               1023 dev/usb/ucom.c 		if (!ISSET(tp->t_state, TS_TTSTOP))
tp               1024 dev/usb/ucom.c 			SET(tp->t_state, TS_FLUSH);
tp               1035 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp               1061 dev/usb/ucom.c 	CLR(tp->t_state, TS_BUSY);
tp               1062 dev/usb/ucom.c 	if (ISSET(tp->t_state, TS_FLUSH))
tp               1063 dev/usb/ucom.c 		CLR(tp->t_state, TS_FLUSH);
tp               1065 dev/usb/ucom.c 		ndflush(&tp->t_outq, cc);
tp               1066 dev/usb/ucom.c 	(*LINESW(tp, l_start))(tp);
tp               1072 dev/usb/ucom.c 	CLR(tp->t_state, TS_BUSY);
tp               1109 dev/usb/ucom.c 	struct tty *tp = sc->sc_tty;
tp               1110 dev/usb/ucom.c 	int (*rint)(int c, struct tty *tp) = LINESW(tp, l_rint);
tp               1123 dev/usb/ucom.c 		(*rint)('\n', tp);
tp               1124 dev/usb/ucom.c 		ttwakeup(tp);
tp               1138 dev/usb/ucom.c 	DPRINTFN(5,("ucomreadcb: got %d chars, tp=%p\n", cc, tp));
tp               1147 dev/usb/ucom.c 		if ((*rint)(*cp++, tp) == -1) {
tp                103 dev/usb/uts.c  struct uts_pos uts_get_pos(usbd_private_handle addr, struct uts_pos tp);
tp                387 dev/usb/uts.c  uts_get_pos(usbd_private_handle addr, struct uts_pos tp)
tp                432 dev/usb/uts.c  			tp.y = x;
tp                433 dev/usb/uts.c  			tp.x = y;
tp                435 dev/usb/uts.c  			tp.x = x;
tp                436 dev/usb/uts.c  			tp.y = y;
tp                441 dev/usb/uts.c  			tp.x = ((tp.x - sc->sc_tsscale.minx) *
tp                444 dev/usb/uts.c  			tp.y = ((tp.y - sc->sc_tsscale.miny) *
tp                448 dev/usb/uts.c  		tp.z = 1;
tp                450 dev/usb/uts.c  		tp.x = sc->sc_oldx;
tp                451 dev/usb/uts.c  		tp.y = sc->sc_oldy;
tp                452 dev/usb/uts.c  		tp.z = 0;
tp                455 dev/usb/uts.c  	return (tp);
tp                464 dev/usb/uts.c  	struct uts_pos tp;
tp                479 dev/usb/uts.c  	tp = uts_get_pos(sc, tp);
tp                488 dev/usb/uts.c  	    sc->sc_dev.dv_xname, tp.z, tp.x, tp.y));
tp                490 dev/usb/uts.c  	wsmouse_input(sc->sc_wsmousedev, tp.z, tp.x, tp.y, 0, 0,
tp                493 dev/usb/uts.c  	sc->sc_oldy = tp.y;
tp                494 dev/usb/uts.c  	sc->sc_oldx = tp.x;
tp                464 dev/wscons/wsdisplay.c 		struct tty *tp = scr->scr_tty;
tp                465 dev/wscons/wsdisplay.c 		(*linesw[tp->t_line].l_modem)(tp, 0);
tp                819 dev/wscons/wsdisplay.c 	struct tty *tp;
tp                837 dev/wscons/wsdisplay.c 		tp = scr->scr_tty;
tp                838 dev/wscons/wsdisplay.c 		tp->t_oproc = wsdisplaystart;
tp                839 dev/wscons/wsdisplay.c 		tp->t_param = wsdisplayparam;
tp                840 dev/wscons/wsdisplay.c 		tp->t_dev = dev;
tp                841 dev/wscons/wsdisplay.c 		newopen = (tp->t_state & TS_ISOPEN) == 0;
tp                843 dev/wscons/wsdisplay.c 			ttychars(tp);
tp                844 dev/wscons/wsdisplay.c 			tp->t_iflag = TTYDEF_IFLAG;
tp                845 dev/wscons/wsdisplay.c 			tp->t_oflag = TTYDEF_OFLAG;
tp                846 dev/wscons/wsdisplay.c 			tp->t_cflag = TTYDEF_CFLAG;
tp                847 dev/wscons/wsdisplay.c 			tp->t_lflag = TTYDEF_LFLAG;
tp                848 dev/wscons/wsdisplay.c 			tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
tp                849 dev/wscons/wsdisplay.c 			wsdisplayparam(tp, &tp->t_termios);
tp                850 dev/wscons/wsdisplay.c 			ttsetwater(tp);
tp                851 dev/wscons/wsdisplay.c 		} else if ((tp->t_state & TS_XCLUDE) != 0 &&
tp                854 dev/wscons/wsdisplay.c 		tp->t_state |= TS_CARR_ON;
tp                856 dev/wscons/wsdisplay.c 		error = ((*linesw[tp->t_line].l_open)(dev, tp));
tp                863 dev/wscons/wsdisplay.c 			tp->t_winsize.ws_row = scr->scr_dconf->scrdata->nrows;
tp                864 dev/wscons/wsdisplay.c 			tp->t_winsize.ws_col = scr->scr_dconf->scrdata->ncols;
tp                876 dev/wscons/wsdisplay.c 	struct tty *tp;
tp                898 dev/wscons/wsdisplay.c 		tp = scr->scr_tty;
tp                899 dev/wscons/wsdisplay.c 		(*linesw[tp->t_line].l_close)(tp, flag);
tp                900 dev/wscons/wsdisplay.c 		ttyclose(tp);
tp                939 dev/wscons/wsdisplay.c 	struct tty *tp;
tp                955 dev/wscons/wsdisplay.c 	tp = scr->scr_tty;
tp                956 dev/wscons/wsdisplay.c 	return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
tp                963 dev/wscons/wsdisplay.c 	struct tty *tp;
tp                979 dev/wscons/wsdisplay.c 	tp = scr->scr_tty;
tp                980 dev/wscons/wsdisplay.c 	return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
tp               1006 dev/wscons/wsdisplay.c 	struct tty *tp;
tp               1029 dev/wscons/wsdisplay.c 		tp = scr->scr_tty;
tp               1033 dev/wscons/wsdisplay.c 		error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
tp               1039 dev/wscons/wsdisplay.c 		error = ttioctl(tp, cmd, data, flag, p);
tp               1388 dev/wscons/wsdisplay.c wsdisplaystart(struct tty *tp)
tp               1395 dev/wscons/wsdisplay.c 	unit = WSDISPLAYUNIT(tp->t_dev);
tp               1401 dev/wscons/wsdisplay.c 	if (tp->t_state & (TS_TIMEOUT | TS_BUSY | TS_TTSTOP)) {
tp               1405 dev/wscons/wsdisplay.c 	if (tp->t_outq.c_cc == 0 && tp->t_wsel.si_selpid == 0)
tp               1408 dev/wscons/wsdisplay.c 	if ((scr = sc->sc_scr[WSDISPLAYSCREEN(tp->t_dev)]) == NULL) {
tp               1413 dev/wscons/wsdisplay.c 		tp->t_state |= TS_TIMEOUT;
tp               1417 dev/wscons/wsdisplay.c 	tp->t_state |= TS_BUSY;
tp               1429 dev/wscons/wsdisplay.c 	n = ndqb(&tp->t_outq, 0);
tp               1430 dev/wscons/wsdisplay.c 	buf = tp->t_outq.c_cf;
tp               1448 dev/wscons/wsdisplay.c 	ndflush(&tp->t_outq, n);
tp               1450 dev/wscons/wsdisplay.c 	if ((n = ndqb(&tp->t_outq, 0)) > 0) {
tp               1451 dev/wscons/wsdisplay.c 		buf = tp->t_outq.c_cf;
tp               1460 dev/wscons/wsdisplay.c 		ndflush(&tp->t_outq, n);
tp               1464 dev/wscons/wsdisplay.c 	tp->t_state &= ~TS_BUSY;
tp               1466 dev/wscons/wsdisplay.c 	if (tp->t_outq.c_cc) {
tp               1467 dev/wscons/wsdisplay.c 		tp->t_state |= TS_TIMEOUT;
tp               1468 dev/wscons/wsdisplay.c 		timeout_add(&tp->t_rstrt_to, (hz > 128) ? (hz / 128) : 1);
tp               1470 dev/wscons/wsdisplay.c 	if (tp->t_outq.c_cc <= tp->t_lowat) {
tp               1472 dev/wscons/wsdisplay.c 		if (tp->t_state & TS_ASLEEP) {
tp               1473 dev/wscons/wsdisplay.c 			tp->t_state &= ~TS_ASLEEP;
tp               1474 dev/wscons/wsdisplay.c 			wakeup((caddr_t)&tp->t_outq);
tp               1476 dev/wscons/wsdisplay.c 		selwakeup(&tp->t_wsel);
tp               1482 dev/wscons/wsdisplay.c wsdisplaystop(struct tty *tp, int flag)
tp               1487 dev/wscons/wsdisplay.c 	if (ISSET(tp->t_state, TS_BUSY))
tp               1488 dev/wscons/wsdisplay.c 		if (!ISSET(tp->t_state, TS_TTSTOP))
tp               1489 dev/wscons/wsdisplay.c 			SET(tp->t_state, TS_FLUSH);
tp               1497 dev/wscons/wsdisplay.c wsdisplayparam(struct tty *tp, struct termios *t)
tp               1500 dev/wscons/wsdisplay.c 	tp->t_ispeed = t->c_ispeed;
tp               1501 dev/wscons/wsdisplay.c 	tp->t_ospeed = t->c_ospeed;
tp               1502 dev/wscons/wsdisplay.c 	tp->t_cflag = t->c_cflag;
tp               1528 dev/wscons/wsdisplay.c 	struct tty *tp;
tp               1538 dev/wscons/wsdisplay.c 	tp = scr->scr_tty;
tp               1540 dev/wscons/wsdisplay.c 		(*linesw[tp->t_line].l_rint)(*data++, tp);
tp               1553 dev/wscons/wsdisplay.c 	struct tty *tp;
tp               1562 dev/wscons/wsdisplay.c 	tp = scr->scr_tty;
tp               1565 dev/wscons/wsdisplay.c 		(*linesw[tp->t_line].l_rint)(KS_VALUE(ks), tp);
tp               1570 dev/wscons/wsdisplay.c 			(*linesw[tp->t_line].l_rint)(*dp++, tp);
tp                 91 kern/kern_clock.c 	volatile struct timeval *tp = (t); \
tp                 94 kern/kern_clock.c 	tp->tv_usec = us = tp->tv_usec + (usec); \
tp                 96 kern/kern_clock.c 		tp->tv_usec = us - 1000000; \
tp                 97 kern/kern_clock.c 		tp->tv_sec++; \
tp               1131 kern/kern_sysctl.c 	struct tty *tp;
tp               1161 kern/kern_sysctl.c 	     (tp = ep->e_sess->s_ttyp)) {
tp               1162 kern/kern_sysctl.c 		ep->e_tdev = tp->t_dev;
tp               1163 kern/kern_sysctl.c 		ep->e_tpgid = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
tp               1164 kern/kern_sysctl.c 		ep->e_tsess = tp->t_session;
tp               1190 kern/kern_sysctl.c 	struct tty *tp;
tp               1234 kern/kern_sysctl.c 	if ((p->p_flag & P_CONTROLT) && (tp = p->p_session->s_ttyp)) {
tp               1235 kern/kern_sysctl.c 		ki->p_tdev = tp->t_dev;
tp               1236 kern/kern_sysctl.c 		ki->p_tpgid = tp->t_pgrp ? tp->t_pgrp->pg_id : -1;
tp               1237 kern/kern_sysctl.c 		ki->p_tsess = PTRTOINT64(tp->t_session);
tp                186 kern/kern_time.c 	return copyout(&ats, SCARG(uap, tp), sizeof(ats));
tp                204 kern/kern_time.c 	if ((error = copyin(SCARG(uap, tp), &ats, sizeof(ats))) != 0)
tp                242 kern/kern_time.c 	if (SCARG(uap, tp))
tp                243 kern/kern_time.c 		error = copyout(&ts, SCARG(uap, tp), sizeof (ts));
tp                308 kern/kern_time.c 	if (SCARG(uap, tp)) {
tp                310 kern/kern_time.c 		if ((error = copyout((void *)&atv, (void *)SCARG(uap, tp),
tp                332 kern/subr_prf.c kputchar(int c, int flags, struct tty *tp)
tp                338 kern/subr_prf.c 	if ((flags & TOCONS) && tp == NULL && constty) {
tp                339 kern/subr_prf.c 		tp = constty;
tp                342 kern/subr_prf.c 	if ((flags & TOTTY) && tp && tputchar(c, tp) < 0 &&
tp                343 kern/subr_prf.c 	    (flags & TOCONS) && tp == constty)
tp                428 kern/subr_prf.c 	struct tty *tp = NULL;
tp                435 kern/subr_prf.c 		tp = sess->s_ttyp;
tp                438 kern/subr_prf.c 	kprintf(fmt, flags, tp, NULL, ap);
tp                454 kern/subr_prf.c ttyprintf(struct tty *tp, const char *fmt, ...)
tp                459 kern/subr_prf.c 	kprintf(fmt, TOTTY, tp, NULL, ap);
tp                175 kern/tty.c     ttyopen(dev_t device, struct tty *tp)
tp                180 kern/tty.c     	tp->t_dev = device;
tp                181 kern/tty.c     	if (!ISSET(tp->t_state, TS_ISOPEN)) {
tp                182 kern/tty.c     		SET(tp->t_state, TS_ISOPEN);
tp                183 kern/tty.c     		bzero(&tp->t_winsize, sizeof(tp->t_winsize));
tp                185 kern/tty.c     		tp->t_flags = 0;
tp                188 kern/tty.c     	CLR(tp->t_state, TS_WOPEN);
tp                199 kern/tty.c     ttyclose(struct tty *tp)
tp                203 kern/tty.c     	if (constty == tp)
tp                206 kern/tty.c     	ttyflush(tp, FREAD | FWRITE);
tp                208 kern/tty.c     	tp->t_gen++;
tp                209 kern/tty.c     	tp->t_pgrp = NULL;
tp                210 kern/tty.c     	if (tp->t_session)
tp                211 kern/tty.c     		SESSRELE(tp->t_session);
tp                212 kern/tty.c     	tp->t_session = NULL;
tp                213 kern/tty.c     	tp->t_state = 0;
tp                232 kern/tty.c     ttyinput(int c, struct tty *tp)
tp                239 kern/tty.c     	add_tty_randomness(tp->t_dev << 8 | c);
tp                243 kern/tty.c     	if (!ISSET(tp->t_cflag, CREAD))
tp                249 kern/tty.c     	lflag = tp->t_lflag;
tp                252 kern/tty.c     		ttypend(tp);
tp                259 kern/tty.c     		++tp->t_cancc;
tp                262 kern/tty.c     		++tp->t_rawcc;
tp                267 kern/tty.c     	cc = tp->t_cc;
tp                268 kern/tty.c     	iflag = tp->t_iflag;
tp                274 kern/tty.c     			ttyflush(tp, FREAD | FWRITE);
tp                276 kern/tty.c     			    pgsignal(tp->t_pgrp, SIGINT, 1);
tp                286 kern/tty.c     parmrk:				(void)putc(0377 | TTY_QUOTE, &tp->t_rawq);
tp                288 kern/tty.c     					(void)putc(0 | TTY_QUOTE, &tp->t_rawq);
tp                289 kern/tty.c     				(void)putc(c | TTY_QUOTE, &tp->t_rawq);
tp                301 kern/tty.c     	if (ISSET(iflag, IXOFF) || ISSET(tp->t_cflag, CHWFLOW))
tp                302 kern/tty.c     		ttyblock(tp);
tp                303 kern/tty.c     	if (!ISSET(tp->t_state, TS_TYPEN) && ISSET(iflag, ISTRIP))
tp                309 kern/tty.c     		if (ISSET(tp->t_state, TS_LNCH)) {
tp                311 kern/tty.c     			CLR(tp->t_state, TS_LNCH);
tp                329 kern/tty.c     						(void)ttyoutput('^', tp);
tp                330 kern/tty.c     						(void)ttyoutput('\b', tp);
tp                332 kern/tty.c     						ttyecho(c, tp);
tp                334 kern/tty.c     				SET(tp->t_state, TS_LNCH);
tp                339 kern/tty.c     					CLR(tp->t_lflag, FLUSHO);
tp                341 kern/tty.c     					ttyflush(tp, FWRITE);
tp                342 kern/tty.c     					ttyecho(c, tp);
tp                343 kern/tty.c     					if (tp->t_rawq.c_cc + tp->t_canq.c_cc)
tp                344 kern/tty.c     						ttyretype(tp);
tp                345 kern/tty.c     					SET(tp->t_lflag, FLUSHO);
tp                356 kern/tty.c     					ttyflush(tp, FREAD | FWRITE);
tp                357 kern/tty.c     				ttyecho(c, tp);
tp                358 kern/tty.c     				pgsignal(tp->t_pgrp,
tp                364 kern/tty.c     					ttyflush(tp, FREAD);
tp                365 kern/tty.c     				ttyecho(c, tp);
tp                366 kern/tty.c     				pgsignal(tp->t_pgrp, SIGTSTP, 1);
tp                375 kern/tty.c     				if (!ISSET(tp->t_state, TS_TTSTOP)) {
tp                376 kern/tty.c     					SET(tp->t_state, TS_TTSTOP);
tp                377 kern/tty.c     					(*cdevsw[major(tp->t_dev)].d_stop)(tp,
tp                402 kern/tty.c     	if (!ISSET(tp->t_lflag, EXTPROC) && ISSET(lflag, ICANON)) {
tp                411 kern/tty.c     			if (ISSET(tp->t_state, TS_BKSL)) {
tp                412 kern/tty.c     				CLR(tp->t_state, TS_BKSL);
tp                432 kern/tty.c     				SET(tp->t_state, TS_BKSL);
tp                444 kern/tty.c     			if (tp->t_rawq.c_cc)
tp                445 kern/tty.c     				ttyrub(unputc(&tp->t_rawq), tp);
tp                453 kern/tty.c     			    tp->t_rawq.c_cc == tp->t_rocount &&
tp                455 kern/tty.c     				while (tp->t_rawq.c_cc)
tp                456 kern/tty.c     					ttyrub(unputc(&tp->t_rawq), tp);
tp                458 kern/tty.c     				ttyecho(c, tp);
tp                461 kern/tty.c     					ttyecho('\n', tp);
tp                462 kern/tty.c     				FLUSHQ(&tp->t_rawq);
tp                463 kern/tty.c     				tp->t_rocount = 0;
tp                465 kern/tty.c     			CLR(tp->t_state, TS_LOCAL);
tp                478 kern/tty.c     			while ((c = unputc(&tp->t_rawq)) == ' ' || c == '\t')
tp                479 kern/tty.c     				ttyrub(c, tp);
tp                486 kern/tty.c     			ttyrub(c, tp);
tp                487 kern/tty.c     			c = unputc(&tp->t_rawq);
tp                491 kern/tty.c     				(void)putc(c, &tp->t_rawq);
tp                499 kern/tty.c     				ttyrub(c, tp);
tp                500 kern/tty.c     				c = unputc(&tp->t_rawq);
tp                505 kern/tty.c     			(void)putc(c, &tp->t_rawq);
tp                512 kern/tty.c     			ttyretype(tp);
tp                520 kern/tty.c     				pgsignal(tp->t_pgrp, SIGINFO, 1);
tp                522 kern/tty.c     				ttyinfo(tp);
tp                529 kern/tty.c     	if (tp->t_rawq.c_cc + tp->t_canq.c_cc >= TTYHOG) {
tp                531 kern/tty.c     			if (tp->t_outq.c_cc < tp->t_hiwat)
tp                532 kern/tty.c     				(void)ttyoutput(CTRL('g'), tp);
tp                534 kern/tty.c     			ttyflush(tp, FREAD | FWRITE);
tp                541 kern/tty.c     	if (putc(c, &tp->t_rawq) >= 0) {
tp                543 kern/tty.c     			ttwakeup(tp);
tp                544 kern/tty.c     			ttyecho(c, tp);
tp                548 kern/tty.c     			tp->t_rocount = 0;
tp                549 kern/tty.c     			catq(&tp->t_rawq, &tp->t_canq);
tp                550 kern/tty.c     			ttwakeup(tp);
tp                551 kern/tty.c     		} else if (tp->t_rocount++ == 0)
tp                552 kern/tty.c     			tp->t_rocol = tp->t_column;
tp                553 kern/tty.c     		if (ISSET(tp->t_state, TS_ERASE)) {
tp                557 kern/tty.c     			CLR(tp->t_state, TS_ERASE);
tp                558 kern/tty.c     			(void)ttyoutput('/', tp);
tp                560 kern/tty.c     		i = tp->t_column;
tp                561 kern/tty.c     		ttyecho(c, tp);
tp                566 kern/tty.c     			i = min(2, tp->t_column - i);
tp                568 kern/tty.c     				(void)ttyoutput('\b', tp);
tp                577 kern/tty.c     	if (ISSET(tp->t_state, TS_TTSTOP) &&
tp                581 kern/tty.c     	CLR(tp->t_lflag, FLUSHO);
tp                582 kern/tty.c     	CLR(tp->t_state, TS_TTSTOP);
tp                584 kern/tty.c     	return (ttstart(tp));
tp                594 kern/tty.c     ttyoutput(int c, struct tty *tp)
tp                599 kern/tty.c     	oflag = tp->t_oflag;
tp                602 kern/tty.c     		tp->t_outcc++;
tp                603 kern/tty.c     		if (!ISSET(tp->t_lflag, FLUSHO) && putc(c, &tp->t_outq))
tp                615 kern/tty.c     	    ISSET(oflag, OXTABS) && !ISSET(tp->t_lflag, EXTPROC)) {
tp                616 kern/tty.c     		c = 8 - (tp->t_column & 7);
tp                617 kern/tty.c     		if (ISSET(tp->t_lflag, FLUSHO)) {
tp                621 kern/tty.c     			notout = b_to_q("        ", c, &tp->t_outq);
tp                624 kern/tty.c     			tp->t_outcc += c;
tp                627 kern/tty.c     		tp->t_column += c;
tp                638 kern/tty.c     	if (c == '\n' && ISSET(tp->t_oflag, ONLCR)) {
tp                640 kern/tty.c     		tp->t_outcc++;
tp                641 kern/tty.c     		if (!ISSET(tp->t_lflag, FLUSHO) && putc('\r', &tp->t_outq))
tp                643 kern/tty.c     		tp->t_column = 0;
tp                645 kern/tty.c     	else if (c == '\r' && ISSET(tp->t_oflag, OCRNL))
tp                648 kern/tty.c     	if (ISSET(tp->t_oflag, OLCUC) && islower(c))
tp                650 kern/tty.c     	else if (ISSET(tp->t_oflag, OLCUC) && ISSET(tp->t_lflag, XCASE)) {
tp                671 kern/tty.c     			tp->t_outcc++;
tp                672 kern/tty.c     			if (putc('\\', &tp->t_outq))
tp                677 kern/tty.c     	if (ISSET(tp->t_oflag, ONOCR) && c == '\r' && tp->t_column == 0)
tp                681 kern/tty.c     	tp->t_outcc++;
tp                682 kern/tty.c     	if (!ISSET(tp->t_lflag, FLUSHO) && putc(c, &tp->t_outq))
tp                685 kern/tty.c     	col = tp->t_column;
tp                694 kern/tty.c     		if (ISSET(tp->t_oflag, ONLRET) || ISSET(tp->t_oflag, OCRNL))
tp                707 kern/tty.c     	tp->t_column = col;
tp                718 kern/tty.c     ttioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p)
tp                750 kern/tty.c     		while (isbackground(p, tp) &&
tp                757 kern/tty.c     			error = ttysleep(tp, &lbolt, TTOPRI | PCATCH,
tp                769 kern/tty.c     			SET(tp->t_state, TS_ASYNC);
tp                771 kern/tty.c     			CLR(tp->t_state, TS_ASYNC);
tp                778 kern/tty.c     		*(int *)data = ttnread(tp);
tp                783 kern/tty.c     		SET(tp->t_state, TS_XCLUDE);
tp                793 kern/tty.c     		ttyflush(tp, flags);
tp                800 kern/tty.c     			if (constty != NULL && constty != tp &&
tp                817 kern/tty.c     			constty = tp;
tp                818 kern/tty.c     		} else if (tp == constty)
tp                823 kern/tty.c     		if ((error = ttywait(tp)) != 0)
tp                829 kern/tty.c     		bcopy(&tp->t_termios, t, sizeof(struct termios));
tp                833 kern/tty.c     		*(int *)data = tp->t_line;
tp                836 kern/tty.c     		*(struct winsize *)data = tp->t_winsize;
tp                840 kern/tty.c     		*(struct timeval *)data = tp->t_tv;
tp                844 kern/tty.c     		if (!isctty(p, tp) && suser(p, 0))
tp                846 kern/tty.c     		*(int *)data = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
tp                851 kern/tty.c     		SET(tp->t_cflag, HUPCL);
tp                857 kern/tty.c     		CLR(tp->t_state, TS_XCLUDE);
tp                861 kern/tty.c     		*(int *)data = tp->t_outq.c_cc;
tp                870 kern/tty.c     			if ((error = ttywait(tp)) != 0) {
tp                875 kern/tty.c     				ttyflush(tp, FREAD);
tp                881 kern/tty.c     			if (tp->t_param && (error = (*tp->t_param)(tp, t))) {
tp                885 kern/tty.c     				if (!ISSET(tp->t_state, TS_CARR_ON) &&
tp                886 kern/tty.c     				    ISSET(tp->t_cflag, CLOCAL) &&
tp                888 kern/tty.c     					CLR(tp->t_state, TS_ISOPEN);
tp                889 kern/tty.c     					SET(tp->t_state, TS_WOPEN);
tp                890 kern/tty.c     					ttwakeup(tp);
tp                892 kern/tty.c     				tp->t_cflag = t->c_cflag;
tp                893 kern/tty.c     				tp->t_ispeed = t->c_ispeed;
tp                894 kern/tty.c     				tp->t_ospeed = t->c_ospeed;
tp                895 kern/tty.c     				if (t->c_ospeed == 0 && tp->t_session &&
tp                896 kern/tty.c     				    tp->t_session->s_leader)
tp                897 kern/tty.c     					psignal(tp->t_session->s_leader,
tp                900 kern/tty.c     			ttsetwater(tp);
tp                904 kern/tty.c     			    ISSET(tp->t_lflag, ICANON)) {
tp                906 kern/tty.c     					SET(tp->t_lflag, PENDIN);
tp                907 kern/tty.c     					ttwakeup(tp);
tp                911 kern/tty.c     					catq(&tp->t_rawq, &tp->t_canq);
tp                912 kern/tty.c     					tq = tp->t_rawq;
tp                913 kern/tty.c     					tp->t_rawq = tp->t_canq;
tp                914 kern/tty.c     					tp->t_canq = tq;
tp                915 kern/tty.c     					CLR(tp->t_lflag, PENDIN);
tp                919 kern/tty.c     		tp->t_iflag = t->c_iflag;
tp                920 kern/tty.c     		tp->t_oflag = t->c_oflag;
tp                924 kern/tty.c     		if (ISSET(tp->t_lflag, EXTPROC))
tp                928 kern/tty.c     		tp->t_lflag = t->c_lflag | ISSET(tp->t_lflag, PENDIN);
tp                929 kern/tty.c     		bcopy(t->c_cc, tp->t_cc, sizeof(t->c_cc));
tp                935 kern/tty.c     		dev_t device = tp->t_dev;
tp                939 kern/tty.c     		if (t != tp->t_line) {
tp                941 kern/tty.c     			(*linesw[tp->t_line].l_close)(tp, flag);
tp                942 kern/tty.c     			error = (*linesw[t].l_open)(device, tp);
tp                944 kern/tty.c     				(void)(*linesw[tp->t_line].l_open)(device, tp);
tp                948 kern/tty.c     			tp->t_line = t;
tp                955 kern/tty.c     		if (ISSET(tp->t_state, TS_TTSTOP) ||
tp                956 kern/tty.c     		    ISSET(tp->t_lflag, FLUSHO)) {
tp                957 kern/tty.c     			CLR(tp->t_lflag, FLUSHO);
tp                958 kern/tty.c     			CLR(tp->t_state, TS_TTSTOP);
tp                959 kern/tty.c     			ttstart(tp);
tp                966 kern/tty.c     		if (p->p_ucred->cr_uid && !isctty(p, tp))
tp                968 kern/tty.c     		(*linesw[tp->t_line].l_rint)(*(u_char *)data, tp);
tp                972 kern/tty.c     		if (!ISSET(tp->t_state, TS_TTSTOP)) {
tp                973 kern/tty.c     			SET(tp->t_state, TS_TTSTOP);
tp                974 kern/tty.c     			(*cdevsw[major(tp->t_dev)].d_stop)(tp, 0);
tp                981 kern/tty.c     		    ((p->p_session->s_ttyvp || tp->t_session) &&
tp                982 kern/tty.c     		     (tp->t_session != p->p_session)))
tp                984 kern/tty.c     		if (tp->t_session)
tp                985 kern/tty.c     			SESSRELE(tp->t_session);
tp                987 kern/tty.c     		tp->t_session = p->p_session;
tp                988 kern/tty.c     		tp->t_pgrp = p->p_pgrp;
tp                989 kern/tty.c     		p->p_session->s_ttyp = tp;
tp                995 kern/tty.c     		if (!isctty(p, tp))
tp               1001 kern/tty.c     		tp->t_pgrp = pgrp;
tp               1005 kern/tty.c     		ttyinfo(tp);
tp               1008 kern/tty.c     		if (bcmp((caddr_t)&tp->t_winsize, data,
tp               1010 kern/tty.c     			tp->t_winsize = *(struct winsize *)data;
tp               1011 kern/tty.c     			pgsignal(tp->t_pgrp, SIGWINCH, 1);
tp               1018 kern/tty.c     		CLR(tp->t_flags, TS_TSTAMPDCDSET);
tp               1019 kern/tty.c     		CLR(tp->t_flags, TS_TSTAMPCTSSET);
tp               1020 kern/tty.c     		CLR(tp->t_flags, TS_TSTAMPDCDCLR);
tp               1021 kern/tty.c     		CLR(tp->t_flags, TS_TSTAMPCTSCLR);
tp               1023 kern/tty.c     			SET(tp->t_flags, TS_TSTAMPDCDSET);
tp               1025 kern/tty.c     			SET(tp->t_flags, TS_TSTAMPCTSSET);
tp               1027 kern/tty.c     			SET(tp->t_flags, TS_TSTAMPDCDCLR);
tp               1029 kern/tty.c     			SET(tp->t_flags, TS_TSTAMPCTSCLR);
tp               1035 kern/tty.c     		return (ttcompat(tp, cmd, data, flag, p));
tp               1046 kern/tty.c     	struct tty *tp;
tp               1049 kern/tty.c     	tp = (*cdevsw[major(device)].d_tty)(device);
tp               1054 kern/tty.c     		if (ttnread(tp) > 0 || (!ISSET(tp->t_cflag, CLOCAL) &&
tp               1055 kern/tty.c     		    !ISSET(tp->t_state, TS_CARR_ON)))
tp               1059 kern/tty.c     		if (tp->t_outq.c_cc <= tp->t_lowat)
tp               1064 kern/tty.c     			selrecord(p, &tp->t_rsel);
tp               1066 kern/tty.c     			selrecord(p, &tp->t_wsel);
tp               1080 kern/tty.c     	struct tty *tp = (*cdevsw[major(dev)].d_tty)(dev);
tp               1086 kern/tty.c     		klist = &tp->t_rsel.si_note;
tp               1090 kern/tty.c     		klist = &tp->t_wsel.si_note;
tp               1110 kern/tty.c     	struct tty *tp = (*cdevsw[major(dev)].d_tty)(dev);
tp               1113 kern/tty.c     	SLIST_REMOVE(&tp->t_rsel.si_note, kn, knote, kn_selnext);
tp               1121 kern/tty.c     	struct tty *tp = (*cdevsw[major(dev)].d_tty)(dev);
tp               1125 kern/tty.c     	kn->kn_data = ttnread(tp);
tp               1127 kern/tty.c     	if (!ISSET(tp->t_cflag, CLOCAL) && !ISSET(tp->t_state, TS_CARR_ON)) {
tp               1138 kern/tty.c     	struct tty *tp = (*cdevsw[major(dev)].d_tty)(dev);
tp               1141 kern/tty.c     	SLIST_REMOVE(&tp->t_wsel.si_note, kn, knote, kn_selnext);
tp               1149 kern/tty.c     	struct tty *tp = (*cdevsw[major(dev)].d_tty)(dev);
tp               1151 kern/tty.c     	kn->kn_data = tp->t_outq.c_cc;
tp               1152 kern/tty.c     	return (kn->kn_data <= tp->t_lowat);
tp               1156 kern/tty.c     ttnread(struct tty *tp)
tp               1162 kern/tty.c     	if (ISSET(tp->t_lflag, PENDIN))
tp               1163 kern/tty.c     		ttypend(tp);
tp               1164 kern/tty.c     	nread = tp->t_canq.c_cc;
tp               1165 kern/tty.c     	if (!ISSET(tp->t_lflag, ICANON)) {
tp               1166 kern/tty.c     		nread += tp->t_rawq.c_cc;
tp               1167 kern/tty.c     		if (nread < tp->t_cc[VMIN] && !tp->t_cc[VTIME])
tp               1177 kern/tty.c     ttywait(struct tty *tp)
tp               1183 kern/tty.c     	while ((tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY)) &&
tp               1184 kern/tty.c     	    (ISSET(tp->t_state, TS_CARR_ON) || ISSET(tp->t_cflag, CLOCAL)) &&
tp               1185 kern/tty.c     	    tp->t_oproc) {
tp               1186 kern/tty.c     		(*tp->t_oproc)(tp);
tp               1187 kern/tty.c     		if ((tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY)) &&
tp               1188 kern/tty.c     		    (ISSET(tp->t_state, TS_CARR_ON) || ISSET(tp->t_cflag, CLOCAL))
tp               1189 kern/tty.c     		    && tp->t_oproc) {
tp               1190 kern/tty.c     			SET(tp->t_state, TS_ASLEEP);
tp               1191 kern/tty.c     			error = ttysleep(tp, &tp->t_outq, TTOPRI | PCATCH, ttyout, 0);
tp               1205 kern/tty.c     ttywflush(struct tty *tp)
tp               1209 kern/tty.c     	if ((error = ttywait(tp)) == 0)
tp               1210 kern/tty.c     		ttyflush(tp, FREAD);
tp               1218 kern/tty.c     ttyflush(struct tty *tp, int rw)
tp               1224 kern/tty.c     		FLUSHQ(&tp->t_canq);
tp               1225 kern/tty.c     		FLUSHQ(&tp->t_rawq);
tp               1226 kern/tty.c     		tp->t_rocount = 0;
tp               1227 kern/tty.c     		tp->t_rocol = 0;
tp               1228 kern/tty.c     		CLR(tp->t_state, TS_LOCAL);
tp               1229 kern/tty.c     		ttyunblock(tp);
tp               1230 kern/tty.c     		ttwakeup(tp);
tp               1233 kern/tty.c     		CLR(tp->t_state, TS_TTSTOP);
tp               1234 kern/tty.c     		(*cdevsw[major(tp->t_dev)].d_stop)(tp, rw);
tp               1235 kern/tty.c     		FLUSHQ(&tp->t_outq);
tp               1236 kern/tty.c     		wakeup((caddr_t)&tp->t_outq);
tp               1237 kern/tty.c     		selwakeup(&tp->t_wsel);
tp               1246 kern/tty.c     ttychars(struct tty *tp)
tp               1249 kern/tty.c     	bcopy(ttydefchars, tp->t_cc, sizeof(ttydefchars));
tp               1256 kern/tty.c     ttyblock(struct tty *tp)
tp               1260 kern/tty.c     	total = tp->t_rawq.c_cc + tp->t_canq.c_cc;
tp               1261 kern/tty.c     	if (tp->t_rawq.c_cc > TTYHOG) {
tp               1262 kern/tty.c     		ttyflush(tp, FREAD | FWRITE);
tp               1263 kern/tty.c     		CLR(tp->t_state, TS_TBLOCK);
tp               1270 kern/tty.c     	     !ISSET(tp->t_state, TS_TBLOCK) &&
tp               1271 kern/tty.c     	     !ISSET(tp->t_lflag, ICANON)) || tp->t_canq.c_cc > 0) {
tp               1272 kern/tty.c     		if (ISSET(tp->t_iflag, IXOFF) &&
tp               1273 kern/tty.c     		    tp->t_cc[VSTOP] != _POSIX_VDISABLE &&
tp               1274 kern/tty.c     		    putc(tp->t_cc[VSTOP], &tp->t_outq) == 0) {
tp               1275 kern/tty.c     			SET(tp->t_state, TS_TBLOCK);
tp               1276 kern/tty.c     			ttstart(tp);
tp               1279 kern/tty.c     		if (ISSET(tp->t_cflag, CHWFLOW) && tp->t_hwiflow &&
tp               1280 kern/tty.c     		    (*tp->t_hwiflow)(tp, 1) != 0)
tp               1281 kern/tty.c     			SET(tp->t_state, TS_TBLOCK);
tp               1288 kern/tty.c     	struct tty *tp;
tp               1295 kern/tty.c     	tp = tp_arg;
tp               1298 kern/tty.c     	CLR(tp->t_state, TS_TIMEOUT);
tp               1299 kern/tty.c     	ttstart(tp);
tp               1305 kern/tty.c     ttstart(struct tty *tp)
tp               1308 kern/tty.c     	if (tp->t_oproc != NULL)	/* XXX: Kludge for pty. */
tp               1309 kern/tty.c     		(*tp->t_oproc)(tp);
tp               1317 kern/tty.c     ttylclose(struct tty *tp, int flag)
tp               1321 kern/tty.c     		ttyflush(tp, FREAD | FWRITE);
tp               1323 kern/tty.c     		ttywflush(tp);
tp               1333 kern/tty.c     ttymodem(struct tty *tp, int flag)
tp               1336 kern/tty.c     	if (!ISSET(tp->t_state, TS_WOPEN) && ISSET(tp->t_cflag, MDMBUF)) {
tp               1341 kern/tty.c     			CLR(tp->t_state, TS_TTSTOP);
tp               1342 kern/tty.c     			ttstart(tp);
tp               1343 kern/tty.c     		} else if (!ISSET(tp->t_state, TS_TTSTOP)) {
tp               1344 kern/tty.c     			SET(tp->t_state, TS_TTSTOP);
tp               1345 kern/tty.c     			(*cdevsw[major(tp->t_dev)].d_stop)(tp, 0);
tp               1351 kern/tty.c     		CLR(tp->t_state, TS_CARR_ON);
tp               1352 kern/tty.c     		if (ISSET(tp->t_state, TS_ISOPEN) &&
tp               1353 kern/tty.c     		    !ISSET(tp->t_cflag, CLOCAL)) {
tp               1354 kern/tty.c     			if (tp->t_session && tp->t_session->s_leader)
tp               1355 kern/tty.c     				psignal(tp->t_session->s_leader, SIGHUP);
tp               1356 kern/tty.c     			ttyflush(tp, FREAD | FWRITE);
tp               1363 kern/tty.c     		SET(tp->t_state, TS_CARR_ON);
tp               1364 kern/tty.c     		ttwakeup(tp);
tp               1374 kern/tty.c     nullmodem(struct tty *tp, int flag)
tp               1378 kern/tty.c     		SET(tp->t_state, TS_CARR_ON);
tp               1380 kern/tty.c     		CLR(tp->t_state, TS_CARR_ON);
tp               1381 kern/tty.c     		if (ISSET(tp->t_state, TS_ISOPEN) &&
tp               1382 kern/tty.c     		    !ISSET(tp->t_cflag, CLOCAL)) {
tp               1383 kern/tty.c     			if (tp->t_session && tp->t_session->s_leader)
tp               1384 kern/tty.c     				psignal(tp->t_session->s_leader, SIGHUP);
tp               1385 kern/tty.c     			ttyflush(tp, FREAD | FWRITE);
tp               1397 kern/tty.c     ttypend(struct tty *tp)
tp               1404 kern/tty.c     	CLR(tp->t_lflag, PENDIN);
tp               1405 kern/tty.c     	SET(tp->t_state, TS_TYPEN);
tp               1406 kern/tty.c     	tq = tp->t_rawq;
tp               1407 kern/tty.c     	tp->t_rawq.c_cc = 0;
tp               1408 kern/tty.c     	tp->t_rawq.c_cf = tp->t_rawq.c_cl = 0;
tp               1410 kern/tty.c     		ttyinput(c, tp);
tp               1411 kern/tty.c     	CLR(tp->t_state, TS_TYPEN);
tp               1419 kern/tty.c     	struct tty *tp = (struct tty *)arg;
tp               1421 kern/tty.c     	wakeup(&tp->t_rawq);
tp               1428 kern/tty.c     ttread(struct tty *tp, struct uio *uio, int flag)
tp               1433 kern/tty.c     	u_char *cc = tp->t_cc;
tp               1439 kern/tty.c     loop:	lflag = tp->t_lflag;
tp               1445 kern/tty.c     		ttypend(tp);
tp               1451 kern/tty.c     	if (isbackground(p, tp)) {
tp               1459 kern/tty.c     		error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg, 0);
tp               1477 kern/tty.c     		qp = &tp->t_rawq;
tp               1497 kern/tty.c     				timeout_set(stime, ttvtimeout, tp);
tp               1514 kern/tty.c     	} else if ((qp = &tp->t_canq)->c_cc <= 0) {
tp               1523 kern/tty.c     		carrier = ISSET(tp->t_state, TS_CARR_ON) ||
tp               1524 kern/tty.c     		    ISSET(tp->t_cflag, CLOCAL);
tp               1525 kern/tty.c     		if (!carrier && ISSET(tp->t_state, TS_ISOPEN)) {
tp               1535 kern/tty.c     		error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
tp               1562 kern/tty.c     			pgsignal(tp->t_pgrp, SIGTSTP, 1);
tp               1564 kern/tty.c     				error = ttysleep(tp, &lbolt, TTIPRI | PCATCH,
tp               1598 kern/tty.c     	if (tp->t_rawq.c_cc < TTYHOG/5)
tp               1599 kern/tty.c     		ttyunblock(tp);
tp               1612 kern/tty.c     ttyunblock(struct tty *tp)
tp               1614 kern/tty.c     	u_char *cc = tp->t_cc;
tp               1618 kern/tty.c     	if (ISSET(tp->t_state, TS_TBLOCK)) {
tp               1619 kern/tty.c     		if (ISSET(tp->t_iflag, IXOFF) &&
tp               1621 kern/tty.c     		    putc(cc[VSTART], &tp->t_outq) == 0) {
tp               1622 kern/tty.c     			CLR(tp->t_state, TS_TBLOCK);
tp               1623 kern/tty.c     			ttstart(tp);
tp               1626 kern/tty.c     		if (ISSET(tp->t_cflag, CHWFLOW) && tp->t_hwiflow &&
tp               1627 kern/tty.c     		    (*tp->t_hwiflow)(tp, 0) != 0)
tp               1628 kern/tty.c     			CLR(tp->t_state, TS_TBLOCK);
tp               1640 kern/tty.c     ttycheckoutq(struct tty *tp, int wait)
tp               1644 kern/tty.c     	hiwat = tp->t_hiwat;
tp               1647 kern/tty.c     	if (tp->t_outq.c_cc > hiwat + 200)
tp               1648 kern/tty.c     		while (tp->t_outq.c_cc > hiwat) {
tp               1649 kern/tty.c     			ttstart(tp);
tp               1654 kern/tty.c     			SET(tp->t_state, TS_ASLEEP);
tp               1655 kern/tty.c     			tsleep(&tp->t_outq, PZERO - 1, "ttckoutq", hz);
tp               1665 kern/tty.c     ttwrite(struct tty *tp, struct uio *uio, int flag)
tp               1673 kern/tty.c     	hiwat = tp->t_hiwat;
tp               1679 kern/tty.c     	if (!ISSET(tp->t_state, TS_CARR_ON) &&
tp               1680 kern/tty.c     	    !ISSET(tp->t_cflag, CLOCAL)) {
tp               1681 kern/tty.c     		if (ISSET(tp->t_state, TS_ISOPEN)) {
tp               1690 kern/tty.c     			error = ttysleep(tp,
tp               1691 kern/tty.c     			    &tp->t_rawq, TTIPRI | PCATCH, ttopen, 0);
tp               1703 kern/tty.c     	if (isbackground(p, tp) &&
tp               1704 kern/tty.c     	    ISSET(tp->t_lflag, TOSTOP) && (p->p_flag & P_PPWAIT) == 0 &&
tp               1712 kern/tty.c     		error = ttysleep(tp, &lbolt, TTIPRI | PCATCH, ttybg, 0);
tp               1723 kern/tty.c     		if (ISSET(tp->t_lflag, FLUSHO)) {
tp               1727 kern/tty.c     		if (tp->t_outq.c_cc > hiwat)
tp               1752 kern/tty.c     			if (!ISSET(tp->t_oflag, OPOST))
tp               1762 kern/tty.c     					tp->t_rocount = 0;
tp               1763 kern/tty.c     					if (ttyoutput(*cp, tp) >= 0) {
tp               1769 kern/tty.c     					if (ISSET(tp->t_lflag, FLUSHO) ||
tp               1770 kern/tty.c     					    tp->t_outq.c_cc > hiwat)
tp               1783 kern/tty.c     			tp->t_rocount = 0;
tp               1784 kern/tty.c     			i = b_to_q(cp, ce, &tp->t_outq);
tp               1786 kern/tty.c     			tp->t_column += ce;
tp               1788 kern/tty.c     			tp->t_outcc += ce;
tp               1793 kern/tty.c     			if (ISSET(tp->t_lflag, FLUSHO) ||
tp               1794 kern/tty.c     			    tp->t_outq.c_cc > hiwat)
tp               1797 kern/tty.c     		ttstart(tp);
tp               1815 kern/tty.c     	hiwat = tp->t_outq.c_cc - 1;
tp               1818 kern/tty.c     	ttstart(tp);
tp               1824 kern/tty.c     	if (tp->t_outq.c_cc <= hiwat) {
tp               1833 kern/tty.c     	SET(tp->t_state, TS_ASLEEP);
tp               1834 kern/tty.c     	error = ttysleep(tp, &tp->t_outq, TTOPRI | PCATCH, ttyout, 0);
tp               1846 kern/tty.c     ttyrub(int c, struct tty *tp)
tp               1852 kern/tty.c     	if (!ISSET(tp->t_lflag, ECHO) || ISSET(tp->t_lflag, EXTPROC))
tp               1854 kern/tty.c     	CLR(tp->t_lflag, FLUSHO);
tp               1855 kern/tty.c     	if (ISSET(tp->t_lflag, ECHOE)) {
tp               1856 kern/tty.c     		if (tp->t_rocount == 0) {
tp               1860 kern/tty.c     			ttyretype(tp);
tp               1864 kern/tty.c     			ttyrubo(tp, 2);
tp               1869 kern/tty.c     				ttyrubo(tp, 1);
tp               1876 kern/tty.c     				if (ISSET(tp->t_lflag, ECHOCTL))
tp               1877 kern/tty.c     					ttyrubo(tp, 2);
tp               1880 kern/tty.c     				if (tp->t_rocount < tp->t_rawq.c_cc) {
tp               1881 kern/tty.c     					ttyretype(tp);
tp               1885 kern/tty.c     				savecol = tp->t_column;
tp               1886 kern/tty.c     				SET(tp->t_state, TS_CNTTB);
tp               1887 kern/tty.c     				SET(tp->t_lflag, FLUSHO);
tp               1888 kern/tty.c     				tp->t_column = tp->t_rocol;
tp               1889 kern/tty.c     				for (cp = firstc(&tp->t_rawq, &tabc); cp;
tp               1890 kern/tty.c     				    cp = nextc(&tp->t_rawq, cp, &tabc))
tp               1891 kern/tty.c     					ttyecho(tabc, tp);
tp               1892 kern/tty.c     				CLR(tp->t_lflag, FLUSHO);
tp               1893 kern/tty.c     				CLR(tp->t_state, TS_CNTTB);
tp               1897 kern/tty.c     				savecol -= tp->t_column;
tp               1898 kern/tty.c     				tp->t_column += savecol;
tp               1902 kern/tty.c     					(void)ttyoutput('\b', tp);
tp               1912 kern/tty.c     	} else if (ISSET(tp->t_lflag, ECHOPRT)) {
tp               1913 kern/tty.c     		if (!ISSET(tp->t_state, TS_ERASE)) {
tp               1914 kern/tty.c     			SET(tp->t_state, TS_ERASE);
tp               1915 kern/tty.c     			(void)ttyoutput('\\', tp);
tp               1917 kern/tty.c     		ttyecho(c, tp);
tp               1919 kern/tty.c     		ttyecho(tp->t_cc[VERASE], tp);
tp               1920 kern/tty.c     	--tp->t_rocount;
tp               1927 kern/tty.c     ttyrubo(struct tty *tp, int cnt)
tp               1931 kern/tty.c     		(void)ttyoutput('\b', tp);
tp               1932 kern/tty.c     		(void)ttyoutput(' ', tp);
tp               1933 kern/tty.c     		(void)ttyoutput('\b', tp);
tp               1943 kern/tty.c     ttyretype(struct tty *tp)
tp               1949 kern/tty.c     	if (tp->t_cc[VREPRINT] != _POSIX_VDISABLE)
tp               1950 kern/tty.c     		ttyecho(tp->t_cc[VREPRINT], tp);
tp               1952 kern/tty.c     	(void)ttyoutput('\n', tp);
tp               1955 kern/tty.c     	for (cp = firstc(&tp->t_canq, &c); cp; cp = nextc(&tp->t_canq, cp, &c))
tp               1956 kern/tty.c     		ttyecho(c, tp);
tp               1957 kern/tty.c     	for (cp = firstc(&tp->t_rawq, &c); cp; cp = nextc(&tp->t_rawq, cp, &c))
tp               1958 kern/tty.c     		ttyecho(c, tp);
tp               1959 kern/tty.c     	CLR(tp->t_state, TS_ERASE);
tp               1962 kern/tty.c     	tp->t_rocount = tp->t_rawq.c_cc;
tp               1963 kern/tty.c     	tp->t_rocol = 0;
tp               1970 kern/tty.c     ttyecho(int c, struct tty *tp)
tp               1973 kern/tty.c     	if (!ISSET(tp->t_state, TS_CNTTB))
tp               1974 kern/tty.c     		CLR(tp->t_lflag, FLUSHO);
tp               1975 kern/tty.c     	if ((!ISSET(tp->t_lflag, ECHO) &&
tp               1976 kern/tty.c     	    (!ISSET(tp->t_lflag, ECHONL) || c != '\n')) ||
tp               1977 kern/tty.c     	    ISSET(tp->t_lflag, EXTPROC))
tp               1979 kern/tty.c     	if (((ISSET(tp->t_lflag, ECHOCTL) &&
tp               1982 kern/tty.c     		(void)ttyoutput('^', tp);
tp               1989 kern/tty.c     	(void)ttyoutput(c, tp);
tp               1996 kern/tty.c     ttwakeup(struct tty *tp)
tp               1999 kern/tty.c     	selwakeup(&tp->t_rsel);
tp               2000 kern/tty.c     	if (ISSET(tp->t_state, TS_ASYNC))
tp               2001 kern/tty.c     		pgsignal(tp->t_pgrp, SIGIO, 1);
tp               2002 kern/tty.c     	wakeup((caddr_t)&tp->t_rawq);
tp               2003 kern/tty.c     	KNOTE(&tp->t_rsel.si_note, 0);
tp               2027 kern/tty.c     ttsetwater(struct tty *tp)
tp               2033 kern/tty.c     	cps = tp->t_ospeed / 10;
tp               2034 kern/tty.c     	tp->t_lowat = x = CLAMP(cps / 2, TTMAXLOWAT, TTMINLOWAT);
tp               2037 kern/tty.c     	tp->t_hiwat = roundup(x, CBSIZE);
tp               2045 kern/tty.c     ttyinfo(struct tty *tp)
tp               2051 kern/tty.c     	if (ttycheckoutq(tp,0) == 0)
tp               2056 kern/tty.c     	ttyprintf(tp, "load: %d.%02d ", tmp / 100, tmp % 100);
tp               2058 kern/tty.c     	if (tp->t_session == NULL)
tp               2059 kern/tty.c     		ttyprintf(tp, "not a controlling terminal\n");
tp               2060 kern/tty.c     	else if (tp->t_pgrp == NULL)
tp               2061 kern/tty.c     		ttyprintf(tp, "no foreground process group\n");
tp               2062 kern/tty.c     	else if ((p = LIST_FIRST(&tp->t_pgrp->pg_members)) == NULL)
tp               2063 kern/tty.c     		ttyprintf(tp, "empty foreground process group\n");
tp               2070 kern/tty.c     		ttyprintf(tp, " cmd: %s %d [%s] ", pick->p_comm, pick->p_pid,
tp               2083 kern/tty.c     		ttyprintf(tp, "%ld.%02ldu ", utime.tv_sec,
tp               2092 kern/tty.c     		ttyprintf(tp, "%ld.%02lds ", stime.tv_sec,
tp               2098 kern/tty.c     		ttyprintf(tp, "%d%% %ldk\n",
tp               2103 kern/tty.c     	tp->t_rocount = 0;	/* so pending input will be retyped if BS */
tp               2182 kern/tty.c     tputchar(int c, struct tty *tp)
tp               2187 kern/tty.c     	if (ISSET(tp->t_state,
tp               2193 kern/tty.c     		(void)ttyoutput('\r', tp);
tp               2194 kern/tty.c     	(void)ttyoutput(c, tp);
tp               2195 kern/tty.c     	ttstart(tp);
tp               2207 kern/tty.c     ttysleep(struct tty *tp, void *chan, int pri, char *wmesg, int timo)
tp               2212 kern/tty.c     	gen = tp->t_gen;
tp               2215 kern/tty.c     	return (tp->t_gen == gen ? 0 : ERESTART);
tp               2236 kern/tty.c     	struct tty *tp;
tp               2238 kern/tty.c     	MALLOC(tp, struct tty *, sizeof(struct tty), M_TTYS, M_WAITOK);
tp               2239 kern/tty.c     	bzero(tp, sizeof *tp);
tp               2241 kern/tty.c     	clalloc(&tp->t_rawq, 1024, 1);
tp               2242 kern/tty.c     	clalloc(&tp->t_canq, 1024, 1);
tp               2244 kern/tty.c     	clalloc(&tp->t_outq, 1024, 0);
tp               2246 kern/tty.c     	TAILQ_INSERT_TAIL(&ttylist, tp, tty_link);
tp               2248 kern/tty.c     	timeout_set(&tp->t_rstrt_to, ttrstrt, tp);
tp               2250 kern/tty.c     	return(tp);
tp               2258 kern/tty.c     ttyfree(struct tty *tp)
tp               2266 kern/tty.c     	TAILQ_REMOVE(&ttylist, tp, tty_link);
tp               2268 kern/tty.c     	clfree(&tp->t_rawq);
tp               2269 kern/tty.c     	clfree(&tp->t_canq);
tp               2270 kern/tty.c     	clfree(&tp->t_outq);
tp               2271 kern/tty.c     	FREE(tp, M_TTYS);
tp               2280 kern/tty.c     	struct tty *tp;
tp               2284 kern/tty.c     	for (tp = TAILQ_FIRST(&ttylist), itp = ttystats; tp;
tp               2285 kern/tty.c     	    tp = TAILQ_NEXT(tp, tty_link), itp++) {
tp               2286 kern/tty.c     		itp->t_dev = tp->t_dev;
tp               2287 kern/tty.c     		itp->t_rawq_c_cc = tp->t_rawq.c_cc;
tp               2288 kern/tty.c     		itp->t_canq_c_cc = tp->t_canq.c_cc;
tp               2289 kern/tty.c     		itp->t_outq_c_cc = tp->t_outq.c_cc;
tp               2290 kern/tty.c     		itp->t_hiwat = tp->t_hiwat;
tp               2291 kern/tty.c     		itp->t_lowat = tp->t_lowat;
tp               2292 kern/tty.c     		itp->t_column = tp->t_column;
tp               2293 kern/tty.c     		itp->t_state = tp->t_state;
tp               2294 kern/tty.c     		itp->t_session = tp->t_session;
tp               2295 kern/tty.c     		if (tp->t_pgrp)
tp               2296 kern/tty.c     			itp->t_pgrp_pg_id = tp->t_pgrp->pg_id;
tp               2299 kern/tty.c     		itp->t_line = tp->t_line;
tp               2344 kern/tty.c     ttytstamp(struct tty *tp, int octs, int ncts, int odcd, int ndcd)
tp               2349 kern/tty.c     		doit |= ncts ? ISSET(tp->t_flags, TS_TSTAMPCTSSET) :
tp               2350 kern/tty.c     		    ISSET(tp->t_flags, TS_TSTAMPCTSCLR);
tp               2352 kern/tty.c     		doit |= ndcd ? ISSET(tp->t_flags, TS_TSTAMPDCDSET) :
tp               2353 kern/tty.c     		    ISSET(tp->t_flags, TS_TSTAMPDCDCLR);
tp               2356 kern/tty.c     		microtime(&tp->t_tv);
tp                 57 kern/tty_conf.c int	slopen(dev_t dev, struct tty *tp);
tp                 58 kern/tty_conf.c int	slclose(struct tty *tp, int flags);
tp                 59 kern/tty_conf.c int	sltioctl(struct tty *tp, u_long cmd, caddr_t data,
tp                 61 kern/tty_conf.c int	slinput(int c, struct tty *tp);
tp                 62 kern/tty_conf.c int	slstart(struct tty *tp);
tp                 67 kern/tty_conf.c int	pppopen(dev_t dev, struct tty *tp);
tp                 68 kern/tty_conf.c int	pppclose(struct tty *tp, int flags);
tp                 69 kern/tty_conf.c int	ppptioctl(struct tty *tp, u_long cmd, caddr_t data,
tp                 71 kern/tty_conf.c int	pppinput(int c, struct tty *tp);
tp                 72 kern/tty_conf.c int	pppstart(struct tty *tp);
tp                 73 kern/tty_conf.c int	pppread(struct tty *tp, struct uio *uio, int flag);
tp                 74 kern/tty_conf.c int	pppwrite(struct tty *tp, struct uio *uio, int flag);
tp                 79 kern/tty_conf.c int	stripopen(dev_t dev, struct tty *tp);
tp                 80 kern/tty_conf.c int	stripclose(struct tty *tp, int flags);
tp                 81 kern/tty_conf.c int	striptioctl(struct tty *tp, u_long cmd, caddr_t data,
tp                 83 kern/tty_conf.c int	stripinput(int c, struct tty *tp);
tp                 84 kern/tty_conf.c int	stripstart(struct tty *tp);
tp                155 kern/tty_conf.c nullioctl(struct tty *tp, u_long cmd, char *data, int flags, struct proc *p)
tp                159 kern/tty_conf.c 	tp = tp; data = data; flags = flags; p = p;
tp                 80 kern/tty_nmea.c nmeaopen(dev_t dev, struct tty *tp)
tp                 86 kern/tty_nmea.c 	if (tp->t_line == NMEADISC)
tp                 99 kern/tty_nmea.c 	tp->t_sc = (caddr_t)np;
tp                101 kern/tty_nmea.c 	error = linesw[TTYDISC].l_open(dev, tp);
tp                104 kern/tty_nmea.c 		tp->t_sc = NULL;
tp                111 kern/tty_nmea.c nmeaclose(struct tty *tp, int flags)
tp                113 kern/tty_nmea.c 	struct nmea *np = (struct nmea *)tp->t_sc;
tp                115 kern/tty_nmea.c 	tp->t_line = TTYDISC;	/* switch back to termios */
tp                118 kern/tty_nmea.c 	tp->t_sc = NULL;
tp                120 kern/tty_nmea.c 	return linesw[TTYDISC].l_close(tp, flags);
tp                125 kern/tty_nmea.c nmeainput(int c, struct tty *tp)
tp                127 kern/tty_nmea.c 	struct nmea *np = (struct nmea *)tp->t_sc;
tp                150 kern/tty_nmea.c 			linesw[TTYDISC].l_rint('[', tp);
tp                151 kern/tty_nmea.c 			linesw[TTYDISC].l_rint('0' + np->gapno++, tp);
tp                152 kern/tty_nmea.c 			linesw[TTYDISC].l_rint(']', tp);
tp                165 kern/tty_nmea.c 		if (tp->t_flags & (TS_TSTAMPDCDSET | TS_TSTAMPDCDCLR |
tp                167 kern/tty_nmea.c 			tmax = lmax(np->ts.tv_sec, tp->t_tv.tv_sec);
tp                168 kern/tty_nmea.c 			tmin = lmin(np->ts.tv_sec, tp->t_tv.tv_sec);
tp                172 kern/tty_nmea.c 				np->ts.tv_sec = tp->t_tv.tv_sec;
tp                173 kern/tty_nmea.c 				np->ts.tv_nsec = tp->t_tv.tv_usec *
tp                183 kern/tty_nmea.c 			nmea_scan(np, tp);
tp                193 kern/tty_nmea.c 	return linesw[TTYDISC].l_rint(c, tp);
tp                198 kern/tty_nmea.c nmea_scan(struct nmea *np, struct tty *tp)
tp                253 kern/tty_nmea.c 		nmea_gprmc(np, tp, fld, fldcnt);
tp                258 kern/tty_nmea.c nmea_gprmc(struct nmea *np, struct tty *tp, char *fld[], int fldcnt)
tp                284 kern/tty_nmea.c 		linesw[TTYDISC].l_rint('[', tp);
tp                285 kern/tty_nmea.c 		linesw[TTYDISC].l_rint('C', tp);
tp                286 kern/tty_nmea.c 		linesw[TTYDISC].l_rint(']', tp);
tp                240 kern/tty_pty.c 	struct tty *tp;
tp                248 kern/tty_pty.c 		tp = pti->pt_tty = ttymalloc();
tp                250 kern/tty_pty.c 		tp = pti->pt_tty;
tp                251 kern/tty_pty.c 	if ((tp->t_state & TS_ISOPEN) == 0) {
tp                252 kern/tty_pty.c 		tp->t_state |= TS_WOPEN;
tp                253 kern/tty_pty.c 		ttychars(tp);		/* Set up default chars */
tp                254 kern/tty_pty.c 		tp->t_iflag = TTYDEF_IFLAG;
tp                255 kern/tty_pty.c 		tp->t_oflag = TTYDEF_OFLAG;
tp                256 kern/tty_pty.c 		tp->t_lflag = TTYDEF_LFLAG;
tp                257 kern/tty_pty.c 		tp->t_cflag = TTYDEF_CFLAG;
tp                258 kern/tty_pty.c 		tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
tp                259 kern/tty_pty.c 		ttsetwater(tp);		/* would be done in xxparam() */
tp                260 kern/tty_pty.c 	} else if (tp->t_state&TS_XCLUDE && p->p_ucred->cr_uid != 0)
tp                262 kern/tty_pty.c 	if (tp->t_oproc)			/* Ctrlr still around. */
tp                263 kern/tty_pty.c 		tp->t_state |= TS_CARR_ON;
tp                264 kern/tty_pty.c 	while ((tp->t_state & TS_CARR_ON) == 0) {
tp                265 kern/tty_pty.c 		tp->t_state |= TS_WOPEN;
tp                268 kern/tty_pty.c 		error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH,
tp                273 kern/tty_pty.c 	error = (*linesw[tp->t_line].l_open)(dev, tp);
tp                274 kern/tty_pty.c 	ptcwakeup(tp, FREAD|FWRITE);
tp                282 kern/tty_pty.c 	struct tty *tp = pti->pt_tty;
tp                285 kern/tty_pty.c 	error = (*linesw[tp->t_line].l_close)(tp, flag);
tp                286 kern/tty_pty.c 	error |= ttyclose(tp);
tp                287 kern/tty_pty.c 	ptcwakeup(tp, FREAD|FWRITE);
tp                296 kern/tty_pty.c 	struct tty *tp = pti->pt_tty;
tp                301 kern/tty_pty.c 		while (isbackground(p, tp)) {
tp                308 kern/tty_pty.c 			error = ttysleep(tp, &lbolt,
tp                313 kern/tty_pty.c 		if (tp->t_canq.c_cc == 0) {
tp                316 kern/tty_pty.c 			error = ttysleep(tp, &tp->t_canq,
tp                322 kern/tty_pty.c 		while (tp->t_canq.c_cc > 1 && uio->uio_resid > 0)
tp                323 kern/tty_pty.c 			if (ureadc(getc(&tp->t_canq), uio) < 0) {
tp                327 kern/tty_pty.c 		if (tp->t_canq.c_cc == 1)
tp                328 kern/tty_pty.c 			(void) getc(&tp->t_canq);
tp                329 kern/tty_pty.c 		if (tp->t_canq.c_cc)
tp                332 kern/tty_pty.c 		if (tp->t_oproc)
tp                333 kern/tty_pty.c 			error = (*linesw[tp->t_line].l_read)(tp, uio, flag);
tp                334 kern/tty_pty.c 	ptcwakeup(tp, FWRITE);
tp                347 kern/tty_pty.c 	struct tty *tp = pti->pt_tty;
tp                349 kern/tty_pty.c 	if (tp->t_oproc == 0)
tp                351 kern/tty_pty.c 	return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
tp                359 kern/tty_pty.c ptsstart(struct tty *tp)
tp                361 kern/tty_pty.c 	struct pt_softc *pti = pt_softc[minor(tp->t_dev)];
tp                363 kern/tty_pty.c 	if (tp->t_state & TS_TTSTOP)
tp                369 kern/tty_pty.c 	ptcwakeup(tp, FREAD);
tp                373 kern/tty_pty.c ptsstop(struct tty *tp, int flush)
tp                375 kern/tty_pty.c 	struct pt_softc *pti = pt_softc[minor(tp->t_dev)];
tp                391 kern/tty_pty.c 	ptcwakeup(tp, flag);
tp                396 kern/tty_pty.c ptcwakeup(struct tty *tp, int flag)
tp                398 kern/tty_pty.c 	struct pt_softc *pti = pt_softc[minor(tp->t_dev)];
tp                402 kern/tty_pty.c 		wakeup(&tp->t_outq.c_cf);
tp                407 kern/tty_pty.c 		wakeup(&tp->t_rawq.c_cf);
tp                419 kern/tty_pty.c 	struct tty *tp;
tp                427 kern/tty_pty.c 		tp = pti->pt_tty = ttymalloc();
tp                429 kern/tty_pty.c 		tp = pti->pt_tty;
tp                430 kern/tty_pty.c 	if (tp->t_oproc)
tp                432 kern/tty_pty.c 	tp->t_oproc = ptsstart;
tp                433 kern/tty_pty.c 	(void)(*linesw[tp->t_line].l_modem)(tp, 1);
tp                434 kern/tty_pty.c 	tp->t_lflag &= ~EXTPROC;
tp                446 kern/tty_pty.c 	struct tty *tp = pti->pt_tty;
tp                448 kern/tty_pty.c 	(void)(*linesw[tp->t_line].l_modem)(tp, 0);
tp                449 kern/tty_pty.c 	tp->t_state &= ~TS_CARR_ON;
tp                450 kern/tty_pty.c 	tp->t_oproc = 0;		/* mark closed */
tp                458 kern/tty_pty.c 	struct tty *tp = pti->pt_tty;
tp                469 kern/tty_pty.c 		if (tp->t_state&TS_ISOPEN) {
tp                476 kern/tty_pty.c 						sizeof(tp->t_termios));
tp                477 kern/tty_pty.c 					uiomove(&tp->t_termios, cc, uio);
tp                489 kern/tty_pty.c 			if (tp->t_outq.c_cc && (tp->t_state&TS_TTSTOP) == 0)
tp                492 kern/tty_pty.c 		if ((tp->t_state&TS_CARR_ON) == 0)
tp                496 kern/tty_pty.c 		error = tsleep(&tp->t_outq.c_cf, TTIPRI | PCATCH,
tp                504 kern/tty_pty.c 		cc = q_to_b(&tp->t_outq, buf, min(uio->uio_resid, BUFSIZ));
tp                509 kern/tty_pty.c 	if (tp->t_outq.c_cc <= tp->t_lowat) {
tp                510 kern/tty_pty.c 		if (tp->t_state&TS_ASLEEP) {
tp                511 kern/tty_pty.c 			tp->t_state &= ~TS_ASLEEP;
tp                512 kern/tty_pty.c 			wakeup(&tp->t_outq);
tp                514 kern/tty_pty.c 		selwakeup(&tp->t_wsel);
tp                524 kern/tty_pty.c 	struct tty *tp = pti->pt_tty;
tp                532 kern/tty_pty.c 	if ((tp->t_state&TS_ISOPEN) == 0)
tp                535 kern/tty_pty.c 		if (tp->t_canq.c_cc)
tp                537 kern/tty_pty.c 		while (uio->uio_resid > 0 && tp->t_canq.c_cc < TTYHOG - 1) {
tp                540 kern/tty_pty.c 				cc = min(cc, TTYHOG - 1 - tp->t_canq.c_cc);
tp                546 kern/tty_pty.c 				if ((tp->t_state&TS_ISOPEN) == 0)
tp                550 kern/tty_pty.c 				(void) b_to_q((char *)cp, cc, &tp->t_canq);
tp                553 kern/tty_pty.c 		(void) putc(0, &tp->t_canq);
tp                554 kern/tty_pty.c 		ttwakeup(tp);
tp                555 kern/tty_pty.c 		wakeup(&tp->t_canq);
tp                566 kern/tty_pty.c 			if ((tp->t_state&TS_ISOPEN) == 0)
tp                570 kern/tty_pty.c 			if ((tp->t_rawq.c_cc + tp->t_canq.c_cc) >= TTYHOG - 2 &&
tp                571 kern/tty_pty.c 			   (tp->t_canq.c_cc > 0 || !ISSET(tp->t_lflag, ICANON))) {
tp                572 kern/tty_pty.c 				wakeup(&tp->t_rawq);
tp                575 kern/tty_pty.c 			(*linesw[tp->t_line].l_rint)(*cp++, tp);
tp                587 kern/tty_pty.c 	if ((tp->t_state&TS_CARR_ON) == 0)
tp                596 kern/tty_pty.c 	error = tsleep(&tp->t_rawq.c_cf, TTOPRI | PCATCH,
tp                610 kern/tty_pty.c 	struct tty *tp = pti->pt_tty;
tp                613 kern/tty_pty.c 	if (!ISSET(tp->t_state, TS_CARR_ON))
tp                616 kern/tty_pty.c 	if (!ISSET(tp->t_state, TS_ISOPEN))
tp                624 kern/tty_pty.c 		if ((tp->t_outq.c_cc && !ISSET(tp->t_state, TS_TTSTOP)) ||
tp                632 kern/tty_pty.c 		    (tp->t_canq.c_cc == 0) :
tp                633 kern/tty_pty.c 		    ((tp->t_rawq.c_cc + tp->t_canq.c_cc < TTYHOG - 2) ||
tp                634 kern/tty_pty.c 		    (tp->t_canq.c_cc == 0 && ISSET(tp->t_lflag, ICANON))))
tp                670 kern/tty_pty.c 	struct tty *tp;
tp                672 kern/tty_pty.c 	tp = pti->pt_tty;
tp                675 kern/tty_pty.c 	if (ISSET(tp->t_state, TS_ISOPEN)) {
tp                676 kern/tty_pty.c 		if (!ISSET(tp->t_state, TS_TTSTOP))
tp                677 kern/tty_pty.c 			kn->kn_data = tp->t_outq.c_cc;
tp                700 kern/tty_pty.c 	struct tty *tp;
tp                702 kern/tty_pty.c 	tp = pti->pt_tty;
tp                705 kern/tty_pty.c 	if (ISSET(tp->t_state, TS_ISOPEN)) {
tp                707 kern/tty_pty.c 			if (tp->t_canq.c_cc == 0)
tp                708 kern/tty_pty.c 				kn->kn_data = tp->t_canq.c_cn;
tp                709 kern/tty_pty.c 		} else if (tp->t_rawq.c_cc + tp->t_canq.c_cc < TTYHOG-2)
tp                710 kern/tty_pty.c 			kn->kn_data = tp->t_canq.c_cn -
tp                711 kern/tty_pty.c 			    (tp->t_rawq.c_cc + tp->t_canq.c_cc);
tp                755 kern/tty_pty.c 	struct tty *tp = pti->pt_tty;
tp                757 kern/tty_pty.c 	return (tp);
tp                765 kern/tty_pty.c 	struct tty *tp = pti->pt_tty;
tp                766 kern/tty_pty.c 	u_char *cc = tp->t_cc;
tp                782 kern/tty_pty.c 				ptcwakeup(tp, FREAD);
tp                784 kern/tty_pty.c 			tp->t_lflag |= EXTPROC;
tp                786 kern/tty_pty.c 			if ((tp->t_lflag & EXTPROC) &&
tp                789 kern/tty_pty.c 				ptcwakeup(tp, FREAD);
tp                791 kern/tty_pty.c 			tp->t_lflag &= ~EXTPROC;
tp                807 kern/tty_pty.c 				if (tp->t_pgrp == 0)
tp                809 kern/tty_pty.c 				*(int *)data = tp->t_pgrp->pg_id;
tp                818 kern/tty_pty.c 			*(int *)data = tp->t_pgrp ? tp->t_pgrp->pg_id : 0;
tp                844 kern/tty_pty.c 			ttyflush(tp, FREAD|FWRITE);
tp                855 kern/tty_pty.c 			ndflush(&tp->t_outq, tp->t_outq.c_cc);
tp                861 kern/tty_pty.c 			if ((tp->t_lflag&NOFLSH) == 0)
tp                862 kern/tty_pty.c 				ttyflush(tp, FREAD|FWRITE);
tp                863 kern/tty_pty.c 			pgsignal(tp->t_pgrp, *(unsigned int *)data, 1);
tp                865 kern/tty_pty.c 			    ((tp->t_lflag&NOKERNINFO) == 0))
tp                866 kern/tty_pty.c 				ttyinfo(tp);
tp                869 kern/tty_pty.c 	error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
tp                871 kern/tty_pty.c 		 error = ttioctl(tp, cmd, data, flag, p);
tp                877 kern/tty_pty.c 				ptcwakeup(tp, FREAD);
tp                886 kern/tty_pty.c 	if ((tp->t_lflag&EXTPROC) && (pti->pt_flags & PF_PKT)) {
tp                901 kern/tty_pty.c 			ptcwakeup(tp, FREAD);
tp                906 kern/tty_pty.c 	stop = (tp->t_iflag & IXON) && CCEQ(cc[VSTOP], CTRL('s')) &&
tp                913 kern/tty_pty.c 			ptcwakeup(tp, FREAD);
tp                920 kern/tty_pty.c 			ptcwakeup(tp, FREAD);
tp                 68 miscfs/procfs/procfs_status.c 	struct tty *tp;
tp                 93 miscfs/procfs/procfs_status.c 	if ((p->p_flag&P_CONTROLT) && (tp = sess->s_ttyp))
tp                 95 miscfs/procfs/procfs_status.c 		    major(tp->t_dev), minor(tp->t_dev));
tp                157 net/if_gif.c   	u_int8_t tp;
tp                219 net/if_gif.c   		tp = *mtod(m, u_int8_t *);
tp                220 net/if_gif.c   		tp = (tp >> 4) & 0xff;  /* Get the IP version number. */
tp                222 net/if_gif.c   		if (tp == IPVERSION)
tp                226 net/if_gif.c   		if (tp == (IPV6_VERSION >> 4))
tp                289 net/if_sl.c    slopen(dev, tp)
tp                291 net/if_sl.c    	struct tty *tp;
tp                300 net/if_sl.c    	if (tp->t_line == SLIPDISC)
tp                307 net/if_sl.c    			tp->t_sc = (caddr_t)sc;
tp                308 net/if_sl.c    			sc->sc_ttyp = tp;
tp                309 net/if_sl.c    			sc->sc_if.if_baudrate = tp->t_ospeed;
tp                311 net/if_sl.c    			tp->t_state |= TS_ISOPEN | TS_XCLUDE;
tp                313 net/if_sl.c    			ttyflush(tp, FREAD | FWRITE);
tp                324 net/if_sl.c    			if (tp->t_outq.c_cn < 2*SLMTU+2) {
tp                325 net/if_sl.c    				sc->sc_oldbufsize = tp->t_outq.c_cn;
tp                326 net/if_sl.c    				sc->sc_oldbufquot = tp->t_outq.c_cq != 0;
tp                328 net/if_sl.c    				clfree(&tp->t_outq);
tp                329 net/if_sl.c    				error = clalloc(&tp->t_outq, 3*SLMTU, 0);
tp                348 net/if_sl.c    slclose(tp)
tp                349 net/if_sl.c    	struct tty *tp;
tp                354 net/if_sl.c    	ttywflush(tp);
tp                355 net/if_sl.c    	tp->t_line = 0;
tp                356 net/if_sl.c    	sc = (struct sl_softc *)tp->t_sc;
tp                362 net/if_sl.c    		tp->t_sc = NULL;
tp                371 net/if_sl.c    			clfree(&tp->t_outq);
tp                372 net/if_sl.c    			clalloc(&tp->t_outq, sc->sc_oldbufsize, sc->sc_oldbufquot);
tp                385 net/if_sl.c    sltioctl(tp, cmd, data, flag)
tp                386 net/if_sl.c    	struct tty *tp;
tp                391 net/if_sl.c    	struct sl_softc *sc = (struct sl_softc *)tp->t_sc;
tp                482 net/if_sl.c    slstart(tp)
tp                483 net/if_sl.c    	struct tty *tp;
tp                485 net/if_sl.c    	struct sl_softc *sc = (struct sl_softc *)tp->t_sc;
tp                505 net/if_sl.c    		if (tp->t_outq.c_cc != 0) {
tp                506 net/if_sl.c    			(*tp->t_oproc)(tp);
tp                507 net/if_sl.c    			if (tp->t_outq.c_cc > SLIP_HIWAT)
tp                523 net/if_sl.c    		if (tp->t_outq.c_cn - tp->t_outq.c_cc < 2*SLMTU+2)
tp                606 net/if_sl.c    		if (tp->t_outq.c_cc == 0) {
tp                608 net/if_sl.c    			(void) putc(FRAME_END, &tp->t_outq);
tp                641 net/if_sl.c    					    &tp->t_outq))
tp                651 net/if_sl.c    					if (putc(FRAME_ESCAPE, &tp->t_outq))
tp                655 net/if_sl.c    					   &tp->t_outq)) {
tp                656 net/if_sl.c    						(void) unputc(&tp->t_outq);
tp                666 net/if_sl.c    		if (putc(FRAME_END, &tp->t_outq)) {
tp                674 net/if_sl.c    			(void) unputc(&tp->t_outq);
tp                675 net/if_sl.c    			(void) putc(FRAME_END, &tp->t_outq);
tp                728 net/if_sl.c    slinput(c, tp)
tp                730 net/if_sl.c    	struct tty *tp;
tp                741 net/if_sl.c    	sc = (struct sl_softc *)tp->t_sc;
tp                744 net/if_sl.c    	if (c & TTY_ERRORMASK || ((tp->t_state & TS_CARR_ON) == 0 &&
tp                745 net/if_sl.c    	    (tp->t_cflag & CLOCAL) == 0)) {
tp                770 net/if_sl.c    					slclose(tp);
tp                264 net/if_strip.c void	strip_resetradio(struct st_softc *sc, struct tty *tp);
tp                265 net/if_strip.c void	strip_proberadio(struct st_softc *sc, struct tty *tp);
tp                435 net/if_strip.c stripopen(dev, tp)
tp                437 net/if_strip.c 	struct tty *tp;
tp                450 net/if_strip.c 	if (tp->t_line == STRIPDISC)
tp                457 net/if_strip.c 			tp->t_sc = (caddr_t)sc;
tp                458 net/if_strip.c 			sc->sc_ttyp = tp;
tp                459 net/if_strip.c 			sc->sc_if.if_baudrate = tp->t_ospeed;
tp                460 net/if_strip.c 			ttyflush(tp, FREAD | FWRITE);
tp                471 net/if_strip.c 			if (tp->t_outq.c_cn < STRIP_MTU_ONWIRE) {
tp                472 net/if_strip.c 				sc->sc_oldbufsize = tp->t_outq.c_cn;
tp                473 net/if_strip.c 				sc->sc_oldbufquot = tp->t_outq.c_cq != 0;
tp                475 net/if_strip.c 				clfree(&tp->t_outq);
tp                476 net/if_strip.c 				error = clalloc(&tp->t_outq, 3*SLMTU, 0);
tp                486 net/if_strip.c 			strip_resetradio(sc, tp);
tp                499 net/if_strip.c stripclose(tp)
tp                500 net/if_strip.c 	struct tty *tp;
tp                505 net/if_strip.c 	ttywflush(tp);
tp                508 net/if_strip.c 	tp->t_line = 0;
tp                509 net/if_strip.c 	sc = (struct st_softc *)tp->t_sc;
tp                513 net/if_strip.c 		tp->t_sc = NULL;
tp                531 net/if_strip.c 		clfree(&tp->t_outq);
tp                532 net/if_strip.c 		clalloc(&tp->t_outq, sc->sc_oldbufsize, sc->sc_oldbufquot);
tp                544 net/if_strip.c striptioctl(tp, cmd, data, flag)
tp                545 net/if_strip.c 	struct tty *tp;
tp                550 net/if_strip.c 	struct st_softc *sc = (struct st_softc *)tp->t_sc;
tp                572 net/if_strip.c 	struct tty *tp = sc->sc_ttyp;
tp                598 net/if_strip.c 			   len, &tp->t_outq)) {
tp                626 net/if_strip.c 	struct tty *tp = sc->sc_ttyp;
tp                633 net/if_strip.c 	if (b_to_q((ttychar_t *)hdr, STRIP_HDRLEN, &tp->t_outq)) {
tp                666 net/if_strip.c 	if (putc(STRIP_FRAME_END, &tp->t_outq)) {
tp                674 net/if_strip.c 		(void) unputc(&tp->t_outq);
tp                675 net/if_strip.c 		(void) putc(STRIP_FRAME_END, &tp->t_outq);
tp                687 net/if_strip.c 		strip_proberadio(sc, tp);
tp                887 net/if_strip.c stripstart(tp)
tp                888 net/if_strip.c 	struct tty *tp;
tp                890 net/if_strip.c 	struct st_softc *sc = (struct st_softc *)tp->t_sc;
tp                909 net/if_strip.c 	if (((tp->t_state & TS_CARR_ON) == 0 && (tp->t_cflag & CLOCAL) == 0)
tp                910 net/if_strip.c 	    || sc == NULL || tp != (struct tty *) sc->sc_ttyp) {
tp                911 net/if_strip.c 		if (tp->t_oproc != NULL)
tp                912 net/if_strip.c 			(*tp->t_oproc)(tp);
tp                919 net/if_strip.c 	if (CCOUNT(&tp->t_outq) != 0) {
tp                920 net/if_strip.c 		(*tp->t_oproc)(tp);
tp                923 net/if_strip.c 	while (CCOUNT(&tp->t_outq) < SLIP_HIWAT) {
tp                942 net/if_strip.c 		if (tp->t_outq.c_cn - tp->t_outq.c_cc < STRIP_MTU_ONWIRE + 4)
tp               1057 net/if_strip.c     if (tp->t_oproc != NULL)
tp               1058 net/if_strip.c 	(*tp->t_oproc)(tp);
tp               1115 net/if_strip.c stripinput(c, tp)
tp               1117 net/if_strip.c 	struct tty *tp;
tp               1128 net/if_strip.c 	sc = (struct st_softc *)tp->t_sc;
tp               1131 net/if_strip.c 	if (c & TTY_ERRORMASK || ((tp->t_state & TS_CARR_ON) == 0 &&
tp               1132 net/if_strip.c 	    (tp->t_cflag & CLOCAL) == 0)) {
tp               1357 net/if_strip.c strip_resetradio(sc, tp)
tp               1359 net/if_strip.c 	struct tty *tp;
tp               1374 net/if_strip.c 	if (tp == NULL)
tp               1377 net/if_strip.c 	if ((i = b_to_q(InitString, sizeof(InitString) - 1, &tp->t_outq))) {
tp               1395 net/if_strip.c 	(*sc->sc_ttyp->t_oproc)(tp);
tp               1410 net/if_strip.c strip_proberadio(sc, tp)
tp               1412 net/if_strip.c 	struct tty *tp;
tp               1421 net/if_strip.c 	if (tp == NULL) {
tp               1426 net/if_strip.c 	overflow = b_to_q((ttychar_t *)strip_probestr, 2, &tp->t_outq);
tp               1459 net/if_strip.c     struct tty *tp =  sc->sc_ttyp;
tp               1464 net/if_strip.c     stripstart(tp);
tp               1495 net/if_strip.c 	struct tty *tp =  sc->sc_ttyp;
tp               1523 net/if_strip.c 		if (tp == NULL)
tp               1526 net/if_strip.c 		(*tp->t_oproc)(tp);
tp                207 net/if_trunk.c 	struct trunk_port *tp;
tp                216 net/if_trunk.c 	while ((tp = SLIST_FIRST(&tr->tr_ports)) != NULL) {
tp                217 net/if_trunk.c 		if ((error = trunk_port_destroy(tp)) != 0) {
tp                253 net/if_trunk.c 	struct trunk_port *tp;
tp                260 net/if_trunk.c 	SLIST_FOREACH(tp, &tr->tr_ports, tp_entries)
tp                261 net/if_trunk.c 		cap &= tp->tp_capabilities;
tp                272 net/if_trunk.c trunk_port_lladdr(struct trunk_port *tp, u_int8_t *lladdr)
tp                274 net/if_trunk.c 	struct ifnet *ifp = tp->tp_if;
tp                301 net/if_trunk.c 	struct trunk_port *tp;
tp                323 net/if_trunk.c 	if ((tp = malloc(sizeof(struct trunk_port),
tp                327 net/if_trunk.c 	bzero(tp, sizeof(struct trunk_port));
tp                332 net/if_trunk.c 			tp->tp_flags |= TRUNK_PORT_STACK;
tp                335 net/if_trunk.c 				free(tp, M_DEVBUF);
tp                342 net/if_trunk.c 	tp->tp_iftype = ifp->if_type;
tp                344 net/if_trunk.c 	ifp->if_tp = (caddr_t)tp;
tp                345 net/if_trunk.c 	tp->tp_watchdog = ifp->if_watchdog;
tp                347 net/if_trunk.c 	tp->tp_ioctl = ifp->if_ioctl;
tp                350 net/if_trunk.c 	tp->tp_if = ifp;
tp                351 net/if_trunk.c 	tp->tp_trunk = tr;
tp                354 net/if_trunk.c 	bcopy(((struct arpcom *)ifp)->ac_enaddr, tp->tp_lladdr, ETHER_ADDR_LEN);
tp                357 net/if_trunk.c 		tr->tr_primary = tp;
tp                358 net/if_trunk.c 		tp->tp_flags |= TRUNK_PORT_MASTER;
tp                359 net/if_trunk.c 		trunk_lladdr(&tr->tr_ac, tp->tp_lladdr);
tp                363 net/if_trunk.c 	trunk_port_lladdr(tp, tr->tr_primary->tp_lladdr);
tp                366 net/if_trunk.c 	SLIST_INSERT_HEAD(&tr->tr_ports, tp, tp_entries);
tp                373 net/if_trunk.c 	trunk_ether_cmdmulti(tp, SIOCADDMULTI);
tp                377 net/if_trunk.c 		tp->lh_cookie = hook_establish(ifp->if_linkstatehooks, 1,
tp                378 net/if_trunk.c 		    trunk_port_state, tp);
tp                381 net/if_trunk.c 		error = (*tr->tr_port_create)(tp);
tp                390 net/if_trunk.c 	struct trunk_port *tp;
tp                393 net/if_trunk.c 	SLIST_FOREACH(tp, &tr->tr_ports, tp_entries) {
tp                394 net/if_trunk.c 		if (tp->tp_flags & TRUNK_PORT_STACK) {
tp                395 net/if_trunk.c 			tr_ptr = (struct trunk_softc *)tp->tp_if->if_softc;
tp                404 net/if_trunk.c trunk_port_destroy(struct trunk_port *tp)
tp                406 net/if_trunk.c 	struct trunk_softc *tr = (struct trunk_softc *)tp->tp_trunk;
tp                408 net/if_trunk.c 	struct ifnet *ifp = tp->tp_if;
tp                411 net/if_trunk.c 		(*tr->tr_port_destroy)(tp);
tp                414 net/if_trunk.c 	trunk_ether_cmdmulti(tp, SIOCDELMULTI);
tp                423 net/if_trunk.c 	ifp->if_type = tp->tp_iftype;
tp                424 net/if_trunk.c 	ifp->if_watchdog = tp->tp_watchdog;
tp                425 net/if_trunk.c 	ifp->if_ioctl = tp->tp_ioctl;
tp                429 net/if_trunk.c 		hook_disestablish(ifp->if_linkstatehooks, tp->lh_cookie);
tp                432 net/if_trunk.c 	SLIST_REMOVE(&tr->tr_ports, tp, trunk_port, tp_entries);
tp                436 net/if_trunk.c 	if (tp == tr->tr_primary) {
tp                455 net/if_trunk.c 	trunk_port_lladdr(tp, tp->tp_lladdr);
tp                457 net/if_trunk.c 	free(tp, M_DEVBUF);
tp                469 net/if_trunk.c 	struct trunk_port *tp;
tp                474 net/if_trunk.c 	if ((tp = (struct trunk_port *)ifp->if_tp) == NULL ||
tp                475 net/if_trunk.c 	    (tr = (struct trunk_softc *)tp->tp_trunk) == NULL)
tp                478 net/if_trunk.c 	if (tp->tp_watchdog != NULL)
tp                479 net/if_trunk.c 		(*tp->tp_watchdog)(ifp);
tp                488 net/if_trunk.c 	struct trunk_port *tp;
tp                495 net/if_trunk.c 	    (tp = (struct trunk_port *)ifp->if_tp) == NULL ||
tp                496 net/if_trunk.c 	    (tr = (struct trunk_softc *)tp->tp_trunk) == NULL)
tp                508 net/if_trunk.c 		if ((tp = trunk_port_get(rp->rp_flags & TRUNK_PORT_GLOBAL ?
tp                514 net/if_trunk.c 		trunk_port2req(tp, rp);
tp                526 net/if_trunk.c 	if (tp != NULL)
tp                527 net/if_trunk.c 		return ((*tp->tp_ioctl)(ifp, cmd, data));
tp                535 net/if_trunk.c 	struct trunk_port *tp;
tp                537 net/if_trunk.c 	if ((tp = (struct trunk_port *)ifp->if_tp) == NULL)
tp                540 net/if_trunk.c 	trunk_port_destroy(tp);
tp                546 net/if_trunk.c 	struct trunk_port *tp;
tp                551 net/if_trunk.c 		SLIST_FOREACH(tp, &tr->tr_ports, tp_entries) {
tp                552 net/if_trunk.c 			if (tp->tp_if == ifp)
tp                553 net/if_trunk.c 				return (tp);
tp                558 net/if_trunk.c 			SLIST_FOREACH(tp, &tr_ptr->tr_ports, tp_entries) {
tp                559 net/if_trunk.c 				if (tp->tp_if == ifp)
tp                560 net/if_trunk.c 					return (tp);
tp                569 net/if_trunk.c trunk_port2req(struct trunk_port *tp, struct trunk_reqport *rp)
tp                571 net/if_trunk.c 	struct trunk_softc *tr = (struct trunk_softc *)tp->tp_trunk;
tp                573 net/if_trunk.c 	strlcpy(rp->rp_portname, tp->tp_if->if_xname, sizeof(rp->rp_portname));
tp                574 net/if_trunk.c 	rp->rp_prio = tp->tp_prio;
tp                575 net/if_trunk.c 	rp->rp_flags = tp->tp_flags;
tp                576 net/if_trunk.c 	if (TRUNK_PORTACTIVE(tp))
tp                588 net/if_trunk.c 	struct trunk_port *tp;
tp                603 net/if_trunk.c 		tp = SLIST_FIRST(&tr->tr_ports);
tp                604 net/if_trunk.c 		while (tp && ra->ra_size >=
tp                606 net/if_trunk.c 			trunk_port2req(tp, &rpbuf);
tp                613 net/if_trunk.c 			tp = SLIST_NEXT(tp, tp_entries);
tp                652 net/if_trunk.c 		if ((tp = trunk_port_get(rp->rp_flags & TRUNK_PORT_GLOBAL ?
tp                658 net/if_trunk.c 		trunk_port2req(tp, rp);
tp                684 net/if_trunk.c 		if ((tp = trunk_port_get(rp->rp_flags & TRUNK_PORT_GLOBAL ?
tp                690 net/if_trunk.c 		error = trunk_port_destroy(tp);
tp                723 net/if_trunk.c 		SLIST_FOREACH(tp, &tr->tr_ports, tp_entries)
tp                724 net/if_trunk.c 			trunk_port_lladdr(tp, ifr->ifr_addr.sa_data);
tp                843 net/if_trunk.c trunk_ether_cmdmulti(struct trunk_port *tp, u_long cmd)
tp                845 net/if_trunk.c 	struct trunk_softc *tr = (struct trunk_softc *)tp->tp_trunk;
tp                851 net/if_trunk.c 	bcopy(tp->tp_ifname, ifr->ifr_name, IFNAMSIZ);
tp                855 net/if_trunk.c 		if ((ret = tp->tp_ioctl(tp->tp_if, cmd, (caddr_t)ifr)) != 0) {
tp                858 net/if_trunk.c 				    tr->tr_ifname, cmd, tp->tp_ifname, ret);
tp                872 net/if_trunk.c 	struct trunk_port *tp;
tp                875 net/if_trunk.c 	SLIST_FOREACH(tp, &tr->tr_ports, tp_entries) {
tp                876 net/if_trunk.c 		bcopy(tp->tp_ifname, ifr->ifr_name, IFNAMSIZ);
tp                877 net/if_trunk.c 		if ((ret = tp->tp_ioctl(tp->tp_if, cmd, data)) != 0) {
tp                880 net/if_trunk.c 				    tr->tr_ifname, cmd, tp->tp_ifname, ret);
tp               1046 net/if_trunk.c 	struct trunk_port *tp;
tp               1055 net/if_trunk.c 	if ((tp = (struct trunk_port *)ifp->if_tp) == NULL ||
tp               1056 net/if_trunk.c 	    (tr = (struct trunk_softc *)tp->tp_trunk) == NULL) {
tp               1064 net/if_trunk.c 	error = (*tr->tr_input)(tr, tp, eh, m);
tp               1100 net/if_trunk.c 	struct trunk_port *tp;
tp               1105 net/if_trunk.c 	tp = tr->tr_primary;
tp               1106 net/if_trunk.c 	if (tp != NULL && tp->tp_if->if_flags & IFF_UP)
tp               1113 net/if_trunk.c 	struct trunk_port *tp = (struct trunk_port *)arg;
tp               1116 net/if_trunk.c 	if (tp != NULL)
tp               1117 net/if_trunk.c 		tr = (struct trunk_softc *)tp->tp_trunk;
tp               1121 net/if_trunk.c 		(*tr->tr_linkstate)(tp);
tp               1122 net/if_trunk.c 	trunk_link_active(tr, tp);
tp               1126 net/if_trunk.c trunk_link_active(struct trunk_softc *tr, struct trunk_port *tp)
tp               1135 net/if_trunk.c 	if (tp == NULL)
tp               1137 net/if_trunk.c 	if (TRUNK_PORTACTIVE(tp)) {
tp               1138 net/if_trunk.c 		rval = tp;
tp               1141 net/if_trunk.c 	if ((tp_next = SLIST_NEXT(tp, tp_entries)) != NULL &&
tp               1186 net/if_trunk.c 	struct trunk_port *tp;
tp               1197 net/if_trunk.c 	tp = SLIST_FIRST(&tr->tr_ports);
tp               1198 net/if_trunk.c 	tr->tr_psc = (caddr_t)tp;
tp               1211 net/if_trunk.c trunk_rr_port_destroy(struct trunk_port *tp)
tp               1213 net/if_trunk.c 	struct trunk_softc *tr = (struct trunk_softc *)tp->tp_trunk;
tp               1215 net/if_trunk.c 	if (tp == (struct trunk_port *)tr->tr_psc)
tp               1222 net/if_trunk.c 	struct trunk_port *tp = (struct trunk_port *)tr->tr_psc, *tp_next;
tp               1225 net/if_trunk.c 	if (tp == NULL && (tp = trunk_link_active(tr, NULL)) == NULL)
tp               1229 net/if_trunk.c 	if ((error = trunk_enqueue(tp->tp_if, m)) != 0)
tp               1233 net/if_trunk.c 	tp_next = trunk_link_active(tr, SLIST_NEXT(tp, tp_entries));
tp               1240 net/if_trunk.c trunk_rr_input(struct trunk_softc *tr, struct trunk_port *tp,
tp               1279 net/if_trunk.c 	struct trunk_port *tp;
tp               1282 net/if_trunk.c 	if ((tp = trunk_link_active(tr, tr->tr_primary)) == NULL)
tp               1286 net/if_trunk.c 	return (trunk_enqueue(tp->tp_if, m));
tp               1290 net/if_trunk.c trunk_fail_input(struct trunk_softc *tr, struct trunk_port *tp,
tp               1296 net/if_trunk.c 	if (tp == tr->tr_primary) {
tp               1307 net/if_trunk.c 		if ((tmp_tp == NULL || tmp_tp == tp)) {
tp               1354 net/if_trunk.c trunk_lb_porttable(struct trunk_softc *tr, struct trunk_port *tp)
tp               1362 net/if_trunk.c 		if (tp_next == tp)
tp               1376 net/if_trunk.c trunk_lb_port_create(struct trunk_port *tp)
tp               1378 net/if_trunk.c 	struct trunk_softc *tr = (struct trunk_softc *)tp->tp_trunk;
tp               1383 net/if_trunk.c trunk_lb_port_destroy(struct trunk_port *tp)
tp               1385 net/if_trunk.c 	struct trunk_softc *tr = (struct trunk_softc *)tp->tp_trunk;
tp               1386 net/if_trunk.c 	trunk_lb_porttable(tr, tp);
tp               1405 net/if_trunk.c 	struct trunk_port *tp = NULL;
tp               1412 net/if_trunk.c 	tp = lb->lb_ports[idx];
tp               1418 net/if_trunk.c 	if ((tp = trunk_link_active(tr, tp)) == NULL)
tp               1422 net/if_trunk.c 	return (trunk_enqueue(tp->tp_if, m));
tp               1426 net/if_trunk.c trunk_lb_input(struct trunk_softc *tr, struct trunk_port *tp,
tp                164 net/if_tun.c   	struct tun_softc	*tp;
tp                169 net/if_tun.c   	tp = malloc(sizeof(*tp), M_DEVBUF, M_NOWAIT);
tp                170 net/if_tun.c   	if (!tp)
tp                172 net/if_tun.c   	bzero(tp, sizeof(*tp));
tp                174 net/if_tun.c   	tp->tun_unit = unit;
tp                175 net/if_tun.c   	tp->tun_flags = TUN_INITED|TUN_STAYUP;
tp                178 net/if_tun.c   	tp->arpcom.ac_enaddr[0] = 0x00;
tp                179 net/if_tun.c   	tp->arpcom.ac_enaddr[1] = 0xbd;
tp                185 net/if_tun.c   	bcopy(&macaddr_rnd, &tp->arpcom.ac_enaddr[2], sizeof(u_int32_t));
tp                186 net/if_tun.c   	tp->arpcom.ac_enaddr[5] = (u_char)unit + 1;
tp                188 net/if_tun.c   	ifp = &tp->tun_if;
tp                191 net/if_tun.c   	ifp->if_softc = tp;
tp                198 net/if_tun.c   		tp->tun_flags &= ~TUN_LAYER2;
tp                209 net/if_tun.c   		tp->tun_flags |= TUN_LAYER2;
tp                219 net/if_tun.c   	LIST_INSERT_HEAD(&tun_softc_list, tp, tun_list);
tp                228 net/if_tun.c   	struct tun_softc	*tp = ifp->if_softc;
tp                231 net/if_tun.c   	tun_wakeup(tp);
tp                234 net/if_tun.c   	klist_invalidate(&tp->tun_rsel.si_note);
tp                235 net/if_tun.c   	klist_invalidate(&tp->tun_wsel.si_note);
tp                239 net/if_tun.c   	LIST_REMOVE(tp, tun_list);
tp                242 net/if_tun.c   	if (tp->tun_flags & TUN_LAYER2)
tp                247 net/if_tun.c   	free(tp, M_DEVBUF);
tp                254 net/if_tun.c   	struct tun_softc *tp;
tp                256 net/if_tun.c   	LIST_FOREACH(tp, &tun_softc_list, tun_list)
tp                257 net/if_tun.c   		if (tp->tun_unit == unit)
tp                258 net/if_tun.c   			return (tp);
tp                263 net/if_tun.c   tun_switch(struct tun_softc *tp, int flags)
tp                265 net/if_tun.c   	struct ifnet	*ifp = &tp->tun_if;
tp                268 net/if_tun.c   	if ((tp->tun_flags & TUN_LAYER2) == (flags & TUN_LAYER2))
tp                272 net/if_tun.c   	unit = tp->tun_unit;
tp                273 net/if_tun.c   	open = tp->tun_flags & (TUN_OPEN|TUN_NBIO|TUN_ASYNC);
tp                284 net/if_tun.c   		if ((tp = tun_lookup(unit)) == NULL)
tp                287 net/if_tun.c   		tp->tun_flags |= open;
tp                288 net/if_tun.c   		TUNDEBUG(("%s: already open\n", tp->tun_if.if_xname));
tp                300 net/if_tun.c   	struct tun_softc	*tp;
tp                307 net/if_tun.c   	if ((tp = tun_lookup(minor(dev))) == NULL) {	/* create on demand */
tp                314 net/if_tun.c   		if ((tp = tun_lookup(minor(dev))) == NULL)
tp                316 net/if_tun.c   		tp->tun_flags &= ~TUN_STAYUP;
tp                319 net/if_tun.c   	if (tp->tun_flags & TUN_OPEN)
tp                322 net/if_tun.c   	ifp = &tp->tun_if;
tp                323 net/if_tun.c   	tp->tun_flags |= TUN_OPEN;
tp                343 net/if_tun.c   	struct tun_softc	*tp;
tp                346 net/if_tun.c   	if ((tp = tun_lookup(minor(dev))) == NULL)
tp                349 net/if_tun.c   	ifp = &tp->tun_if;
tp                350 net/if_tun.c   	tp->tun_flags &= ~(TUN_OPEN|TUN_NBIO|TUN_ASYNC);
tp                362 net/if_tun.c   	if (!(tp->tun_flags & TUN_STAYUP))
tp                365 net/if_tun.c   		tp->tun_pgid = 0;
tp                366 net/if_tun.c   		selwakeup(&tp->tun_rsel);
tp                367 net/if_tun.c   		KNOTE(&tp->tun_rsel.si_note, 0);
tp                374 net/if_tun.c   tuninit(struct tun_softc *tp)
tp                376 net/if_tun.c   	struct ifnet	*ifp = &tp->tun_if;
tp                384 net/if_tun.c   	tp->tun_flags &= ~(TUN_IASET|TUN_DSTADDR|TUN_BRDADDR);
tp                392 net/if_tun.c   				tp->tun_flags |= TUN_IASET;
tp                397 net/if_tun.c   					tp->tun_flags |= TUN_DSTADDR;
tp                399 net/if_tun.c   				tp->tun_flags &= ~TUN_DSTADDR;
tp                404 net/if_tun.c   					tp->tun_flags |= TUN_BRDADDR;
tp                406 net/if_tun.c   				tp->tun_flags &= ~TUN_BRDADDR;
tp                415 net/if_tun.c   				tp->tun_flags |= TUN_IASET;
tp                421 net/if_tun.c   					tp->tun_flags |= TUN_DSTADDR;
tp                423 net/if_tun.c   				tp->tun_flags &= ~TUN_DSTADDR;
tp                437 net/if_tun.c   	struct tun_softc	*tp = (struct tun_softc *)(ifp->if_softc);
tp                442 net/if_tun.c   	if (tp->tun_flags & TUN_LAYER2)
tp                443 net/if_tun.c   		if ((error = ether_ioctl(ifp, &tp->arpcom, cmd, data)) > 0) {
tp                449 net/if_tun.c   		tuninit(tp);
tp                451 net/if_tun.c   		if (tp->tun_flags & TUN_LAYER2)
tp                455 net/if_tun.c   				arp_ifinit(&tp->arpcom, (struct ifaddr *)data);
tp                463 net/if_tun.c   		tuninit(tp);
tp                467 net/if_tun.c   		tuninit(tp);
tp                483 net/if_tun.c   		if (tp->tun_flags & TUN_LAYER2) {
tp                485 net/if_tun.c   			    ether_addmulti(ifr, &tp->arpcom) :
tp                486 net/if_tun.c   			    ether_delmulti(ifr, &tp->arpcom);
tp                515 net/if_tun.c   		error = tun_switch(tp,
tp                532 net/if_tun.c   	struct tun_softc	*tp = ifp->if_softc;
tp                543 net/if_tun.c   	if ((tp->tun_flags & TUN_READY) != TUN_READY) {
tp                545 net/if_tun.c   		     tp->tun_flags));
tp                550 net/if_tun.c   	if (tp->tun_flags & TUN_LAYER2)
tp                575 net/if_tun.c   	tun_wakeup(tp);
tp                580 net/if_tun.c   tun_wakeup(struct tun_softc *tp)
tp                582 net/if_tun.c   	if (tp->tun_flags & TUN_RWAIT) {
tp                583 net/if_tun.c   		tp->tun_flags &= ~TUN_RWAIT;
tp                584 net/if_tun.c   		wakeup((caddr_t)tp);
tp                586 net/if_tun.c   	if (tp->tun_flags & TUN_ASYNC && tp->tun_pgid)
tp                587 net/if_tun.c   		csignal(tp->tun_pgid, SIGIO,
tp                588 net/if_tun.c   		    tp->tun_siguid, tp->tun_sigeuid);
tp                589 net/if_tun.c   	selwakeup(&tp->tun_rsel);
tp                590 net/if_tun.c   	KNOTE(&tp->tun_rsel.si_note, 0);
tp                600 net/if_tun.c   	struct tun_softc	*tp;
tp                604 net/if_tun.c   	if ((tp = tun_lookup(minor(dev))) == NULL)
tp                615 net/if_tun.c   		tp->tun_if.if_mtu = tunp->mtu;
tp                616 net/if_tun.c   		tp->tun_if.if_type = tunp->type;
tp                617 net/if_tun.c   		tp->tun_if.if_flags = 
tp                619 net/if_tun.c   		    (tp->tun_if.if_flags & ~TUN_IFF_FLAGS);
tp                620 net/if_tun.c   		tp->tun_if.if_baudrate = tunp->baudrate;
tp                624 net/if_tun.c   		tunp->mtu = tp->tun_if.if_mtu;
tp                625 net/if_tun.c   		tunp->type = tp->tun_if.if_type;
tp                626 net/if_tun.c   		tunp->flags = tp->tun_if.if_flags;
tp                627 net/if_tun.c   		tunp->baudrate = tp->tun_if.if_baudrate;
tp                641 net/if_tun.c   			tp->tun_if.if_flags &= ~TUN_IFF_FLAGS;
tp                642 net/if_tun.c   			tp->tun_if.if_flags |= *(int *)data & TUN_IFF_FLAGS;
tp                652 net/if_tun.c   			tp->tun_flags |= TUN_NBIO;
tp                654 net/if_tun.c   			tp->tun_flags &= ~TUN_NBIO;
tp                658 net/if_tun.c   			tp->tun_flags |= TUN_ASYNC;
tp                660 net/if_tun.c   			tp->tun_flags &= ~TUN_ASYNC;
tp                663 net/if_tun.c   		IFQ_POLL(&tp->tun_if.if_snd, m);
tp                670 net/if_tun.c   		tp->tun_pgid = *(int *)data;
tp                671 net/if_tun.c   		tp->tun_siguid = p->p_cred->p_ruid;
tp                672 net/if_tun.c   		tp->tun_sigeuid = p->p_ucred->cr_uid;
tp                675 net/if_tun.c   		*(int *)data = tp->tun_pgid;
tp                679 net/if_tun.c   		if (!(tp->tun_flags & TUN_LAYER2)) {
tp                683 net/if_tun.c   		bcopy(tp->arpcom.ac_enaddr, data,
tp                684 net/if_tun.c   		    sizeof(tp->arpcom.ac_enaddr));
tp                688 net/if_tun.c   		if (!(tp->tun_flags & TUN_LAYER2)) {
tp                692 net/if_tun.c   		bcopy(data, tp->arpcom.ac_enaddr,
tp                693 net/if_tun.c   		    sizeof(tp->arpcom.ac_enaddr));
tp                710 net/if_tun.c   	struct tun_softc	*tp;
tp                715 net/if_tun.c   	if ((tp = tun_lookup(minor(dev))) == NULL)
tp                718 net/if_tun.c   	ifp = &tp->tun_if;
tp                720 net/if_tun.c   	if ((tp->tun_flags & TUN_READY) != TUN_READY) {
tp                721 net/if_tun.c   		TUNDEBUG(("%s: not ready %#x\n", ifp->if_xname, tp->tun_flags));
tp                725 net/if_tun.c   	tp->tun_flags &= ~TUN_RWAIT;
tp                729 net/if_tun.c   		while ((tp->tun_flags & TUN_READY) != TUN_READY)
tp                730 net/if_tun.c   			if ((error = tsleep((caddr_t)tp,
tp                737 net/if_tun.c   			if (tp->tun_flags & TUN_NBIO && ioflag & IO_NDELAY) {
tp                741 net/if_tun.c   			tp->tun_flags |= TUN_RWAIT;
tp                742 net/if_tun.c   			if ((error = tsleep((caddr_t)tp,
tp                775 net/if_tun.c   	struct tun_softc	*tp;
tp                783 net/if_tun.c   	if ((tp = tun_lookup(minor(dev))) == NULL)
tp                786 net/if_tun.c   	ifp = &tp->tun_if;
tp                790 net/if_tun.c   	    (tp->tun_flags & TUN_LAYER2 ? ETHER_HDR_LEN : sizeof(*th))) {
tp                812 net/if_tun.c   	if (tp->tun_flags & TUN_LAYER2) {
tp                858 net/if_tun.c   	if (tp->tun_flags & TUN_LAYER2) {
tp                921 net/if_tun.c   	struct tun_softc	*tp;
tp                925 net/if_tun.c   	if ((tp = tun_lookup(minor(dev))) == NULL)
tp                928 net/if_tun.c   	ifp = &tp->tun_if;
tp                941 net/if_tun.c   			selrecord(p, &tp->tun_rsel);
tp                964 net/if_tun.c   	struct tun_softc	*tp;
tp                967 net/if_tun.c   	if ((tp = tun_lookup(minor(dev))) == NULL)
tp                970 net/if_tun.c   	ifp = &tp->tun_if;
tp                978 net/if_tun.c   			klist = &tp->tun_rsel.si_note;
tp                982 net/if_tun.c   			klist = &tp->tun_wsel.si_note;
tp                989 net/if_tun.c   	kn->kn_hook = (caddr_t)tp;
tp               1002 net/if_tun.c   	struct tun_softc	*tp;
tp               1004 net/if_tun.c   	tp = (struct tun_softc *)kn->kn_hook;
tp               1007 net/if_tun.c   		SLIST_REMOVE(&tp->tun_rsel.si_note, kn, knote, kn_selnext);
tp               1015 net/if_tun.c   	struct tun_softc	*tp;
tp               1024 net/if_tun.c   	tp = (struct tun_softc *)kn->kn_hook;
tp               1025 net/if_tun.c   	ifp = &tp->tun_if;
tp               1046 net/if_tun.c   	struct tun_softc	*tp;
tp               1048 net/if_tun.c   	tp = (struct tun_softc *)kn->kn_hook;
tp               1051 net/if_tun.c   		SLIST_REMOVE(&tp->tun_wsel.si_note, kn, knote, kn_selnext);
tp               1058 net/if_tun.c   	struct tun_softc	*tp;
tp               1066 net/if_tun.c   	tp = (struct tun_softc *)kn->kn_hook;
tp               1067 net/if_tun.c   	ifp = &tp->tun_if;
tp               1084 net/if_tun.c   	struct tun_softc	*tp = ifp->if_softc;
tp               1087 net/if_tun.c   	if (!(tp->tun_flags & TUN_LAYER2) &&
tp               1094 net/if_tun.c   		if (tp->tun_flags & TUN_LAYER2) {
tp               1101 net/if_tun.c   		tun_wakeup(tp);
tp                129 net/ppp_tty.c  int	pppopen(dev_t dev, struct tty *tp);
tp                130 net/ppp_tty.c  int	pppclose(struct tty *tp, int flag);
tp                131 net/ppp_tty.c  int	pppread(struct tty *tp, struct uio *uio, int flag);
tp                132 net/ppp_tty.c  int	pppwrite(struct tty *tp, struct uio *uio, int flag);
tp                133 net/ppp_tty.c  int	ppptioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
tp                135 net/ppp_tty.c  int	pppinput(int c, struct tty *tp);
tp                136 net/ppp_tty.c  int	pppstart(struct tty *tp, int);
tp                182 net/ppp_tty.c  pppopen(dev, tp)
tp                184 net/ppp_tty.c      struct tty *tp;
tp                195 net/ppp_tty.c      if (tp->t_line == PPPDISC) {
tp                196 net/ppp_tty.c  	sc = (struct ppp_softc *) tp->t_sc;
tp                197 net/ppp_tty.c  	if (sc != NULL && sc->sc_devp == (void *) tp) {
tp                218 net/ppp_tty.c      sc->sc_devp = (void *) tp;
tp                225 net/ppp_tty.c      sc->sc_if.if_baudrate = tp->t_ospeed;
tp                227 net/ppp_tty.c      tp->t_sc = (caddr_t) sc;
tp                228 net/ppp_tty.c      ttyflush(tp, FREAD | FWRITE);
tp                241 net/ppp_tty.c  pppclose(tp, flag)
tp                242 net/ppp_tty.c      struct tty *tp;
tp                249 net/ppp_tty.c      ttyflush(tp, FREAD|FWRITE);
tp                250 net/ppp_tty.c      tp->t_line = 0;
tp                251 net/ppp_tty.c      sc = (struct ppp_softc *) tp->t_sc;
tp                253 net/ppp_tty.c  	tp->t_sc = NULL;
tp                254 net/ppp_tty.c  	if (tp == (struct tty *) sc->sc_devp) {
tp                292 net/ppp_tty.c  pppread(tp, uio, flag)
tp                293 net/ppp_tty.c      struct tty *tp;
tp                297 net/ppp_tty.c      struct ppp_softc *sc = (struct ppp_softc *)tp->t_sc;
tp                310 net/ppp_tty.c  	if (tp != (struct tty *) sc->sc_devp || tp->t_line != PPPDISC) {
tp                316 net/ppp_tty.c  	if ((tp->t_state & TS_CARR_ON) == 0 && (tp->t_cflag & CLOCAL) == 0
tp                317 net/ppp_tty.c  	    && (tp->t_state & TS_ISOPEN)) {
tp                321 net/ppp_tty.c  	if (tp->t_state & TS_ASYNC || flag & IO_NDELAY) {
tp                325 net/ppp_tty.c  	error = ttysleep(tp, (caddr_t)&tp->t_rawq, TTIPRI|PCATCH, ttyin, 0);
tp                333 net/ppp_tty.c      getc(&tp->t_canq);
tp                350 net/ppp_tty.c  pppwrite(tp, uio, flag)
tp                351 net/ppp_tty.c      struct tty *tp;
tp                355 net/ppp_tty.c      struct ppp_softc *sc = (struct ppp_softc *)tp->t_sc;
tp                360 net/ppp_tty.c      if ((tp->t_state & TS_CARR_ON) == 0 && (tp->t_cflag & CLOCAL) == 0)
tp                362 net/ppp_tty.c      if (tp->t_line != PPPDISC)
tp                364 net/ppp_tty.c      if (sc == NULL || tp != (struct tty *) sc->sc_devp)
tp                403 net/ppp_tty.c  ppptioctl(tp, cmd, data, flag, p)
tp                404 net/ppp_tty.c      struct tty *tp;
tp                410 net/ppp_tty.c      struct ppp_softc *sc = (struct ppp_softc *) tp->t_sc;
tp                413 net/ppp_tty.c      if (sc == NULL || tp != (struct tty *) sc->sc_devp)
tp                522 net/ppp_tty.c      struct tty *tp = (struct tty *) sc->sc_devp;
tp                531 net/ppp_tty.c      while (CCOUNT(&tp->t_outq) < PPP_HIWAT) {
tp                552 net/ppp_tty.c  	    if (CCOUNT(&tp->t_outq) == 0) {
tp                554 net/ppp_tty.c  		(void) putc(PPP_FLAG, &tp->t_outq);
tp                576 net/ppp_tty.c  		    ndone = n - b_to_q(start, n, &tp->t_outq);
tp                591 net/ppp_tty.c  		    if (putc(PPP_ESCAPE, &tp->t_outq)) {
tp                595 net/ppp_tty.c  		    if (putc(*start ^ PPP_TRANS, &tp->t_outq)) {
tp                596 net/ppp_tty.c  			(void) unputc(&tp->t_outq);
tp                643 net/ppp_tty.c  		    if (putc(*q, &tp->t_outq)) {
tp                646 net/ppp_tty.c  			    unputc(&tp->t_outq);
tp                683 net/ppp_tty.c      pppstart(tp, 0);
tp                706 net/ppp_tty.c      struct tty *tp;
tp                711 net/ppp_tty.c      tp = (struct tty *) sc->sc_devp;
tp                712 net/ppp_tty.c      putc(0, &tp->t_canq);
tp                713 net/ppp_tty.c      ttwakeup(tp);
tp                723 net/ppp_tty.c  pppstart(tp, force)
tp                724 net/ppp_tty.c      struct tty *tp;
tp                727 net/ppp_tty.c      struct ppp_softc *sc = (struct ppp_softc *) tp->t_sc;
tp                733 net/ppp_tty.c      if (tp->t_oproc != NULL)
tp                734 net/ppp_tty.c  	(*tp->t_oproc)(tp);
tp                750 net/ppp_tty.c      if ((CCOUNT(&tp->t_outq) < PPP_LOWAT || force)
tp                751 net/ppp_tty.c  	&& !((tp->t_state & TS_CARR_ON) == 0 && (tp->t_cflag & CLOCAL) == 0)
tp                752 net/ppp_tty.c  	&& sc != NULL && tp == (struct tty *) sc->sc_devp) {
tp                767 net/ppp_tty.c      struct tty *tp = (struct tty *) sc->sc_devp;
tp                772 net/ppp_tty.c      pppstart(tp, 1);
tp                812 net/ppp_tty.c  pppinput(c, tp)
tp                814 net/ppp_tty.c      struct tty *tp;
tp                820 net/ppp_tty.c      sc = (struct ppp_softc *) tp->t_sc;
tp                821 net/ppp_tty.c      if (sc == NULL || tp != (struct tty *) sc->sc_devp)
tp                839 net/ppp_tty.c      if (tp->t_iflag & IXON) {
tp                840 net/ppp_tty.c  	if (c == tp->t_cc[VSTOP] && tp->t_cc[VSTOP] != _POSIX_VDISABLE) {
tp                841 net/ppp_tty.c  	    if ((tp->t_state & TS_TTSTOP) == 0) {
tp                842 net/ppp_tty.c  		tp->t_state |= TS_TTSTOP;
tp                843 net/ppp_tty.c  		(*cdevsw[major(tp->t_dev)].d_stop)(tp, 0);
tp                847 net/ppp_tty.c  	if (c == tp->t_cc[VSTART] && tp->t_cc[VSTART] != _POSIX_VDISABLE) {
tp                848 net/ppp_tty.c  	    tp->t_state &= ~TS_TTSTOP;
tp                849 net/ppp_tty.c  	    if (tp->t_oproc != NULL)
tp                850 net/ppp_tty.c  		(*tp->t_oproc)(tp);
tp                380 netinet/ip_ipip.c 	u_int8_t tp, otos;
tp                393 netinet/ip_ipip.c 	m_copydata(m, 0, 1, &tp);
tp                394 netinet/ip_ipip.c 	tp = (tp >> 4) & 0xff;  /* Get the IP version number. */
tp                438 netinet/ip_ipip.c 		if (tp == IPVERSION) {
tp                458 netinet/ip_ipip.c 		else if (tp == (IPV6_VERSION >> 4)) {
tp                525 netinet/ip_ipip.c 		if (tp == IPVERSION) {
tp                536 netinet/ip_ipip.c 			if (tp == (IPV6_VERSION >> 4)) {
tp               1248 netinet/ip_mroute.c 	struct timeval tp;
tp               1251 netinet/ip_mroute.c 	microtime(&tp);
tp               1253 netinet/ip_mroute.c 	if (timercmp(t, &tp, <)) {
tp               1254 netinet/ip_mroute.c 		TV_DELTA(tp, *t, delta);
tp               1437 netinet/ip_mroute.c 		struct timeval tp;
tp               1439 netinet/ip_mroute.c 		microtime(&tp);
tp               1584 netinet/ip_mroute.c 		rte->t = tp;
tp               2093 netinet/ip_mroute.c 	struct timeval tp;
tp               2097 netinet/ip_mroute.c 	microtime(&tp);
tp               2099 netinet/ip_mroute.c 	TV_DELTA(tp, vifp->tbf_last_pkt_t, tm);
tp               2111 netinet/ip_mroute.c 	vifp->tbf_last_pkt_t = tp;
tp                118 netinet/tcp_debug.c tcp_trace(short act, short ostate, struct tcpcb *tp, caddr_t headers,
tp                137 netinet/tcp_debug.c 	td->td_tcb = (caddr_t)tp;
tp                138 netinet/tcp_debug.c 	if (tp)
tp                139 netinet/tcp_debug.c 		td->td_cb = *tp;
tp                141 netinet/tcp_debug.c 		bzero((caddr_t)&td->td_cb, sizeof (*tp));
tp                142 netinet/tcp_debug.c 	switch (tp->pf) {
tp                169 netinet/tcp_debug.c 	if (tp)
tp                170 netinet/tcp_debug.c 		printf("%x %s:", tp, tcpstates[ostate]);
tp                209 netinet/tcp_debug.c 	if (tp)
tp                210 netinet/tcp_debug.c 		printf(" -> %s", tcpstates[tp->t_state]);
tp                213 netinet/tcp_debug.c 	if (tp == 0)
tp                216 netinet/tcp_debug.c 	    tp->rcv_nxt, tp->rcv_wnd, tp->rcv_up, tp->snd_una, tp->snd_nxt,
tp                217 netinet/tcp_debug.c 	    tp->snd_max);
tp                219 netinet/tcp_debug.c 	    tp->snd_wl1, tp->snd_wl2, tp->snd_wnd);
tp                140 netinet/tcp_input.c #define ND6_HINT(tp) \
tp                142 netinet/tcp_input.c 	if (tp && tp->t_inpcb && (tp->t_inpcb->inp_flags & INP_IPV6) && \
tp                143 netinet/tcp_input.c 	    tp->t_inpcb->inp_route6.ro_rt) { \
tp                144 netinet/tcp_input.c 		nd6_nud_hint(tp->t_inpcb->inp_route6.ro_rt, NULL, 0); \
tp                148 netinet/tcp_input.c #define ND6_HINT(tp)
tp                169 netinet/tcp_input.c #define	TCP_SETUP_ACK(tp, tiflags) \
tp                171 netinet/tcp_input.c 	if ((tp)->t_flags & TF_DELACK || \
tp                173 netinet/tcp_input.c 		tp->t_flags |= TF_ACKNOW; \
tp                175 netinet/tcp_input.c 		TCP_SET_DELACK(tp); \
tp                190 netinet/tcp_input.c tcp_reass(tp, th, m, tlen)
tp                191 netinet/tcp_input.c 	struct tcpcb *tp;
tp                197 netinet/tcp_input.c 	struct socket *so = tp->t_inpcb->inp_socket;
tp                213 netinet/tcp_input.c 		tiqe = TAILQ_LAST(&tp->t_segq, tcpqehead);
tp                214 netinet/tcp_input.c 		if (tiqe != NULL && th->th_seq == tp->rcv_nxt) {
tp                217 netinet/tcp_input.c 			TAILQ_REMOVE(&tp->t_segq, tiqe, tcpqe_q);
tp                219 netinet/tcp_input.c 		if (tiqe == NULL || th->th_seq != tp->rcv_nxt) {
tp                221 netinet/tcp_input.c 			tcp_freeq(tp);
tp                231 netinet/tcp_input.c 	for (p = NULL, q = TAILQ_FIRST(&tp->t_segq); q != NULL;
tp                281 netinet/tcp_input.c 		TAILQ_REMOVE(&tp->t_segq, q, tcpqe_q);
tp                290 netinet/tcp_input.c 		TAILQ_INSERT_HEAD(&tp->t_segq, tiqe, tcpqe_q);
tp                292 netinet/tcp_input.c 		TAILQ_INSERT_AFTER(&tp->t_segq, p, tiqe, tcpqe_q);
tp                300 netinet/tcp_input.c 	if (TCPS_HAVEESTABLISHED(tp->t_state) == 0)
tp                302 netinet/tcp_input.c 	q = TAILQ_FIRST(&tp->t_segq);
tp                303 netinet/tcp_input.c 	if (q == NULL || q->tcpqe_tcp->th_seq != tp->rcv_nxt)
tp                305 netinet/tcp_input.c 	if (tp->t_state == TCPS_SYN_RECEIVED && q->tcpqe_tcp->th_reseqlen)
tp                308 netinet/tcp_input.c 		tp->rcv_nxt += q->tcpqe_tcp->th_reseqlen;
tp                312 netinet/tcp_input.c 		TAILQ_REMOVE(&tp->t_segq, q, tcpqe_q);
tp                313 netinet/tcp_input.c 		ND6_HINT(tp);
tp                320 netinet/tcp_input.c 	} while (q != NULL && q->tcpqe_tcp->th_seq == tp->rcv_nxt);
tp                375 netinet/tcp_input.c 	struct tcpcb *tp = 0;
tp                641 netinet/tcp_input.c 	tp = intotcpcb(inp);
tp                642 netinet/tcp_input.c 	if (tp == 0)
tp                644 netinet/tcp_input.c 	if (tp->t_state == TCPS_CLOSED)
tp                649 netinet/tcp_input.c 		tiwin = th->th_win << tp->snd_scale;
tp                692 netinet/tcp_input.c 			ostate = tp->t_state;
tp                745 netinet/tcp_input.c 						tp = NULL;
tp                747 netinet/tcp_input.c 						tp = intotcpcb(inp);
tp                748 netinet/tcp_input.c 						if (tp == NULL)
tp                755 netinet/tcp_input.c 						tcp_rscale(tp, so->so_rcv.sb_hiwat);
tp                812 netinet/tcp_input.c 						tp = NULL;
tp                862 netinet/tcp_input.c 	if (tp->t_state == TCPS_LISTEN)
tp                924 netinet/tcp_input.c 	tp->t_rcvtime = tcp_now;
tp                925 netinet/tcp_input.c 	if (TCPS_HAVEESTABLISHED(tp->t_state))
tp                926 netinet/tcp_input.c 		TCP_TIMER_ARM(tp, TCPT_KEEP, tcp_keepidle);
tp                929 netinet/tcp_input.c 	if (tp->sack_enable)
tp                930 netinet/tcp_input.c 		tcp_del_sackholes(tp, th); /* Delete stale SACK holes */
tp                937 netinet/tcp_input.c 	if (optp || (tp->t_flags & TF_SIGNATURE))
tp                941 netinet/tcp_input.c 		if (tcp_dooptions(tp, optp, optlen, th, m, iphlen, &opti))
tp                948 netinet/tcp_input.c 		opti.ts_ecr -= tp->ts_modulate;
tp                959 netinet/tcp_input.c 		tp->t_flags |= TF_RCVD_CE;
tp                977 netinet/tcp_input.c 	if (tp->t_state == TCPS_ESTABLISHED &&
tp                983 netinet/tcp_input.c 	    (!opti.ts_present || TSTMP_GEQ(opti.ts_val, tp->ts_recent)) &&
tp                984 netinet/tcp_input.c 	    th->th_seq == tp->rcv_nxt &&
tp                985 netinet/tcp_input.c 	    tiwin && tiwin == tp->snd_wnd &&
tp                986 netinet/tcp_input.c 	    tp->snd_nxt == tp->snd_max) {
tp                993 netinet/tcp_input.c 		if (opti.ts_present && SEQ_LEQ(th->th_seq, tp->last_ack_sent)) {
tp                994 netinet/tcp_input.c 			tp->ts_recent_age = tcp_now;
tp                995 netinet/tcp_input.c 			tp->ts_recent = opti.ts_val;
tp                999 netinet/tcp_input.c 			if (SEQ_GT(th->th_ack, tp->snd_una) &&
tp               1000 netinet/tcp_input.c 			    SEQ_LEQ(th->th_ack, tp->snd_max) &&
tp               1001 netinet/tcp_input.c 			    tp->snd_cwnd >= tp->snd_wnd &&
tp               1002 netinet/tcp_input.c 			    tp->t_dupacks == 0) {
tp               1008 netinet/tcp_input.c 					tcp_xmit_timer(tp, tcp_now - opti.ts_ecr);
tp               1009 netinet/tcp_input.c 				else if (tp->t_rtttime &&
tp               1010 netinet/tcp_input.c 				    SEQ_GT(th->th_ack, tp->t_rtseq))
tp               1011 netinet/tcp_input.c 					tcp_xmit_timer(tp,
tp               1012 netinet/tcp_input.c 					    tcp_now - tp->t_rtttime);
tp               1013 netinet/tcp_input.c 				acked = th->th_ack - tp->snd_una;
tp               1016 netinet/tcp_input.c 				ND6_HINT(tp);
tp               1025 netinet/tcp_input.c 				if ((tp->t_flags & TF_PMTUD_PEND) && 
tp               1026 netinet/tcp_input.c 				    SEQ_GT(th->th_ack, tp->t_pmtud_th_seq))
tp               1027 netinet/tcp_input.c 					tp->t_flags &= ~TF_PMTUD_PEND;
tp               1033 netinet/tcp_input.c 				if (tp->t_pmtud_mss_acked < acked)
tp               1034 netinet/tcp_input.c 					tp->t_pmtud_mss_acked = acked;
tp               1036 netinet/tcp_input.c 				tp->snd_una = th->th_ack;
tp               1044 netinet/tcp_input.c 				if (SEQ_GT(tp->snd_una, tp->snd_last))
tp               1046 netinet/tcp_input.c 				tp->snd_last = tp->snd_una;
tp               1049 netinet/tcp_input.c 				tp->snd_fack = tp->snd_una;
tp               1050 netinet/tcp_input.c 				tp->retran_data = 0;
tp               1063 netinet/tcp_input.c 				if (tp->snd_una == tp->snd_max)
tp               1064 netinet/tcp_input.c 					TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp               1065 netinet/tcp_input.c 				else if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0)
tp               1066 netinet/tcp_input.c 					TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
tp               1071 netinet/tcp_input.c 					(void) tcp_output(tp);
tp               1074 netinet/tcp_input.c 		} else if (th->th_ack == tp->snd_una &&
tp               1075 netinet/tcp_input.c 		    TAILQ_EMPTY(&tp->t_segq) &&
tp               1084 netinet/tcp_input.c 			if (tp->sack_enable && tp->rcv_numsacks)
tp               1085 netinet/tcp_input.c 				tcp_clean_sackreport(tp);
tp               1088 netinet/tcp_input.c 			tp->rcv_nxt += tlen;
tp               1091 netinet/tcp_input.c 			ND6_HINT(tp);
tp               1103 netinet/tcp_input.c 			TCP_SETUP_ACK(tp, tiflags);
tp               1104 netinet/tcp_input.c 			if (tp->t_flags & TF_ACKNOW)
tp               1105 netinet/tcp_input.c 				(void) tcp_output(tp);
tp               1126 netinet/tcp_input.c 	tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt));
tp               1129 netinet/tcp_input.c 	switch (tp->t_state) {
tp               1143 netinet/tcp_input.c 			if (SEQ_LEQ(th->th_ack, tp->snd_una) ||
tp               1144 netinet/tcp_input.c 			    SEQ_GT(th->th_ack, tp->snd_max))
tp               1163 netinet/tcp_input.c 		    (SEQ_LEQ(th->th_ack, tp->iss) ||
tp               1164 netinet/tcp_input.c 		     SEQ_GT(th->th_ack, tp->snd_max)))
tp               1169 netinet/tcp_input.c 			if (tcp_do_ecn && !(tp->t_flags & TF_DISABLE_ECN))
tp               1173 netinet/tcp_input.c 				tp = tcp_drop(tp, ECONNREFUSED);
tp               1179 netinet/tcp_input.c 			tp->snd_una = th->th_ack;
tp               1180 netinet/tcp_input.c 			if (SEQ_LT(tp->snd_nxt, tp->snd_una))
tp               1181 netinet/tcp_input.c 				tp->snd_nxt = tp->snd_una;
tp               1183 netinet/tcp_input.c 		TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp               1184 netinet/tcp_input.c 		tp->irs = th->th_seq;
tp               1185 netinet/tcp_input.c 		tcp_mss(tp, opti.maxseg);
tp               1187 netinet/tcp_input.c 		if (tp->t_rxtshift > 0)
tp               1188 netinet/tcp_input.c 			tp->snd_cwnd = tp->t_maxseg;
tp               1189 netinet/tcp_input.c 		tcp_rcvseqinit(tp);
tp               1190 netinet/tcp_input.c 		tp->t_flags |= TF_ACKNOW;
tp               1197 netinet/tcp_input.c 		if (tp->sack_enable)
tp               1198 netinet/tcp_input.c 			tp->sack_enable = tp->t_flags & TF_SACK_PERMIT;
tp               1211 netinet/tcp_input.c 				tp->t_flags |= TF_ECN_PERMIT;
tp               1218 netinet/tcp_input.c 		if (tiflags & TH_ACK && SEQ_GT(tp->snd_una, tp->iss)) {
tp               1221 netinet/tcp_input.c 			tp->t_state = TCPS_ESTABLISHED;
tp               1222 netinet/tcp_input.c 			TCP_TIMER_ARM(tp, TCPT_KEEP, tcp_keepidle);
tp               1224 netinet/tcp_input.c 			if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) ==
tp               1226 netinet/tcp_input.c 				tp->snd_scale = tp->requested_s_scale;
tp               1227 netinet/tcp_input.c 				tp->rcv_scale = tp->request_r_scale;
tp               1229 netinet/tcp_input.c 			tcp_reass_lock(tp);
tp               1230 netinet/tcp_input.c 			(void) tcp_reass(tp, (struct tcphdr *)0,
tp               1232 netinet/tcp_input.c 			tcp_reass_unlock(tp);
tp               1237 netinet/tcp_input.c 			if (tp->t_rtttime)
tp               1238 netinet/tcp_input.c 				tcp_xmit_timer(tp, tcp_now - tp->t_rtttime);
tp               1247 netinet/tcp_input.c 			tp->snd_cwnd += tp->t_maxseg;
tp               1249 netinet/tcp_input.c 			tp->t_state = TCPS_SYN_RECEIVED;
tp               1260 netinet/tcp_input.c 		if (tlen > tp->rcv_wnd) {
tp               1261 netinet/tcp_input.c 			todrop = tlen - tp->rcv_wnd;
tp               1263 netinet/tcp_input.c 			tlen = tp->rcv_wnd;
tp               1268 netinet/tcp_input.c 		tp->snd_wl1 = th->th_seq - 1;
tp               1269 netinet/tcp_input.c 		tp->rcv_up = th->th_seq;
tp               1280 netinet/tcp_input.c 		    TSTMP_LT(tp->ts_recent, opti.ts_val)) ||
tp               1281 netinet/tcp_input.c 		    SEQ_GT(th->th_seq, tp->rcv_nxt))) {
tp               1287 netinet/tcp_input.c 			iss = tp->snd_nxt +
tp               1290 netinet/tcp_input.c 			tp = tcp_close(tp);
tp               1305 netinet/tcp_input.c 	if (opti.ts_present && (tiflags & TH_RST) == 0 && tp->ts_recent &&
tp               1306 netinet/tcp_input.c 	    TSTMP_LT(opti.ts_val, tp->ts_recent)) {
tp               1309 netinet/tcp_input.c 		if ((int)(tcp_now - tp->ts_recent_age) > TCP_PAWS_IDLE) {
tp               1321 netinet/tcp_input.c 			tp->ts_recent = 0;
tp               1330 netinet/tcp_input.c 	todrop = tp->rcv_nxt - th->th_seq;
tp               1353 netinet/tcp_input.c 			tp->t_flags |= TF_ACKNOW;
tp               1376 netinet/tcp_input.c 	    tp->t_state > TCPS_CLOSE_WAIT && tlen) {
tp               1377 netinet/tcp_input.c 		tp = tcp_close(tp);
tp               1386 netinet/tcp_input.c 	todrop = (th->th_seq + tlen) - (tp->rcv_nxt+tp->rcv_wnd);
tp               1398 netinet/tcp_input.c 			if (tp->rcv_wnd == 0 && th->th_seq == tp->rcv_nxt) {
tp               1399 netinet/tcp_input.c 				tp->t_flags |= TF_ACKNOW;
tp               1415 netinet/tcp_input.c 	if (opti.ts_present && TSTMP_GEQ(opti.ts_val, tp->ts_recent) &&
tp               1416 netinet/tcp_input.c 	    SEQ_LEQ(th->th_seq, tp->last_ack_sent)) {
tp               1417 netinet/tcp_input.c 		if (SEQ_LEQ(tp->last_ack_sent, th->th_seq + tlen +
tp               1419 netinet/tcp_input.c 			tp->ts_recent = opti.ts_val;
tp               1421 netinet/tcp_input.c 			tp->ts_recent = 0;
tp               1422 netinet/tcp_input.c 		tp->ts_recent_age = tcp_now;
tp               1436 netinet/tcp_input.c 		if (th->th_seq != tp->last_ack_sent &&
tp               1437 netinet/tcp_input.c 		    th->th_seq != tp->rcv_nxt &&
tp               1438 netinet/tcp_input.c 		    th->th_seq != (tp->rcv_nxt + 1))
tp               1441 netinet/tcp_input.c 		switch (tp->t_state) {
tp               1445 netinet/tcp_input.c 			if (tcp_do_ecn && !(tp->t_flags & TF_DISABLE_ECN))
tp               1457 netinet/tcp_input.c 			tp->t_state = TCPS_CLOSED;
tp               1459 netinet/tcp_input.c 			tp = tcp_close(tp);
tp               1464 netinet/tcp_input.c 			tp = tcp_close(tp);
tp               1480 netinet/tcp_input.c 		if (tp->t_flags & TF_ACKNOW)
tp               1489 netinet/tcp_input.c 	switch (tp->t_state) {
tp               1499 netinet/tcp_input.c 		tp->t_state = TCPS_ESTABLISHED;
tp               1500 netinet/tcp_input.c 		TCP_TIMER_ARM(tp, TCPT_KEEP, tcp_keepidle);
tp               1502 netinet/tcp_input.c 		if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) ==
tp               1504 netinet/tcp_input.c 			tp->snd_scale = tp->requested_s_scale;
tp               1505 netinet/tcp_input.c 			tp->rcv_scale = tp->request_r_scale;
tp               1507 netinet/tcp_input.c 		tcp_reass_lock(tp);
tp               1508 netinet/tcp_input.c 		(void) tcp_reass(tp, (struct tcphdr *)0, (struct mbuf *)0,
tp               1510 netinet/tcp_input.c 		tcp_reass_unlock(tp);
tp               1511 netinet/tcp_input.c 		tp->snd_wl1 = th->th_seq - 1;
tp               1537 netinet/tcp_input.c 			if ((tp->t_flags & TF_ECN_PERMIT) &&
tp               1538 netinet/tcp_input.c 			    SEQ_GEQ(tp->snd_una, tp->snd_last)) {
tp               1541 netinet/tcp_input.c 				win = min(tp->snd_wnd, tp->snd_cwnd) / tp->t_maxseg;
tp               1543 netinet/tcp_input.c 					tp->snd_ssthresh = win / 2 * tp->t_maxseg;
tp               1544 netinet/tcp_input.c 					tp->snd_cwnd = tp->snd_ssthresh;
tp               1545 netinet/tcp_input.c 					tp->snd_last = tp->snd_max;
tp               1546 netinet/tcp_input.c 					tp->t_flags |= TF_SEND_CWR;
tp               1557 netinet/tcp_input.c 			tp->t_flags &= ~TF_RCVD_CE;
tp               1562 netinet/tcp_input.c 		if (SEQ_LEQ(th->th_ack, tp->snd_una)) {
tp               1577 netinet/tcp_input.c 				if (th->th_seq != tp->rcv_nxt &&
tp               1579 netinet/tcp_input.c 				   tp->snd_una - tp->max_sndwnd)) {
tp               1591 netinet/tcp_input.c 			if (th->th_ack != tp->snd_una) {
tp               1592 netinet/tcp_input.c 				tp->t_dupacks = 0;
tp               1595 netinet/tcp_input.c 			if (tiwin == tp->snd_wnd) {
tp               1621 netinet/tcp_input.c 				if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0)
tp               1622 netinet/tcp_input.c 					tp->t_dupacks = 0;
tp               1628 netinet/tcp_input.c 				else if (++tp->t_dupacks == tcprexmtthresh ||
tp               1629 netinet/tcp_input.c 				    ((SEQ_GT(tp->snd_fack, tcprexmtthresh *
tp               1630 netinet/tcp_input.c 				    tp->t_maxseg + tp->snd_una)) &&
tp               1631 netinet/tcp_input.c 				    SEQ_GT(tp->snd_una, tp->snd_last))) {
tp               1633 netinet/tcp_input.c 				else if (++tp->t_dupacks == tcprexmtthresh) {
tp               1635 netinet/tcp_input.c 					tcp_seq onxt = tp->snd_nxt;
tp               1637 netinet/tcp_input.c 					    ulmin(tp->snd_wnd, tp->snd_cwnd) /
tp               1638 netinet/tcp_input.c 						2 / tp->t_maxseg;
tp               1641 netinet/tcp_input.c 					if (SEQ_LT(th->th_ack, tp->snd_last)){
tp               1646 netinet/tcp_input.c 						tp->t_dupacks = 0;
tp               1652 netinet/tcp_input.c 					tp->snd_ssthresh = win * tp->t_maxseg;
tp               1654 netinet/tcp_input.c 					tp->snd_last = tp->snd_max;
tp               1657 netinet/tcp_input.c                     			if (tp->sack_enable) {
tp               1658 netinet/tcp_input.c 						TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp               1659 netinet/tcp_input.c 						tp->t_rtttime = 0;
tp               1661 netinet/tcp_input.c 						tp->t_flags |= TF_SEND_CWR;
tp               1668 netinet/tcp_input.c 						tp->t_dupacks = tcprexmtthresh;
tp               1669 netinet/tcp_input.c 						(void) tcp_output(tp);
tp               1674 netinet/tcp_input.c 						tp->snd_cwnd = tp->snd_ssthresh;
tp               1680 netinet/tcp_input.c 						(void) tcp_output(tp);
tp               1681 netinet/tcp_input.c 						tp->snd_cwnd = tp->snd_ssthresh+
tp               1682 netinet/tcp_input.c 					           tp->t_maxseg * tp->t_dupacks;
tp               1687 netinet/tcp_input.c 					TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp               1688 netinet/tcp_input.c 					tp->t_rtttime = 0;
tp               1689 netinet/tcp_input.c 					tp->snd_nxt = th->th_ack;
tp               1690 netinet/tcp_input.c 					tp->snd_cwnd = tp->t_maxseg;
tp               1692 netinet/tcp_input.c 					tp->t_flags |= TF_SEND_CWR;
tp               1698 netinet/tcp_input.c 					(void) tcp_output(tp);
tp               1700 netinet/tcp_input.c 					tp->snd_cwnd = tp->snd_ssthresh +
tp               1701 netinet/tcp_input.c 					    tp->t_maxseg * tp->t_dupacks;
tp               1702 netinet/tcp_input.c 					if (SEQ_GT(onxt, tp->snd_nxt))
tp               1703 netinet/tcp_input.c 						tp->snd_nxt = onxt;
tp               1705 netinet/tcp_input.c 				} else if (tp->t_dupacks > tcprexmtthresh) {
tp               1711 netinet/tcp_input.c 					if (tp->sack_enable) {
tp               1712 netinet/tcp_input.c 						if (tp->snd_awnd < tp->snd_cwnd)
tp               1713 netinet/tcp_input.c 							tcp_output(tp);
tp               1717 netinet/tcp_input.c 					tp->snd_cwnd += tp->t_maxseg;
tp               1718 netinet/tcp_input.c 					(void) tcp_output(tp);
tp               1721 netinet/tcp_input.c 			} else if (tiwin < tp->snd_wnd) {
tp               1728 netinet/tcp_input.c 				tp->t_dupacks = 0;
tp               1737 netinet/tcp_input.c 		if (tp->sack_enable) {
tp               1738 netinet/tcp_input.c 			if (tp->t_dupacks >= tcprexmtthresh) {
tp               1740 netinet/tcp_input.c 				if (tcp_sack_partialack(tp, th)) {
tp               1743 netinet/tcp_input.c 					if (tp->snd_awnd < tp->snd_cwnd)
tp               1746 netinet/tcp_input.c 					tp->snd_cwnd += tp->t_maxseg;
tp               1751 netinet/tcp_input.c 					tp->snd_cwnd = tp->snd_ssthresh;
tp               1752 netinet/tcp_input.c 					if (tcp_seq_subtract(tp->snd_max,
tp               1753 netinet/tcp_input.c 					    th->th_ack) < tp->snd_ssthresh)
tp               1754 netinet/tcp_input.c 						tp->snd_cwnd =
tp               1755 netinet/tcp_input.c 						   tcp_seq_subtract(tp->snd_max,
tp               1757 netinet/tcp_input.c 					tp->t_dupacks = 0;
tp               1759 netinet/tcp_input.c 					if (SEQ_GT(th->th_ack, tp->snd_fack))
tp               1760 netinet/tcp_input.c 						tp->snd_fack = th->th_ack;
tp               1765 netinet/tcp_input.c 			if (tp->t_dupacks >= tcprexmtthresh &&
tp               1766 netinet/tcp_input.c 			    !tcp_newreno(tp, th)) {
tp               1768 netinet/tcp_input.c 				tp->snd_cwnd = tp->snd_ssthresh;
tp               1769 netinet/tcp_input.c 				if (tcp_seq_subtract(tp->snd_max, th->th_ack) <
tp               1770 netinet/tcp_input.c 			  	    tp->snd_ssthresh)
tp               1771 netinet/tcp_input.c 					tp->snd_cwnd =
tp               1772 netinet/tcp_input.c 					    tcp_seq_subtract(tp->snd_max,
tp               1774 netinet/tcp_input.c 				tp->t_dupacks = 0;
tp               1777 netinet/tcp_input.c 		if (tp->t_dupacks < tcprexmtthresh)
tp               1778 netinet/tcp_input.c 			tp->t_dupacks = 0;
tp               1780 netinet/tcp_input.c 		if (tp->t_dupacks >= tcprexmtthresh &&
tp               1781 netinet/tcp_input.c 		    tp->snd_cwnd > tp->snd_ssthresh)
tp               1782 netinet/tcp_input.c 			tp->snd_cwnd = tp->snd_ssthresh;
tp               1783 netinet/tcp_input.c 		tp->t_dupacks = 0;
tp               1785 netinet/tcp_input.c 		if (SEQ_GT(th->th_ack, tp->snd_max)) {
tp               1789 netinet/tcp_input.c 		acked = th->th_ack - tp->snd_una;
tp               1803 netinet/tcp_input.c 			tcp_xmit_timer(tp, tcp_now - opti.ts_ecr);
tp               1804 netinet/tcp_input.c 		else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq))
tp               1805 netinet/tcp_input.c 			tcp_xmit_timer(tp, tcp_now - tp->t_rtttime);
tp               1813 netinet/tcp_input.c 		if (th->th_ack == tp->snd_max) {
tp               1814 netinet/tcp_input.c 			TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp               1816 netinet/tcp_input.c 		} else if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0)
tp               1817 netinet/tcp_input.c 			TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
tp               1826 netinet/tcp_input.c 		u_int cw = tp->snd_cwnd;
tp               1827 netinet/tcp_input.c 		u_int incr = tp->t_maxseg;
tp               1829 netinet/tcp_input.c 		if (cw > tp->snd_ssthresh)
tp               1832 netinet/tcp_input.c 		if (tp->t_dupacks < tcprexmtthresh)
tp               1834 netinet/tcp_input.c 		tp->snd_cwnd = ulmin(cw + incr, TCP_MAXWIN<<tp->snd_scale);
tp               1836 netinet/tcp_input.c 		ND6_HINT(tp);
tp               1838 netinet/tcp_input.c 			tp->snd_wnd -= so->so_snd.sb_cc;
tp               1843 netinet/tcp_input.c 			tp->snd_wnd -= acked;
tp               1854 netinet/tcp_input.c 		if ((tp->t_flags & TF_PMTUD_PEND) && 
tp               1855 netinet/tcp_input.c 		    SEQ_GT(th->th_ack, tp->t_pmtud_th_seq))
tp               1856 netinet/tcp_input.c 			tp->t_flags &= ~TF_PMTUD_PEND;
tp               1862 netinet/tcp_input.c 		if (tp->t_pmtud_mss_acked < acked)
tp               1863 netinet/tcp_input.c 			tp->t_pmtud_mss_acked = acked;
tp               1865 netinet/tcp_input.c 		tp->snd_una = th->th_ack;
tp               1868 netinet/tcp_input.c 		if (SEQ_GT(tp->snd_una, tp->snd_last))
tp               1869 netinet/tcp_input.c 			tp->snd_last = tp->snd_una;
tp               1871 netinet/tcp_input.c 		if (SEQ_LT(tp->snd_nxt, tp->snd_una))
tp               1872 netinet/tcp_input.c 			tp->snd_nxt = tp->snd_una;
tp               1874 netinet/tcp_input.c 		if (SEQ_GT(tp->snd_una, tp->snd_fack)) {
tp               1875 netinet/tcp_input.c 			tp->snd_fack = tp->snd_una;
tp               1879 netinet/tcp_input.c 			tp->snd_awnd = tcp_seq_subtract(tp->snd_nxt,
tp               1880 netinet/tcp_input.c 				tp->snd_fack) + tp->retran_data;
tp               1884 netinet/tcp_input.c 		switch (tp->t_state) {
tp               1902 netinet/tcp_input.c 					TCP_TIMER_ARM(tp, TCPT_2MSL, tcp_maxidle);
tp               1904 netinet/tcp_input.c 				tp->t_state = TCPS_FIN_WAIT_2;
tp               1916 netinet/tcp_input.c 				tp->t_state = TCPS_TIME_WAIT;
tp               1917 netinet/tcp_input.c 				tcp_canceltimers(tp);
tp               1918 netinet/tcp_input.c 				TCP_TIMER_ARM(tp, TCPT_2MSL, 2 * TCPTV_MSL);
tp               1931 netinet/tcp_input.c 				tp = tcp_close(tp);
tp               1942 netinet/tcp_input.c 			TCP_TIMER_ARM(tp, TCPT_2MSL, 2 * TCPTV_MSL);
tp               1953 netinet/tcp_input.c 	    (SEQ_LT(tp->snd_wl1, th->th_seq) || (tp->snd_wl1 == th->th_seq &&
tp               1954 netinet/tcp_input.c 	    (SEQ_LT(tp->snd_wl2, th->th_ack) ||
tp               1955 netinet/tcp_input.c 	    (tp->snd_wl2 == th->th_ack && tiwin > tp->snd_wnd))))) {
tp               1958 netinet/tcp_input.c 		    tp->snd_wl2 == th->th_ack && tiwin > tp->snd_wnd)
tp               1960 netinet/tcp_input.c 		tp->snd_wnd = tiwin;
tp               1961 netinet/tcp_input.c 		tp->snd_wl1 = th->th_seq;
tp               1962 netinet/tcp_input.c 		tp->snd_wl2 = th->th_ack;
tp               1963 netinet/tcp_input.c 		if (tp->snd_wnd > tp->max_sndwnd)
tp               1964 netinet/tcp_input.c 			tp->max_sndwnd = tp->snd_wnd;
tp               1972 netinet/tcp_input.c 	    TCPS_HAVERCVDFIN(tp->t_state) == 0) {
tp               1998 netinet/tcp_input.c 		if (SEQ_GT(th->th_seq+th->th_urp, tp->rcv_up)) {
tp               1999 netinet/tcp_input.c 			tp->rcv_up = th->th_seq + th->th_urp;
tp               2001 netinet/tcp_input.c 			    (tp->rcv_up - tp->rcv_nxt) - 1;
tp               2005 netinet/tcp_input.c 			tp->t_oobflags &= ~(TCPOOB_HAVEDATA | TCPOOB_HADDATA);
tp               2025 netinet/tcp_input.c 		if (SEQ_GT(tp->rcv_nxt, tp->rcv_up))
tp               2026 netinet/tcp_input.c 			tp->rcv_up = tp->rcv_nxt;
tp               2038 netinet/tcp_input.c 	    TCPS_HAVERCVDFIN(tp->t_state) == 0) {
tp               2043 netinet/tcp_input.c 		tcp_reass_lock(tp);
tp               2044 netinet/tcp_input.c 		if (th->th_seq == tp->rcv_nxt && TAILQ_EMPTY(&tp->t_segq) &&
tp               2045 netinet/tcp_input.c 		    tp->t_state == TCPS_ESTABLISHED) {
tp               2046 netinet/tcp_input.c 			tcp_reass_unlock(tp);
tp               2047 netinet/tcp_input.c 			TCP_SETUP_ACK(tp, tiflags);
tp               2048 netinet/tcp_input.c 			tp->rcv_nxt += tlen;
tp               2052 netinet/tcp_input.c 			ND6_HINT(tp);
tp               2062 netinet/tcp_input.c 			tiflags = tcp_reass(tp, th, m, &tlen);
tp               2063 netinet/tcp_input.c 			tcp_reass_unlock(tp);
tp               2064 netinet/tcp_input.c 			tp->t_flags |= TF_ACKNOW;
tp               2067 netinet/tcp_input.c 		if (tp->sack_enable)
tp               2068 netinet/tcp_input.c 			tcp_update_sack_list(tp, laststart, lastend);
tp               2081 netinet/tcp_input.c 		len = so->so_rcv.sb_hiwat - (tp->rcv_adv - tp->rcv_nxt);
tp               2093 netinet/tcp_input.c 	if ((tiflags & TH_FIN) && TCPS_HAVEESTABLISHED(tp->t_state)) {
tp               2094 netinet/tcp_input.c 		if (TCPS_HAVERCVDFIN(tp->t_state) == 0) {
tp               2096 netinet/tcp_input.c 			tp->t_flags |= TF_ACKNOW;
tp               2097 netinet/tcp_input.c 			tp->rcv_nxt++;
tp               2099 netinet/tcp_input.c 		switch (tp->t_state) {
tp               2105 netinet/tcp_input.c 			tp->t_state = TCPS_CLOSE_WAIT;
tp               2113 netinet/tcp_input.c 			tp->t_state = TCPS_CLOSING;
tp               2122 netinet/tcp_input.c 			tp->t_state = TCPS_TIME_WAIT;
tp               2123 netinet/tcp_input.c 			tcp_canceltimers(tp);
tp               2124 netinet/tcp_input.c 			TCP_TIMER_ARM(tp, TCPT_2MSL, 2 * TCPTV_MSL);
tp               2132 netinet/tcp_input.c 			TCP_TIMER_ARM(tp, TCPT_2MSL, 2 * TCPTV_MSL);
tp               2137 netinet/tcp_input.c 		switch (tp->pf) {
tp               2140 netinet/tcp_input.c 			tcp_trace(TA_INPUT, ostate, tp, (caddr_t) &tcp_saveti6,
tp               2145 netinet/tcp_input.c 			tcp_trace(TA_INPUT, ostate, tp, (caddr_t) &tcp_saveti,
tp               2154 netinet/tcp_input.c 	if (needoutput || (tp->t_flags & TF_ACKNOW)) {
tp               2155 netinet/tcp_input.c 		(void) tcp_output(tp);
tp               2164 netinet/tcp_input.c 	tp = NULL;
tp               2183 netinet/tcp_input.c 	tp->t_flags |= TF_ACKNOW;
tp               2184 netinet/tcp_input.c 	(void) tcp_output(tp);
tp               2210 netinet/tcp_input.c 		tcp_respond(tp, mtod(m, caddr_t), m, (tcp_seq)0, th->th_ack,
tp               2215 netinet/tcp_input.c 		tcp_respond(tp, mtod(m, caddr_t), m, th->th_seq + tlen,
tp               2224 netinet/tcp_input.c 	if (tp && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) {
tp               2225 netinet/tcp_input.c 		switch (tp->pf) {
tp               2228 netinet/tcp_input.c 			tcp_trace(TA_DROP, ostate, tp, (caddr_t) &tcp_saveti6,
tp               2233 netinet/tcp_input.c 			tcp_trace(TA_DROP, ostate, tp, (caddr_t) &tcp_saveti,
tp               2244 netinet/tcp_input.c tcp_dooptions(tp, cp, cnt, th, m, iphlen, oi)
tp               2245 netinet/tcp_input.c 	struct tcpcb *tp;
tp               2283 netinet/tcp_input.c 			if (TCPS_HAVERCVDSYN(tp->t_state))
tp               2295 netinet/tcp_input.c 			if (TCPS_HAVERCVDSYN(tp->t_state))
tp               2297 netinet/tcp_input.c 			tp->t_flags |= TF_RCVD_SCALE;
tp               2298 netinet/tcp_input.c 			tp->requested_s_scale = min(cp[2], TCP_MAX_WINSHIFT);
tp               2312 netinet/tcp_input.c 			if (TCPS_HAVERCVDSYN(tp->t_state))
tp               2318 netinet/tcp_input.c 			tp->t_flags |= TF_RCVD_TSTMP;
tp               2319 netinet/tcp_input.c 			tp->ts_recent = oi->ts_val;
tp               2320 netinet/tcp_input.c 			tp->ts_recent_age = tcp_now;
tp               2325 netinet/tcp_input.c 			if (!tp->sack_enable || optlen!=TCPOLEN_SACK_PERMITTED)
tp               2329 netinet/tcp_input.c 			if (TCPS_HAVERCVDSYN(tp->t_state))
tp               2332 netinet/tcp_input.c 			tp->t_flags |= TF_SACK_PERMIT;
tp               2335 netinet/tcp_input.c 			tcp_sack_option(tp, th, cp, optlen);
tp               2353 netinet/tcp_input.c 	if (tp->t_flags & TF_SIGNATURE) {
tp               2359 netinet/tcp_input.c 		switch (tp->pf) {
tp               2389 netinet/tcp_input.c 		if (tdb == NULL && tp->t_state == TCPS_LISTEN)
tp               2390 netinet/tcp_input.c 			tp->t_flags &= ~TF_SIGNATURE;
tp               2394 netinet/tcp_input.c 	if ((sigp ? TF_SIGNATURE : 0) ^ (tp->t_flags & TF_SIGNATURE)) {
tp               2407 netinet/tcp_input.c 		if (tcp_signature(tdb, tp->pf, m, th, iphlen, 1, sig) < 0)
tp               2438 netinet/tcp_input.c tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_laststart,
tp               2451 netinet/tcp_input.c 	for (i = 0; i < tp->rcv_numsacks; i++) {
tp               2452 netinet/tcp_input.c 		sack = tp->sackblks[i];
tp               2457 netinet/tcp_input.c 		if (SEQ_LEQ(sack.end, tp->rcv_nxt)) {
tp               2458 netinet/tcp_input.c 			tp->sackblks[i].start = tp->sackblks[i].end = 0;
tp               2461 netinet/tcp_input.c 			temp[j].start = tp->sackblks[i].start;
tp               2462 netinet/tcp_input.c 			temp[j++].end = tp->sackblks[i].end;
tp               2465 netinet/tcp_input.c 	tp->rcv_numsacks -= count;
tp               2466 netinet/tcp_input.c 	if (tp->rcv_numsacks == 0) { /* no sack blocks currently (fast path) */
tp               2467 netinet/tcp_input.c 		tcp_clean_sackreport(tp);
tp               2468 netinet/tcp_input.c 		if (SEQ_LT(tp->rcv_nxt, rcv_laststart)) {
tp               2470 netinet/tcp_input.c 			tp->sackblks[0].start = rcv_laststart;
tp               2471 netinet/tcp_input.c 			tp->sackblks[0].end = rcv_lastend;
tp               2472 netinet/tcp_input.c 			tp->rcv_numsacks = 1;
tp               2477 netinet/tcp_input.c 	for (i = 0; i < tp->rcv_numsacks; i++)
tp               2478 netinet/tcp_input.c 		tp->sackblks[i] = temp[i]; /* first copy back sack list */
tp               2479 netinet/tcp_input.c 	if (SEQ_GEQ(tp->rcv_nxt, rcv_lastend))
tp               2487 netinet/tcp_input.c 	for (i = 0; i < tp->rcv_numsacks; i++) {
tp               2488 netinet/tcp_input.c 		sack = tp->sackblks[i];
tp               2497 netinet/tcp_input.c 			tp->sackblks[i].start = tp->sackblks[i].end = 0;
tp               2505 netinet/tcp_input.c 		tp->sackblks[i].start = tp->sackblks[i].end = 0;
tp               2509 netinet/tcp_input.c 		for (i = 0, j = 1; i < tp->rcv_numsacks; i++) {
tp               2510 netinet/tcp_input.c 			sack = tp->sackblks[i];
tp               2515 netinet/tcp_input.c 		tp->rcv_numsacks = j; /* including first blk (added later) */
tp               2516 netinet/tcp_input.c 		for (i = 1; i < tp->rcv_numsacks; i++) /* now copy back */
tp               2517 netinet/tcp_input.c 			tp->sackblks[i] = temp[i];
tp               2519 netinet/tcp_input.c 		if (tp->rcv_numsacks < MAX_SACK_BLKS)
tp               2520 netinet/tcp_input.c 			tp->rcv_numsacks++;
tp               2521 netinet/tcp_input.c 		for (i = tp->rcv_numsacks-1; i > 0; i--)
tp               2522 netinet/tcp_input.c 			tp->sackblks[i] = tp->sackblks[i-1];
tp               2524 netinet/tcp_input.c 	tp->sackblks[0] = firstsack;
tp               2533 netinet/tcp_input.c tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
tp               2539 netinet/tcp_input.c 	if (!tp->sack_enable)
tp               2545 netinet/tcp_input.c 	if (SEQ_LT(th->th_ack, tp->snd_una) ||
tp               2546 netinet/tcp_input.c 	    SEQ_GT(th->th_ack, tp->snd_max))
tp               2555 netinet/tcp_input.c 	if (tp->snd_numholes < 0)
tp               2556 netinet/tcp_input.c 		tp->snd_numholes = 0;
tp               2557 netinet/tcp_input.c 	if (tp->t_maxseg == 0)
tp               2571 netinet/tcp_input.c 		if (SEQ_LEQ(sack.end, tp->snd_una))
tp               2575 netinet/tcp_input.c 		if (SEQ_GT(sack.end, tp->snd_fack))
tp               2576 netinet/tcp_input.c 			tp->snd_fack = sack.end;
tp               2578 netinet/tcp_input.c 		if (SEQ_GT(th->th_ack, tp->snd_una)) {
tp               2582 netinet/tcp_input.c 		if (SEQ_GT(sack.end, tp->snd_max))
tp               2584 netinet/tcp_input.c 		if (tp->snd_holes == NULL) { /* first hole */
tp               2585 netinet/tcp_input.c 			tp->snd_holes = (struct sackhole *)
tp               2587 netinet/tcp_input.c 			if (tp->snd_holes == NULL) {
tp               2591 netinet/tcp_input.c 			cur = tp->snd_holes;
tp               2596 netinet/tcp_input.c 			tp->snd_numholes = 1;
tp               2597 netinet/tcp_input.c 			tp->rcv_lastsack = sack.end;
tp               2603 netinet/tcp_input.c 			    ((sack.end - cur->end)/tp->t_maxseg));
tp               2609 netinet/tcp_input.c 		p = cur = tp->snd_holes;
tp               2617 netinet/tcp_input.c 				if (((sack.end - cur->end)/tp->t_maxseg) >=
tp               2628 netinet/tcp_input.c 					tp->retran_data -=
tp               2632 netinet/tcp_input.c 					tp->retran_data -=
tp               2646 netinet/tcp_input.c 						tp->snd_holes = p;
tp               2648 netinet/tcp_input.c 					tp->snd_numholes--;
tp               2662 netinet/tcp_input.c 					tp->retran_data -=
tp               2669 netinet/tcp_input.c 				if (((sack.end - cur->end)/tp->t_maxseg) >=
tp               2688 netinet/tcp_input.c 					tp->retran_data -=
tp               2692 netinet/tcp_input.c 					tp->retran_data -=
tp               2704 netinet/tcp_input.c 				if (((sack.end - cur->end)/tp->t_maxseg) >=
tp               2710 netinet/tcp_input.c 				tp->snd_numholes++;
tp               2714 netinet/tcp_input.c 		if (SEQ_LT(tp->rcv_lastsack, sack.start)) {
tp               2723 netinet/tcp_input.c 			temp->start = tp->rcv_lastsack;
tp               2726 netinet/tcp_input.c 			    ((sack.end - sack.start)/tp->t_maxseg));
tp               2732 netinet/tcp_input.c 			tp->rcv_lastsack = sack.end;
tp               2733 netinet/tcp_input.c 			tp->snd_numholes++;
tp               2742 netinet/tcp_input.c 	tp->retran_data = 0;
tp               2743 netinet/tcp_input.c 	cur = tp->snd_holes;
tp               2745 netinet/tcp_input.c 		tp->retran_data += cur->rxmit - cur->start;
tp               2748 netinet/tcp_input.c 	tp->snd_awnd = tcp_seq_subtract(tp->snd_nxt, tp->snd_fack) +
tp               2749 netinet/tcp_input.c 	    tp->retran_data;
tp               2761 netinet/tcp_input.c tcp_del_sackholes(tp, th)
tp               2762 netinet/tcp_input.c 	struct tcpcb *tp;
tp               2765 netinet/tcp_input.c 	if (tp->sack_enable && tp->t_state != TCPS_LISTEN) {
tp               2767 netinet/tcp_input.c 		tcp_seq lastack = SEQ_GT(th->th_ack, tp->snd_una) ?
tp               2768 netinet/tcp_input.c 			th->th_ack : tp->snd_una;
tp               2769 netinet/tcp_input.c 		struct sackhole *cur = tp->snd_holes;
tp               2776 netinet/tcp_input.c 				tp->snd_numholes--;
tp               2784 netinet/tcp_input.c 		tp->snd_holes = cur;
tp               2792 netinet/tcp_input.c tcp_clean_sackreport(tp)
tp               2793 netinet/tcp_input.c 	struct tcpcb *tp;
tp               2797 netinet/tcp_input.c 	tp->rcv_numsacks = 0;
tp               2799 netinet/tcp_input.c 		tp->sackblks[i].start = tp->sackblks[i].end=0;
tp               2809 netinet/tcp_input.c tcp_sack_partialack(tp, th)
tp               2810 netinet/tcp_input.c 	struct tcpcb *tp;
tp               2813 netinet/tcp_input.c 	if (SEQ_LT(th->th_ack, tp->snd_last)) {
tp               2815 netinet/tcp_input.c 		TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp               2816 netinet/tcp_input.c 		tp->t_rtttime = 0;
tp               2823 netinet/tcp_input.c 		if (tp->snd_cwnd > (th->th_ack - tp->snd_una)) {
tp               2824 netinet/tcp_input.c 			tp->snd_cwnd -= th->th_ack - tp->snd_una;
tp               2825 netinet/tcp_input.c 			tp->snd_cwnd += tp->t_maxseg;
tp               2827 netinet/tcp_input.c 			tp->snd_cwnd = tp->t_maxseg;
tp               2853 netinet/tcp_input.c 			struct tcpcb *tp = sototcpcb(so);
tp               2855 netinet/tcp_input.c 			tp->t_iobc = *cp;
tp               2856 netinet/tcp_input.c 			tp->t_oobflags |= TCPOOB_HAVEDATA;
tp               2874 netinet/tcp_input.c tcp_xmit_timer(tp, rtt)
tp               2875 netinet/tcp_input.c 	struct tcpcb *tp;
tp               2887 netinet/tcp_input.c 	if (tp->t_srtt != 0) {
tp               2898 netinet/tcp_input.c 		    (tp->t_srtt >> TCP_RTT_SHIFT);
tp               2899 netinet/tcp_input.c 		if ((tp->t_srtt += delta) <= 0)
tp               2900 netinet/tcp_input.c 			tp->t_srtt = 1 << TCP_RTT_BASE_SHIFT;
tp               2913 netinet/tcp_input.c 		delta -= (tp->t_rttvar >> TCP_RTTVAR_SHIFT);
tp               2914 netinet/tcp_input.c 		if ((tp->t_rttvar += delta) <= 0)
tp               2915 netinet/tcp_input.c 			tp->t_rttvar = 1 << TCP_RTT_BASE_SHIFT;
tp               2922 netinet/tcp_input.c 		tp->t_srtt = (rtt + 1) << (TCP_RTT_SHIFT + TCP_RTT_BASE_SHIFT);
tp               2923 netinet/tcp_input.c 		tp->t_rttvar = (rtt + 1) <<
tp               2926 netinet/tcp_input.c 	tp->t_rtttime = 0;
tp               2927 netinet/tcp_input.c 	tp->t_rxtshift = 0;
tp               2940 netinet/tcp_input.c 	rttmin = min(max(rtt + 2, tp->t_rttmin), TCPTV_REXMTMAX);
tp               2941 netinet/tcp_input.c 	TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp), rttmin, TCPTV_REXMTMAX);
tp               2950 netinet/tcp_input.c 	tp->t_softerror = 0;
tp               2978 netinet/tcp_input.c tcp_mss(tp, offer)
tp               2979 netinet/tcp_input.c 	struct tcpcb *tp;
tp               2988 netinet/tcp_input.c 	inp = tp->t_inpcb;
tp               2999 netinet/tcp_input.c 	switch (tp->pf) {
tp               3023 netinet/tcp_input.c 		if (tp->pf == AF_INET6 && rt->rt_rmx.rmx_mtu < IPV6_MMTU) {
tp               3044 netinet/tcp_input.c 	else if (tp->pf == AF_INET) {
tp               3051 netinet/tcp_input.c 	else if (tp->pf == AF_INET6) {
tp               3065 netinet/tcp_input.c 		if (tp->pf == AF_INET6)
tp               3087 netinet/tcp_input.c 		tp->t_peermss = offer;
tp               3088 netinet/tcp_input.c 	if (tp->t_peermss)
tp               3089 netinet/tcp_input.c 		mss = min(mss, max(tp->t_peermss, 216));
tp               3101 netinet/tcp_input.c 	tp->t_maxopd = mss;
tp               3103 netinet/tcp_input.c 	if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
tp               3104 netinet/tcp_input.c 	    (tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP)
tp               3107 netinet/tcp_input.c 	if (tp->t_flags & TF_SIGNATURE)
tp               3113 netinet/tcp_input.c 		tp->t_flags &= ~TF_PMTUD_PEND;
tp               3114 netinet/tcp_input.c 		tp->t_pmtud_mtu_sent = 0;
tp               3115 netinet/tcp_input.c 		tp->t_pmtud_mss_acked = 0;
tp               3116 netinet/tcp_input.c 		if (mss < tp->t_maxseg) {
tp               3122 netinet/tcp_input.c 			tp->snd_cwnd = ulmax((tp->snd_cwnd / tp->t_maxseg) *
tp               3127 netinet/tcp_input.c 		tp->snd_cwnd = ulmin(4 * mss, ulmax(2 * mss, 4380));
tp               3129 netinet/tcp_input.c 		tp->snd_cwnd = mss;
tp               3131 netinet/tcp_input.c 	tp->t_maxseg = mss;
tp               3137 netinet/tcp_input.c tcp_hdrsz(struct tcpcb *tp)
tp               3141 netinet/tcp_input.c 	switch (tp->pf) {
tp               3156 netinet/tcp_input.c 	if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
tp               3157 netinet/tcp_input.c 	    (tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP)
tp               3160 netinet/tcp_input.c 	if (tp->t_flags & TF_SIGNATURE)
tp               3177 netinet/tcp_input.c tcp_mss_update(tp)
tp               3178 netinet/tcp_input.c 	struct tcpcb *tp;
tp               3185 netinet/tcp_input.c 	so = tp->t_inpcb->inp_socket;
tp               3186 netinet/tcp_input.c 	mss = tp->t_maxseg;
tp               3188 netinet/tcp_input.c 	rt = in_pcbrtentry(tp->t_inpcb);
tp               3197 netinet/tcp_input.c 		tcp_mss(tp, mss);
tp               3223 netinet/tcp_input.c tcp_newreno(tp, th)
tp               3224 netinet/tcp_input.c 	struct tcpcb *tp;
tp               3227 netinet/tcp_input.c 	if (SEQ_LT(th->th_ack, tp->snd_last)) {
tp               3234 netinet/tcp_input.c 		tcp_seq onxt = tp->snd_nxt;
tp               3235 netinet/tcp_input.c 		u_long  ocwnd = tp->snd_cwnd;
tp               3236 netinet/tcp_input.c 		TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp               3237 netinet/tcp_input.c 		tp->t_rtttime = 0;
tp               3238 netinet/tcp_input.c 		tp->snd_nxt = th->th_ack;
tp               3243 netinet/tcp_input.c 		tp->snd_cwnd = tp->t_maxseg + (th->th_ack - tp->snd_una);
tp               3244 netinet/tcp_input.c 		(void) tcp_output(tp);
tp               3245 netinet/tcp_input.c 		tp->snd_cwnd = ocwnd;
tp               3246 netinet/tcp_input.c 		if (SEQ_GT(onxt, tp->snd_nxt))
tp               3247 netinet/tcp_input.c 			tp->snd_nxt = onxt;
tp               3252 netinet/tcp_input.c 		if (tp->snd_cwnd > th->th_ack - tp->snd_una)
tp               3253 netinet/tcp_input.c 			tp->snd_cwnd -= th->th_ack - tp->snd_una;
tp               3255 netinet/tcp_input.c 			tp->snd_cwnd = 0;
tp               3256 netinet/tcp_input.c 		tp->snd_cwnd += tp->t_maxseg;
tp               3386 netinet/tcp_input.c syn_cache_insert(sc, tp)
tp               3388 netinet/tcp_input.c 	struct tcpcb *tp;
tp               3473 netinet/tcp_input.c 	LIST_INSERT_HEAD(&tp->t_sc, sc, sc_tpq);
tp               3550 netinet/tcp_input.c syn_cache_cleanup(tp)
tp               3551 netinet/tcp_input.c 	struct tcpcb *tp;
tp               3558 netinet/tcp_input.c 	for (sc = LIST_FIRST(&tp->t_sc); sc != NULL; sc = nsc) {
tp               3562 netinet/tcp_input.c 		if (sc->sc_tp != tp)
tp               3569 netinet/tcp_input.c 	LIST_INIT(&tp->t_sc);
tp               3642 netinet/tcp_input.c 	struct tcpcb *tp = 0;
tp               3786 netinet/tcp_input.c 	tp = intotcpcb(inp);
tp               3787 netinet/tcp_input.c 	tp->t_flags = sototcpcb(oso)->t_flags & TF_NODELAY;
tp               3789 netinet/tcp_input.c 		tp->requested_s_scale = sc->sc_requested_s_scale;
tp               3790 netinet/tcp_input.c 		tp->request_r_scale = sc->sc_request_r_scale;
tp               3791 netinet/tcp_input.c 		tp->snd_scale = sc->sc_requested_s_scale;
tp               3792 netinet/tcp_input.c 		tp->rcv_scale = sc->sc_request_r_scale;
tp               3793 netinet/tcp_input.c 		tp->t_flags |= TF_REQ_SCALE|TF_RCVD_SCALE;
tp               3796 netinet/tcp_input.c 		tp->t_flags |= TF_REQ_TSTMP|TF_RCVD_TSTMP;
tp               3798 netinet/tcp_input.c 	tp->t_template = tcp_template(tp);
tp               3799 netinet/tcp_input.c 	if (tp->t_template == 0) {
tp               3800 netinet/tcp_input.c 		tp = tcp_drop(tp, ENOBUFS);	/* destroys socket */
tp               3806 netinet/tcp_input.c 	tp->sack_enable = sc->sc_flags & SCF_SACK_PERMIT;
tp               3809 netinet/tcp_input.c 	tp->ts_modulate = sc->sc_modulate;
tp               3810 netinet/tcp_input.c 	tp->iss = sc->sc_iss;
tp               3811 netinet/tcp_input.c 	tp->irs = sc->sc_irs;
tp               3812 netinet/tcp_input.c 	tcp_sendseqinit(tp);
tp               3814 netinet/tcp_input.c 	tp->snd_last = tp->snd_una;
tp               3817 netinet/tcp_input.c 	tp->snd_fack = tp->snd_una;
tp               3818 netinet/tcp_input.c 	tp->retran_data = 0;
tp               3819 netinet/tcp_input.c 	tp->snd_awnd = 0;
tp               3823 netinet/tcp_input.c 		tp->t_flags |= TF_ECN_PERMIT;
tp               3829 netinet/tcp_input.c 		tp->t_flags |= TF_SACK_PERMIT;
tp               3833 netinet/tcp_input.c 		tp->t_flags |= TF_SIGNATURE;
tp               3835 netinet/tcp_input.c 	tcp_rcvseqinit(tp);
tp               3836 netinet/tcp_input.c 	tp->t_state = TCPS_SYN_RECEIVED;
tp               3837 netinet/tcp_input.c 	tp->t_rcvtime = tcp_now;
tp               3838 netinet/tcp_input.c 	TCP_TIMER_ARM(tp, TCPT_KEEP, tcptv_keep_init);
tp               3841 netinet/tcp_input.c 	tcp_mss(tp, sc->sc_peermaxseg);	 /* sets t_maxseg */
tp               3843 netinet/tcp_input.c 		tcp_mss_update(tp);
tp               3846 netinet/tcp_input.c 		tp->snd_cwnd = tp->t_maxseg;
tp               3847 netinet/tcp_input.c 	tp->snd_wl1 = sc->sc_irs;
tp               3848 netinet/tcp_input.c 	tp->rcv_up = sc->sc_irs + 1;
tp               3854 netinet/tcp_input.c 	tp->snd_up = tp->snd_una;
tp               3855 netinet/tcp_input.c 	tp->snd_max = tp->snd_nxt = tp->iss+1;
tp               3856 netinet/tcp_input.c 	TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
tp               3857 netinet/tcp_input.c 	if (sc->sc_win > 0 && SEQ_GT(tp->rcv_nxt + sc->sc_win, tp->rcv_adv))
tp               3858 netinet/tcp_input.c 		tp->rcv_adv = tp->rcv_nxt + sc->sc_win;
tp               3859 netinet/tcp_input.c 	tp->last_ack_sent = tp->rcv_nxt;
tp               3974 netinet/tcp_input.c 	struct tcpcb tb, *tp;
tp               3980 netinet/tcp_input.c 	tp = sototcpcb(so);
tp               3996 netinet/tcp_input.c 	if (optp || (tp->t_flags & TF_SIGNATURE)) {
tp               4000 netinet/tcp_input.c 		tb.pf = tp->pf;
tp               4002 netinet/tcp_input.c 		tb.sack_enable = tp->sack_enable;
tp               4006 netinet/tcp_input.c 		if (tp->t_flags & TF_SIGNATURE)
tp               4119 netinet/tcp_input.c 	sc->sc_tp = tp;
tp               4121 netinet/tcp_input.c 		syn_cache_insert(sc, tp);
tp                111 netinet/tcp_output.c void tcp_print_holes(struct tcpcb *tp);
tp                114 netinet/tcp_output.c tcp_print_holes(struct tcpcb *tp)
tp                116 netinet/tcp_output.c 	struct sackhole *p = tp->snd_holes;
tp                134 netinet/tcp_output.c tcp_sack_output(struct tcpcb *tp)
tp                138 netinet/tcp_output.c 	if (!tp->sack_enable)
tp                140 netinet/tcp_output.c 	p = tp->snd_holes;
tp                150 netinet/tcp_output.c 		     tp->t_dupacks == tcprexmtthresh) &&
tp                153 netinet/tcp_output.c 			if (SEQ_LT(p->rxmit, tp->snd_una)) {/* old SACK hole */
tp                159 netinet/tcp_output.c 				tcp_print_holes(tp);
tp                175 netinet/tcp_output.c tcp_sack_adjust(struct tcpcb *tp)
tp                177 netinet/tcp_output.c 	struct sackhole *cur = tp->snd_holes;
tp                180 netinet/tcp_output.c 	if (SEQ_GEQ(tp->snd_nxt, tp->rcv_lastsack))
tp                188 netinet/tcp_output.c 		if (SEQ_LT(tp->snd_nxt, cur->end))
tp                190 netinet/tcp_output.c 		if (SEQ_GEQ(tp->snd_nxt, cur->next->start))
tp                193 netinet/tcp_output.c 			tp->snd_nxt = cur->next->start;
tp                197 netinet/tcp_output.c 	if (SEQ_LT(tp->snd_nxt, cur->end))
tp                199 netinet/tcp_output.c 	tp->snd_nxt = tp->rcv_lastsack;
tp                208 netinet/tcp_output.c tcp_output(tp)
tp                209 netinet/tcp_output.c 	struct tcpcb *tp;
tp                211 netinet/tcp_output.c 	struct socket *so = tp->t_inpcb->inp_socket;
tp                234 netinet/tcp_output.c 	if (tp->sack_enable && (tp->t_flags & TF_SIGNATURE))
tp                244 netinet/tcp_output.c 	idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una);
tp                245 netinet/tcp_output.c 	if (idle && (tcp_now - tp->t_rcvtime) >= tp->t_rxtcur)
tp                251 netinet/tcp_output.c 		tp->snd_cwnd = 2 * tp->t_maxseg;
tp                255 netinet/tcp_output.c 		tp->t_flags |= TF_LASTIDLE;
tp                258 netinet/tcp_output.c 		tp->t_flags &= ~TF_LASTIDLE;
tp                267 netinet/tcp_output.c 	if (tp->sack_enable && SEQ_LT(tp->snd_nxt, tp->snd_max))
tp                268 netinet/tcp_output.c 		tcp_sack_adjust(tp);
tp                270 netinet/tcp_output.c 	off = tp->snd_nxt - tp->snd_una;
tp                276 netinet/tcp_output.c 	if (tp->sack_enable && (tp->t_dupacks > tcprexmtthresh))
tp                277 netinet/tcp_output.c 		win = tp->snd_wnd;
tp                280 netinet/tcp_output.c 	win = ulmin(tp->snd_wnd, tp->snd_cwnd);
tp                282 netinet/tcp_output.c 	flags = tcp_outflags[tp->t_state];
tp                292 netinet/tcp_output.c 	if (tp->sack_enable && !sendalot) {
tp                293 netinet/tcp_output.c 		if (tp->t_dupacks >= tcprexmtthresh &&
tp                294 netinet/tcp_output.c 		    (p = tcp_sack_output(tp))) {
tp                295 netinet/tcp_output.c 			off = p->rxmit - tp->snd_una;
tp                300 netinet/tcp_output.c 			len = min(tp->t_maxseg, p->end - p->rxmit);
tp                303 netinet/tcp_output.c 			if (SEQ_LT(tp->snd_una, tp->snd_last))
tp                304 netinet/tcp_output.c 				tp->snd_cwnd -= tp->t_maxseg;
tp                317 netinet/tcp_output.c 	if (tp->t_force) {
tp                339 netinet/tcp_output.c 			TCP_TIMER_DISARM(tp, TCPT_PERSIST);
tp                340 netinet/tcp_output.c 			tp->t_rxtshift = 0;
tp                355 netinet/tcp_output.c 	if (tp->sack_enable && len && SEQ_GT(tp->snd_last, tp->snd_una) &&
tp                356 netinet/tcp_output.c 	    (tp->snd_awnd >= tp->snd_cwnd))
tp                376 netinet/tcp_output.c 			TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp                377 netinet/tcp_output.c 			tp->t_rxtshift = 0;
tp                378 netinet/tcp_output.c 			tp->snd_nxt = tp->snd_una;
tp                379 netinet/tcp_output.c 			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0)
tp                380 netinet/tcp_output.c 				tcp_setpersist(tp);
tp                390 netinet/tcp_output.c 	txmaxseg = ulmin(so->so_snd.sb_hiwat / 2, tp->t_maxseg);
tp                414 netinet/tcp_output.c 		if ((idle || tp->t_flags & TF_NODELAY) &&
tp                417 netinet/tcp_output.c 		if (tp->t_force)
tp                419 netinet/tcp_output.c 		if (len >= tp->max_sndwnd / 2 && tp->max_sndwnd > 0)
tp                421 netinet/tcp_output.c 		if (SEQ_LT(tp->snd_nxt, tp->snd_max))
tp                442 netinet/tcp_output.c 		long adv = lmin(win, (long)TCP_MAXWIN << tp->rcv_scale) -
tp                443 netinet/tcp_output.c 			(tp->rcv_adv - tp->rcv_nxt);
tp                445 netinet/tcp_output.c 		if (adv >= (long) (2 * tp->t_maxseg))
tp                454 netinet/tcp_output.c 	if (tp->t_flags & TF_ACKNOW)
tp                458 netinet/tcp_output.c 	if (SEQ_GT(tp->snd_up, tp->snd_una))
tp                466 netinet/tcp_output.c 	    ((tp->t_flags & TF_SENTFIN) == 0 || tp->snd_nxt == tp->snd_una))
tp                474 netinet/tcp_output.c 	if (SEQ_GT(tp->snd_max, tp->snd_una) &&
tp                475 netinet/tcp_output.c 	    TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 &&
tp                476 netinet/tcp_output.c 	    TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
tp                477 netinet/tcp_output.c 		TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
tp                504 netinet/tcp_output.c 	if (so->so_snd.sb_cc && TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 &&
tp                505 netinet/tcp_output.c 	    TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
tp                506 netinet/tcp_output.c 		tp->t_rxtshift = 0;
tp                507 netinet/tcp_output.c 		tcp_setpersist(tp);
tp                527 netinet/tcp_output.c 	switch (tp->pf) {
tp                544 netinet/tcp_output.c 		tp->snd_nxt = tp->iss;
tp                545 netinet/tcp_output.c 		if ((tp->t_flags & TF_NOOPT) == 0) {
tp                550 netinet/tcp_output.c 			mss = htons((u_int16_t) tcp_mss(tp, 0));
tp                555 netinet/tcp_output.c 				tcp_mss_update(tp);
tp                563 netinet/tcp_output.c 			if (tp->sack_enable && ((flags & TH_ACK) == 0 ||
tp                564 netinet/tcp_output.c 			    (tp->t_flags & TF_SACK_PERMIT))) {
tp                571 netinet/tcp_output.c 			if ((tp->t_flags & TF_REQ_SCALE) &&
tp                573 netinet/tcp_output.c 			    (tp->t_flags & TF_RCVD_SCALE))) {
tp                578 netinet/tcp_output.c 					tp->request_r_scale);
tp                589 netinet/tcp_output.c 	if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
tp                592 netinet/tcp_output.c 	     (tp->t_flags & TF_RCVD_TSTMP))) {
tp                597 netinet/tcp_output.c 		*lp++ = htonl(tcp_now + tp->ts_modulate);
tp                598 netinet/tcp_output.c 		*lp   = htonl(tp->ts_recent);
tp                603 netinet/tcp_output.c 	if (tp->t_flags & TF_SIGNATURE) {
tp                635 netinet/tcp_output.c 	if (tp->sack_enable && tp->t_state == TCPS_ESTABLISHED &&
tp                636 netinet/tcp_output.c 	    (tp->t_flags & (TF_SACK_PERMIT|TF_NOOPT)) == TF_SACK_PERMIT &&
tp                637 netinet/tcp_output.c 	    tp->rcv_numsacks) {
tp                645 netinet/tcp_output.c 		for (i = 0; (i < tp->rcv_numsacks && count < maxsack); i++) {
tp                646 netinet/tcp_output.c 			struct sackblk sack = tp->sackblks[i];
tp                669 netinet/tcp_output.c 	if (len > tp->t_maxopd - optlen) {
tp                670 netinet/tcp_output.c 		len = tp->t_maxopd - optlen;
tp                686 netinet/tcp_output.c 		if (tp->t_force && len == 1)
tp                688 netinet/tcp_output.c 		else if (SEQ_LT(tp->snd_nxt, tp->snd_max)) {
tp                743 netinet/tcp_output.c 		if (tp->t_flags & TF_ACKNOW)
tp                747 netinet/tcp_output.c 		else if (SEQ_GT(tp->snd_up, tp->snd_una))
tp                770 netinet/tcp_output.c 	if (!tp->t_template)
tp                773 netinet/tcp_output.c 	if (tp->t_template->m_len != hdrlen - optlen)
tp                776 netinet/tcp_output.c 	bcopy(mtod(tp->t_template, caddr_t), mtod(m, caddr_t),
tp                777 netinet/tcp_output.c 		tp->t_template->m_len);
tp                778 netinet/tcp_output.c 	th = (struct tcphdr *)(mtod(m, caddr_t) + tp->t_template->m_len -
tp                786 netinet/tcp_output.c 	if ((flags & TH_FIN) && (tp->t_flags & TF_SENTFIN) &&
tp                787 netinet/tcp_output.c 	    (tp->snd_nxt == tp->snd_max))
tp                788 netinet/tcp_output.c 		tp->snd_nxt--;
tp                802 netinet/tcp_output.c 	if (len || (flags & (TH_SYN|TH_FIN)) || TCP_TIMER_ISARMED(tp, TCPT_PERSIST))
tp                803 netinet/tcp_output.c 		th->th_seq = htonl(tp->snd_nxt);
tp                805 netinet/tcp_output.c 		th->th_seq = htonl(tp->snd_max);
tp                819 netinet/tcp_output.c 		tp->retran_data += len;
tp                826 netinet/tcp_output.c 	th->th_ack = htonl(tp->rcv_nxt);
tp                837 netinet/tcp_output.c 		if (tp->t_flags & TF_RCVD_CE) {
tp                841 netinet/tcp_output.c 		if (!(tp->t_flags & TF_DISABLE_ECN)) {
tp                848 netinet/tcp_output.c 			else if ((tp->t_flags & TF_ECN_PERMIT) &&
tp                856 netinet/tcp_output.c 		if ((tp->t_flags & TF_ECN_PERMIT) &&
tp                857 netinet/tcp_output.c 		    (tp->t_flags & TF_SEND_CWR)) {
tp                859 netinet/tcp_output.c 			tp->t_flags &= ~TF_SEND_CWR;
tp                870 netinet/tcp_output.c 	if (win < (long)(so->so_rcv.sb_hiwat / 4) && win < (long)tp->t_maxseg)
tp                872 netinet/tcp_output.c 	if (win > (long)TCP_MAXWIN << tp->rcv_scale)
tp                873 netinet/tcp_output.c 		win = (long)TCP_MAXWIN << tp->rcv_scale;
tp                874 netinet/tcp_output.c 	if (win < (long)(int32_t)(tp->rcv_adv - tp->rcv_nxt))
tp                875 netinet/tcp_output.c 		win = (long)(int32_t)(tp->rcv_adv - tp->rcv_nxt);
tp                878 netinet/tcp_output.c 	th->th_win = htons((u_int16_t) (win>>tp->rcv_scale));
tp                879 netinet/tcp_output.c 	if (SEQ_GT(tp->snd_up, tp->snd_nxt)) {
tp                880 netinet/tcp_output.c 		u_int32_t urp = tp->snd_up - tp->snd_nxt;
tp                892 netinet/tcp_output.c 		tp->snd_up = tp->snd_una;		/* drag it along */
tp                895 netinet/tcp_output.c 	if (tp->t_flags & TF_SIGNATURE) {
tp                903 netinet/tcp_output.c 		switch (tp->pf) {
tp                935 netinet/tcp_output.c 		if (tcp_signature(tdb, tp->pf, m, th, iphlen, 0,
tp                945 netinet/tcp_output.c 	switch (tp->pf) {
tp                968 netinet/tcp_output.c 	if (tp->t_force == 0 || TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
tp                969 netinet/tcp_output.c 		tcp_seq startseq = tp->snd_nxt;
tp                976 netinet/tcp_output.c 				tp->snd_nxt++;
tp                978 netinet/tcp_output.c 				tp->snd_nxt++;
tp                979 netinet/tcp_output.c 				tp->t_flags |= TF_SENTFIN;
tp                983 netinet/tcp_output.c 		if (tp->sack_enable) {
tp                984 netinet/tcp_output.c 			if (sack_rxmit && (p->rxmit != tp->snd_nxt)) {
tp                989 netinet/tcp_output.c 		tp->snd_nxt += len;
tp                990 netinet/tcp_output.c 		if (SEQ_GT(tp->snd_nxt, tp->snd_max)) {
tp                991 netinet/tcp_output.c 			tp->snd_max = tp->snd_nxt;
tp                996 netinet/tcp_output.c 			if (tp->t_rtttime == 0) {
tp                997 netinet/tcp_output.c 				tp->t_rtttime = tcp_now;
tp                998 netinet/tcp_output.c 				tp->t_rtseq = startseq;
tp               1013 netinet/tcp_output.c 		if (tp->sack_enable && sack_rxmit &&
tp               1014 netinet/tcp_output.c 		    TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 &&
tp               1015 netinet/tcp_output.c 		    tp->snd_nxt != tp->snd_max) {
tp               1016 netinet/tcp_output.c 			TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
tp               1017 netinet/tcp_output.c 			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
tp               1018 netinet/tcp_output.c 				TCP_TIMER_DISARM(tp, TCPT_PERSIST);
tp               1019 netinet/tcp_output.c 				tp->t_rxtshift = 0;
tp               1024 netinet/tcp_output.c 		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 &&
tp               1025 netinet/tcp_output.c 		    tp->snd_nxt != tp->snd_una) {
tp               1026 netinet/tcp_output.c 			TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
tp               1027 netinet/tcp_output.c 			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
tp               1028 netinet/tcp_output.c 				TCP_TIMER_DISARM(tp, TCPT_PERSIST);
tp               1029 netinet/tcp_output.c 				tp->t_rxtshift = 0;
tp               1033 netinet/tcp_output.c 		if (SEQ_GT(tp->snd_nxt + len, tp->snd_max))
tp               1034 netinet/tcp_output.c 			tp->snd_max = tp->snd_nxt + len;
tp               1040 netinet/tcp_output.c 		tcp_trace(TA_OUTPUT, tp->t_state, tp, mtod(m, caddr_t), 0,
tp               1056 netinet/tcp_output.c 	if (tcp_do_ecn && (tp->t_flags & TF_ECN_PERMIT)) {
tp               1057 netinet/tcp_output.c 		if (len == 0 || SEQ_LT(tp->snd_nxt, tp->snd_max) ||
tp               1058 netinet/tcp_output.c 		    (tp->t_force && len == 1)) {
tp               1067 netinet/tcp_output.c 	switch (tp->pf) {
tp               1077 netinet/tcp_output.c 			ip->ip_ttl = tp->t_inpcb->inp_ip.ip_ttl;
tp               1078 netinet/tcp_output.c 			ip->ip_tos = tp->t_inpcb->inp_ip.ip_tos;
tp               1084 netinet/tcp_output.c 		error = ip_output(m, tp->t_inpcb->inp_options,
tp               1085 netinet/tcp_output.c 			&tp->t_inpcb->inp_route,
tp               1088 netinet/tcp_output.c 			(void *)NULL, tp->t_inpcb);
tp               1101 netinet/tcp_output.c 			ip6->ip6_hlim = in6_selecthlim(tp->t_inpcb, NULL);
tp               1107 netinet/tcp_output.c 		error = ip6_output(m, tp->t_inpcb->inp_outputopts6,
tp               1108 netinet/tcp_output.c 			  &tp->t_inpcb->inp_route6,
tp               1110 netinet/tcp_output.c 			  tp->t_inpcb);
tp               1117 netinet/tcp_output.c 	tp->snd_awnd = tcp_seq_subtract(tp->snd_max, tp->snd_fack) +
tp               1118 netinet/tcp_output.c 		tp->retran_data;
tp               1128 netinet/tcp_output.c 			tp->snd_cwnd = tp->t_maxseg;
tp               1138 netinet/tcp_output.c 			tcp_mtudisc(tp->t_inpcb, -1);
tp               1142 netinet/tcp_output.c 		    TCPS_HAVERCVDSYN(tp->t_state)) {
tp               1143 netinet/tcp_output.c 			tp->t_softerror = error;
tp               1148 netinet/tcp_output.c 		if (tp->t_flags & TF_DELACK)
tp               1149 netinet/tcp_output.c 			TCP_RESTART_DELACK(tp);
tp               1154 netinet/tcp_output.c 	if (packetlen > tp->t_pmtud_mtu_sent)
tp               1155 netinet/tcp_output.c 		tp->t_pmtud_mtu_sent = packetlen;
tp               1158 netinet/tcp_output.c 	if (tp->t_flags & TF_DELACK)
tp               1167 netinet/tcp_output.c 	if (win > 0 && SEQ_GT(tp->rcv_nxt+win, tp->rcv_adv))
tp               1168 netinet/tcp_output.c 		tp->rcv_adv = tp->rcv_nxt + win;
tp               1169 netinet/tcp_output.c 	tp->last_ack_sent = tp->rcv_nxt;
tp               1170 netinet/tcp_output.c 	tp->t_flags &= ~TF_ACKNOW;
tp               1171 netinet/tcp_output.c 	TCP_CLEAR_DELACK(tp);
tp               1182 netinet/tcp_output.c tcp_setpersist(struct tcpcb *tp)
tp               1184 netinet/tcp_output.c 	int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> (1 + TCP_RTT_BASE_SHIFT);
tp               1187 netinet/tcp_output.c 	if (TCP_TIMER_ISARMED(tp, TCPT_REXMT))
tp               1192 netinet/tcp_output.c 	if (t < tp->t_rttmin)
tp               1193 netinet/tcp_output.c 		t = tp->t_rttmin;
tp               1194 netinet/tcp_output.c 	TCPT_RANGESET(nticks, t * tcp_backoff[tp->t_rxtshift],
tp               1196 netinet/tcp_output.c 	TCP_TIMER_ARM(tp, TCPT_PERSIST, nticks);
tp               1197 netinet/tcp_output.c 	if (tp->t_rxtshift < TCP_MAXRXTSHIFT)
tp               1198 netinet/tcp_output.c 		tp->t_rxtshift++;
tp                 53 netinet/tcp_seq.h #define	tcp_rcvseqinit(tp) \
tp                 54 netinet/tcp_seq.h 	(tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
tp                 56 netinet/tcp_seq.h #define	tcp_sendseqinit(tp) \
tp                 57 netinet/tcp_seq.h 	(tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
tp                 58 netinet/tcp_seq.h 	    (tp)->iss
tp                204 netinet/tcp_subr.c tcp_template(tp)
tp                205 netinet/tcp_subr.c 	struct tcpcb *tp;
tp                207 netinet/tcp_subr.c 	struct inpcb *inp = tp->t_inpcb;
tp                211 netinet/tcp_subr.c 	if ((m = tp->t_template) == 0) {
tp                216 netinet/tcp_subr.c 		switch (tp->pf) {
tp                245 netinet/tcp_subr.c 	switch(tp->pf) {
tp                320 netinet/tcp_subr.c tcp_respond(tp, template, m, ack, seq, flags)
tp                321 netinet/tcp_subr.c 	struct tcpcb *tp;
tp                334 netinet/tcp_subr.c 	if (tp) {
tp                335 netinet/tcp_subr.c 		win = sbspace(&tp->t_inpcb->inp_socket->so_rcv);
tp                340 netinet/tcp_subr.c 		af = tp->pf;
tp                346 netinet/tcp_subr.c 		ro = &tp->t_inpcb->inp_route;
tp                420 netinet/tcp_subr.c 	if (tp)
tp                421 netinet/tcp_subr.c 		win >>= tp->rcv_scale;
tp                433 netinet/tcp_subr.c 			in6_selecthlim(tp ? tp->t_inpcb : NULL, NULL);	/*XXX*/
tp                439 netinet/tcp_subr.c 		ip6_output(m, tp ? tp->t_inpcb->inp_outputopts6 : NULL,
tp                441 netinet/tcp_subr.c 		    tp ? tp->t_inpcb : NULL);
tp                458 netinet/tcp_subr.c 			(void *)NULL, tp ? tp->t_inpcb : (void *)NULL);
tp                470 netinet/tcp_subr.c 	struct tcpcb *tp;
tp                473 netinet/tcp_subr.c 	tp = pool_get(&tcpcb_pool, PR_NOWAIT);
tp                474 netinet/tcp_subr.c 	if (tp == NULL)
tp                476 netinet/tcp_subr.c 	bzero((char *) tp, sizeof(struct tcpcb));
tp                477 netinet/tcp_subr.c 	TAILQ_INIT(&tp->t_segq);
tp                478 netinet/tcp_subr.c 	tp->t_maxseg = tcp_mssdflt;
tp                479 netinet/tcp_subr.c 	tp->t_maxopd = 0;
tp                481 netinet/tcp_subr.c 	TCP_INIT_DELACK(tp);
tp                483 netinet/tcp_subr.c 		TCP_TIMER_INIT(tp, i);
tp                484 netinet/tcp_subr.c 	timeout_set(&tp->t_reap_to, tcp_reaper, tp);
tp                487 netinet/tcp_subr.c 	tp->sack_enable = tcp_do_sack;
tp                489 netinet/tcp_subr.c 	tp->t_flags = tcp_do_rfc1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0;
tp                490 netinet/tcp_subr.c 	tp->t_inpcb = inp;
tp                496 netinet/tcp_subr.c 	tp->t_srtt = TCPTV_SRTTBASE;
tp                497 netinet/tcp_subr.c 	tp->t_rttvar = tcp_rttdflt * PR_SLOWHZ <<
tp                499 netinet/tcp_subr.c 	tp->t_rttmin = TCPTV_MIN;
tp                500 netinet/tcp_subr.c 	TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp),
tp                502 netinet/tcp_subr.c 	tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT;
tp                503 netinet/tcp_subr.c 	tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT;
tp                505 netinet/tcp_subr.c 	tp->t_pmtud_mtu_sent = 0;
tp                506 netinet/tcp_subr.c 	tp->t_pmtud_mss_acked = 0;
tp                511 netinet/tcp_subr.c 		tp->pf = PF_INET;
tp                513 netinet/tcp_subr.c 		tp->pf = PF_INET6;
tp                515 netinet/tcp_subr.c 	tp->pf = PF_INET;
tp                525 netinet/tcp_subr.c 	inp->inp_ppcb = (caddr_t)tp;
tp                526 netinet/tcp_subr.c 	return (tp);
tp                535 netinet/tcp_subr.c tcp_drop(tp, errno)
tp                536 netinet/tcp_subr.c 	struct tcpcb *tp;
tp                539 netinet/tcp_subr.c 	struct socket *so = tp->t_inpcb->inp_socket;
tp                541 netinet/tcp_subr.c 	if (TCPS_HAVERCVDSYN(tp->t_state)) {
tp                542 netinet/tcp_subr.c 		tp->t_state = TCPS_CLOSED;
tp                543 netinet/tcp_subr.c 		(void) tcp_output(tp);
tp                547 netinet/tcp_subr.c 	if (errno == ETIMEDOUT && tp->t_softerror)
tp                548 netinet/tcp_subr.c 		errno = tp->t_softerror;
tp                550 netinet/tcp_subr.c 	return (tcp_close(tp));
tp                560 netinet/tcp_subr.c tcp_close(struct tcpcb *tp)
tp                562 netinet/tcp_subr.c 	struct inpcb *inp = tp->t_inpcb;
tp                569 netinet/tcp_subr.c 	tcp_reass_lock(tp);
tp                570 netinet/tcp_subr.c 	tcp_freeq(tp);
tp                571 netinet/tcp_subr.c 	tcp_reass_unlock(tp);
tp                573 netinet/tcp_subr.c 	tcp_canceltimers(tp);
tp                574 netinet/tcp_subr.c 	TCP_CLEAR_DELACK(tp);
tp                575 netinet/tcp_subr.c 	syn_cache_cleanup(tp);
tp                579 netinet/tcp_subr.c 	q = p = tp->snd_holes;
tp                586 netinet/tcp_subr.c 	if (tp->t_template)
tp                587 netinet/tcp_subr.c 		(void) m_free(tp->t_template);
tp                589 netinet/tcp_subr.c 	tp->t_flags |= TF_DEAD;
tp                590 netinet/tcp_subr.c 	timeout_add(&tp->t_reap_to, 0);
tp                601 netinet/tcp_subr.c 	struct tcpcb *tp = arg;
tp                605 netinet/tcp_subr.c 	pool_put(&tcpcb_pool, tp);
tp                611 netinet/tcp_subr.c tcp_freeq(struct tcpcb *tp)
tp                616 netinet/tcp_subr.c 	while ((qe = TAILQ_FIRST(&tp->t_segq)) != NULL) {
tp                617 netinet/tcp_subr.c 		TAILQ_REMOVE(&tp->t_segq, qe, tcpqe_q);
tp                632 netinet/tcp_subr.c 		struct tcpcb *tp = (struct tcpcb *)inp->inp_ppcb;
tp                634 netinet/tcp_subr.c 		if (tp != NULL) {
tp                635 netinet/tcp_subr.c 			if (tcp_reass_lock_try(tp) == 0)
tp                637 netinet/tcp_subr.c 			if (tcp_freeq(tp))
tp                639 netinet/tcp_subr.c 			tcp_reass_unlock(tp);
tp                649 netinet/tcp_subr.c tcp_rscale(struct tcpcb *tp, u_long hiwat)
tp                651 netinet/tcp_subr.c 	tp->request_r_scale = 0;
tp                652 netinet/tcp_subr.c 	while (tp->request_r_scale < TCP_MAX_WINSHIFT &&
tp                653 netinet/tcp_subr.c 	       TCP_MAXWIN << tp->request_r_scale < hiwat)
tp                654 netinet/tcp_subr.c 		tp->request_r_scale++;
tp                667 netinet/tcp_subr.c 	struct tcpcb *tp = (struct tcpcb *)inp->inp_ppcb;
tp                677 netinet/tcp_subr.c 	if (tp->t_state == TCPS_ESTABLISHED &&
tp                681 netinet/tcp_subr.c 	} else if (TCPS_HAVEESTABLISHED(tp->t_state) == 0 &&
tp                682 netinet/tcp_subr.c 	    tp->t_rxtshift > 3 && tp->t_softerror)
tp                685 netinet/tcp_subr.c 		tp->t_softerror = error;
tp                699 netinet/tcp_subr.c 	struct tcpcb *tp;
tp                789 netinet/tcp_subr.c 			    (tp = intotcpcb(inp)) &&
tp                790 netinet/tcp_subr.c 			    SEQ_GEQ(seq, tp->snd_una) &&
tp                791 netinet/tcp_subr.c 			    SEQ_LT(seq, tp->snd_max))
tp                814 netinet/tcp_subr.c 	struct tcpcb *tp;
tp                849 netinet/tcp_subr.c 		if (inp && (tp = intotcpcb(inp)) &&
tp                850 netinet/tcp_subr.c 		    SEQ_GEQ(seq, tp->snd_una) &&
tp                851 netinet/tcp_subr.c 		    SEQ_LT(seq, tp->snd_max)) {
tp                862 netinet/tcp_subr.c 			if (mtu >= tp->t_pmtud_mtu_sent)
tp                864 netinet/tcp_subr.c 			if (mtu >= tcp_hdrsz(tp) + tp->t_pmtud_mss_acked) {
tp                869 netinet/tcp_subr.c 				tp->t_flags &= ~TF_PMTUD_PEND;
tp                879 netinet/tcp_subr.c 				if (tp->t_flags & TF_PMTUD_PEND) {
tp                880 netinet/tcp_subr.c 					if (SEQ_LT(tp->t_pmtud_th_seq, seq))
tp                883 netinet/tcp_subr.c 					tp->t_flags |= TF_PMTUD_PEND;
tp                884 netinet/tcp_subr.c 				tp->t_pmtud_th_seq = seq;
tp                885 netinet/tcp_subr.c 				tp->t_pmtud_nextmtu = icp->icmp_nextmtu;
tp                886 netinet/tcp_subr.c 				tp->t_pmtud_ip_len = icp->icmp_ip.ip_len;
tp                887 netinet/tcp_subr.c 				tp->t_pmtud_ip_hl = icp->icmp_ip.ip_hl;
tp                909 netinet/tcp_subr.c 			    (tp = intotcpcb(inp)) &&
tp                910 netinet/tcp_subr.c 			    SEQ_GEQ(seq, tp->snd_una) &&
tp                911 netinet/tcp_subr.c 			    SEQ_LT(seq, tp->snd_max))
tp                963 netinet/tcp_subr.c 	struct tcpcb *tp = intotcpcb(inp);
tp                967 netinet/tcp_subr.c 	if (tp != 0) {
tp                968 netinet/tcp_subr.c 		int orig_maxseg = tp->t_maxseg;
tp                978 netinet/tcp_subr.c 			if (orig_maxseg != tp->t_maxseg ||
tp                982 netinet/tcp_subr.c 		tcp_mss(tp, -1);
tp                987 netinet/tcp_subr.c 		tp->snd_nxt = tp->snd_una;
tp                989 netinet/tcp_subr.c 			tcp_output(tp);
tp                998 netinet/tcp_subr.c 	struct tcpcb *tp = intotcpcb(inp);
tp               1001 netinet/tcp_subr.c 	if (tp != 0 && rt != 0) {
tp               1009 netinet/tcp_subr.c 		tcp_mss(tp, -1);
tp               1019 netinet/tcp_subr.c tcp_set_iss_tsm(struct tcpcb *tp)
tp               1031 netinet/tcp_subr.c 	MD5Update(&ctx, (char *)&tp->t_inpcb->inp_lport, sizeof(u_short));
tp               1032 netinet/tcp_subr.c 	MD5Update(&ctx, (char *)&tp->t_inpcb->inp_fport, sizeof(u_short));
tp               1033 netinet/tcp_subr.c 	if (tp->pf == AF_INET6) {
tp               1034 netinet/tcp_subr.c 		MD5Update(&ctx, (char *)&tp->t_inpcb->inp_laddr6,
tp               1036 netinet/tcp_subr.c 		MD5Update(&ctx, (char *)&tp->t_inpcb->inp_faddr6,
tp               1039 netinet/tcp_subr.c 		MD5Update(&ctx, (char *)&tp->t_inpcb->inp_laddr,
tp               1041 netinet/tcp_subr.c 		MD5Update(&ctx, (char *)&tp->t_inpcb->inp_faddr,
tp               1046 netinet/tcp_subr.c 	tp->iss = digest[0] + tcp_iss;
tp               1047 netinet/tcp_subr.c 	tp->ts_modulate = digest[1];
tp                106 netinet/tcp_timer.c 	struct tcpcb *tp = arg;
tp                116 netinet/tcp_timer.c 	if (tp->t_flags & TF_DEAD) {
tp                120 netinet/tcp_timer.c 	tp->t_flags |= TF_ACKNOW;
tp                121 netinet/tcp_timer.c 	(void) tcp_output(tp);
tp                152 netinet/tcp_timer.c tcp_canceltimers(tp)
tp                153 netinet/tcp_timer.c 	struct tcpcb *tp;
tp                158 netinet/tcp_timer.c 		TCP_TIMER_DISARM(tp, i);
tp                174 netinet/tcp_timer.c tcp_timer_freesack(struct tcpcb *tp)
tp                180 netinet/tcp_timer.c 	q = tp->snd_holes;
tp                186 netinet/tcp_timer.c 	tp->snd_holes = 0;
tp                188 netinet/tcp_timer.c 	tp->snd_fack = tp->snd_una;
tp                189 netinet/tcp_timer.c 	tp->retran_data = 0;
tp                190 netinet/tcp_timer.c 	tp->snd_awnd = 0;
tp                198 netinet/tcp_timer.c 	struct tcpcb *tp = arg;
tp                203 netinet/tcp_timer.c 	if (tp->t_flags & TF_DEAD) {
tp                208 netinet/tcp_timer.c 	if ((tp->t_flags & TF_PMTUD_PEND) && tp->t_inpcb &&
tp                209 netinet/tcp_timer.c 	    SEQ_GEQ(tp->t_pmtud_th_seq, tp->snd_una) &&
tp                210 netinet/tcp_timer.c 	    SEQ_LT(tp->t_pmtud_th_seq, (int)(tp->snd_una + tp->t_maxseg))) {
tp                214 netinet/tcp_timer.c 		tp->t_flags &= ~TF_PMTUD_PEND;
tp                217 netinet/tcp_timer.c 		icmp.icmp_nextmtu = tp->t_pmtud_nextmtu;
tp                218 netinet/tcp_timer.c 		icmp.icmp_ip.ip_len = tp->t_pmtud_ip_len;
tp                219 netinet/tcp_timer.c 		icmp.icmp_ip.ip_hl = tp->t_pmtud_ip_hl;
tp                220 netinet/tcp_timer.c 		icmpsrc.sin_addr = tp->t_inpcb->inp_faddr;
tp                234 netinet/tcp_timer.c 	tcp_timer_freesack(tp);
tp                236 netinet/tcp_timer.c 	if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) {
tp                237 netinet/tcp_timer.c 		tp->t_rxtshift = TCP_MAXRXTSHIFT;
tp                239 netinet/tcp_timer.c 		(void)tcp_drop(tp, tp->t_softerror ?
tp                240 netinet/tcp_timer.c 		    tp->t_softerror : ETIMEDOUT);
tp                244 netinet/tcp_timer.c 	rto = TCP_REXMTVAL(tp);
tp                245 netinet/tcp_timer.c 	if (rto < tp->t_rttmin)
tp                246 netinet/tcp_timer.c 		rto = tp->t_rttmin;
tp                247 netinet/tcp_timer.c 	TCPT_RANGESET(tp->t_rxtcur,
tp                248 netinet/tcp_timer.c 	    rto * tcp_backoff[tp->t_rxtshift],
tp                249 netinet/tcp_timer.c 	    tp->t_rttmin, TCPTV_REXMTMAX);
tp                250 netinet/tcp_timer.c 	TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
tp                260 netinet/tcp_timer.c 	if (ip_mtudisc && tp->t_inpcb &&
tp                261 netinet/tcp_timer.c 	    TCPS_HAVEESTABLISHED(tp->t_state) &&
tp                262 netinet/tcp_timer.c 	    tp->t_rxtshift > TCP_MAXRXTSHIFT / 6) {
tp                263 netinet/tcp_timer.c 		struct inpcb *inp = tp->t_inpcb;
tp                278 netinet/tcp_timer.c 		switch(tp->pf) {
tp                317 netinet/tcp_timer.c 	if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
tp                318 netinet/tcp_timer.c 		in_losing(tp->t_inpcb);
tp                319 netinet/tcp_timer.c 		tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
tp                320 netinet/tcp_timer.c 		tp->t_srtt = 0;
tp                322 netinet/tcp_timer.c 	tp->snd_nxt = tp->snd_una;
tp                328 netinet/tcp_timer.c 	tp->snd_last = tp->snd_max;
tp                333 netinet/tcp_timer.c 	tp->t_rtttime = 0;
tp                339 netinet/tcp_timer.c 	if ((tp->t_state == TCPS_SYN_SENT || tp->t_state == TCPS_SYN_RECEIVED)
tp                340 netinet/tcp_timer.c 	    && tcp_do_ecn && !(tp->t_flags & TF_DISABLE_ECN))
tp                341 netinet/tcp_timer.c 		tp->t_flags |= TF_DISABLE_ECN;
tp                368 netinet/tcp_timer.c 		u_long win = ulmin(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg;
tp                371 netinet/tcp_timer.c 		tp->snd_cwnd = tp->t_maxseg;
tp                372 netinet/tcp_timer.c 		tp->snd_ssthresh = win * tp->t_maxseg;
tp                373 netinet/tcp_timer.c 		tp->t_dupacks = 0;
tp                375 netinet/tcp_timer.c 		tp->snd_last = tp->snd_max;
tp                376 netinet/tcp_timer.c 		tp->t_flags |= TF_SEND_CWR;
tp                382 netinet/tcp_timer.c 	(void) tcp_output(tp);
tp                391 netinet/tcp_timer.c 	struct tcpcb *tp = arg;
tp                396 netinet/tcp_timer.c 	if ((tp->t_flags & TF_DEAD) ||
tp                397 netinet/tcp_timer.c             TCP_TIMER_ISARMED(tp, TCPT_REXMT)) {
tp                409 netinet/tcp_timer.c 	rto = TCP_REXMTVAL(tp);
tp                410 netinet/tcp_timer.c 	if (rto < tp->t_rttmin)
tp                411 netinet/tcp_timer.c 		rto = tp->t_rttmin;
tp                412 netinet/tcp_timer.c 	if (tp->t_rxtshift == TCP_MAXRXTSHIFT &&
tp                413 netinet/tcp_timer.c 	    ((tcp_now - tp->t_rcvtime) >= tcp_maxpersistidle ||
tp                414 netinet/tcp_timer.c 	    (tcp_now - tp->t_rcvtime) >= rto * tcp_totbackoff)) {
tp                416 netinet/tcp_timer.c 		tp = tcp_drop(tp, ETIMEDOUT);
tp                419 netinet/tcp_timer.c 	tcp_setpersist(tp);
tp                420 netinet/tcp_timer.c 	tp->t_force = 1;
tp                421 netinet/tcp_timer.c 	(void) tcp_output(tp);
tp                422 netinet/tcp_timer.c 	tp->t_force = 0;
tp                430 netinet/tcp_timer.c 	struct tcpcb *tp = arg;
tp                434 netinet/tcp_timer.c 	if (tp->t_flags & TF_DEAD) {
tp                440 netinet/tcp_timer.c 	if (TCPS_HAVEESTABLISHED(tp->t_state) == 0)
tp                442 netinet/tcp_timer.c 	if (tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE &&
tp                443 netinet/tcp_timer.c 	    tp->t_state <= TCPS_CLOSING) {
tp                445 netinet/tcp_timer.c 		    ((tcp_now - tp->t_rcvtime) >= tcp_keepidle + tcp_maxidle))
tp                465 netinet/tcp_timer.c 		tcp_respond(tp, mtod(tp->t_template, caddr_t),
tp                466 netinet/tcp_timer.c 		    (struct mbuf *)NULL, tp->rcv_nxt - 1, tp->snd_una - 1, 0);
tp                468 netinet/tcp_timer.c 		tcp_respond(tp, mtod(tp->t_template, caddr_t),
tp                469 netinet/tcp_timer.c 		    (struct mbuf *)NULL, tp->rcv_nxt, tp->snd_una - 1, 0);
tp                471 netinet/tcp_timer.c 		TCP_TIMER_ARM(tp, TCPT_KEEP, tcp_keepintvl);
tp                473 netinet/tcp_timer.c 		TCP_TIMER_ARM(tp, TCPT_KEEP, tcp_keepidle);
tp                480 netinet/tcp_timer.c 	tp = tcp_drop(tp, ETIMEDOUT);
tp                488 netinet/tcp_timer.c 	struct tcpcb *tp = arg;
tp                492 netinet/tcp_timer.c 	if (tp->t_flags & TF_DEAD) {
tp                498 netinet/tcp_timer.c 	tcp_timer_freesack(tp);
tp                501 netinet/tcp_timer.c 	if (tp->t_state != TCPS_TIME_WAIT &&
tp                502 netinet/tcp_timer.c 	    ((tcp_maxidle == 0) || ((tcp_now - tp->t_rcvtime) <= tcp_maxidle)))
tp                503 netinet/tcp_timer.c 		TCP_TIMER_ARM(tp, TCPT_2MSL, tcp_keepintvl);
tp                505 netinet/tcp_timer.c 		tp = tcp_close(tp);
tp                118 netinet/tcp_timer.h #define	TCP_TIMER_INIT(tp, timer)					\
tp                119 netinet/tcp_timer.h 	timeout_set(&(tp)->t_timer[(timer)], tcp_timer_funcs[(timer)], tp)
tp                121 netinet/tcp_timer.h #define	TCP_TIMER_ARM(tp, timer, nticks)				\
tp                122 netinet/tcp_timer.h 	timeout_add(&(tp)->t_timer[(timer)], (nticks) * (hz / PR_SLOWHZ))
tp                124 netinet/tcp_timer.h #define	TCP_TIMER_DISARM(tp, timer)					\
tp                125 netinet/tcp_timer.h 	timeout_del(&(tp)->t_timer[(timer)])
tp                127 netinet/tcp_timer.h #define	TCP_TIMER_ISARMED(tp, timer)					\
tp                128 netinet/tcp_timer.h 	timeout_pending(&(tp)->t_timer[(timer)])
tp                154 netinet/tcp_usrreq.c 	struct tcpcb *tp = NULL;
tp                194 netinet/tcp_usrreq.c 		tp = intotcpcb(inp);
tp                197 netinet/tcp_usrreq.c 		tcp_acounts[tp->t_state][req]++;
tp                199 netinet/tcp_usrreq.c 		ostate = tp->t_state;
tp                218 netinet/tcp_usrreq.c 		tp = sototcpcb(so);
tp                229 netinet/tcp_usrreq.c 		tp = tcp_disconnect(tp);
tp                261 netinet/tcp_usrreq.c 			tp->t_state = TCPS_LISTEN;
tp                316 netinet/tcp_usrreq.c 		tp->t_template = tcp_template(tp);
tp                317 netinet/tcp_usrreq.c 		if (tp->t_template == 0) {
tp                326 netinet/tcp_usrreq.c 		tcp_rscale(tp, so->so_rcv.sb_hiwat);
tp                330 netinet/tcp_usrreq.c 		tp->t_state = TCPS_SYN_SENT;
tp                331 netinet/tcp_usrreq.c 		TCP_TIMER_ARM(tp, TCPT_KEEP, tcptv_keep_init);
tp                333 netinet/tcp_usrreq.c 		tp->iss = tcp_iss;
tp                336 netinet/tcp_usrreq.c 		tcp_set_iss_tsm(tp);
tp                338 netinet/tcp_usrreq.c 		tcp_sendseqinit(tp);
tp                340 netinet/tcp_usrreq.c 		tp->snd_last = tp->snd_una;
tp                343 netinet/tcp_usrreq.c 		tp->snd_fack = tp->snd_una;
tp                344 netinet/tcp_usrreq.c 		tp->retran_data = 0;
tp                345 netinet/tcp_usrreq.c 		tp->snd_awnd = 0;
tp                347 netinet/tcp_usrreq.c 		error = tcp_output(tp);
tp                369 netinet/tcp_usrreq.c 		tp = tcp_disconnect(tp);
tp                393 netinet/tcp_usrreq.c 		tp = tcp_usrclosed(tp);
tp                394 netinet/tcp_usrreq.c 		if (tp)
tp                395 netinet/tcp_usrreq.c 			error = tcp_output(tp);
tp                410 netinet/tcp_usrreq.c 			(void) tcp_output(tp);
tp                419 netinet/tcp_usrreq.c 		error = tcp_output(tp);
tp                426 netinet/tcp_usrreq.c 		tp = tcp_drop(tp, ECONNABORTED);
tp                438 netinet/tcp_usrreq.c 		    tp->t_oobflags & TCPOOB_HADDATA) {
tp                442 netinet/tcp_usrreq.c 		if ((tp->t_oobflags & TCPOOB_HAVEDATA) == 0) {
tp                447 netinet/tcp_usrreq.c 		*mtod(m, caddr_t) = tp->t_iobc;
tp                449 netinet/tcp_usrreq.c 			tp->t_oobflags ^= (TCPOOB_HAVEDATA | TCPOOB_HADDATA);
tp                467 netinet/tcp_usrreq.c 		tp->snd_up = tp->snd_una + so->so_snd.sb_cc;
tp                468 netinet/tcp_usrreq.c 		tp->t_force = 1;
tp                469 netinet/tcp_usrreq.c 		error = tcp_output(tp);
tp                470 netinet/tcp_usrreq.c 		tp->t_force = 0;
tp                494 netinet/tcp_usrreq.c 	if (tp && (so->so_options & SO_DEBUG))
tp                495 netinet/tcp_usrreq.c 		tcp_trace(TA_USER, ostate, tp, (caddr_t)0, req, 0);
tp                509 netinet/tcp_usrreq.c 	struct tcpcb *tp;
tp                522 netinet/tcp_usrreq.c 	tp = intotcpcb(inp);
tp                542 netinet/tcp_usrreq.c 	tp = intotcpcb(inp);
tp                555 netinet/tcp_usrreq.c 				tp->t_flags |= TF_NODELAY;
tp                557 netinet/tcp_usrreq.c 				tp->t_flags &= ~TF_NODELAY;
tp                567 netinet/tcp_usrreq.c 			if (i > 0 && i <= tp->t_maxseg)
tp                568 netinet/tcp_usrreq.c 				tp->t_maxseg = i;
tp                580 netinet/tcp_usrreq.c 			if (TCPS_HAVEESTABLISHED(tp->t_state)) {
tp                585 netinet/tcp_usrreq.c 			if (tp->t_flags & TF_SIGNATURE) {
tp                591 netinet/tcp_usrreq.c 				tp->sack_enable = 1;
tp                593 netinet/tcp_usrreq.c 				tp->sack_enable = 0;
tp                603 netinet/tcp_usrreq.c 			if (TCPS_HAVEESTABLISHED(tp->t_state)) {
tp                609 netinet/tcp_usrreq.c 				tp->t_flags |= TF_SIGNATURE;
tp                611 netinet/tcp_usrreq.c 				tp->sack_enable = 0;
tp                614 netinet/tcp_usrreq.c 				tp->t_flags &= ~TF_SIGNATURE;
tp                631 netinet/tcp_usrreq.c 			*mtod(m, int *) = tp->t_flags & TF_NODELAY;
tp                634 netinet/tcp_usrreq.c 			*mtod(m, int *) = tp->t_maxseg;
tp                638 netinet/tcp_usrreq.c 			*mtod(m, int *) = tp->sack_enable;
tp                643 netinet/tcp_usrreq.c 			*mtod(m, int *) = tp->t_flags & TF_SIGNATURE;
tp                665 netinet/tcp_usrreq.c 	struct tcpcb *tp;
tp                678 netinet/tcp_usrreq.c 	tp = tcp_newtcpcb(inp);
tp                679 netinet/tcp_usrreq.c 	if (tp == NULL) {
tp                687 netinet/tcp_usrreq.c 	tp->t_state = TCPS_CLOSED;
tp                691 netinet/tcp_usrreq.c 		tp->pf = PF_INET6;
tp                693 netinet/tcp_usrreq.c 		tp->pf = PF_INET;
tp                695 netinet/tcp_usrreq.c 	tp->pf = PF_INET;
tp                709 netinet/tcp_usrreq.c tcp_disconnect(tp)
tp                710 netinet/tcp_usrreq.c 	struct tcpcb *tp;
tp                712 netinet/tcp_usrreq.c 	struct socket *so = tp->t_inpcb->inp_socket;
tp                714 netinet/tcp_usrreq.c 	if (TCPS_HAVEESTABLISHED(tp->t_state) == 0)
tp                715 netinet/tcp_usrreq.c 		tp = tcp_close(tp);
tp                717 netinet/tcp_usrreq.c 		tp = tcp_drop(tp, 0);
tp                721 netinet/tcp_usrreq.c 		tp = tcp_usrclosed(tp);
tp                722 netinet/tcp_usrreq.c 		if (tp)
tp                723 netinet/tcp_usrreq.c 			(void) tcp_output(tp);
tp                725 netinet/tcp_usrreq.c 	return (tp);
tp                739 netinet/tcp_usrreq.c tcp_usrclosed(tp)
tp                740 netinet/tcp_usrreq.c 	struct tcpcb *tp;
tp                743 netinet/tcp_usrreq.c 	switch (tp->t_state) {
tp                748 netinet/tcp_usrreq.c 		tp->t_state = TCPS_CLOSED;
tp                749 netinet/tcp_usrreq.c 		tp = tcp_close(tp);
tp                754 netinet/tcp_usrreq.c 		tp->t_state = TCPS_FIN_WAIT_1;
tp                758 netinet/tcp_usrreq.c 		tp->t_state = TCPS_LAST_ACK;
tp                761 netinet/tcp_usrreq.c 	if (tp && tp->t_state >= TCPS_FIN_WAIT_2) {
tp                762 netinet/tcp_usrreq.c 		soisdisconnected(tp->t_inpcb->inp_socket);
tp                770 netinet/tcp_usrreq.c 		if (tp->t_state == TCPS_FIN_WAIT_2)
tp                771 netinet/tcp_usrreq.c 			TCP_TIMER_ARM(tp, TCPT_2MSL, tcp_maxidle);
tp                773 netinet/tcp_usrreq.c 	return (tp);
tp                790 netinet/tcp_usrreq.c 	struct tcpcb *tp = NULL;
tp                851 netinet/tcp_usrreq.c 		if (inp && (tp = intotcpcb(inp)) &&
tp                853 netinet/tcp_usrreq.c 			tp = tcp_drop(tp, ECONNABORTED);
tp                210 netinet/tcp_var.h #define TCP_INIT_DELACK(tp)						\
tp                211 netinet/tcp_var.h 	timeout_set(&(tp)->t_delack_to, tcp_delack, tp)
tp                213 netinet/tcp_var.h #define TCP_RESTART_DELACK(tp)						\
tp                214 netinet/tcp_var.h 	timeout_add(&(tp)->t_delack_to, tcp_delack_ticks)
tp                216 netinet/tcp_var.h #define	TCP_SET_DELACK(tp)						\
tp                218 netinet/tcp_var.h 	if (((tp)->t_flags & TF_DELACK) == 0) {				\
tp                219 netinet/tcp_var.h 		(tp)->t_flags |= TF_DELACK;				\
tp                220 netinet/tcp_var.h 		TCP_RESTART_DELACK(tp);					\
tp                224 netinet/tcp_var.h #define	TCP_CLEAR_DELACK(tp)						\
tp                226 netinet/tcp_var.h 	if ((tp)->t_flags & TF_DELACK) {				\
tp                227 netinet/tcp_var.h 		(tp)->t_flags &= ~TF_DELACK;				\
tp                228 netinet/tcp_var.h 		timeout_del(&(tp)->t_delack_to);			\
tp                307 netinet/tcp_var.h #define tcp_reass_lock(tp) tcp_reass_lock_try(tp)
tp                310 netinet/tcp_var.h tcp_reass_lock_try(struct tcpcb *tp)
tp                316 netinet/tcp_var.h 	if (tp->t_flags & TF_REASSLOCK) {
tp                320 netinet/tcp_var.h 	tp->t_flags |= TF_REASSLOCK;
tp                326 netinet/tcp_var.h tcp_reass_unlock(struct tcpcb *tp)
tp                331 netinet/tcp_var.h 	tp->t_flags &= ~TF_REASSLOCK;
tp                363 netinet/tcp_var.h #define	TCP_REXMTVAL(tp) \
tp                364 netinet/tcp_var.h 	((((tp)->t_srtt >> TCP_RTT_SHIFT) + (tp)->t_rttvar) >> TCP_RTT_BASE_SHIFT)
tp                636 netinet/tcp_var.h void	 tcp_update_sack_list(struct tcpcb *tp, tcp_seq, tcp_seq);
tp                638 netinet/tcp_var.h void	 tcp_clean_sackreport(struct tcpcb *tp);
tp                639 netinet/tcp_var.h void	 tcp_sack_adjust(struct tcpcb *tp);
tp                641 netinet/tcp_var.h 	 tcp_sack_output(struct tcpcb *tp);
tp                644 netinet/tcp_var.h void	 tcp_print_holes(struct tcpcb *tp);
tp                904 netinet6/ip6_mroute.c 	struct timeval tp;
tp                907 netinet6/ip6_mroute.c 	GET_TIME(tp);
tp                909 netinet6/ip6_mroute.c 	if (TV_LT(*t, tp))
tp                911 netinet6/ip6_mroute.c 		TV_DELTA(tp, *t, delta);
tp               1075 netinet6/ip6_mroute.c 		struct timeval tp;
tp               1077 netinet6/ip6_mroute.c 		GET_TIME(tp);
tp               1259 netinet6/ip6_mroute.c 		rte->t = tp;
tp                154 sys/conf.h     	int	(*d_stop)(struct tty *tp, int rw);
tp                499 sys/conf.h     	int	(*l_open)(dev_t dev, struct tty *tp);
tp                500 sys/conf.h     	int	(*l_close)(struct tty *tp, int flags);
tp                501 sys/conf.h     	int	(*l_read)(struct tty *tp, struct uio *uio,
tp                503 sys/conf.h     	int	(*l_write)(struct tty *tp, struct uio *uio,
tp                505 sys/conf.h     	int	(*l_ioctl)(struct tty *tp, u_long cmd, caddr_t data,
tp                507 sys/conf.h     	int	(*l_rint)(int c, struct tty *tp);
tp                508 sys/conf.h     	int	(*l_start)(struct tty *tp);
tp                509 sys/conf.h     	int	(*l_modem)(struct tty *tp, int flag);
tp                518 sys/syscallargs.h 	syscallarg(struct timeval *) tp;
tp                987 sys/syscallargs.h 	syscallarg(struct timespec *) tp;
tp                992 sys/syscallargs.h 	syscallarg(const struct timespec *) tp;
tp                997 sys/syscallargs.h 	syscallarg(struct timespec *) tp;
tp                 55 sys/timeb.h    int ftime(struct timeb *tp);
tp                125 sys/tty.h      	int	(*t_hwiflow)(struct tty *tp, int flag);
tp                231 sys/tty.h      #define	isctty(p, tp)							\
tp                232 sys/tty.h      	((p)->p_session == (tp)->t_session && (p)->p_flag & P_CONTROLT)
tp                235 sys/tty.h      #define	isbackground(p, tp)						\
tp                236 sys/tty.h      	(isctty((p), (tp)) && (p)->p_pgrp != (tp)->t_pgrp)
tp                265 sys/tty.h      int	 nullmodem(struct tty *tp, int flag);
tp                266 sys/tty.h      int	 tputchar(int c, struct tty *tp);
tp                267 sys/tty.h      int	 ttioctl(struct tty *tp, u_long com, caddr_t data, int flag,
tp                269 sys/tty.h      int	 ttread(struct tty *tp, struct uio *uio, int flag);
tp                270 sys/tty.h      void	 ttrstrt(void *tp);
tp                273 sys/tty.h      void	 ttsetwater(struct tty *tp);
tp                275 sys/tty.h      int	 ttstart(struct tty *tp);
tp                276 sys/tty.h      void	 ttwakeup(struct tty *tp);
tp                277 sys/tty.h      int	 ttwrite(struct tty *tp, struct uio *uio, int flag);
tp                278 sys/tty.h      void	 ttychars(struct tty *tp);
tp                279 sys/tty.h      int	 ttycheckoutq(struct tty *tp, int wait);
tp                280 sys/tty.h      int	 ttyclose(struct tty *tp);
tp                281 sys/tty.h      void	 ttyflush(struct tty *tp, int rw);
tp                282 sys/tty.h      void	 ttyinfo(struct tty *tp);
tp                283 sys/tty.h      int	 ttyinput(int c, struct tty *tp);
tp                284 sys/tty.h      int	 ttylclose(struct tty *tp, int flag);
tp                285 sys/tty.h      int	 ttymodem(struct tty *tp, int flag);
tp                286 sys/tty.h      int	 ttyopen(dev_t device, struct tty *tp);
tp                287 sys/tty.h      int	 ttyoutput(int c, struct tty *tp);
tp                288 sys/tty.h      void	 ttypend(struct tty *tp);
tp                289 sys/tty.h      void	 ttyretype(struct tty *tp);
tp                290 sys/tty.h      void	 ttyrub(int c, struct tty *tp);
tp                291 sys/tty.h      int	 ttysleep(struct tty *tp,
tp                293 sys/tty.h      int	 ttywait(struct tty *tp);
tp                294 sys/tty.h      int	 ttywflush(struct tty *tp);
tp                295 sys/tty.h      void	 ttytstamp(struct tty *tp, int octs, int ncts, int odcd, int ndcd);
tp                 78 uvm/uvm_pglist.c 	vm_page_t tp;
tp                110 uvm/uvm_pglist.c 		for (tp = TAILQ_FIRST(&uvm.page_free[free_list].pgfl_queues[pgflidx]);
tp                111 uvm/uvm_pglist.c 		     tp != NULL;
tp                112 uvm/uvm_pglist.c 		     tp = TAILQ_NEXT(tp, pageq)) {
tp                113 uvm/uvm_pglist.c 			if (tp == pg)
tp                116 uvm/uvm_pglist.c 		if (tp == NULL)
tp                188 uvm/uvm_pglist.c 	vm_page_t tp;
tp                300 uvm/uvm_pglist.c 		for (tp = TAILQ_FIRST(&uvm.page_free[
tp                302 uvm/uvm_pglist.c 		     tp != NULL;
tp                303 uvm/uvm_pglist.c 		     tp = TAILQ_NEXT(tp, pageq)) {
tp                304 uvm/uvm_pglist.c 			if (tp == m)
tp                307 uvm/uvm_pglist.c 		if (tp == NULL)