Deleted Added
full compact
tcp_var.h (124258) tcp_var.h (125680)
1/*
2 * Copyright (c) 1982, 1986, 1993, 1994, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
1/*
2 * Copyright (c) 1982, 1986, 1993, 1994, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
34 * $FreeBSD: head/sys/netinet/tcp_var.h 124258 2004-01-08 17:40:07Z andre $
34 * $FreeBSD: head/sys/netinet/tcp_var.h 125680 2004-02-11 04:26:04Z bms $
35 */
36
37#ifndef _NETINET_TCP_VAR_H_
38#define _NETINET_TCP_VAR_H_
39
40#include <netinet/in_pcb.h> /* needed for in_conninfo, inp_gen_t */
41#include <netinet/tcp.h>
42

--- 57 unchanged lines hidden (view full) ---

100#define TF_RCVD_CC 0x004000 /* a CC was received in SYN */
101#define TF_SENDCCNEW 0x008000 /* send CCnew instead of CC in SYN */
102#define TF_MORETOCOME 0x010000 /* More data to be appended to sock */
103#define TF_LQ_OVERFLOW 0x020000 /* listen queue overflow */
104#define TF_LASTIDLE 0x040000 /* connection was previously idle */
105#define TF_RXWIN0SENT 0x080000 /* sent a receiver win 0 in response */
106#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */
107#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */
35 */
36
37#ifndef _NETINET_TCP_VAR_H_
38#define _NETINET_TCP_VAR_H_
39
40#include <netinet/in_pcb.h> /* needed for in_conninfo, inp_gen_t */
41#include <netinet/tcp.h>
42

--- 57 unchanged lines hidden (view full) ---

100#define TF_RCVD_CC 0x004000 /* a CC was received in SYN */
101#define TF_SENDCCNEW 0x008000 /* send CCnew instead of CC in SYN */
102#define TF_MORETOCOME 0x010000 /* More data to be appended to sock */
103#define TF_LQ_OVERFLOW 0x020000 /* listen queue overflow */
104#define TF_LASTIDLE 0x040000 /* connection was previously idle */
105#define TF_RXWIN0SENT 0x080000 /* sent a receiver win 0 in response */
106#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */
107#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */
108#define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */
108 int t_force; /* 1 if forcing out a byte */
109
110 tcp_seq snd_una; /* send unacknowledged */
111 tcp_seq snd_max; /* highest sequence number sent;
112 * used to recognize retransmits
113 */
114 tcp_seq snd_nxt; /* send next */
115 tcp_seq snd_up; /* send urgent pointer */

--- 68 unchanged lines hidden (view full) ---

184 u_long rcv_pps; /* received packets per second */
185 u_long rcv_byps; /* received bytes per second */
186};
187
188#define IN_FASTRECOVERY(tp) (tp->t_flags & TF_FASTRECOVERY)
189#define ENTER_FASTRECOVERY(tp) tp->t_flags |= TF_FASTRECOVERY
190#define EXIT_FASTRECOVERY(tp) tp->t_flags &= ~TF_FASTRECOVERY
191
109 int t_force; /* 1 if forcing out a byte */
110
111 tcp_seq snd_una; /* send unacknowledged */
112 tcp_seq snd_max; /* highest sequence number sent;
113 * used to recognize retransmits
114 */
115 tcp_seq snd_nxt; /* send next */
116 tcp_seq snd_up; /* send urgent pointer */

--- 68 unchanged lines hidden (view full) ---

