tcp_stack.h revision bd670b35a010421b6e1a5536c34453a827007c81
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _INET_TCP_STACK_H
#define _INET_TCP_STACK_H
#include <sys/netstack.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Kstats */
typedef struct tcp_stat {
} tcp_stat_t;
#define TCP_STAT_UPDATE(tcps, x, n) \
#define TCP_STAT_SET(tcps, x, n) \
typedef struct tcp_g_stat {
} tcp_g_stat_t;
#ifdef _KERNEL
/*
* TCP stack instances
*/
struct tcp_stack {
/*
* Extra privileged ports. In host byte order.
* Protected by tcp_epriv_port_lock.
*/
#define TCP_NUM_EPRIV_PORTS 64
/*
* The smallest anonymous port in the priviledged port range which TCP
* looks for free port. Use in the option TCP_ANONPRIVBIND.
*/
/* Only modified during _init and _fini thus no locking is needed. */
struct tcpparam_s *tcps_wroff_xtra_param;
/* Hint not protected by any lock */
/* TCP bind hash list - all tcp_t with state >= BOUND. */
struct tf_s *tcps_bind_fanout;
/* TCP queue hash list - all tcp_t in case they will be an acceptor. */
struct tf_s *tcps_acceptor_fanout;
/*
* MIB-2 stuff for SNMP
* Note: tcpInErrs {tcp 15} is accumulated in ip.c
*/
/* Incremented for each connection */
/* Packet dropper for TCP IPsec policy drops. */
/*
* These two variables control the rate for TCP to generate RSTs in
* response to segments not belonging to any connections. We limit
* TCP to sent out tcp_rst_sent_rate (ndd param) number of RSTs in
* each 1 second interval. This is to protect TCP against DoS attack.
*/
/* The number of RST not sent because of the rate limit. */
/* Used to synchronize access when reclaiming memory */
};
typedef struct tcp_stack tcp_stack_t;
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _INET_TCP_STACK_H */