nrelease - fix/improve livecd
[dragonfly.git] / sys / netinet / tcp_debug.h
1 /*
2  * Copyright (c) 1982, 1986, 1993
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
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the University nor the names of its contributors
14  *    may be used to endorse or promote products derived from this software
15  *    without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  *      @(#)tcp_debug.h 8.1 (Berkeley) 6/10/93
30  * $FreeBSD: src/sys/netinet/tcp_debug.h,v 1.11 2000/01/29 11:49:05 shin Exp $
31  * $DragonFly: src/sys/netinet/tcp_debug.h,v 1.4 2006/05/20 02:42:12 dillon Exp $
32  */
33
34 #ifndef _NETINET_TCP_DEBUG_H_
35 #define _NETINET_TCP_DEBUG_H_
36
37 #ifndef _SYS_TYPES_H_
38 #include <sys/types.h>
39 #endif
40 #ifndef _NETINET_IN_SYSTM_H_
41 #include <netinet/in_systm.h>
42 #endif
43 #ifndef _NETINET_TCPIP_H_
44 #include <netinet/tcpip.h>
45 #endif
46 #ifndef _NETINET_TCP_H_
47 #include <netinet/tcp.h>
48 #endif
49 #ifndef _NETINET_TCP_VAR_H_
50 #include <netinet/tcp_var.h>
51 #endif
52
53 struct  tcp_debug {
54         n_time  td_time;
55         short   td_act;
56         short   td_ostate;
57         caddr_t td_tcb;
58         int     td_family;
59         /*
60          * Co-existense of td_ti and td_ti6 below is ugly, but it is necessary
61          * to achieve backword compatibility to some extent.
62          */
63         struct  tcpiphdr td_ti;
64         struct {
65 #if !defined(_KERNEL) && defined(INET6)
66                 struct  ip6_hdr ip6;
67 #else
68                 u_char  ip6buf[40]; /* sizeof(struct ip6_hdr) */
69 #endif
70                 struct  tcphdr th;
71         } td_ti6;
72 #define td_ip6buf       td_ti6.ip6buf
73         short   td_req;
74         struct  tcpcb td_cb;
75 };
76
77 #define TA_INPUT        0
78 #define TA_OUTPUT       1
79 #define TA_USER         2
80 #define TA_RESPOND      3
81 #define TA_DROP         4
82
83 #ifdef TANAMES
84 static const char *tanames[] =
85     { "input", "output", "user", "respond", "drop" };
86 #endif
87
88 #define TCP_NDEBUG 100
89
90 #ifndef _KERNEL
91 /* XXX common variables for broken applications. */
92 struct  tcp_debug tcp_debug[TCP_NDEBUG];
93 int     tcp_debx;
94 #endif
95
96 #endif /* !_NETINET_TCP_DEBUG_H_ */