aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_header.h
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace changes due to changes in ident.Michael Tuexen2018-07-191-13/+13
| | | | Notes: svn path=/head/; revision=336511
* Revert https://svnweb.freebsd.org/changeset/base/336503Michael Tuexen2018-07-191-13/+13
| | | | | | | 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-13/+13
| | | | 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
* Cleanup the names of SSN, SID, TSN, FSN, PPID and MID.Michael Tuexen2016-12-071-10/+10
| | | | | | | | | | | | 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
* Whitespace changes.Michael Tuexen2016-12-061-1/+0
| | | | | | | | | | | The tools using to generate the sources has been updated and produces different whitespaces. Commit this seperately to avoid intermixing these with real code changes. MFC after: 3 days Notes: svn path=/head/; revision=309607
* Fix the PR-SCTP behaviour.Michael Tuexen2016-07-171-1/+1
| | | | | | | | | This is done by rrs@. MFC after: 3 days Notes: svn path=/head/; revision=302949
* Don't use anonymous unions.Michael Tuexen2016-04-181-1/+1
| | | | Notes: svn path=/head/; revision=298187
* This is work done by Michael Tuexen and myself at the IETF. ThisRandall Stewart2016-04-071-0/+23
| | | | | | | | | | | | 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
* Cleanup the handling of error causes for ERROR chunks. This fixesMichael Tuexen2015-09-121-51/+0
| | | | | | | | | | an inconsistency of the padding handling. The final padding is now considered to be a chunk padding. MFC after: 1 week Notes: svn path=/head/; revision=287717
* Fix the reported streams in a SCTP_STREAM_RESET_EVENT, if aMichael Tuexen2014-10-161-1/+5
| | | | | | | | | | | sent incoming stream reset request was responded with failed or denied. Thanks to Peter Bostroem from Google for reporting the issue. MFC after: 3 days Notes: svn path=/head/; revision=273168
* Cleanup sctp_send_initiate() and sctp_send_initiate_ack() to beMichael Tuexen2014-08-011-6/+0
| | | | | | | in sync as much as possible. This simplifies upcoming changes. Notes: svn path=/head/; revision=269376
* Don't include a structure containing a flexible array in anotherMichael Tuexen2012-09-071-10/+0
| | | | | | | | | structure. MFC after: 10 days Notes: svn path=/head/; revision=240198
* 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
* Honor SCTP_ENABLE_STREAM_RESET socket option when processing incomingMichael Tuexen2012-05-051-6/+7
| | | | | | | | | | requests. Fix also the provided result in the response and use names as specified in RFC 6525. MFC after: 3 days Notes: svn path=/head/; revision=235064
* Make stream our stream reset implementationRandall Stewart2012-03-291-1/+1
| | | | | | | | | compliant to RFC6525. MFC after: 1 month Notes: svn path=/head/; revision=233660
* Fix unused parameter warnings.Michael Tuexen2011-12-171-2/+2
| | | | | | | | | While there, fix some whitespace issues. MFC after: 3 months. Notes: svn path=/head/; revision=228653
* Fix a warning reported by arundel@.Michael Tuexen2011-11-271-2/+1
| | | | | | | | | | | Fix a bug where the parameter length of a supported address types parameter is set to a wrong value if the kernel is built with with either INET or INET6, but not both. MFC after: 3 days. Notes: svn path=/head/; revision=228031
* The result of a joint work between rrs@ and myself at the IETF:Michael Tuexen2011-08-031-1/+2
| | | | | | | | | | | | | | * Decouple the path supervision using a separate HB timer per path. * Add support for potentially failed state. * Bring back RTO.min to 1 second. * Accept packets on IP-addresses already announced via an ASCONF * While there: do some cleanups. Approved by: re@ MFC after: 2 months. Notes: svn path=/head/; revision=224641
* 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
* More ECN fixes:Randall Stewart2011-01-311-6/+0
| | | | | | | | | | | | | | 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
* Fixes to ECN in SCTP.Randall Stewart2011-01-291-0/+6
| | | | | | | | | | | | | | | | 1) ECN was on an association basis, this is incorrect and will not work with CMT or for that matter if the user is sending to multiple addresses. This commit makes ECN on a per path basis. 2) Adopt the new format for the ECN internet draft. This also maintains compatability with old format chunks as well. 3) Keep track of the real time of a RTT down to micro seconds. For some future conditional features (for like a data center this is good information to have). MFC after: 1 month Notes: svn path=/head/; revision=218072
* Add missing SCTP_PACKED. Spotted by Irene Ruengeler.Michael Tuexen2010-02-131-2/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=203847
* Use [] instead of [0] for flexible arrays.Michael Tuexen2010-01-221-9/+9
| | | | | | | | Obtained from: Bruce Cran MFC after: 1 week Notes: svn path=/head/; revision=202782
* Get rid of a lot of duplicated code for NR-SACK handle.Michael Tuexen2010-01-171-8/+0
| | | | | | | Generalize the SACK to code handle also NR-SACKs. Notes: svn path=/head/; revision=202526
* Add the add-stream capability. Still needs moreRandall Stewart2009-02-201-1/+6
| | | | | | | | | testing.. MFC after: 1 month Notes: svn path=/head/; revision=188854
* Code from the hack-session known as the IETF (and aRandall Stewart2008-12-061-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* - Macro-izes the packed declaration in all headers.Randall Stewart2008-06-141-0/+2
| | | | | | | | | | | | | | | | | | | | | - Vimage prep - these are major restructures to move all global variables to be accessed via a macro or two. The variables all go into a single structure. - Asconf address addition tweaks (add_or_del Interfaces) - Fix rwnd calcualtion to be more conservative. - Support SACK_IMMEDIATE flag to skip delayed sack by demand of peer. - Comment updates in the sack mapping calculations - Invarients panic added. - Pre-support for UDP tunneling (we can do this on MAC but will need added support from UDP to get a "pipe" of UDP packets in. - clear trace buffer sysctl added when local tracing on. Note the majority of this huge patch is all the vimage prep stuff :-) Notes: svn path=/head/; revision=179783
* - Fix address add handling to clear cached routes and source addressesRandall Stewart2007-08-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when peer acks the add in case the routing table changes. - Fix sctp_lower_sosend to send shutdown chunk for mbuf send case when sndlen = 0 and sinfoflag = SCTP_EOF - Fix sctp_lower_sosend for SCTP_ABORT mbuf send case with null data, So that it does not send the "null" data mbuf out and cause it to get freed twice. - Fix so auto-asconf sysctl actually effect the socket's asconf state. - Do not allow SCTP_AUTO_ASCONF option to be used on subset bound sockets. - Memset bug in sctp_output.c (arguments were reversed) submitted found and reported by Dave Jones (davej@codemonkey.org.uk). - PD-API point needs to be invoked >= not just > to conform to socket api draft this fixes sctp_indata.c in the two places need to be >=. - move M_NOTIFICATION to use M_PROTO5. - PEER_ADDR_PARAMS did not fail properly if you specify an address that is not in the association with a valid assoc_id. This meant you got or set the stcb level values instead of the destination you thought you were going to get/set. Now validate if the stcb is non-null and the net is NULL that the sa_family is set and the address is unspecified otherwise return an error. - The thread based iterator could crash if associations were freed at the exact time it was running. rework the worker thread to use the increment/decrement to prevent this and no longer use the markers that the timer based iterator uses. - Fix the memleak in sctp_add_addr_to_vrf() for the case when it is detected that ifa is already pointing to a ifn. - Fix it so that if someone is so insane that they drop the send window below the minimal add mark, they still can send. - Changed all state for associations to use mask safe macro. - During front states in association freeing in sctp_inpcbfree, we had a locking problem where locks were not in place where they should have been. - Free association calls were not testing the return value in sctp_inpcb_free() properly... others should be cast void returns where we don't care about the return value. - If a reference count is held on an assoc, even from the "force free" we should not do the actual free.. but instead let the timer free it. - When we enter sctp_input(), if the SCTP_ASOC_ABOUT_TO_BE_FREED flag is set, we must NOT process the packet but handle it like ootb. This is because while freeing an assoc we release the locks to get all the higher order locks so we can purge all the hash tables. This leaves a hole if a packet comes in just at that point. Now sctp_common_input_processing() will call the ootb code in such a case. - Change MBUF M_NOTIFICATION to use M_PROTO5 (per Sam L). This makes it so we don't have a conflict (I think this is a covertity change). We made this change AFTER some conversation and looking to make sure that M_PROTO5 does not have a problem between SCTP and the 802.11 stuff (which is the only other place its used). - Fixed lock order reversal and missing atomic protection around locked_tcb during association lookup and the 1-2-1 model. - Added debug to source address selection. - V6 output must always do checksum even for loopback. - Remove more locks around inp that are not needed for an atomically added/subtracted ref count. - slight optimization in the way we zero the array in sctp_sack_check() - It was possible to respond to a ABORT() with bad checksum with a PKT-DROP. This lead to a PKT-DROP/ABORT war. Add code to NOT send a PKT-DROP to any ABORT(). - Add an option for local logging (useful for macintosh or when you need better performing during debugging). Note no commands are here to get the log info, you must just use kgdb. - The timer code needs to be aware of if it needs to call sctp_sack_check() to slide the maps and adjust the cum-ack. This is because it may be out of sync cum-ack wise. - Added threshold managment logging. - If the user picked just the right size, that just filled the send window minus one mtu, we would enter a forever loop not copying and at the same time not blocking. Change from < to <= solves this. - Sysctl added to control the fragment interleave level which defaults to 1. - My rwnd control was not being used to control the rwnd properly (we did not add and subtract to it :-() this is now fixed so we handle small messages (1 byte etc) better to bring our rwnd down more slowly. Approved by: re@freebsd.org (Bruce Mah) Notes: svn path=/head/; revision=171943
* - Restructure so bindx functions are not done inline to socket optionRandall Stewart2007-06-121-64/+70
| | | | | | | | | | but are a seperate call that can be re-used if needed. - 64 bit issues o re-arrange cookie so it is better 64 bit aligned o For wire level things we need the packed attribute. Notes: svn path=/head/; revision=170606
* - 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
* - Somehow the disable fragment option got lost. We couldRandall Stewart2007-05-021-1/+10
| | | | | | | | | | | | | | | 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
* - Sysctl's move to seperate fileRandall Stewart2007-03-151-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - moved away from ifn/ifa access to sctp_ifa/sctp_ifn built and managed by the add-ip code. - cleaned up add-ip code to use the iterator - made iterator be a thread, which enables auto-asconf now. - rewrote and cleaned up source address selection (also made it use new structures). - Fixed a couple of memory leaks. - DACK now settable as to how many packets to delay as well as time. - connectx() to latest socket API, new associd arg. - Fixed issue with revoking and loosing potential to send when we inflate the flight size. We now inflate the cwnd too and deflate it later when the revoked chunk is sent or acked. - Got rid of some temp debug code - src addr selection moved to a common file (sctp_output.c) - Support for simple VRF's (we have support for multi-vfr via compile switch that is scrubbed from BSD but we won't need multi-vrf until we first get VRF :-D) - Rest of mib work for address information now done - Limit number of addresses in INIT/INIT-ACK to a #def (30). Reviewed by: gnn Notes: svn path=/head/; revision=167598
* Ok, here it is, we finally add SCTP to current. Note that thisRandall Stewart2006-11-031-0/+562
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