printf("\trcv_nxt %lx rcv_wnd %x snd_una %lx snd_nxt %lx snd_max %lx\n",
printf("\trcv_nxt %x rcv_wnd %lx snd_una %x snd_nxt %x snd_max %x\n",
tcp_trace(act, ostate, atp, tp, ti, req)	short act, ostate;	struct tcpcb *atp, *tp;	struct tcpiphdr *ti;	int req;{	tcp_seq seq, ack;	int flags, len, win, timer;	printf("%03ld %s:%s ",(ntime/10) % 1000, tcpstates[ostate],	    tanames[act]);	switch (act) {	case TA_INPUT:	case TA_OUTPUT:	case TA_DROP:		if (aflag) {			printf("(src=%s,%u, ",			    inet_ntoa(ti->ti_src), ntohs(ti->ti_sport));			printf("dst=%s,%u)",			    inet_ntoa(ti->ti_dst), ntohs(ti->ti_dport));		}		seq = ti->ti_seq;		ack = ti->ti_ack;		len = ti->ti_len;		win = ti->ti_win;		if (act == TA_OUTPUT) {			seq = ntohl(seq);			ack = ntohl(ack);			len = ntohs(len);			win = ntohs(win);		}		if (act == TA_OUTPUT)			len -= sizeof(struct tcphdr);		if (len)			printf("[%lx..%lx)", seq, seq + len);		else			printf("%lx", seq);		printf("@%lx", ack);		if (win)			printf("(win=%x)", win);		flags = ti->ti_flags;		if (flags) {			register char *cp = "<";#define	pf(flag, string) { \	if (ti->ti_flags&flag) { \		(void)printf("%s%s", cp, string); \		cp = ","; \	} \}			pf(TH_SYN, "SYN");			pf(TH_ACK, "ACK");			pf(TH_FIN, "FIN");			pf(TH_RST, "RST");			pf(TH_PUSH, "PUSH");			pf(TH_URG, "URG");			printf(">");		}		break;	case TA_USER:		timer = req >> 8;		req &= 0xff;		printf("%s", prurequests[req]);		if (req == PRU_SLOWTIMO || req == PRU_FASTTIMO)			printf("<%s>", tcptimers[timer]);		break;	}	printf(" -> %s", tcpstates[tp->t_state]);	/* print out internal state of tp !?! */	printf("\n");	if (sflag) {		printf("\trcv_nxt %lx rcv_wnd %x snd_una %lx snd_nxt %lx snd_max %lx\n",		    tp->rcv_nxt, tp->rcv_wnd, tp->snd_una, tp->snd_nxt,		    tp->snd_max);		printf("\tsnd_wl1 %lx snd_wl2 %lx snd_wnd %x\n", tp->snd_wl1,		    tp->snd_wl2, tp->snd_wnd);	}	/* print out timers? */	if (tflag) {		register char *cp = "\t";		register int i;		for (i = 0; i < TCPT_NTIMERS; i++) {			if (tp->t_timer[i] == 0)				continue;			printf("%s%s=%d", cp, tcptimers[i], tp->t_timer[i]);			if (i == TCPT_REXMT)				printf(" (t_rxtshft=%d)", tp->t_rxtshift);			cp = ", ";		}		if (*cp != '\t')			putchar('\n');	}}