tcp_syncache.c (215701) | tcp_syncache.c (217322) |
---|---|
1/*- 2 * Copyright (c) 2001 McAfee, Inc. 3 * Copyright (c) 2006 Andre Oppermann, Internet Business Solutions AG 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Jonathan Lemon 7 * and McAfee Research, the Security Research Division of McAfee, Inc. under 8 * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 McAfee, Inc. 3 * Copyright (c) 2006 Andre Oppermann, Internet Business Solutions AG 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Jonathan Lemon 7 * and McAfee Research, the Security Research Division of McAfee, Inc. under 8 * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/netinet/tcp_syncache.c 215701 2010-11-22 19:32:54Z dim $"); | 34__FBSDID("$FreeBSD: head/sys/netinet/tcp_syncache.c 217322 2011-01-12 19:53:50Z mdf $"); |
35 36#include "opt_inet.h" 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> --- 100 unchanged lines hidden (view full) --- 143#define TCP_SYNCACHE_HASHSIZE 512 144#define TCP_SYNCACHE_BUCKETLIMIT 30 145 146static VNET_DEFINE(struct tcp_syncache, tcp_syncache); 147#define V_tcp_syncache VNET(tcp_syncache) 148 149SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache"); 150 | 35 36#include "opt_inet.h" 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> --- 100 unchanged lines hidden (view full) --- 143#define TCP_SYNCACHE_HASHSIZE 512 144#define TCP_SYNCACHE_BUCKETLIMIT 30 145 146static VNET_DEFINE(struct tcp_syncache, tcp_syncache); 147#define V_tcp_syncache VNET(tcp_syncache) 148 149SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache"); 150 |
151SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, | 151SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN, |
152 &VNET_NAME(tcp_syncache.bucket_limit), 0, 153 "Per-bucket hash limit for syncache"); 154 | 152 &VNET_NAME(tcp_syncache.bucket_limit), 0, 153 "Per-bucket hash limit for syncache"); 154 |
155SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, | 155SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, cachelimit, CTLFLAG_RDTUN, |
156 &VNET_NAME(tcp_syncache.cache_limit), 0, 157 "Overall entry limit for syncache"); 158 | 156 &VNET_NAME(tcp_syncache.cache_limit), 0, 157 "Overall entry limit for syncache"); 158 |
159SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, count, CTLFLAG_RD, | 159SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, count, CTLFLAG_RD, |
160 &VNET_NAME(tcp_syncache.cache_count), 0, 161 "Current number of entries in syncache"); 162 | 160 &VNET_NAME(tcp_syncache.cache_count), 0, 161 "Current number of entries in syncache"); 162 |
163SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, hashsize, CTLFLAG_RDTUN, | 163SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, hashsize, CTLFLAG_RDTUN, |
164 &VNET_NAME(tcp_syncache.hashsize), 0, 165 "Size of TCP syncache hashtable"); 166 | 164 &VNET_NAME(tcp_syncache.hashsize), 0, 165 "Size of TCP syncache hashtable"); 166 |
167SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, rexmtlimit, CTLFLAG_RW, | 167SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, rexmtlimit, CTLFLAG_RW, |
168 &VNET_NAME(tcp_syncache.rexmt_limit), 0, 169 "Limit on SYN/ACK retransmissions"); 170 171VNET_DEFINE(int, tcp_sc_rst_sock_fail) = 1; 172SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, rst_on_sock_fail, 173 CTLFLAG_RW, &VNET_NAME(tcp_sc_rst_sock_fail), 0, 174 "Send reset on socket allocation failure"); 175 --- 1635 unchanged lines hidden --- | 168 &VNET_NAME(tcp_syncache.rexmt_limit), 0, 169 "Limit on SYN/ACK retransmissions"); 170 171VNET_DEFINE(int, tcp_sc_rst_sock_fail) = 1; 172SYSCTL_VNET_INT(_net_inet_tcp_syncache, OID_AUTO, rst_on_sock_fail, 173 CTLFLAG_RW, &VNET_NAME(tcp_sc_rst_sock_fail), 0, 174 "Send reset on socket allocation failure"); 175 --- 1635 unchanged lines hidden --- |