summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_var.h
AgeCommit message (Collapse)Author
2013-04-10Remove various external variable declaration from sources files andMartin Pieuchot
move them to the corresponding header with an appropriate comment if necessary. ok guenther@
2011-07-06Add sysctl net.inet.tcp.always_keepalive, when this is set the systemStuart Henderson
behaves as if SO_KEEPALIVE was set on all TCP sockets, forcing keepalives to be sent every net.inet.tcp.keepidle half-seconds. In conjunction with a keepidle value greatly reduced from the default, this can be useful for keeping sessions open if you are stuck on a network with short NAT or firewall timeouts. Feedback from various people, ok henning@ claudio@
2011-01-07Add socket option SO_SPLICE to splice together two TCP sockets.Alexander Bluhm
The data received on the source socket will automatically be sent on the drain socket. This allows to write relay daemons with zero data copy. ok markus@
2010-10-21There is no TCP6 in our kernel, so remove the #ifndef TCP6.Alexander Bluhm
No binary change. ok claudio@ henning@
2010-09-24TCP send and recv buffer scaling.Claudio Jeker
Send buffer is scaled by not accounting unacknowledged on the wire data against the buffer limit. Receive buffer scaling is done similar to FreeBSD -- measure the delay * bandwith product and base the buffer on that. The problem is that our RTT measurment is coarse so it overshoots on low delay links. This does not matter that much since the recvbuffer is almost always empty. Add a back pressure mechanism to control the amount of memory assigned to socketbuffers that kicks in when 80% of the cluster pool is used. Increases the download speed from 300kB/s to 4.4MB/s on ftp.eu.openbsd.org. Based on work by markus@ and djm@. OK dlg@, henning@, put it in deraadt@
2010-07-09Add support for using IPsec in multiple rdomains.Reyk Floeter
This allows to run isakmpd/iked/ipsecctl in multiple rdomains independently (with "route exec"); the kernel will pickup the rdomain from the process context of the pfkey socket and load the flows and SAs into the matching rdomain encap routing table. The network stack also needs to pass the rdomain to the ipsec stack to lookup the correct rdomain that belongs to an interface/mbuf/... You can now run individual IPsec configs per rdomain or create IPsec VPNs between multiple rdomains on the same machine ;). Note that a primary enc(4) in addition to enc0 interface is required per rdomain, eg. enc1 rdomain 1. Test by some people, mostly on existing "rdomain 0" setups. Was in snaps for some days and people didn't complain. ok claudio@ naddy@
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
2009-11-13Extend the protosw pr_ctlinput function to include the rdomain. This isClaudio Jeker
needed so that the route and inp lookups done in TCP and UDP know where to look. Additionally in_pcbnotifyall() and tcp_respond() got a rdomain argument as well for similar reasons. With this tcp seems to be now fully rdomain save and no longer leaks single packets into the main domain. Looks good markus@, henning@
2009-08-10sockets created via a listening socket lose the rdomain and fail to workClaudio Jeker
therefore. Inherit the rdomain through the syncache. There are some interactions that need some more work (ctlinput) so this can be improved but is good enough for now. OK markus@
2009-06-05Initial support for routing domains. This allows to bind interfaces toClaudio Jeker
alternate routing table and separate them from other interfaces in distinct routing tables. The same network can now be used in any doamin at the same time without causing conflicts. This diff is mostly mechanical and adds the necessary rdomain checks accross net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6. input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
2008-11-08fix macros up so they use the do { } while (/* CONSTCOND */ 0) idiomDavid Gwynne
ok deraadt@ otto@
2008-05-24Remove {tcp/udp}6_usrreq(); Since the normal ones nowThordur I. Bjornsson
take a proc argument, theres no need for these, since they are just wrappers. OK claudio@
2008-05-23Deal with the situation when TCP nfs mounts timeout and processesThordur I. Bjornsson
get hung in nfs_reconnect() because they do not have the proper privilages to bind to a socket, by adding a struct proc * argument to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind) and do the sobind() with proc0 in nfs_connect. OK markus@, blambert@. "go ahead" deraadt@. Fixes an issue reported by bernd@ (Tested by bernd@). Fixes PR5135 too.
2008-05-06remove tcp_drain code since it's not longer used; ok henning, feedback thibMarkus Friedl
2008-02-20remove old unused TCP isn code; ok henning, dhartmei, mcbrideMarkus Friedl
2008-02-20when creating a response, use the correct TCP header instead ofMarkus Friedl
relying on the mbuf chain layout; with claudio@ and krw@; ok henning@
2007-12-13implement sysctls to report IP, TCP, UDP, and ICMP statistics andReyk Floeter
change netstat to use them instead of accessing kvm for it. more protocols will be added later. discussed with deraadt@ claudio@ gilles@ ok deraadt@
2007-06-25merge tcp_set_iss() and tcp_set_tsm(); ok mcbride, djm (on earlier version)Markus Friedl
2007-06-15Drop the current random timestamps and the current ISN generationMarkus Friedl
code and replace both with a RFC1948 based method, so TCP clients now have monotonic ISN/timestamps. The server side uses completely random ISN/timestamps and does time-wait recycling (on port reuse). ok djm@, mcbride@; thanks to lots of testers
2007-02-01correct rfc; from Kris KatterjohnJason McIntyre
2005-12-11bitfields must be off an int or such typeTheo de Raadt
2005-11-20splimp -> splvm. mbuf allocation here.Brad Smith
ok henning@
2005-11-15Only two `h' in threshold.Miod Vallat
2005-08-02change the TCP reass queue from LIST to TAILQ;Markus Friedl
ok henning claudio fgsch krw
2005-07-04remove TUBA, ok manyMarkus Friedl
2005-06-30implement PMTU checks fromMarkus Friedl
http://www.gont.com.ar/drafts/icmp-attacks-against-tcp.html i.e. don't act on ICMP-need-frag immediately if adhoc checks on the advertised mtu fail. the mtu update is delayed until a tcp retransmit happens. initial patch by Fernando Gont, tested by many.
2005-05-24Ignore ICMP Source Quench messages meant for TCP connections. (Details inFernando Gont
http://www.gont.com.ar/drafts/icmp-attacks-against-tcp.html) ok markus frantzen
2005-04-05add tcp sack stats, similar to freebsd; ok deraadtMarkus Friedl
2005-03-09from freebsd:Markus Friedl
1. set rcv_laststart/rcv_lastend after checking the tcp window 2. pass rcv_laststart and rcv_lastend on the stack (shrink tcp state) ok henning, djm
2005-03-04- check th_ack against snd_una/max; from Raja Mukerji via hugh@Markus Friedl
- limit pool to tcp_sackhole_limit entries (sysctl-able) - stop sack option processing on pool_get errors - use SEQ_MIN/SEQ_MAX ok henning, hshoexer, deraadt
2005-02-271. tcp_xmit_timer(): remove extra rtt decrement (t_rtttime is 0-basedMarkus Friedl
while t_rtt was 1-based), update callers 2. define and use TCP_RTT_BASE_SHIFT instead of the hardcoded 2. 3. add missing shifts when t_srtt/t_rttvar are used. 4. update the comments: t_srtt uses 5 bits of fraction (not 3) and t_rttvar uses 4 bits 5. remove obsolete/unused macros TCP_RTT_SCALE and TCP_RTTVAR_SCALE 6. make sure rttmin is not > TCPTV_REXMTMAX parts from netbsd, ok mcbride, henning
2005-01-10Make sure bogus values don't make their way into tcp_xmit_timer() calculations.Ryan Thomas McBride
- Ignore ts_ecr if it is 0, or the resulting rtt is out of range. (use tp->t_rtttime instead) - Initialise tcp_now to 1, to avoid the 500ms window where a valid ts_ecr of 0 could be ignored. - Convert out-of-range rtt values to valid ones in tcp_xmit_timer(). ok frantzen@ markus@
2004-11-25fix for race between invocation for timer and network inputMarkus Friedl
1) add a reaper for TCP and SYN cache states (cf. netbsd pr 20390) 2) additional check for TCP_TIMER_ISARMED(TCPT_REXMT) in tcp_timer_persist() with mickey@; ok deraadt@
2004-10-28Modulate tcp_now by a random amount on a per-connection basis.Ryan Thomas McBride
ok markus@ frantzen@
2004-09-16don't send partial segments if SS_ISSENDING is set, rememberMarkus Friedl
TF_LASTIDLE across invocations of tcp_output (from freebsd); ok mcbride
2004-07-15tcp_trace() expects short, not int; ok deraadtMarkus Friedl
2004-06-08factor out md5 code; ok+tests henning@, djm@, hshoexer@Markus Friedl
2004-04-25add TCPCTL_DROP; ok deraadt, cedric, grange, ...Markus Friedl
2004-04-20add tcps_rcvacktooold; ok deraadtMarkus Friedl
2004-03-02limit total number of queued out-of-order packets to NMBCLUSTERS/2; ok mcbrideMarkus Friedl
2004-02-27implement tcp_drain() similar to ip_drain(); ok mcbride@Markus Friedl
2004-02-27API change; counter for upcoming tcp_drain(); ok deraadtMarkus Friedl
2004-02-15switch to sysctl_int_arr(); ok itojun, henning, miod, deraadtMarkus Friedl
2004-01-31!sack_disable -> sack_enable; ok deraadt@Markus Friedl
2004-01-29support for RFC3390 (Increasing TCP's Initial Window); ok deraadt, itojunMarkus Friedl
2004-01-14syncache+ipv6 support for TCP_SIGNATURE; with itojun; ok deraadtMarkus Friedl
2004-01-13bring back the old TCP_SIGNATURE code from tcp_input.c rev 1.45Markus Friedl
and make it compile (does not work yet); ok deraadt@
2004-01-07syn_XXX_limit -> synXXXlimit for consistency; ok deraadtMarkus Friedl
2004-01-06import netbsd's version of David Borman's syncache codeMarkus Friedl
http://www.kohala.com/start/borman.97jun06.txt; ok deraadt@, henning@
2003-06-09backout following:Jun-ichiro itojun Hagino
>use m_pulldown not m_pullup2. fix some bugs in IPv6 tcp_trace(). PR 3283 fixed (confirmed)