FreeBSD kernel IPv4 code
sctp_structs.h
Go to the documentation of this file.
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved.
5 * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved.
6 * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are met:
10 *
11 * a) Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 *
14 * b) Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the distribution.
17 *
18 * c) Neither the name of Cisco Systems, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 * THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD$");
37
38#ifndef _NETINET_SCTP_STRUCTS_H_
39#define _NETINET_SCTP_STRUCTS_H_
40
41#include <netinet/sctp_os.h>
42#include <netinet/sctp_header.h>
43#include <netinet/sctp_auth.h>
44
45struct sctp_timer {
47
48 int type;
49 /*
50 * Depending on the timer type these will be setup and cast with the
51 * appropriate entity.
52 */
53 void *ep;
54 void *tcb;
55 void *net;
56 void *vnet;
57
58 /* for sanity checking */
59 void *self;
62};
63
65 struct sctp_inpcb *inp;
68 int updown;
69};
70
71/*
72 * This is the information we track on each interface that we know about from
73 * the distant end.
74 */
75TAILQ_HEAD(sctpnetlisthead, sctp_nets);
76
83};
84
86
87/*
88 * Users of the iterator need to malloc a iterator with a call to
89 * sctp_initiate_iterator(inp_func, assoc_func, inp_func, pcb_flags, pcb_features,
90 * asoc_state, void-ptr-arg, uint32-arg, end_func, inp);
91 *
92 * Use the following two defines if you don't care what pcb flags are on the EP
93 * and/or you don't care what state the association is in.
94 *
95 * Note that if you specify an INP as the last argument then ONLY each
96 * association of that single INP will be executed upon. Note that the pcb
97 * flags STILL apply so if the inp you specify has different pcb_flags then
98 * what you put in pcb_flags nothing will happen. use SCTP_PCB_ANY_FLAGS to
99 * assure the inp you specify gets treated.
100 */
101#define SCTP_PCB_ANY_FLAGS 0x00000000
102#define SCTP_PCB_ANY_FEATURES 0x00000000
103#define SCTP_ASOC_ANY_STATE 0x00000000
104
105typedef void (*asoc_func) (struct sctp_inpcb *, struct sctp_tcb *, void *ptr,
106 uint32_t val);
107typedef int (*inp_func) (struct sctp_inpcb *, void *ptr, uint32_t val);
108typedef void (*end_func) (void *ptr, uint32_t val);
109
110#if defined(SCTP_MCORE_INPUT) && defined(SMP)
111/* whats on the mcore control struct */
112struct sctp_mcore_queue {
113 TAILQ_ENTRY(sctp_mcore_queue) next;
114 struct vnet *vn;
115 struct mbuf *m;
116 int off;
117 int v6;
118};
119
120TAILQ_HEAD(sctp_mcore_qhead, sctp_mcore_queue);
121
122struct sctp_mcore_ctrl {
123 SCTP_PROCESS_STRUCT thread_proc;
124 struct sctp_mcore_qhead que;
125 struct mtx core_mtx;
126 struct mtx que_mtx;
127 int running;
128 int cpuid;
129};
130#endif
131
134 struct vnet *vn;
136 struct sctp_inpcb *inp; /* current endpoint */
137 struct sctp_tcb *stcb; /* current* assoc */
138 struct sctp_inpcb *next_inp; /* special hook to skip to */
139 asoc_func function_assoc; /* per assoc function */
140 inp_func function_inp; /* per endpoint function */
141 inp_func function_inp_end; /* end INP function */
142 end_func function_atend; /* iterator completion function */
143 void *pointer; /* pointer for apply func to use */
144 uint32_t val; /* value for apply func to use */
145 uint32_t pcb_flags; /* endpoint flags being checked */
146 uint32_t pcb_features; /* endpoint features being checked */
147 uint32_t asoc_state; /* assoc state being checked */
151};
152
153/* iterator_flags values */
154#define SCTP_ITERATOR_DO_ALL_INP 0x00000001
155#define SCTP_ITERATOR_DO_SINGLE_INP 0x00000002
156
157TAILQ_HEAD(sctpiterators, sctp_iterator);
158
160 struct sctp_inpcb *inp; /* ep */
161 struct mbuf *m;
163 ssize_t sndlen;
166};
167
169 struct sctpladdr list_of_work;
170 int cnt;
171};
172
175 struct mtx it_mtx;
177 struct sctpiterators iteratorhead;
181};
182#define SCTP_ITERATOR_STOP_CUR_IT 0x00000004
183#define SCTP_ITERATOR_STOP_CUR_INP 0x00000008
184
186 struct nhop_object *ro_nh;
187 struct llentry *ro_lle;
193 union sctp_sockstore _l_addr; /* remote peer addr */
194 struct sctp_ifa *_s_addr; /* our selected src addr */
195};
196
197struct htcp {
198 uint16_t alpha; /* Fixed point arith, << 7 */
199 uint8_t beta; /* Fixed point arith, << 7 */
200 uint8_t modeswitch; /* Delay modeswitch until we had at least one
201 * congestion event */
202 uint32_t last_cong; /* Time since last congestion event end */
208
211
212 /* Bandwidth estimation */
218};
219
220struct rtcc_cc {
221 struct timeval tls; /* The time we started the sending */
222 uint64_t lbw; /* Our last estimated bw */
223 uint64_t lbw_rtt; /* RTT at bw estimate */
224 uint64_t bw_bytes; /* The total bytes since this sending began */
225 uint64_t bw_tot_time; /* The total time since sending began */
226 uint64_t new_tot_time; /* temp holding the new value */
227 uint64_t bw_bytes_at_last_rttc; /* What bw_bytes was at last rtt calc */
228 uint32_t cwnd_at_bw_set; /* Cwnd at last bw saved - lbw */
229 uint32_t vol_reduce; /* cnt of voluntary reductions */
230 uint16_t steady_step; /* The number required to be in steady state */
231 uint16_t step_cnt; /* The current number */
232 uint8_t ret_from_eq; /* When all things are equal what do I return
233 * 0/1 - 1 no cc advance */
234 uint8_t use_dccc_ecn; /* Flag to enable DCCC ECN */
235 uint8_t tls_needs_set; /* Flag to indicate we need to set tls 0 or 1
236 * means set at send 2 not */
237 uint8_t last_step_state; /* Last state if steady state stepdown
238 * is on */
239 uint8_t rtt_set_this_sack; /* Flag saying this sack had RTT calc
240 * on it */
241 uint8_t last_inst_ind; /* Last saved inst indication */
242};
243
244struct sctp_nets {
245 TAILQ_ENTRY(sctp_nets) sctp_next; /* next link */
246
247 /*
248 * Things on the top half may be able to be split into a common
249 * structure shared by all.
250 */
253
254 /*
255 * The following two in combination equate to a route entry for v6
256 * or v4.
257 */
259
260 /* mtu discovered so far */
262 uint32_t ssthresh; /* not sure about this one for split */
267 /* smoothed average things for RTT and RTO itself */
270 uint64_t rtt; /* last measured rtt value in us */
272
273 /* This is used for SHUTDOWN/SHUTDOWN-ACK/SEND or INIT timers */
275
276 /* last time in seconds I sent to it */
277 struct timeval last_sent_time;
279 struct htcp htcp_ca; /* JRS - struct used in HTCP algorithm */
280 struct rtcc_cc rtcc; /* rtcc module cc stuff */
283
284 /* Congestion stats per destination */
285 /*
286 * flight size variables and such, sorry Vern, I could not avoid
287 * this if I wanted performance :>
288 */
290 uint32_t cwnd; /* actual cwnd */
291 uint32_t prev_cwnd; /* cwnd before any processing */
292 uint32_t ecn_prev_cwnd; /* ECN prev cwnd at first ecn_echo seen in new
293 * window */
294 uint32_t partial_bytes_acked; /* in CA tracks when to incr a MTU */
295 /* tracking variables to avoid the aloc/free in sack processing */
296 unsigned int net_ack;
297 unsigned int net_ack2;
298
299 /*
300 * JRS - 5/8/07 - Variable to track last time a destination was
301 * active for CMT PF
302 */
304
305 /*
306 * CMT variables (iyengar@cis.udel.edu)
307 */
308 uint32_t this_sack_highest_newack; /* tracks highest TSN newly
309 * acked for a given dest in
310 * the current SACK. Used in
311 * SFR and HTNA algos */
312 uint32_t pseudo_cumack; /* CMT CUC algorithm. Maintains next expected
313 * pseudo-cumack for this destination */
314 uint32_t rtx_pseudo_cumack; /* CMT CUC algorithm. Maintains next
315 * expected pseudo-cumack for this
316 * destination */
317
318 /* CMT fast recovery variables */
322#ifdef INET6
323 uint32_t flowlabel;
324#endif
326
327 struct timeval start_time; /* time when this net was created */
328 uint32_t marked_retrans; /* number or DATA chunks marked for
329 * timer based retransmissions */
331 uint32_t heart_beat_delay; /* Heart Beat delay in ms */
332
333 /* if this guy is ok or not ... status */
335 /* number of timeouts to consider the destination unreachable */
337 /* number of timeouts to consider the destination potentially failed */
339 /* error stats on the destination */
341 /* UDP port number in case of UDP tunneling */
343
346 /* Flags that probably can be combined into dest_state */
347 uint8_t fast_retran_ip; /* fast retransmit in progress */
349 uint8_t saw_newack; /* CMT's SFR algorithm flag */
350 uint8_t src_addr_selected; /* if we split we move */
352 uint8_t addr_is_local; /* its a local address (if known) could move
353 * in split */
354
355 /*
356 * CMT variables (iyengar@cis.udel.edu)
357 */
358 uint8_t find_pseudo_cumack; /* CMT CUC algorithm. Flag used to
359 * find a new pseudocumack. This flag
360 * is set after a new pseudo-cumack
361 * has been received and indicates
362 * that the sender should find the
363 * next pseudo-cumack expected for
364 * this destination */
365 uint8_t find_rtx_pseudo_cumack; /* CMT CUCv2 algorithm. Flag used to
366 * find a new rtx-pseudocumack. This
367 * flag is set after a new
368 * rtx-pseudo-cumack has been received
369 * and indicates that the sender
370 * should find the next
371 * rtx-pseudo-cumack expected for this
372 * destination */
373 uint8_t new_pseudo_cumack; /* CMT CUC algorithm. Flag used to
374 * indicate if a new pseudo-cumack or
375 * rtx-pseudo-cumack has been received */
376 uint8_t window_probe; /* Doing a window probe? */
377 uint8_t RTO_measured; /* Have we done the first measure */
378 uint8_t last_hs_used; /* index into the last HS table entry we used */
383};
384
386 uint32_t tsn; /* the TSN of this transmit */
387 uint32_t mid; /* the message identifier of this transmit */
388 uint16_t sid; /* the stream number of this guy */
390 uint32_t context; /* from send */
392 /*
393 * part of the Highest sacked algorithm to be able to stroke counts
394 * on ones that are FR'd.
395 */
396 uint32_t fast_retran_tsn; /* sending_seq at the time of FR */
397 struct timeval timetodrop; /* time we drop it from queue */
398 uint32_t fsn; /* Fragment Sequence Number */
400 uint8_t rcv_flags; /* flags pulled from data chunk on inbound for
401 * outbound holds sending flags for PR-SCTP. */
405};
406
407TAILQ_HEAD(sctpchunk_listhead, sctp_tmit_chunk);
408
409/* The lower byte is used to enumerate PR_SCTP policies */
410#define CHUNK_FLAGS_PR_SCTP_TTL SCTP_PR_SCTP_TTL
411#define CHUNK_FLAGS_PR_SCTP_BUF SCTP_PR_SCTP_BUF
412#define CHUNK_FLAGS_PR_SCTP_RTX SCTP_PR_SCTP_RTX
413
414/* The upper byte is used as a bit mask */
415#define CHUNK_FLAGS_FRAGMENT_OK 0x0100
416
417struct chk_id {
420};
421
423 union {
427 struct sctp_association *asoc; /* bp to asoc this belongs to */
428 struct timeval sent_rcv_time; /* filled in if RTT being calculated */
429 struct mbuf *data; /* pointer to mbuf chain of data */
430 struct mbuf *last_mbuf; /* pointer to last mbuf in chain */
432 TAILQ_ENTRY(sctp_tmit_chunk) sctp_next; /* next link */
433 int32_t sent; /* the send status */
434 uint16_t snd_count; /* number of times I sent */
435 uint16_t flags; /* flags, such as FRAGMENT_OK */
440 uint8_t holds_key_ref; /* flag if auth keyid refcount is held */
447};
448
449struct sctp_queued_to_read { /* sinfo structure Pluse more */
450 uint16_t sinfo_stream; /* off the wire */
451 uint16_t sinfo_flags; /* SCTP_UNORDERED from wire use SCTP_EOF for
452 * EOR */
453 uint32_t sinfo_ppid; /* off the wire */
454 uint32_t sinfo_context; /* pick this up from assoc def context? */
455 uint32_t sinfo_timetolive; /* not used by kernel */
456 uint32_t sinfo_tsn; /* Use this in reassembly as first TSN */
457 uint32_t sinfo_cumtsn; /* Use this in reassembly as last TSN */
458 sctp_assoc_t sinfo_assoc_id; /* our assoc id */
459 /* Non sinfo stuff */
460 uint32_t mid; /* Fragment Index */
461 uint32_t length; /* length of data */
462 uint32_t held_length; /* length held in sb */
463 uint32_t top_fsn; /* Highest FSN in queue */
464 uint32_t fsn_included; /* Highest FSN in *data portion */
465 struct sctp_nets *whoFrom; /* where it came from */
466 struct mbuf *data; /* front of the mbuf chain of data with
467 * PKT_HDR */
468 struct mbuf *tail_mbuf; /* used for multi-part data */
469 struct mbuf *aux_data; /* used to hold/cache control if o/s does not
470 * take it from us */
471 struct sctp_tcb *stcb; /* assoc, used for window update */
474 struct sctpchunk_listhead reasm;
476 uint16_t spec_flags; /* Flags to hold the notification field */
486};
487
488#define SCTP_ON_ORDERED 1
489#define SCTP_ON_UNORDERED 2
490
491/* This data structure will be on the outbound
492 * stream queues. Data will be pulled off from
493 * the front of the mbuf data and chunk-ified
494 * by the output routines. We will custom
495 * fit every chunk we pull to the send/sent
496 * queue to make up the next full packet
497 * if we can. An entry cannot be removed
498 * from the stream_out queue until
499 * the msg_is_complete flag is set. This
500 * means at times data/tail_mbuf MIGHT
501 * be NULL.. If that occurs it happens
502 * for one of two reasons. Either the user
503 * is blocked on a send() call and has not
504 * awoken to copy more data down... OR
505 * the user is in the explict MSG_EOR mode
506 * and wrote some data, but has not completed
507 * sending.
508 * ss_next and scheduled are only used by the FCFS stream scheduler.
509 */
511 struct mbuf *data;
512 struct mbuf *tail_mbuf;
513 struct timeval ts;
514 struct sctp_nets *net;
534};
535
536/*
537 * this struct contains info that is used to track inbound stream data and
538 * help with ordering.
539 */
540TAILQ_HEAD(sctpwheelunrel_listhead, sctp_stream_in);
542 struct sctp_readhead inqueue;
543 struct sctp_readhead uno_inqueue;
544 uint32_t last_mid_delivered; /* used for re-order */
548};
549
550TAILQ_HEAD(sctpwheel_listhead, sctp_stream_out);
552
553/*
554 * This union holds all data necessary for
555 * different stream schedulers.
556 */
559 /* circular looking for output selection */
561 union {
562 struct sctpwheel_listhead wheel;
563 struct sctplist_listhead list;
565};
566
567/* Round-robin schedulers */
568struct ss_rr {
569 /* next link in wheel */
571};
572
573/* Priority scheduler */
574struct ss_prio {
575 /* next link in wheel */
577 /* priority id */
579};
580
581/* Fair Bandwidth scheduler */
582struct ss_fb {
583 /* next link in wheel */
585 /* stores message size */
586 int32_t rounds;
587};
588
589/*
590 * This union holds all parameters per stream
591 * necessary for different stream schedulers.
592 */
594 union {
595 struct ss_rr rr;
596 struct ss_prio prio;
597 struct ss_fb fb;
598 } ss;
600};
601
602/* States for outgoing streams */
603#define SCTP_STREAM_CLOSED 0x00
604#define SCTP_STREAM_OPENING 0x01
605#define SCTP_STREAM_OPEN 0x02
606#define SCTP_STREAM_RESET_PENDING 0x03
607#define SCTP_STREAM_RESET_IN_FLIGHT 0x04
608
609/* This struct is used to track the traffic on outbound streams */
611 struct sctp_streamhead outqueue;
613 uint32_t chunks_on_queues; /* send queue and sent queue */
614#if defined(SCTP_DETAILED_STR_STATS)
617#else
618 /* Only the aggregation */
621#endif
622 /*
623 * For associations using DATA chunks, the lower 16-bit of
624 * next_mid_ordered are used as the next SSN.
625 */
631};
632
633#define SCTP_MAX_STREAMS_AT_ONCE_RESET 200
634
635/* used to keep track of the addresses yet to try to add/delete */
636TAILQ_HEAD(sctp_asconf_addrhead, sctp_asconf_addr);
640 struct sctp_ifa *ifa; /* save the ifa for add/del ip */
641 uint8_t sent; /* has this been sent yet? */
642 uint8_t special_del; /* not to be used in lookup */
643};
644
652};
653
654#define SCTP_TSN_LOG_SIZE 40
655
657 void *stcb;
666};
667
668#define SCTP_FS_SPEC_LOG_SIZE 200
676};
677
678/* This struct is here to cut out the compatiabilty
679 * pad that bulks up both the inp and stcb. The non
680 * pad portion MUST stay in complete sync with
681 * sctp_sndrcvinfo... i.e. if sinfo_xxxx is added
682 * this must be done here too.
683 */
696};
697
698/*
699 * JRS - Structure to hold function pointers to the functions responsible
700 * for congestion control.
701 */
702
704 void (*sctp_set_initial_cc_param) (struct sctp_tcb *stcb, struct sctp_nets *net);
706 struct sctp_association *asoc,
707 int accum_moved, int reneged_all, int will_exit);
708 void (*sctp_cwnd_update_exit_pf) (struct sctp_tcb *stcb, struct sctp_nets *net);
709 void (*sctp_cwnd_update_after_fr) (struct sctp_tcb *stcb,
710 struct sctp_association *asoc);
712 struct sctp_nets *net);
714 struct sctp_nets *net, int in_window, int num_pkt_lost);
716 struct sctp_nets *net, struct sctp_pktdrop_chunk *cp,
717 uint32_t *bottle_bw, uint32_t *on_queue);
719 struct sctp_nets *net, int burst_limit);
721 struct sctp_nets *net);
723 struct sctp_tmit_chunk *);
725 struct sctp_nets *net);
727 struct sctp_nets *net);
728 int (*sctp_cwnd_socket_option) (struct sctp_tcb *stcb, int set, struct sctp_cc_option *);
729 void (*sctp_rtt_calculated) (struct sctp_tcb *, struct sctp_nets *, struct timeval *);
730};
731
732/*
733 * RS - Structure to hold function pointers to the functions responsible
734 * for stream scheduling.
735 */
737 void (*sctp_ss_init) (struct sctp_tcb *stcb, struct sctp_association *asoc);
738 void (*sctp_ss_clear) (struct sctp_tcb *stcb, struct sctp_association *asoc,
739 bool clear_values);
740 void (*sctp_ss_init_stream) (struct sctp_tcb *stcb, struct sctp_stream_out *strq, struct sctp_stream_out *with_strq);
741 void (*sctp_ss_add_to_stream) (struct sctp_tcb *stcb, struct sctp_association *asoc,
742 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp);
743 bool (*sctp_ss_is_empty) (struct sctp_tcb *stcb, struct sctp_association *asoc);
744 void (*sctp_ss_remove_from_stream) (struct sctp_tcb *stcb, struct sctp_association *asoc,
745 struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp);
746struct sctp_stream_out *(*sctp_ss_select_stream) (struct sctp_tcb *stcb,
747 struct sctp_nets *net, struct sctp_association *asoc);
748 void (*sctp_ss_scheduled) (struct sctp_tcb *stcb, struct sctp_nets *net,
749 struct sctp_association *asoc, struct sctp_stream_out *strq, int moved_how_much);
750 void (*sctp_ss_packet_done) (struct sctp_tcb *stcb, struct sctp_nets *net,
751 struct sctp_association *asoc);
752 int (*sctp_ss_get_value) (struct sctp_tcb *stcb, struct sctp_association *asoc,
753 struct sctp_stream_out *strq, uint16_t *value);
754 int (*sctp_ss_set_value) (struct sctp_tcb *stcb, struct sctp_association *asoc,
755 struct sctp_stream_out *strq, uint16_t value);
756 bool (*sctp_ss_is_user_msgs_incomplete) (struct sctp_tcb *stcb, struct sctp_association *asoc);
757};
758
759/* used to save ASCONF chunks for retransmission */
760TAILQ_HEAD(sctp_asconf_head, sctp_asconf);
765 struct mbuf *data;
767};
768
769/* used to save ASCONF-ACK chunks for retransmission */
770TAILQ_HEAD(sctp_asconf_ackhead, sctp_asconf_ack);
775 struct mbuf *data;
777};
778
779/*
780 * Here we have information about each individual association that we track.
781 * We probably in production would be more dynamic. But for ease of
782 * implementation we will have a fixed array that we hunt for in a linear
783 * fashion.
784 */
786 /* association state */
787 int state;
788
789 /* queue of pending addrs to add/delete */
790 struct sctp_asconf_addrhead asconf_queue;
791
792 struct timeval time_entered; /* time we entered state */
793 struct timeval time_last_rcvd;
794 struct timeval time_last_sent;
795 struct timeval time_last_sat_advance;
797
798 /* timers and such */
799 struct sctp_timer dack_timer; /* Delayed ack timer */
800 struct sctp_timer asconf_timer; /* asconf */
801 struct sctp_timer strreset_timer; /* stream reset */
802 struct sctp_timer shut_guard_timer; /* shutdown guard */
803 struct sctp_timer autoclose_timer; /* automatic close timer */
804 struct sctp_timer delete_prim_timer; /* deleting primary dst */
805
806 /* list of restricted local addresses */
807 struct sctpladdr sctp_restricted_addrs;
808
809 /* last local address pending deletion (waiting for an address add) */
811 /* Deleted primary destination (used to stop timer) */
813
814 struct sctpnetlisthead nets; /* remote address list */
815
816 /* Free chunk list */
817 struct sctpchunk_listhead free_chunks;
818
819 /* Control chunk queue */
820 struct sctpchunk_listhead control_send_queue;
821
822 /* ASCONF chunk queue */
823 struct sctpchunk_listhead asconf_send_queue;
824
825 /*
826 * Once a TSN hits the wire it is moved to the sent_queue. We
827 * maintain two counts here (don't know if any but retran_cnt is
828 * needed). The idea is that the sent_queue_retran_cnt reflects how
829 * many chunks have been marked for retranmission by either T3-rxt
830 * or FR.
831 */
832 struct sctpchunk_listhead sent_queue;
833 struct sctpchunk_listhead send_queue;
834
835 /* Scheduling queues */
837
838 /* If an iterator is looking at me, this is it */
840
841 /* ASCONF save the last ASCONF-ACK so we can resend it if necessary */
842 struct sctp_asconf_ackhead asconf_ack_sent;
843
844 /*
845 * pointer to last stream reset queued to control queue by us with
846 * requests.
847 */
849 /*
850 * if Source Address Selection happening, this will rotate through
851 * the link list.
852 */
854
855 /* stream arrays */
859 /* primary destination to use */
861 struct sctp_nets *alternate; /* If primary is down or PF */
862 /* For CMT */
864 /* last place I got a data chunk from */
866 /* last place I got a control from */
868
869 /*
870 * wait to the point the cum-ack passes req->send_reset_at_tsn for
871 * any req on the list.
872 */
873 struct sctp_resethead resetHead;
874
875 /* queue of chunks waiting to be sent into the local stack */
876 struct sctp_readhead pending_reply_queue;
877
878 /* JRS - the congestion control functions are in this struct */
880 /*
881 * JRS - value to store the currently loaded congestion control
882 * module
883 */
885 /* RS - the stream scheduling functions are in this struct */
887 /* RS - value to store the currently loaded stream scheduling module */
889
892 /* ASCONF next seq I am sending out, inits at init-tsn */
895 /* ASCONF last received ASCONF from peer, starts at peer's TSN-1 */
897
898 /* next seq I am sending in str reset messages */
900 /* next seq I am expecting in str reset messages */
902
903 /* various verification tag information */
904 uint32_t my_vtag; /* The tag to be used. if assoc is re-initited
905 * by remote end, and I have unlocked this
906 * will be regenerated to a new random value. */
907 uint32_t peer_vtag; /* The peers last tag */
908
911
913
914 /* This is the SCTP fragmentation threshold */
916
917 /*
918 * Special hook for Fast retransmit, allows us to track the highest
919 * TSN that is NEW in this SACK if gap ack blocks are present.
920 */
922
923 /*
924 * The highest consecutive TSN that has been acked by peer on my
925 * sends
926 */
928
929 /* The next TSN that I will use in sending. */
931
932 /* Original seq number I used ??questionable to keep?? */
934
935 /* The Advanced Peer Ack Point, as required by the PR-SCTP */
936 /* (A1 in Section 4.2) */
938
939 /*
940 * The highest consequetive TSN at the bottom of the mapping array
941 * (for his sends).
942 */
944 /*
945 * Used to track the mapping array and its offset bits. This MAY be
946 * lower then cumulative_tsn.
947 */
949 /*
950 * used to track highest TSN we have received and is listed in the
951 * mapping array.
952 */
954
955 /* EY - new NR variables used for nr_sack based on mapping_array */
958
962 /*
963 * For the pd-api we should re-write this a bit more efficient. We
964 * could have multiple sctp_queued_to_read's that we are building at
965 * once. Now we only do this when we get ready to deliver to the
966 * socket buffer. Note that we depend on the fact that the struct is
967 * "stuck" on the read queue until we finish all the pd-api.
968 */
970
977#ifdef SCTP_ASOCLOG_OF_TSNS
978 /*
979 * special log - This adds considerable size to the asoc, but
980 * provides a log that you can use to detect problems via kgdb.
981 */
982 struct sctp_tsn_log in_tsnlog[SCTP_TSN_LOG_SIZE];
983 struct sctp_tsn_log out_tsnlog[SCTP_TSN_LOG_SIZE];
984 uint32_t cumack_log[SCTP_TSN_LOG_SIZE];
985 uint32_t cumack_logsnt[SCTP_TSN_LOG_SIZE];
986 uint16_t tsn_in_at;
987 uint16_t tsn_out_at;
988 uint16_t tsn_in_wrapped;
989 uint16_t tsn_out_wrapped;
990 uint16_t cumack_log_at;
991 uint16_t cumack_log_atsnt;
992#endif /* SCTP_ASOCLOG_OF_TSNS */
993#ifdef SCTP_FS_SPEC_LOG
995 uint16_t fs_index;
996#endif
997
998 /*
999 * window state information and smallest MTU that I use to bound
1000 * segmentation
1001 */
1006
1008
1009 uint32_t sb_cc; /* shadow of sb_cc */
1010 uint32_t sb_send_resv; /* amount reserved on a send */
1011 uint32_t my_rwnd_control_len; /* shadow of sb_mbcnt used for rwnd
1012 * control */
1013#ifdef INET6
1014 uint32_t default_flowlabel;
1015#endif
1017 int ctrl_queue_cnt; /* could be removed REM - NO IT CAN'T!! RRS */
1018 /*
1019 * All outbound datagrams queue into this list from the individual
1020 * stream queue. Here they get assigned a TSN and then await
1021 * sending. The stream seq comes when it is first put in the
1022 * individual str queue
1023 */
1024 unsigned int stream_queue_cnt;
1025 unsigned int send_queue_cnt;
1026 unsigned int sent_queue_cnt;
1028 /*
1029 * Number on sent queue that are marked for retran until this value
1030 * is 0 we only send one packet of retran'ed data.
1031 */
1033
1036 unsigned int fwd_tsn_cnt;
1037 /* amount of data (bytes) currently in flight (on all destinations) */
1038 unsigned int total_flight;
1039 /* Total book size in flight */
1040 unsigned int total_flight_count; /* count of chunks used with
1041 * book total */
1042 /* count of destinaton nets and list of destination nets */
1043 unsigned int numnets;
1044
1045 /* Total error count on this association */
1047
1048 unsigned int cnt_msg_on_sb;
1049
1050 /* All stream count of chunks for delivery */
1053
1054 /* Heart Beat delay in ms */
1056
1057 /* autoclose */
1059
1060 /* how many preopen streams we have */
1061 unsigned int pre_open_streams;
1062
1063 /* How many streams I support coming into me */
1065
1066 /* the cookie life I award for any cookie, in seconds */
1068 /* time to delay acks for */
1069 unsigned int delayed_ack;
1070 unsigned int old_delayed_ack;
1071 unsigned int sack_freq;
1072 unsigned int data_pkts_seen;
1073
1074 unsigned int numduptsns;
1076 uint32_t initial_init_rto_max; /* initial RTO for INIT's */
1077 uint32_t initial_rto; /* initial send RTO */
1078 uint32_t minrto; /* per assoc RTO-MIN */
1079 uint32_t maxrto; /* per assoc RTO-MAX */
1080
1081 /* authentication fields */
1084 sctp_hmaclist_t *local_hmacs; /* local HMACs supported */
1085 sctp_hmaclist_t *peer_hmacs; /* peer HMACs supported */
1086 struct sctp_keyhead shared_keys; /* assoc's shared keys */
1087 sctp_authinfo_t authinfo; /* randoms, cached keys */
1088 /*
1089 * refcnt to block freeing when a sender or receiver is off coping
1090 * user data in.
1091 */
1093 uint32_t chunks_on_out_queue; /* total chunks floating around,
1094 * locked by send socket buffer */
1097 uint16_t peer_hmac_id; /* peer HMAC id to send */
1098
1099 /*
1100 * Being that we have no bag to collect stale cookies, and that we
1101 * really would not want to anyway.. we will count them in this
1102 * counter. We of course feed them to the pigeons right away (I have
1103 * always thought of pigeons as flying rats).
1104 */
1106
1107 /*
1108 * For the partial delivery API, if up, invoked this is what last
1109 * TSN I delivered
1110 */
1113
1114 /* counts of actual built streams. Allocation may be more however */
1115 /* could re-arrange to optimize space here. */
1120 /* my maximum number of retrans of INIT and SEND */
1121 /* copied from SCTP but should be individually setable */
1124
1126
1128
1129 /*
1130 * lock flag: 0 is ok to send, 1+ (duals as a retran count) is
1131 * awaiting ACK
1132 */
1134
1137
1140
1143
1146 uint8_t authenticated; /* packet authenticated ok */
1147 /*
1148 * This flag indicates that a SACK need to be sent. Initially this
1149 * is 1 to send the first sACK immediately.
1150 */
1152
1153 /* max burst of new packets into the network */
1155 /* max burst of fast retransmit packets */
1157
1158 uint8_t sat_network; /* RTT is in range of sat net or greater */
1159 uint8_t sat_network_lockout; /* lockout code */
1160 uint8_t burst_limit_applied; /* Burst limit in effect at last send? */
1161 /* flag goes on when we are doing a partial delivery api */
1169 uint8_t asconf_del_pending; /* asconf delete last addr pending */
1171 /*
1172 * This value, plus all other ack'd but above cum-ack is added
1173 * together to cross check against the bit that we have yet to
1174 * define (probably in the SACK). When the cum-ack is updated, this
1175 * sum is updated as well.
1176 */
1177
1178 /* Flags whether an extension is supported or not */
1187
1188 /* Did the peer make the stream config (add out) request */
1190
1193
1195 /* flags to handle send alternate net tracking */
1211 /* CMT variables */
1216 /* JRS 5/21/07 - CMT PF variable */
1221 uint16_t port; /* remote UDP encapsulation port */
1222 /*
1223 * The mapping array is used to track out of order sequences above
1224 * last_acked_seq. 0 indicates packet missing 1 indicates packet
1225 * rec'd. We slide it up every time we raise last_acked_seq and 0
1226 * trailing locactions out. If I get a TSN above the array
1227 * mappingArraySz, I discard the datagram and let retransmit happen.
1228 */
1237 struct timeval start_time;
1238 struct timeval discontinuity_time;
1241};
1242
1243#endif
__uint32_t uint32_t
Definition: in.h:62
__uint16_t uint16_t
Definition: in.h:57
__uint8_t uint8_t
Definition: in.h:52
ipfw_dyn_rule * next
Definition: ip_fw.h:0
#define SCTP_MAX_DUP_TSNS
#define SCTP_MAX_RESET_PARAMS
#define SCTP_PROCESS_STRUCT
Definition: sctp_os_bsd.h:233
struct callout sctp_os_timer_t
Definition: sctp_os_bsd.h:267
void(* asoc_func)(struct sctp_inpcb *, struct sctp_tcb *, void *ptr, uint32_t val)
Definition: sctp_structs.h:105
int(* inp_func)(struct sctp_inpcb *, void *ptr, uint32_t val)
Definition: sctp_structs.h:107
__FBSDID("$FreeBSD$")
#define SCTP_FS_SPEC_LOG_SIZE
Definition: sctp_structs.h:668
TAILQ_HEAD(sctpnetlisthead, sctp_nets)
void(* end_func)(void *ptr, uint32_t val)
Definition: sctp_structs.h:108
#define SCTP_TSN_LOG_SIZE
Definition: sctp_structs.h:654
uint32_t sctp_assoc_t
Definition: sctp_uio.h:48
#define SCTP_PR_SCTP_MAX
Definition: sctp_uio.h:264
uint8_t id
Definition: sctp_structs.h:418
uint8_t can_take_data
Definition: sctp_structs.h:419
Definition: cc_htcp.c:154
uint8_t modeswitch
Definition: sctp_structs.h:200
uint32_t last_cong
Definition: sctp_structs.h:202
uint32_t undo_last_cong
Definition: sctp_structs.h:203
uint32_t undo_old_maxB
Definition: sctp_structs.h:210
uint32_t minRTT
Definition: sctp_structs.h:206
uint8_t beta
Definition: sctp_structs.h:199
uint32_t bytecount
Definition: sctp_structs.h:205
uint32_t lasttime
Definition: sctp_structs.h:217
uint32_t undo_maxRTT
Definition: sctp_structs.h:209
uint32_t minB
Definition: sctp_structs.h:213
uint16_t bytes_acked
Definition: sctp_structs.h:204
uint32_t old_maxB
Definition: sctp_structs.h:215
uint32_t Bi
Definition: sctp_structs.h:216
uint32_t maxRTT
Definition: sctp_structs.h:207
uint16_t alpha
Definition: sctp_structs.h:198
uint32_t maxB
Definition: sctp_structs.h:214
struct mtx ipi_iterator_wq_mtx
Definition: sctp_structs.h:174
struct mtx it_mtx
Definition: sctp_structs.h:175
SCTP_PROCESS_STRUCT thread_proc
Definition: sctp_structs.h:176
struct sctpiterators iteratorhead
Definition: sctp_structs.h:177
uint32_t iterator_running
Definition: sctp_structs.h:179
uint32_t iterator_flags
Definition: sctp_structs.h:180
struct sctp_iterator * cur_it
Definition: sctp_structs.h:178
uint64_t lbw
Definition: sctp_structs.h:222
uint16_t steady_step
Definition: sctp_structs.h:230
uint32_t cwnd_at_bw_set
Definition: sctp_structs.h:228
uint8_t rtt_set_this_sack
Definition: sctp_structs.h:239
uint8_t use_dccc_ecn
Definition: sctp_structs.h:234
uint64_t new_tot_time
Definition: sctp_structs.h:226
uint64_t bw_bytes_at_last_rttc
Definition: sctp_structs.h:227
struct timeval tls
Definition: sctp_structs.h:221
uint16_t step_cnt
Definition: sctp_structs.h:231
uint8_t ret_from_eq
Definition: sctp_structs.h:232
uint8_t last_step_state
Definition: sctp_structs.h:237
uint64_t bw_bytes
Definition: sctp_structs.h:224
uint8_t tls_needs_set
Definition: sctp_structs.h:235
uint8_t last_inst_ind
Definition: sctp_structs.h:241
uint32_t vol_reduce
Definition: sctp_structs.h:229
uint64_t lbw_rtt
Definition: sctp_structs.h:223
uint64_t bw_tot_time
Definition: sctp_structs.h:225
struct sctpwheel_listhead wheel
Definition: sctp_structs.h:562
struct sctplist_listhead list
Definition: sctp_structs.h:563
struct sctp_stream_out * locked_on_sending
Definition: sctp_structs.h:558
struct sctp_stream_out * last_out_stream
Definition: sctp_structs.h:560
union scheduling_data::@35 out
union scheduling_parameters::@36 ss
struct ss_prio prio
Definition: sctp_structs.h:596
uint32_t serial_number
Definition: sctp_structs.h:773
TAILQ_ENTRY(sctp_asconf_ack) next
struct sctp_nets * last_sent_to
Definition: sctp_structs.h:774
struct mbuf * data
Definition: sctp_structs.h:775
struct sctp_ifa * ifa
Definition: sctp_structs.h:640
struct sctp_asconf_addr_param ap
Definition: sctp_structs.h:639
TAILQ_ENTRY(sctp_asconf_addr) next
struct sctpladdr list_of_work
Definition: sctp_structs.h:169
uint16_t snd_count
Definition: sctp_structs.h:764
struct mbuf * data
Definition: sctp_structs.h:765
uint32_t serial_number
Definition: sctp_structs.h:763
TAILQ_ENTRY(sctp_asconf) next
uint16_t len
Definition: sctp_structs.h:766
uint16_t peer_hmac_id
uint32_t asconf_seq_in
Definition: sctp_structs.h:896
uint32_t cookie_preserve_req
Definition: sctp_structs.h:891
uint32_t sending_seq
Definition: sctp_structs.h:930
unsigned int numnets
uint8_t fragment_flags
int16_t num_send_timers_up
uint16_t strm_realoutsize
struct timeval time_entered
Definition: sctp_structs.h:792
uint16_t mapping_array_size
uint32_t last_base_tsnsent[SCTP_MAX_RESET_PARAMS]
Definition: sctp_structs.h:976
uint32_t total_output_queue_size
unsigned int sent_queue_retran_cnt
uint16_t max_send_times
unsigned int cnt_msg_on_sb
uint32_t timoshutdown
uint8_t asconf_del_pending
unsigned int sent_queue_cnt_removeable
uint16_t stream_locked_on
uint8_t peer_supports_nat
uint16_t last_strm_seq_delivered
uint8_t fragmented_delivery_inprogress
uint32_t sctp_frag_point
sctp_auth_chklist_t * local_auth_chunks
uint32_t highest_tsn_inside_map
Definition: sctp_structs.h:953
struct sctp_nets * alternate
Definition: sctp_structs.h:861
struct sctp_timer asconf_timer
Definition: sctp_structs.h:800
uint32_t str_reset_seq_out
Definition: sctp_structs.h:899
uint32_t my_last_reported_rwnd
uint16_t max_init_times
unsigned int old_delayed_ack
uint32_t default_mtu
uint8_t adaptation_needed
struct timeval time_last_sat_advance
Definition: sctp_structs.h:795
struct sctpchunk_listhead send_queue
Definition: sctp_structs.h:833
struct sctp_timer strreset_timer
Definition: sctp_structs.h:801
uint16_t streamincnt
uint16_t ssn_of_pdapi
uint8_t ifp_had_enobuf
uint16_t def_net_failure
struct sctp_stream_out * strmout
Definition: sctp_structs.h:857
uint32_t sb_send_resv
uint32_t peer_vtag_nonce
Definition: sctp_structs.h:910
struct sctpladdr sctp_restricted_addrs
Definition: sctp_structs.h:807
unsigned int total_flight_count
struct sctp_keyhead shared_keys
uint32_t sat_t3_recovery_tsn
Definition: sctp_structs.h:960
uint8_t used_alt_asconfack
struct timeval start_time
uint32_t sctp_autoclose_ticks
uint32_t asconf_seq_out
Definition: sctp_structs.h:893
struct sctpnetlisthead nets
Definition: sctp_structs.h:814
uint8_t reconfig_supported
uint8_t auth_supported
struct sctp_nets * last_control_chunk_from
Definition: sctp_structs.h:867
struct sctp_readhead pending_reply_queue
Definition: sctp_structs.h:876
uint8_t fast_retran_loss_recovery
uint8_t burst_limit_applied
sctp_authinfo_t authinfo
uint32_t pr_sctp_cnt
uint16_t stale_cookie_count
struct sctp_nets * deleted_primary
Definition: sctp_structs.h:812
struct timeval time_last_rcvd
Definition: sctp_structs.h:793
uint8_t dropped_special_cnt
uint8_t idata_supported
uint32_t initial_rto
uint32_t last_reset_action[SCTP_MAX_RESET_PARAMS]
Definition: sctp_structs.h:974
struct sctp_laddr * last_used_address
Definition: sctp_structs.h:853
uint8_t sat_network_lockout
uint32_t asconf_seq_out_acked
Definition: sctp_structs.h:894
struct sctp_timer dack_timer
Definition: sctp_structs.h:799
uint8_t delayed_connection
struct sctp_asconf_ackhead asconf_ack_sent
Definition: sctp_structs.h:842
unsigned int cnt_on_all_streams
uint32_t cumulative_tsn
Definition: sctp_structs.h:943
struct sctpchunk_listhead free_chunks
Definition: sctp_structs.h:817
uint32_t mapping_array_base_tsn
Definition: sctp_structs.h:948
uint8_t cmt_dac_pkts_rcvd
uint8_t stream_reset_out_is_outstanding
uint32_t peers_adaptation
uint32_t timoheartbeat
uint32_t str_reset_seq_in
Definition: sctp_structs.h:901
unsigned int total_flight
uint32_t timoshutdownack
uint32_t pdapi_ppid
Definition: sctp_structs.h:972
unsigned int stream_queue_cnt
uint8_t sctp_cmt_on_off
uint32_t tsn_last_delivered
Definition: sctp_structs.h:961
uint8_t sat_t3_loss_recovery
uint16_t last_revoke_count
uint8_t hb_ect_randombit
uint8_t adaptation_sent
uint32_t cookie_life
struct sctp_asconf_addrhead asconf_queue
Definition: sctp_structs.h:790
struct sctpchunk_listhead asconf_send_queue
Definition: sctp_structs.h:823
struct sctp_queued_to_read * control_pdapi
Definition: sctp_structs.h:969
uint8_t saw_sack_with_nr_frags
uint8_t saw_sack_with_frags
uint8_t cookie_how[8]
uint16_t last_strm_no_delivered
struct sctp_nets * last_net_cmt_send_started
Definition: sctp_structs.h:863
unsigned int fwd_tsn_cnt
unsigned int delayed_ack
uint32_t fast_recovery_tsn
Definition: sctp_structs.h:959
struct sctp_resethead resetHead
Definition: sctp_structs.h:873
struct sctp_ss_functions ss_functions
Definition: sctp_structs.h:886
struct sctp_timer autoclose_timer
Definition: sctp_structs.h:803
struct sctp_timer shut_guard_timer
Definition: sctp_structs.h:802
uint8_t * nr_mapping_array
Definition: sctp_structs.h:956
uint32_t my_rwnd_control_len
uint16_t streamoutcnt
struct sctpchunk_listhead control_send_queue
Definition: sctp_structs.h:820
uint16_t str_of_pdapi
unsigned int size_on_all_streams
uint8_t asconf_supported
uint32_t highest_tsn_inside_nr_map
Definition: sctp_structs.h:957
uint32_t smallest_mtu
Definition: sctp_structs.h:915
uint8_t seen_a_sack_this_pkt
unsigned int max_inbound_streams
uint32_t last_acked_seq
Definition: sctp_structs.h:927
struct sctp_iterator * stcb_starting_point_for_iterator
Definition: sctp_structs.h:839
uint16_t def_net_pf_threshold
uint64_t abandoned_unsent[SCTP_PR_SCTP_MAX+1]
uint32_t tsn_of_pdapi_last_delivered
Definition: sctp_structs.h:971
struct sctp_timer delete_prim_timer
Definition: sctp_structs.h:804
sctp_hmaclist_t * local_hmacs
unsigned int numduptsns
uint32_t this_sack_highest_gap
Definition: sctp_structs.h:921
unsigned int data_pkts_seen
uint32_t congestion_control_module
Definition: sctp_structs.h:884
sctp_hmaclist_t * peer_hmacs
uint8_t nrsack_supported
uint8_t use_precise_time
struct sctp_scoping scope
struct scheduling_data ss_data
Definition: sctp_structs.h:836
uint8_t pktdrop_supported
uint8_t * mapping_array
Definition: sctp_structs.h:858
uint32_t last_sending_seq[SCTP_MAX_RESET_PARAMS]
Definition: sctp_structs.h:975
uint16_t free_chunk_cnt
struct sctp_tmit_chunk * str_reset
Definition: sctp_structs.h:848
unsigned int cnt_on_reasm_queue
uint32_t chunks_on_out_queue
uint8_t prsctp_supported
unsigned int send_queue_cnt
uint64_t abandoned_sent[SCTP_PR_SCTP_MAX+1]
uint8_t in_asocid_hash
int dup_tsns[SCTP_MAX_DUP_TSNS]
struct timeval time_last_sent
Definition: sctp_structs.h:794
struct sctp_nonpad_sndrcvinfo def_send
Definition: sctp_structs.h:796
uint16_t ecn_echo_cnt_onq
uint32_t heart_beat_delay
uint8_t last_flags_delivered
struct sctp_nets * primary_destination
Definition: sctp_structs.h:860
uint32_t stream_scheduling_module
Definition: sctp_structs.h:888
uint8_t hb_random_values[4]
struct sctp_cc_functions cc_functions
Definition: sctp_structs.h:879
unsigned int overall_error_count
struct sctp_nets * last_data_chunk_from
Definition: sctp_structs.h:865
uint32_t init_seq_number
Definition: sctp_structs.h:933
struct sctpchunk_listhead sent_queue
Definition: sctp_structs.h:832
unsigned int pre_open_streams
sctp_auth_chklist_t * peer_auth_chunks
unsigned int size_on_reasm_queue
uint8_t stream_reset_outstanding
uint32_t initial_init_rto_max
uint32_t fr_max_burst
uint32_t marked_retrans
struct sctp_ifa * asconf_addr_del_pending
Definition: sctp_structs.h:810
uint32_t my_vtag_nonce
Definition: sctp_structs.h:909
uint16_t strm_pending_add_size
unsigned int sack_freq
uint32_t advanced_peer_ack_point
Definition: sctp_structs.h:937
struct sctp_stream_in * strmin
Definition: sctp_structs.h:856
uint64_t sctp_features
uint8_t local_strreset_support
struct timeval discontinuity_time
uint32_t peer_vtag
Definition: sctp_structs.h:907
unsigned int sent_queue_cnt
void(* sctp_cwnd_update_after_packet_dropped)(struct sctp_tcb *stcb, struct sctp_nets *net, struct sctp_pktdrop_chunk *cp, uint32_t *bottle_bw, uint32_t *on_queue)
Definition: sctp_structs.h:715
void(* sctp_cwnd_update_packet_transmitted)(struct sctp_tcb *stcb, struct sctp_nets *net)
Definition: sctp_structs.h:720
void(* sctp_cwnd_new_transmission_begins)(struct sctp_tcb *stcb, struct sctp_nets *net)
Definition: sctp_structs.h:724
void(* sctp_cwnd_update_tsn_acknowledged)(struct sctp_nets *net, struct sctp_tmit_chunk *)
Definition: sctp_structs.h:722
void(* sctp_cwnd_update_after_sack)(struct sctp_tcb *stcb, struct sctp_association *asoc, int accum_moved, int reneged_all, int will_exit)
Definition: sctp_structs.h:705
void(* sctp_rtt_calculated)(struct sctp_tcb *, struct sctp_nets *, struct timeval *)
Definition: sctp_structs.h:729
void(* sctp_cwnd_update_exit_pf)(struct sctp_tcb *stcb, struct sctp_nets *net)
Definition: sctp_structs.h:708
void(* sctp_set_initial_cc_param)(struct sctp_tcb *stcb, struct sctp_nets *net)
Definition: sctp_structs.h:704
void(* sctp_cwnd_prepare_net_for_sack)(struct sctp_tcb *stcb, struct sctp_nets *net)
Definition: sctp_structs.h:726
void(* sctp_cwnd_update_after_ecn_echo)(struct sctp_tcb *stcb, struct sctp_nets *net, int in_window, int num_pkt_lost)
Definition: sctp_structs.h:713
void(* sctp_cwnd_update_after_timeout)(struct sctp_tcb *stcb, struct sctp_nets *net)
Definition: sctp_structs.h:711
int(* sctp_cwnd_socket_option)(struct sctp_tcb *stcb, int set, struct sctp_cc_option *)
Definition: sctp_structs.h:728
void(* sctp_cwnd_update_after_output)(struct sctp_tcb *stcb, struct sctp_nets *net, int burst_limit)
Definition: sctp_structs.h:718
void(* sctp_cwnd_update_after_fr)(struct sctp_tcb *stcb, struct sctp_association *asoc)
Definition: sctp_structs.h:709
struct sctp_sndrcvinfo sndrcv
Definition: sctp_structs.h:162
ssize_t sndlen
Definition: sctp_structs.h:163
struct mbuf * m
Definition: sctp_structs.h:161
struct sctp_inpcb * inp
Definition: sctp_structs.h:160
struct timeval timetodrop
Definition: sctp_structs.h:397
uint32_t fast_retran_tsn
Definition: sctp_structs.h:396
uint8_t doing_fast_retransmit
Definition: sctp_structs.h:399
uint8_t chunk_was_revoked
Definition: sctp_structs.h:403
struct sctp_inpcb * inp
Definition: sctp_structs.h:65
uint32_t ticks
Definition: sctp_structs.h:67
uint32_t lineno
Definition: sctp_structs.h:66
uint32_t total_flight
Definition: sctp_structs.h:671
uint32_t pcb_features
Definition: sctp_structs.h:146
uint8_t done_current_ep
Definition: sctp_structs.h:150
inp_func function_inp
Definition: sctp_structs.h:140
struct sctp_inpcb * inp
Definition: sctp_structs.h:136
uint32_t iterator_flags
Definition: sctp_structs.h:148
TAILQ_ENTRY(sctp_iterator) sctp_nxt_itr
end_func function_atend
Definition: sctp_structs.h:142
uint32_t asoc_state
Definition: sctp_structs.h:147
asoc_func function_assoc
Definition: sctp_structs.h:139
struct sctp_inpcb * next_inp
Definition: sctp_structs.h:138
struct sctp_tcb * stcb
Definition: sctp_structs.h:137
struct sctp_timer tmr
Definition: sctp_structs.h:135
uint32_t pcb_flags
Definition: sctp_structs.h:145
uint32_t val
Definition: sctp_structs.h:144
uint8_t no_chunk_output
Definition: sctp_structs.h:149
inp_func function_inp_end
Definition: sctp_structs.h:141
struct vnet * vn
Definition: sctp_structs.h:134
struct nhop_object * ro_nh
Definition: sctp_structs.h:186
union sctp_sockstore _l_addr
Definition: sctp_structs.h:193
struct llentry * ro_lle
Definition: sctp_structs.h:187
struct sctp_ifa * _s_addr
Definition: sctp_structs.h:194
uint16_t ro_plen
Definition: sctp_structs.h:189
uint16_t spare
Definition: sctp_structs.h:192
uint16_t ro_flags
Definition: sctp_structs.h:190
uint16_t ro_mtu
Definition: sctp_structs.h:191
uint32_t marked_fastretrans
Definition: sctp_structs.h:330
uint32_t ecn_ce_pkt_cnt
Definition: sctp_structs.h:265
uint32_t pseudo_cumack
Definition: sctp_structs.h:312
TAILQ_ENTRY(sctp_nets) sctp_next
uint16_t failure_threshold
Definition: sctp_structs.h:336
uint32_t heartbeat_random1
Definition: sctp_structs.h:320
uint32_t cwr_window_tsn
Definition: sctp_structs.h:264
uint32_t prev_cwnd
Definition: sctp_structs.h:291
uint8_t addr_is_local
Definition: sctp_structs.h:352
uint8_t new_pseudo_cumack
Definition: sctp_structs.h:373
uint32_t marked_retrans
Definition: sctp_structs.h:328
uint8_t last_hs_used
Definition: sctp_structs.h:378
uint32_t flight_size
Definition: sctp_structs.h:289
uint8_t indx_of_eligible_next_to_use
Definition: sctp_structs.h:351
uint8_t saw_newack
Definition: sctp_structs.h:349
uint32_t heartbeat_random2
Definition: sctp_structs.h:321
uint8_t fast_retran_ip
Definition: sctp_structs.h:347
uint32_t partial_bytes_acked
Definition: sctp_structs.h:294
uint32_t rtx_pseudo_cumack
Definition: sctp_structs.h:314
uint32_t this_sack_highest_newack
Definition: sctp_structs.h:308
uint8_t find_pseudo_cumack
Definition: sctp_structs.h:358
uint32_t RTO
Definition: sctp_structs.h:271
uint32_t ssthresh
Definition: sctp_structs.h:262
uint16_t pf_threshold
Definition: sctp_structs.h:338
struct sctp_timer pmtu_timer
Definition: sctp_structs.h:251
uint8_t dscp
Definition: sctp_structs.h:325
uint32_t heart_beat_delay
Definition: sctp_structs.h:331
uint32_t fast_recovery_tsn
Definition: sctp_structs.h:319
uint16_t port
Definition: sctp_structs.h:342
uint16_t error_count
Definition: sctp_structs.h:340
struct timeval last_sent_time
Definition: sctp_structs.h:277
uint32_t last_active
Definition: sctp_structs.h:303
struct timeval start_time
Definition: sctp_structs.h:327
uint8_t RTO_measured
Definition: sctp_structs.h:377
uint8_t hb_responded
Definition: sctp_structs.h:348
union sctp_nets::cc_control_data cc_mod
uint32_t mtu
Definition: sctp_structs.h:261
uint8_t flowtype
Definition: sctp_structs.h:382
uint16_t dest_state
Definition: sctp_structs.h:334
struct sctp_net_route ro
Definition: sctp_structs.h:258
uint64_t rtt
Definition: sctp_structs.h:270
uint32_t lost_cnt
Definition: sctp_structs.h:266
uint8_t rto_needed
Definition: sctp_structs.h:380
struct sctp_timer hb_timer
Definition: sctp_structs.h:252
unsigned int net_ack2
Definition: sctp_structs.h:297
uint32_t flowid
Definition: sctp_structs.h:381
uint8_t find_rtx_pseudo_cumack
Definition: sctp_structs.h:365
uint32_t ecn_prev_cwnd
Definition: sctp_structs.h:292
uint8_t fast_retran_loss_recovery
Definition: sctp_structs.h:344
uint8_t window_probe
Definition: sctp_structs.h:376
struct sctp_timer rxt_timer
Definition: sctp_structs.h:274
uint32_t last_cwr_tsn
Definition: sctp_structs.h:263
uint8_t will_exit_fast_recovery
Definition: sctp_structs.h:345
uint8_t src_addr_selected
Definition: sctp_structs.h:350
uint8_t lan_type
Definition: sctp_structs.h:379
uint32_t cwnd
Definition: sctp_structs.h:290
unsigned int net_ack
Definition: sctp_structs.h:296
sctp_assoc_t sinfo_assoc_id
Definition: sctp_structs.h:693
uint16_t sinfo_keynumber_valid
Definition: sctp_structs.h:695
struct mbuf * aux_data
Definition: sctp_structs.h:469
TAILQ_ENTRY(sctp_queued_to_read) next
struct sctp_tcb * stcb
Definition: sctp_structs.h:471
struct mbuf * data
Definition: sctp_structs.h:466
struct sctpchunk_listhead reasm
Definition: sctp_structs.h:474
uint32_t sinfo_timetolive
Definition: sctp_structs.h:455
struct mbuf * tail_mbuf
Definition: sctp_structs.h:468
sctp_assoc_t sinfo_assoc_id
Definition: sctp_structs.h:458
struct sctp_nets * whoFrom
Definition: sctp_structs.h:465
TAILQ_ENTRY(sctp_queued_to_read) next_instrm
uint8_t site_scope
Definition: sctp_structs.h:651
uint8_t ipv6_addr_legal
Definition: sctp_structs.h:647
uint8_t ipv4_addr_legal
Definition: sctp_structs.h:646
uint8_t ipv4_local_scope
Definition: sctp_structs.h:649
uint8_t loopback_scope
Definition: sctp_structs.h:648
uint8_t local_scope
Definition: sctp_structs.h:650
void(* sctp_ss_packet_done)(struct sctp_tcb *stcb, struct sctp_nets *net, struct sctp_association *asoc)
Definition: sctp_structs.h:750
void(* sctp_ss_clear)(struct sctp_tcb *stcb, struct sctp_association *asoc, bool clear_values)
Definition: sctp_structs.h:738
int(* sctp_ss_get_value)(struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_stream_out *strq, uint16_t *value)
Definition: sctp_structs.h:752
bool(* sctp_ss_is_empty)(struct sctp_tcb *stcb, struct sctp_association *asoc)
Definition: sctp_structs.h:743
void(* sctp_ss_remove_from_stream)(struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp)
Definition: sctp_structs.h:744
bool(* sctp_ss_is_user_msgs_incomplete)(struct sctp_tcb *stcb, struct sctp_association *asoc)
Definition: sctp_structs.h:756
int(* sctp_ss_set_value)(struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_stream_out *strq, uint16_t value)
Definition: sctp_structs.h:754
void(* sctp_ss_scheduled)(struct sctp_tcb *stcb, struct sctp_nets *net, struct sctp_association *asoc, struct sctp_stream_out *strq, int moved_how_much)
Definition: sctp_structs.h:748
void(* sctp_ss_add_to_stream)(struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp)
Definition: sctp_structs.h:741
void(* sctp_ss_init)(struct sctp_tcb *stcb, struct sctp_association *asoc)
Definition: sctp_structs.h:737
void(* sctp_ss_init_stream)(struct sctp_tcb *stcb, struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
Definition: sctp_structs.h:740
uint32_t last_mid_delivered
Definition: sctp_structs.h:544
struct sctp_readhead inqueue
Definition: sctp_structs.h:542
uint8_t pd_api_started
Definition: sctp_structs.h:547
uint8_t delivery_started
Definition: sctp_structs.h:546
struct sctp_readhead uno_inqueue
Definition: sctp_structs.h:543
uint8_t last_msg_incomplete
Definition: sctp_structs.h:629
uint32_t chunks_on_queues
Definition: sctp_structs.h:613
uint32_t next_mid_ordered
Definition: sctp_structs.h:626
uint32_t abandoned_unsent[1]
Definition: sctp_structs.h:619
struct scheduling_parameters ss_params
Definition: sctp_structs.h:612
uint32_t next_mid_unordered
Definition: sctp_structs.h:627
struct sctp_streamhead outqueue
Definition: sctp_structs.h:611
uint32_t abandoned_sent[1]
Definition: sctp_structs.h:620
TAILQ_ENTRY(sctp_stream_queue_pending) next
TAILQ_ENTRY(sctp_stream_queue_pending) ss_next
struct sctp_nets * net
Definition: sctp_structs.h:514
TAILQ_ENTRY(sctp_stream_reset_list) next_resp
uint16_t list_of_streams[]
Definition: sctp_structs.h:82
void * net
Definition: sctp_structs.h:55
uint32_t stopped_from
Definition: sctp_structs.h:61
void * self
Definition: sctp_structs.h:59
void * tcb
Definition: sctp_structs.h:54
uint32_t ticks
Definition: sctp_structs.h:60
void * ep
Definition: sctp_structs.h:53
sctp_os_timer_t timer
Definition: sctp_structs.h:46
void * vnet
Definition: sctp_structs.h:56
union sctp_tmit_chunk::@34 rec
struct sctp_data_chunkrec data
Definition: sctp_structs.h:424
uint8_t window_probe
Definition: sctp_structs.h:446
TAILQ_ENTRY(sctp_tmit_chunk) sctp_next
uint8_t book_size_scale
Definition: sctp_structs.h:443
struct timeval sent_rcv_time
Definition: sctp_structs.h:428
uint8_t copy_by_ref
Definition: sctp_structs.h:445
struct mbuf * data
Definition: sctp_structs.h:429
uint16_t book_size
Definition: sctp_structs.h:437
uint16_t snd_count
Definition: sctp_structs.h:434
struct mbuf * last_mbuf
Definition: sctp_structs.h:430
uint8_t pad_inplace
Definition: sctp_structs.h:441
struct sctp_nets * whoTo
Definition: sctp_structs.h:431
struct chk_id chunk_id
Definition: sctp_structs.h:425
uint8_t holds_key_ref
Definition: sctp_structs.h:440
uint16_t send_size
Definition: sctp_structs.h:436
struct sctp_association * asoc
Definition: sctp_structs.h:427
uint8_t no_fr_allowed
Definition: sctp_structs.h:444
uint16_t auth_keyid
Definition: sctp_structs.h:439
uint16_t in_pos
Definition: sctp_structs.h:663
uint16_t sz
Definition: sctp_structs.h:661
uint32_t tsn
Definition: sctp_structs.h:658
uint16_t resv
Definition: sctp_structs.h:665
uint16_t in_out
Definition: sctp_structs.h:664
uint32_t seq
Definition: sctp_structs.h:659
uint16_t strm
Definition: sctp_structs.h:660
uint16_t flgs
Definition: sctp_structs.h:662
int32_t rounds
Definition: sctp_structs.h:586
TAILQ_ENTRY(sctp_stream_out) next_spoke
TAILQ_ENTRY(sctp_stream_out) next_spoke
uint16_t priority
Definition: sctp_structs.h:578
TAILQ_ENTRY(sctp_stream_out) next_spoke
TAILQ_ENTRY(bbr_sendmap) r_next
struct in6_addr v6
Definition: tcp_lro.h:16