Date: Sun, 22 Mar 2009 22:23:58 GMT From: Andre Oppermann <andre@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 159642 for review Message-ID: <200903222223.n2MMNwDl033076@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=159642 Change 159642 by andre@andre_t61 on 2009/03/22 22:23:33 Add tcp_win and tcp_ts types for more safety Affected files ... .. //depot/projects/tcp_new/netinet/tcp.h#3 edit .. //depot/projects/tcp_new/netinet/tcp_input.c#9 edit .. //depot/projects/tcp_new/netinet/tcp_var.h#6 edit Differences ... ==== //depot/projects/tcp_new/netinet/tcp.h#3 (text+ko) ==== @@ -38,6 +38,8 @@ #if __BSD_VISIBLE typedef u_int32_t tcp_seq; +typedef u_int32_t tcp_win; +typedef u_int32_t tcp_ts; #define tcp6_seq tcp_seq /* for KAME src sync over BSD*'s */ #define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */ ==== //depot/projects/tcp_new/netinet/tcp_input.c#9 (text+ko) ==== @@ -2490,7 +2490,7 @@ int acked, int tlen, int sacked) { int rtt; - int tick = tcp_ticks; + tcp_ts tick = tcp_ticks; INP_LOCK_ASSERT(tp->t_inpcb); KASSERT(tp != NULL && th != NULL && to != NULL, ==== //depot/projects/tcp_new/netinet/tcp_var.h#6 (text+ko) ==== @@ -295,16 +295,16 @@ * options in tcp_addoptions. */ struct tcpopt { - u_long to_flags; /* which options are present */ + u_int to_flags; /* which options are present */ #define TOF_MSS 0x0001 /* maximum segment size */ #define TOF_SCALE 0x0002 /* window scaling */ #define TOF_SACKPERM 0x0004 /* SACK permitted */ #define TOF_TS 0x0010 /* timestamp */ #define TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */ #define TOF_SACK 0x0080 /* Peer sent SACK option */ -#define TOF_MAXOPT 0x0100 - u_int32_t to_tsval; /* new timestamp */ - u_int32_t to_tsecr; /* reflected timestamp */ +#define TOF_MAXOPT 0x0100 /* highest option shift one */ + tcp_ts to_tsval; /* new timestamp */ + tcp_ts to_tsecr; /* reflected timestamp */ u_int16_t to_mss; /* maximum segment size */ u_int8_t to_wscale; /* window scaling */ u_int8_t to_nsacks; /* number of SACK blocks */help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903222223.n2MMNwDl033076>