185 u_long rcv_pps; /* received packets per second */
186 u_long rcv_byps; /* received bytes per second */
187};
188
189#define IN_FASTRECOVERY(tp) (tp->t_flags & TF_FASTRECOVERY)
190#define ENTER_FASTRECOVERY(tp) tp->t_flags |= TF_FASTRECOVERY
191#define EXIT_FASTRECOVERY(tp) tp->t_flags &= ~TF_FASTRECOVERY
192
193#ifdef TCP_SIGNATURE
192/*
194/*
195 * Defines which are needed by the xform_tcp module and tcp_[in|out]put
196 * for SADB verification and lookup.
197 */
198#define TCP_SIGLEN 16 /* length of computed digest in bytes */
199#define TCP_KEYLEN_MIN 1 /* minimum length of TCP-MD5 key */
200#define TCP_KEYLEN_MAX 80 /* maximum length of TCP-MD5 key */
201/*
202 * Only a single SA per host may be specified at this time. An SPI is
203 * needed in order for the KEY_ALLOCSA() lookup to work.
204 */
205#define TCP_SIG_SPI 0x1000
206#endif /* TCP_SIGNATURE */
207
208/*
193 * Structure to hold TCP options that are only used during segment
194 * processing (in tcp_input), but not held in the tcpcb.
195 * It's basically used to reduce the number of parameters
196 * to tcp_dooptions.
197 */
198struct tcpopt {
199 u_long to_flags; /* which options are present */
200#define TOF_TS 0x0001 /* timestamp */
201#define TOF_CC 0x0002 /* CC and CCnew are exclusive */
202#define TOF_CCNEW 0x0004
203#define TOF_CCECHO 0x0008
204#define TOF_MSS 0x0010
205#define TOF_SCALE 0x0020
209 * Structure to hold TCP options that are only used during segment
210 * processing (in tcp_input), but not held in the tcpcb.
211 * It's basically used to reduce the number of parameters
212 * to tcp_dooptions.
213 */
214struct tcpopt {
215 u_long to_flags; /* which options are present */
216#define TOF_TS 0x0001 /* timestamp */
217#define TOF_CC 0x0002 /* CC and CCnew are exclusive */
218#define TOF_CCNEW 0x0004
219#define TOF_CCECHO 0x0008
220#define TOF_MSS 0x0010
221#define TOF_SCALE 0x0020
222#define TOF_SIGNATURE 0x0040 /* signature option present */
223#define TOF_SIGLEN 0x0080 /* sigature length valid (RFC2385) */
206 u_int32_t to_tsval;
207 u_int32_t to_tsecr;
208 tcp_cc to_cc; /* holds CC or CCnew */
209 tcp_cc to_ccecho;
210 u_int16_t to_mss;
211 u_int8_t to_requested_s_scale;
212 u_int8_t to_pad;
213};

--- 15 unchanged lines hidden (view full) ---

229 u_int8_t sc_requested_s_scale:4,
230 sc_request_r_scale:4;
231 u_int8_t sc_flags;
232#define SCF_NOOPT 0x01 /* no TCP options */
233#define SCF_WINSCALE 0x02 /* negotiated window scaling */
234#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */
235#define SCF_CC 0x08 /* negotiated CC */
236#define SCF_UNREACH 0x10 /* icmp unreachable received */
224 u_int32_t to_tsval;
225 u_int32_t to_tsecr;
226 tcp_cc to_cc; /* holds CC or CCnew */
227 tcp_cc to_ccecho;
228 u_int16_t to_mss;
229 u_int8_t to_requested_s_scale;
230 u_int8_t to_pad;
231};

--- 15 unchanged lines hidden (view full) ---

247 u_int8_t sc_requested_s_scale:4,
248 sc_request_r_scale:4;
249 u_int8_t sc_flags;
250#define SCF_NOOPT 0x01 /* no TCP options */
251#define SCF_WINSCALE 0x02 /* negotiated window scaling */
252#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */
253#define SCF_CC 0x08 /* negotiated CC */
254#define SCF_UNREACH 0x10 /* icmp unreachable received */
255#define SCF_SIGNATURE 0x20 /* send MD5 digests */
237 TAILQ_ENTRY(syncache) sc_hash;
238 TAILQ_ENTRY(syncache) sc_timerq;
239};
240
241struct syncache_head {
242 TAILQ_HEAD(, syncache) sch_bucket;
243 u_int sch_length;
244};

--- 299 unchanged lines hidden (view full) ---

544void tcp_hc_updatemtu(struct in_conninfo *, u_long);
545void tcp_hc_update(struct in_conninfo *, struct hc_metrics_lite *);
546void tcp_hc_updatetao(struct in_conninfo *, int, tcp_cc, u_short);
547/* update which tao field */
548#define TCP_HC_TAO_CC 0x1
549#define TCP_HC_TAO_CCSENT 0x2
550#define TCP_HC_TAO_MSSOPT 0x3
551
256 TAILQ_ENTRY(syncache) sc_hash;
257 TAILQ_ENTRY(syncache) sc_timerq;
258};
259
260struct syncache_head {
261 TAILQ_HEAD(, syncache) sch_bucket;
262 u_int sch_length;
263};

--- 299 unchanged lines hidden (view full) ---

563void tcp_hc_updatemtu(struct in_conninfo *, u_long);
564void tcp_hc_update(struct in_conninfo *, struct hc_metrics_lite *);
565void tcp_hc_updatetao(struct in_conninfo *, int, tcp_cc, u_short);
566/* update which tao field */
567#define TCP_HC_TAO_CC 0x1
568#define TCP_HC_TAO_CCSENT 0x2
569#define TCP_HC_TAO_MSSOPT 0x3
570
571#ifdef TCP_SIGNATURE
572int tcpsignature_apply(void *fstate, void *data, unsigned int len);
573int tcpsignature_compute(struct mbuf *m, int off0, int len, int tcpoptlen,
574 u_char *buf, u_int direction);
575#endif /* TCP_SIGNATURE */
576
552extern struct pr_usrreqs tcp_usrreqs;
553extern u_long tcp_sendspace;
554extern u_long tcp_recvspace;
555tcp_seq tcp_new_isn(struct tcpcb *);
556
557#endif /* _KERNEL */
558
559#endif /* _NETINET_TCP_VAR_H_ */
577extern struct pr_usrreqs tcp_usrreqs;
578extern u_long tcp_sendspace;
579extern u_long tcp_recvspace;
580tcp_seq tcp_new_isn(struct tcpcb *);
581
582#endif /* _KERNEL */
583
584#endif /* _NETINET_TCP_VAR_H_ */