aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_indata.h
Commit message (Collapse)AuthorAgeFilesLines
* net: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-3/+0
| | | | Notes: svn path=/head/; revision=365071
* Ensure that an stcb is not dereferenced when it is about to beMichael Tuexen2020-05-161-0/+3
| | | | | | | | | | freed. This issue was found by SYZKALLER. MFC after: 3 days Notes: svn path=/head/; revision=361116
* Fix initialization of top_fsn.Michael Tuexen2019-09-011-1/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=351655
* Whitespace changes due to changes in ident.Michael Tuexen2018-07-191-2/+1
| | | | Notes: svn path=/head/; revision=336511
* Revert https://svnweb.freebsd.org/changeset/base/336503Michael Tuexen2018-07-191-2/+3
| | | | | | | since I also ran the export script with different parameters. Notes: svn path=/head/; revision=336508
* Whitespace changes due to change if ident.Michael Tuexen2018-07-191-3/+2
| | | | Notes: svn path=/head/; revision=336503
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* Whitespace changes.Michael Tuexen2016-12-261-1/+1
| | | | | | | | | | The toolchain for processing the sources has been updated. No functional change. MFC after: 3 days Notes: svn path=/head/; revision=310590
* Cleanup the names of SSN, SID, TSN, FSN, PPID and MID.Michael Tuexen2016-12-071-6/+5
| | | | | | | | | | | | This made a couple of bugs visible in handling SSN wrap-arounds when using DATA chunks. Now bulk transfer seems to work fine... This fixes the issue reported in https://github.com/sctplab/usrsctp/issues/111 MFC after: 1 week Notes: svn path=/head/; revision=309682
* A couple of minor changes that I missed that Michael had done, most notedRandall Stewart2016-04-071-1/+1
| | | | | | | | in these is the change to non-strict ordering for incoming data (this will make pkt-drill test 14 fail but its expected). Notes: svn path=/head/; revision=297663
* This is work done by Michael Tuexen and myself at the IETF. ThisRandall Stewart2016-04-071-12/+8
| | | | | | | | | | | | adds the new I-Data (Interleaved Data) message. This allows a user to be able to have complete freedom from Head Of Line blocking that was previously there due to the in-ability to send multiple large messages without the TSN's being in sequence. The code as been tested with Michaels various packet drill scripts as well as inter-networking between the IETF's location in Argentina and Germany. Notes: svn path=/head/; revision=297662
* Don't take the port numbers for packets containing ABORT chunks fromMichael Tuexen2015-08-021-5/+1
| | | | | | | | | a freed mbuf. Just use them from the stcb. MFC after: 3 days Notes: svn path=/head/; revision=286206
* Code cleanups.Michael Tuexen2013-07-031-2/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=252585
* Pass the src and dst address of a received packet explicitly around.Michael Tuexen2012-06-281-1/+3
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=237715
* Pass flowid explicitly through the stack instead of taking it fromMichael Tuexen2012-06-141-1/+3
| | | | | | | | | | the mbuf chain at different places. While there: Fix several bugs related to VRFs. MFC after: 3 days Notes: svn path=/head/; revision=237049
* Use consistent text at the begining of the files.Michael Tuexen2012-05-231-6/+4
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=235828
* Fix unused parameter warnings.Michael Tuexen2011-12-171-6/+5
| | | | | | | | | While there, fix some whitespace issues. MFC after: 3 months. Notes: svn path=/head/; revision=228653
* Get rid of unused functions.Michael Tuexen2011-05-291-5/+0
| | | | | | | MFC after: 1 week. Notes: svn path=/head/; revision=222459
* 1) Typo correction in comments and one spacing change.Randall Stewart2011-02-051-0/+2
| | | | | | | | 2) Mass update to all copyrights. MFC after: 3 Months Notes: svn path=/head/; revision=218319
* 1) Allow a chunk to track the cwnd it was at when sent.Randall Stewart2011-02-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | 2) Add separate max-bursts for retransmit and hb. These are set to sysctlable values but not settable via the socket api. This makes sure we don't blast out HB's or fast-retransmits. 3) Determine on the first data transmission on a net if its local-lan (by being under or over a RTT). This can later be used to think about different algorithms based on locallan vs big-i (experimental) 4) The cwnd should NOT be allowed to grow when an ECNEcho is seen (TCP has this same bug). We fix this in SCTP so an ECNe being seen prevents an advance of cwnd. 5) CWR's should not be sent multiple times to the same network, instead just updating the TSN being transmitted if needed. MFC after: 1 Month Notes: svn path=/head/; revision=218186
* More ECN fixes:Randall Stewart2011-01-311-1/+1
| | | | | | | | | | | | | | 1) We now remove ECN-Nonce since it will no longer continue as a I-D 2) Eliminate last_tsn_echo, this tied us to an assoc not the net and thus we were not doing m-homing on the ECN-Echo senders side right. 3) Increment the count going out even if the TSN in lower in the pending ECN-Echo, this way the receiver knows exactly how many packets were marked even with network re-ordering 4) Fix so we DO NOT stop doing delayed sack if a ECN Echo is in queue MFC after: 1 month Notes: svn path=/head/; revision=218129
* * Fix some race condition in SACK/NR-SACK processing.Michael Tuexen2010-04-031-1/+3
| | | | | | | | | | | * Fix handling of mapping arrays when draining mbufs or processing FORWARD-TSN chunks. * Cleanup code (no duplicate code anymore for SACKs and NR-SACKs). Part of this code was developed together with rrs. MFC after: 2 weeks. Notes: svn path=/head/; revision=206137
* Get rid of a lot of duplicated code for NR-SACK handle.Michael Tuexen2010-01-171-12/+5
| | | | | | | Generalize the SACK to code handle also NR-SACKs. Notes: svn path=/head/; revision=202526
* Code from the hack-session known as the IETF (and aRandall Stewart2008-12-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bit of debugging afterwards): - Fix protection code for notification generation. - Decouple associd from vtag - Allow vtags to have less strigent requirements in non-uniqueness. o don't pre-hash them when you issue one in a cookie. o Allow duplicates and use addresses and ports to discriminate amongst the duplicates during lookup. - Add support for the NAT draft draft-ietf-behave-sctpnat-00, this is still experimental and needs more extensive testing with the Jason Butt ipfw changes. - Support for the SENDER_DRY event to get DTLS in OpenSSL working with a set of patches from Michael Tuexen (hopefully heading to OpenSSL soon). - Update the support of SCTP-AUTH by Peter Lei. - Use macros for refcounting. - Fix MTU for UDP encapsulation. - Fix reporting back of unsent data. - Update assoc send counter handling to be consistent with endpoint sent counter. - Fix a bug in PR-SCTP. - Fix so we only send another FWD-TSN when a SACK arrives IF and only if the adv-peer-ack point progressed. However we still make sure a timer is running if we do have an adv_peer_ack point. - Fix PR-SCTP bug where chunks were retransmitted if they are sent unreliable but not abandoned yet. With the help of: Michael Teuxen and Peter Lei :-) MFC after: 4 weeks Notes: svn path=/head/; revision=185694
* 1) Adds the rest of the VIMAGE change macrosRandall Stewart2008-07-091-1/+1
| | | | | | | | | | | | | | | 2) Adds some __UserSpace__ on some of the common defines that the user space code needs 3) Fixes a bug when we send up data to a user that failed. We need to a) trim off the data chunk headers, if present, and b) make sure the frag bit is communicated properly for the msgs coming off the stream queues... i.e. we see if some of the msg has been taken. Obtained from: jeli contributed the VIMAGE changes on this pass Thanks Julain! Notes: svn path=/head/; revision=180387
* - Fix stream reset so it limits the number of streams that can be listedRandall Stewart2007-06-221-1/+1
| | | | | | | | | | | | - Fix fwd-tsn to use proper accessor so it does not overrun mbufs - Fix stream reset error reporting to actually work (it has always been broken if the peer rejects a stream reset) - Some 64 bit friendly changes Approved by: re(bmah@freebsd.org) Notes: svn path=/head/; revision=170992
* - Issue one, new stack reduction left packet_drop handling stillRandall Stewart2007-06-151-1/+1
| | | | | | | | | | | | thinking it had the whole chunk. This could cause a crash if a large packet drop came in. Fixed by adjusting the trunc length down to the limit. - Large sacks with lots of segments could also have same issue. Changed duplicate and segment handling to use proper get_m_ptr function to pull each block from mbuf chains. Notes: svn path=/head/; revision=170781
* - Copyright change, cisco's silly tool wants it to say:Randall Stewart2007-05-081-1/+1
| | | | | | | | | | | "Copyright (c) 2001-2007, by Cisco Systems," instead of *Copyright (c) 2001-2007, Cisco Systems," - Also fix a few straglers that were still in 2006. Notes: svn path=/head/; revision=169382
* - More macros for OS compatabiltyRandall Stewart2007-05-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - PR-SCTP would ignore FWD-TSN's above a rwnd's worth of TSN's (1 byte msgs).. this left the peer hopelessly out of sync.. or an attacker. So now we abort the assoc. - New IFN hash, also rename hashes to match addr/ifn now that the vrf has multiple. - Do not enable SCTP_PCB_FLAGS_RECVDATAIOEVNT per default as defined in the Socket API ID. - Export MTU information via sysctl. - Vrf's need table id's. This is default for BSD, but may be other things later when BSD fully supports VRFs. - Additional stream reset bug (caught by cisco dev-test). - Additional validations for the address in sending a message (socket api). -------- and ----- - Fix association notifications not to give the active open side false notifications. - Fix so sendfile and SENDALL will work properly (missing flag to say socket sender is done). - Fix Bug that prevented COOKIES from being retransmitted. - Break out connectx into helper sub-models so that iox routines can reuse the helpers. - When an address is added during system init (non-dynamic mode) make sure that the "defer use" flag is not set. ** its compiling on XR now :-D ** Reviewed by: gnn Notes: svn path=/head/; revision=169352
* - Somehow the disable fragment option got lost. We couldRandall Stewart2007-05-021-2/+3
| | | | | | | | | | | | | | | set/clear it but would not do it. Now we will. - Moved to latest socket api for extended sndrcv info struct. - Moved to support all new levels of fragment interleave (0-2). - Codenomicon security test updates - length checks and such. - Bug in stream reset (2 actually). - setpeerprimary could unlock a null pointer, fixed. - Added a flag in the pcb so netstat can see if we are listening easier. Obtained from: (some of the Listen changes from Weongyo Jeong) Notes: svn path=/head/; revision=169208
* - Somehow the disable fragment option got lost. We couldRandall Stewart2007-04-221-1/+1
| | | | | | | | | set/clear it but would not do it. Now we will. - Moved to latest socket api for extended sndrcv info struct. - Moved to support all new levels of fragment interleave. Notes: svn path=/head/; revision=168943
* - most all includes (#include <>) migrate to the sctp_os_bsd.h fileRandall Stewart2007-01-181-6/+1
| | | | | | | | | | | | | | | | | | - Finally all splxx() are removed - Count error fixed in mapping array which might cause a wrong cumack generation. - Invariants around panic for case D + printf when no invariants. - one-to-one model race condition fixed by using a pre-formed connection and then completing the work so accept won't happen on a non-formed association. - Some additional paranoia checks in sctp_output. - Locks that were missing in the accept code. Approved by: gnn Notes: svn path=/head/; revision=166086
* - Macroizes the V6ONLY flag check.Randall Stewart2007-01-151-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added a short time wait (not used yet) constant - Corrected the type of the crc32c table (it was unsigned long and really is a uint32_t - Got rid of the user of MHeaders until they are truely needed by lower layers. - Fixed an initialization problem in the readq structure (ordering was off). - Found yet another collision bug when the random number generator returns two numbers on one side (during a collision) that are the same. Also added some tracking of cookies that will go away when we know that we have the last collision bug gone. - Fixed an init bug for book_size_scale, that was causing Early FR code to run when it should not. - Fixed a flight size tracking bug that was associated with Early FR but due to above bug also effected all FR's - Fixed it so Max Burst also will apply to Fast Retransmit. - Fixed a bug in the temporary logging code that allowed a static log array overflow - hashinit_flags is now used. - Two last mcopym's were converted to the macro sctp_m_copym that has always been used by all other places - macro sctp_m_copym was converted to upper case. - We now validate sinfo_flags on input (we did not before). - Fixed a bug that prevented a user from sending data and immediately shuting down with one send operation. - Moved to use hashdestroy instead of free() in our macros. - Fixed an init problem in our timed_wait vtag where we did not fully initialize our time-wait blocks. - Timer stops were re-positioned. - A pcb cleanup method was added, however this probably will not be used in BSD.. unless we make module loadable protocols - I think this fixes the mysterious timer bug.. it was a ordering of locks problem in the way we did timers. It now conforms to the timeout(9) manual (except for the _drain part, we had to do this a different way due to locks). - Fixed error return code so we get either CONNREUSED or CONNRESET depending on where one is in progression - Purged an unused clone macro. - Fixed a read erro code issue where we were NOT getting the proper error when the connection was reset. - Purged an unused clone macro. - Fixed a read erro code issue where we were NOT getting the proper error when the connection was reset. Approved by: gnn Notes: svn path=/head/; revision=166023
* Ok, here it is, we finally add SCTP to current. Note that thisRandall Stewart2006-11-031-0/+118
work is not just mine, but it is also the works of Peter Lei and Michael Tuexen. They both are my two key other developers working on the project.. and they need ata-boy's too: **** peterlei@cisco.com tuexen@fh-muenster.de **** I did do a make sysent which updated the syscall's and sysproto.. I hope that is correct... without it you don't build since we have new syscalls for SCTP :-0 So go out and look at the NOTES, add option SCTP (make sure inet and inet6 are present too) and play with SCTP. I will see about comitting some test tools I have after I figure out where I should place them. I also have a lib (libsctp.a) that adds some of the missing socketapi functions that I need to put into lib's.. I will talk to George about this :-) There may still be some 64 bit issues in here, none of us have a 64 bit processor to test with yet.. Michael may have a MAC but thats another beast too.. If you have a mac and want to use SCTP contact Michael he maintains a web site with a loadable module with this code :-) Reviewed by: gnn Approved by: gnn Notes: svn path=/head/; revision=163953