The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/netinet/sctp_structs.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $KAME: sctp_structs.h,v 1.13 2005/03/06 16:04:18 itojun Exp $   */
    2 /*      $NetBSD: sctp_structs.h,v 1.2 2016/04/25 21:21:02 rjs Exp $ */
    3 
    4 #ifndef __SCTP_STRUCTS_H__
    5 #define __SCTP_STRUCTS_H__
    6 
    7 /*
    8  * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
    9  * All rights reserved.
   10  *
   11  * Redistribution and use in source and binary forms, with or without
   12  * modification, are permitted provided that the following conditions
   13  * are met:
   14  * 1. Redistributions of source code must retain the above copyright
   15  *    notice, this list of conditions and the following disclaimer.
   16  * 2. Redistributions in binary form must reproduce the above copyright
   17  *    notice, this list of conditions and the following disclaimer in the
   18  *    documentation and/or other materials provided with the distribution.
   19  * 3. All advertising materials mentioning features or use of this software
   20  *    must display the following acknowledgement:
   21  *      This product includes software developed by Cisco Systems, Inc.
   22  * 4. Neither the name of the project nor the names of its contributors
   23  *    may be used to endorse or promote products derived from this software
   24  *    without specific prior written permission.
   25  *
   26  * THIS SOFTWARE IS PROVIDED BY CISCO SYSTEMS AND CONTRIBUTORS ``AS IS'' AND
   27  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   28  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   29  * ARE DISCLAIMED.  IN NO EVENT SHALL CISCO SYSTEMS OR CONTRIBUTORS BE LIABLE
   30  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   31  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   32  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   34  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   35  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   36  * SUCH DAMAGE.
   37  */
   38 #include <sys/queue.h>
   39 
   40 #include <sys/callout.h>
   41 
   42 #ifdef IPSEC
   43 #include <netipsec/ipsec.h>
   44 #include <netipsec/key.h>
   45 #endif
   46 
   47 #include <netinet/sctp_header.h>
   48 #include <netinet/sctp_uio.h>
   49 
   50 struct sctp_timer {
   51         struct callout timer;
   52         int type;
   53         /*
   54          * Depending on the timer type these will be setup and cast with
   55          * the appropriate entity.
   56          */
   57         void *ep;
   58         void *tcb;
   59         void *net;
   60 };
   61 
   62 /*
   63  * This is the information we track on each interface that we know about        * from the distant end.
   64  */
   65 TAILQ_HEAD(sctpnetlisthead, sctp_nets);
   66 
   67 /*
   68  * Users of the iterator need to malloc a iterator with a call to
   69  * sctp_initiate_iterator(func, pcb_flags, asoc_state, void-ptr-arg, u_int32_t,
   70  *                        u_int32-arg, end_func, inp);
   71  *
   72  * Use the following two defines if you don't care what pcb flags are on the
   73  * EP and/or you don't care what state the association is in.
   74  *
   75  * Note that if you specify an INP as the last argument then ONLY each
   76  * association of that single INP will be executed upon. Note that the
   77  * pcb flags STILL apply so if the inp you specify has different pcb_flags
   78  * then what you put in pcb_flags nothing will happen. use SCTP_PCB_ANY_FLAGS
   79  * to assure the inp you specify gets treated.
   80  */
   81 #define SCTP_PCB_ANY_FLAGS  0x00000000
   82 #define SCTP_ASOC_ANY_STATE 0x00000000
   83 
   84 typedef void (*asoc_func)(struct sctp_inpcb *, struct sctp_tcb *, void *ptr,
   85                           u_int32_t val);
   86 typedef void (*end_func)(void *ptr, u_int32_t val);
   87 
   88 #define SCTP_ITERATOR_DO_ALL_INP        0x00000001
   89 #define SCTP_ITERATOR_DO_SINGLE_INP     0x00000002
   90 
   91 struct sctp_iterator {
   92         LIST_ENTRY(sctp_iterator) sctp_nxt_itr;
   93         struct sctp_timer tmr;
   94         struct sctp_inpcb *inp; /* ep */
   95         struct sctp_tcb *stcb;  /* assoc */
   96         asoc_func function_toapply;
   97         end_func function_atend;
   98         void *pointer;          /* pointer for apply func to use */
   99         u_int32_t val;          /* value for apply func to use */
  100         u_int32_t pcb_flags;
  101         u_int32_t asoc_state;
  102         u_int32_t iterator_flags;
  103 };
  104 
  105 LIST_HEAD(sctpiterators, sctp_iterator);
  106 
  107 struct sctp_copy_all {
  108         struct sctp_inpcb *inp; /* ep */
  109         struct mbuf *m;
  110         struct sctp_sndrcvinfo sndrcv;
  111         int sndlen;
  112         int cnt_sent;
  113         int cnt_failed;
  114 };
  115 
  116 union sctp_sockstore {
  117 #ifdef AF_INET
  118         struct sockaddr_in  sin;
  119 #endif
  120 #ifdef AF_INET6
  121         struct sockaddr_in6 sin6;
  122 #endif
  123         struct sockaddr     sa;
  124 };
  125 
  126 struct sctp_nets {
  127         TAILQ_ENTRY(sctp_nets) sctp_next;       /* next link */
  128 
  129         /* Things on the top half may be able to be split
  130          * into a common structure shared by all.
  131          */
  132         struct sctp_timer pmtu_timer;
  133 
  134         /*
  135          * The following two in combination equate to a route entry for
  136          * v6 or v4.
  137          */
  138 #if 0
  139         struct sctp_route {
  140                 struct rtentry *ro_rt;
  141                 union sctp_sockstore _l_addr;   /* remote peer addr */
  142                 union sctp_sockstore _s_addr;   /* our selected src addr */
  143         } ro;
  144 #endif
  145         struct route ro;
  146         /* union sctp_sockstore _l_addr; */
  147         union sctp_sockstore _s_addr;
  148         /* mtu discovered so far */
  149         u_int32_t mtu;
  150         u_int32_t ssthresh;             /* not sure about this one for split */
  151 
  152         /* smoothed average things for RTT and RTO itself */
  153         int lastsa;
  154         int lastsv;
  155         unsigned int RTO;
  156 
  157         /* This is used for SHUTDOWN/SHUTDOWN-ACK/SEND or INIT timers */
  158         struct sctp_timer rxt_timer;
  159 
  160         /* last time in seconds I sent to it */
  161         struct timeval last_sent_time;
  162         int ref_count;
  163 
  164         /* Congestion stats per destination */
  165         /*
  166          * flight size variables and such, sorry Vern, I could not avoid
  167          * this if I wanted performance :>
  168          */
  169         u_int32_t flight_size;
  170         u_int32_t cwnd; /* actual cwnd */
  171         u_int32_t prev_cwnd; /* cwnd before any processing */
  172         u_int32_t partial_bytes_acked; /* in CA tracks when to incr a MTU */
  173 
  174         /* tracking variables to avoid the aloc/free in sack processing */
  175         unsigned int net_ack;
  176         unsigned int net_ack2;
  177         /*
  178          * These only are valid if the primary dest_sstate holds the
  179          * SCTP_ADDR_SWITCH_PRIMARY flag
  180          */
  181         u_int32_t next_tsn_at_change;
  182         u_int32_t heartbeat_random1;
  183         u_int32_t heartbeat_random2;
  184 
  185         /* if this guy is ok or not ... status */
  186         u_int16_t dest_state;
  187         /* number of transmit failures to down this guy */
  188         u_int16_t failure_threshold;
  189         /* error stats on destination */
  190         u_int16_t error_count;
  191 
  192         /* Flags that probably can be combined into dest_state */
  193         u_int8_t rto_pending;           /* is segment marked for RTO update  ** if we split?*/
  194         u_int8_t fast_retran_ip;        /* fast retransmit in progress */
  195         u_int8_t hb_responded;
  196         u_int8_t cacc_saw_newack;       /* CACC algorithm flag */
  197         u_int8_t src_addr_selected;     /* if we split we move */
  198         u_int8_t indx_of_eligible_next_to_use;
  199         u_int8_t addr_is_local;         /* its a local address (if known) could move in split */
  200 #ifdef SCTP_HIGH_SPEED
  201         u_int8_t last_hs_used;          /* index into the last HS table entry we used */
  202 #endif
  203 };
  204 
  205 
  206 struct sctp_data_chunkrec {
  207         u_int32_t TSN_seq;  /* the TSN of this transmit */
  208         u_int16_t stream_seq; /* the stream sequence number of this transmit */
  209         u_int16_t stream_number; /* the stream number of this guy */
  210         u_int32_t payloadtype;
  211         u_int32_t context;      /* from send */
  212 
  213        /* ECN Nonce: Nonce Value for this chunk */
  214         u_int8_t ect_nonce;
  215 
  216         /* part of the Highest sacked algorithm to be able to
  217          * stroke counts on ones that are FR'd.
  218          */
  219         u_int32_t fast_retran_tsn;      /* sending_seq at the time of FR */
  220         struct timeval timetodrop;      /* time we drop it from queue */
  221         u_int8_t doing_fast_retransmit;
  222         u_int8_t rcv_flags; /* flags pulled from data chunk on inbound
  223                            * for outbound holds sending flags.
  224                            */
  225         u_int8_t state_flags;
  226 };
  227 
  228 TAILQ_HEAD(sctpchunk_listhead, sctp_tmit_chunk);
  229 
  230 #define CHUNK_FLAGS_FRAGMENT_OK 0x0001
  231 
  232 struct sctp_tmit_chunk {
  233         union {
  234                 struct sctp_data_chunkrec data;
  235                 int chunk_id;
  236         } rec;
  237         int32_t   sent;         /* the send status */
  238         int32_t   snd_count;                    /* number of times I sent */
  239         u_int32_t flags;                /* flags, such as FRAGMENT_OK */
  240         u_int32_t   send_size;
  241         u_int32_t   book_size;
  242         u_int32_t   mbcnt;
  243         struct sctp_association *asoc;  /* bp to asoc this belongs to */
  244         struct timeval sent_rcv_time;   /* filled in if RTT being calculated */
  245         struct mbuf *data;              /* pointer to mbuf chain of data */
  246         struct sctp_nets *whoTo;
  247         TAILQ_ENTRY(sctp_tmit_chunk) sctp_next; /* next link */
  248         uint8_t do_rtt;
  249 };
  250 
  251 
  252 /*
  253  * this struct contains info that is used to track inbound stream data
  254  * and help with ordering.
  255  */
  256 TAILQ_HEAD(sctpwheelunrel_listhead, sctp_stream_in);
  257 struct sctp_stream_in {
  258         struct sctpchunk_listhead inqueue;
  259         TAILQ_ENTRY(sctp_stream_in) next_spoke;
  260         uint16_t stream_no;
  261         uint16_t last_sequence_delivered;       /* used for re-order */
  262 };
  263 
  264 /* This struct is used to track the traffic on outbound streams */
  265 TAILQ_HEAD(sctpwheel_listhead, sctp_stream_out);
  266 struct sctp_stream_out {
  267         struct sctpchunk_listhead outqueue;
  268         TAILQ_ENTRY(sctp_stream_out) next_spoke; /* next link in wheel */
  269         uint16_t stream_no;
  270         uint16_t next_sequence_sent; /* next one I expect to send out */
  271 };
  272 
  273 /* used to keep track of the addresses yet to try to add/delete */
  274 TAILQ_HEAD(sctp_asconf_addrhead, sctp_asconf_addr);
  275 struct sctp_asconf_addr {
  276         TAILQ_ENTRY(sctp_asconf_addr) next;
  277         struct sctp_asconf_addr_param ap;
  278         struct ifaddr *ifa;     /* save the ifa for add/del ip */
  279         uint8_t sent;           /* has this been sent yet? */
  280 };
  281 
  282 
  283 /*
  284  * Here we have information about each individual association that we
  285  * track. We probably in production would be more dynamic. But for ease
  286  * of implementation we will have a fixed array that we hunt for in a
  287  * linear fashion.
  288  */
  289 struct sctp_association {
  290         /* association state */
  291         int state;
  292         /* queue of pending addrs to add/delete */
  293         struct sctp_asconf_addrhead asconf_queue;
  294         struct timeval time_entered;            /* time we entered state */
  295         struct timeval time_last_rcvd;
  296         struct timeval time_last_sent;
  297         struct timeval time_last_sat_advance;
  298         struct sctp_sndrcvinfo def_send;        /* default send parameters */
  299 
  300         /* timers and such */
  301         struct sctp_timer hb_timer;             /* hb timer */
  302         struct sctp_timer dack_timer;           /* Delayed ack timer */
  303         struct sctp_timer asconf_timer;         /* Asconf */
  304         struct sctp_timer strreset_timer;       /* stream reset */
  305         struct sctp_timer shut_guard_timer;     /* guard */
  306         struct sctp_timer autoclose_timer;      /* automatic close timer */
  307         struct sctp_timer delayed_event_timer;  /* timer for delayed events */
  308 
  309         /* list of local addresses when add/del in progress */
  310         struct sctpladdr sctp_local_addr_list;
  311         struct sctpnetlisthead nets;
  312 
  313         /* Control chunk queue */
  314         struct sctpchunk_listhead control_send_queue;
  315 
  316         /* Once a TSN hits the wire it is moved to the sent_queue. We
  317          * maintain two counts here (don't know if any but retran_cnt
  318          * is needed). The idea is that the sent_queue_retran_cnt
  319          * reflects how many chunks have been marked for retranmission
  320          * by either T3-rxt or FR.
  321          */
  322         struct sctpchunk_listhead sent_queue;
  323         struct sctpchunk_listhead send_queue;
  324 
  325 
  326         /* re-assembly queue for fragmented chunks on the inbound path */
  327         struct sctpchunk_listhead reasmqueue;
  328 
  329         /*
  330          * this queue is used when we reach a condition that we can NOT
  331          * put data into the socket buffer. We track the size of this
  332          * queue and set our rwnd to the space in the socket minus also
  333          * the size_on_delivery_queue.
  334          */
  335         struct sctpchunk_listhead delivery_queue;
  336 
  337         struct sctpwheel_listhead out_wheel;
  338 
  339         /* If an iterator is looking at me, this is it */
  340         struct sctp_iterator *stcb_starting_point_for_iterator;
  341 
  342         /* ASCONF destination address last sent to */
  343         struct sctp_nets *asconf_last_sent_to;
  344 
  345         /* ASCONF save the last ASCONF-ACK so we can resend it if necessary */
  346         struct mbuf *last_asconf_ack_sent;
  347 
  348         /*
  349          * if Source Address Selection happening, this will rotate through
  350          * the link list.
  351          */
  352         struct sctp_laddr *last_used_address;
  353 
  354         /* stream arrays */
  355         struct sctp_stream_in  *strmin;
  356         struct sctp_stream_out *strmout;
  357         u_int8_t *mapping_array;
  358         /* primary destination to use */
  359         struct sctp_nets *primary_destination;
  360 
  361         /* last place I got a data chunk from */
  362         struct sctp_nets *last_data_chunk_from;
  363         /* last place I got a control from */
  364         struct sctp_nets *last_control_chunk_from;
  365 
  366         /* circular looking for output selection */
  367         struct sctp_stream_out *last_out_stream;
  368 
  369         /* wait to the point the cum-ack passes
  370          * pending_reply->sr_resp.reset_at_tsn.
  371          */
  372         struct sctp_stream_reset_response *pending_reply;
  373         struct sctpchunk_listhead pending_reply_queue;
  374 
  375         u_int32_t cookie_preserve_req;
  376         /* ASCONF next seq I am sending out, inits at init-tsn */
  377         uint32_t asconf_seq_out;
  378         /* ASCONF last received ASCONF from peer, starts at peer's TSN-1 */
  379         uint32_t asconf_seq_in;
  380 
  381         /* next seq I am sending in str reset messages */
  382         uint32_t str_reset_seq_out;
  383 
  384         /* next seq I am expecting in str reset messages */
  385         uint32_t str_reset_seq_in;
  386         u_int32_t str_reset_sending_seq;
  387 
  388         /* various verification tag information */
  389         u_int32_t my_vtag;      /*
  390                                  * The tag to be used. if assoc is
  391                                  * re-initited by remote end, and
  392                                  * I have unlocked this will be
  393                                  * regenrated to a new random value.
  394                                  */
  395         u_int32_t peer_vtag;    /* The peers last tag */
  396 
  397         u_int32_t my_vtag_nonce;
  398         u_int32_t peer_vtag_nonce;
  399 
  400 
  401         /* This is the SCTP fragmentation threshold */
  402         u_int32_t smallest_mtu;
  403 
  404         /*
  405          * Special hook for Fast retransmit, allows us to track the highest
  406          * TSN that is NEW in this SACK if gap ack blocks are present.
  407          */
  408         u_int32_t this_sack_highest_gap;
  409 
  410         /*
  411          * The highest consecutive TSN that has been acked by peer on my
  412          * sends
  413          */
  414         u_int32_t last_acked_seq;
  415 
  416         /* The next TSN that I will use in sending. */
  417         u_int32_t sending_seq;
  418 
  419         /* Original seq number I used ??questionable to keep?? */
  420         u_int32_t init_seq_number;
  421 
  422         /*
  423          * We use this value to know if FR's are allowed, i.e. did the
  424          * cum-ack pass this point or equal it so FR's are now allowed.
  425          */
  426         u_int32_t t3timeout_highest_marked;
  427 
  428         /* The Advanced Peer Ack Point, as required by the PR-SCTP */
  429         /* (A1 in Section 4.2) */
  430         u_int32_t advanced_peer_ack_point;
  431 
  432         /*
  433          * The highest consequetive TSN at the bottom of the mapping
  434          * array (for his sends).
  435          */
  436         u_int32_t cumulative_tsn;
  437         /*
  438          * Used to track the mapping array and its offset bits. This
  439          * MAY be lower then cumulative_tsn.
  440          */
  441         u_int32_t mapping_array_base_tsn;
  442         /*
  443          * used to track highest TSN we have received and is listed in
  444          * the mapping array.
  445          */
  446         u_int32_t highest_tsn_inside_map;
  447 
  448         u_int32_t last_echo_tsn;
  449         u_int32_t last_cwr_tsn;
  450         u_int32_t fast_recovery_tsn;
  451         u_int32_t sat_t3_recovery_tsn;
  452 
  453         u_int32_t tsn_last_delivered;
  454 
  455         /*
  456          * window state information and smallest MTU that I use to bound
  457          * segmentation
  458          */
  459         u_int32_t peers_rwnd;
  460         u_int32_t my_rwnd;
  461         u_int32_t my_last_reported_rwnd;
  462         u_int32_t my_rwnd_control_len;
  463 
  464         u_int32_t total_output_queue_size;
  465         u_int32_t total_output_mbuf_queue_size;
  466 
  467         /* 32 bit nonce stuff */
  468         u_int32_t nonce_resync_tsn;
  469         u_int32_t nonce_wait_tsn;
  470 
  471         int ctrl_queue_cnt; /* could be removed  REM */
  472         /*
  473          * All outbound datagrams queue into this list from the
  474          * individual stream queue. Here they get assigned a TSN
  475          * and then await sending. The stream seq comes when it
  476          * is first put in the individual str queue
  477          */
  478         unsigned int stream_queue_cnt;
  479         unsigned int send_queue_cnt;
  480         unsigned int sent_queue_cnt;
  481         unsigned int sent_queue_cnt_removeable;
  482         /*
  483          * Number on sent queue that are marked for retran until this
  484          * value is 0 we only send one packet of retran'ed data.
  485          */
  486         unsigned int sent_queue_retran_cnt;
  487 
  488         unsigned int size_on_reasm_queue;
  489         unsigned int cnt_on_reasm_queue;
  490         /* amount of data (bytes) currently in flight (on all destinations) */
  491         unsigned int total_flight;
  492         /* Total book size in flight */
  493         unsigned int total_flight_count;        /* count of chunks used with book total */
  494         /* count of destinaton nets and list of destination nets */
  495         unsigned int numnets;
  496 
  497         /* Total error count on this association */
  498         unsigned int overall_error_count;
  499 
  500         unsigned int size_on_delivery_queue;
  501         unsigned int cnt_on_delivery_queue;
  502 
  503         unsigned int cnt_msg_on_sb;
  504 
  505         /* All stream count of chunks for delivery */
  506         unsigned int size_on_all_streams;
  507         unsigned int cnt_on_all_streams;
  508 
  509         /* Heart Beat delay in ticks */
  510         unsigned int heart_beat_delay;
  511 
  512         /* autoclose */
  513         unsigned int sctp_autoclose_ticks;
  514 
  515         /* how many preopen streams we have */
  516         unsigned int pre_open_streams;
  517 
  518         /* How many streams I support coming into me */
  519         unsigned int max_inbound_streams;
  520 
  521         /* the cookie life I award for any cookie, in seconds */
  522         unsigned int cookie_life;
  523 
  524         unsigned int numduptsns;
  525         int dup_tsns[SCTP_MAX_DUP_TSNS];
  526         unsigned int initial_init_rto_max;      /* initial RTO for INIT's */
  527         unsigned int initial_rto;               /* initial send RTO */
  528         unsigned int minrto;                    /* per assoc RTO-MIN */
  529         unsigned int maxrto;                    /* per assoc RTO-MAX */
  530         /* Being that we have no bag to collect stale cookies, and
  531          * that we really would not want to anyway.. we will count
  532          * them in this counter. We of course feed them to the
  533          * pigeons right away (I have always thought of pigeons
  534          * as flying rats).
  535          */
  536         u_int16_t stale_cookie_count;
  537 
  538         /* For the partial delivery API, if up, invoked
  539          * this is what last TSN I delivered
  540          */
  541         u_int16_t str_of_pdapi;
  542         u_int16_t ssn_of_pdapi;
  543 
  544 
  545         /* counts of actual built streams. Allocation may be more however */
  546         /* could re-arrange to optimize space here. */
  547         u_int16_t streamincnt;
  548         u_int16_t streamoutcnt;
  549 
  550         /* my maximum number of retrans of INIT and SEND */
  551         /* copied from SCTP but should be individually setable */
  552         u_int16_t max_init_times;
  553         u_int16_t max_send_times;
  554 
  555         u_int16_t def_net_failure;
  556 
  557         /*
  558          * lock flag: 0 is ok to send, 1+ (duals as a retran count) is
  559          * awaiting ACK
  560          */
  561         u_int16_t asconf_sent;   /* possibly removable REM */
  562         u_int16_t mapping_array_size;
  563 
  564         u_int16_t chunks_on_out_queue; /* total chunks floating around */
  565         int16_t num_send_timers_up;
  566         /*
  567          * This flag indicates that we need to send the first SACK. If
  568          * in place it says we have NOT yet sent a SACK and need to.
  569          */
  570         u_int8_t first_ack_sent;
  571 
  572         /* max burst after fast retransmit completes */
  573         u_int8_t max_burst;
  574 
  575         u_int8_t sat_network;   /* RTT is in range of sat net or greater */
  576         u_int8_t sat_network_lockout;/* lockout code */
  577         u_int8_t burst_limit_applied;   /* Burst limit in effect at last send? */
  578         /* flag goes on when we are doing a partial delivery api */
  579         u_int8_t hb_random_values[4];
  580         u_int8_t fragmented_delivery_inprogress;
  581         u_int8_t fragment_flags;
  582         u_int8_t hb_ect_randombit;
  583         u_int8_t hb_random_idx;
  584 
  585         /* ECN Nonce stuff */
  586         u_int8_t receiver_nonce_sum; /* nonce I sum and put in my sack */
  587         u_int8_t ecn_nonce_allowed;  /* Tells us if ECN nonce is on */
  588         u_int8_t nonce_sum_check;    /* On off switch used during re-sync */
  589         u_int8_t nonce_wait_for_ecne;/* flag when we expect a ECN */
  590         u_int8_t peer_supports_ecn_nonce;
  591 
  592         /*
  593          * This value, plus all other ack'd but above cum-ack is added
  594          * together to cross check against the bit that we have yet to
  595          * define (probably in the SACK).
  596          * When the cum-ack is updated, this sum is updated as well.
  597          */
  598         u_int8_t nonce_sum_expect_base;
  599         /* Flag to tell if ECN is allowed */
  600         u_int8_t ecn_allowed;
  601 
  602         /* flag to indicate if peer can do asconf */
  603         uint8_t peer_supports_asconf;
  604         uint8_t peer_supports_asconf_setprim; /* possibly removable REM */
  605         /* pr-sctp support flag */
  606         uint8_t peer_supports_prsctp;
  607 
  608         /* stream resets are supported by the peer */
  609         uint8_t peer_supports_strreset;
  610 
  611         /*
  612          * packet drop's are supported by the peer, we don't really care
  613          * about this but we bookkeep it anyway.
  614          */
  615         uint8_t peer_supports_pktdrop;
  616 
  617         /* Do we allow V6/V4? */
  618         u_int8_t ipv4_addr_legal;
  619         u_int8_t ipv6_addr_legal;
  620         /* Address scoping flags */
  621         /* scope value for IPv4 */
  622         u_int8_t ipv4_local_scope;
  623         /* scope values for IPv6 */
  624         u_int8_t local_scope;
  625         u_int8_t site_scope;
  626         /* loopback scope */
  627         u_int8_t loopback_scope;
  628         /* flags to handle send alternate net tracking */
  629         u_int8_t used_alt_onsack;
  630         u_int8_t used_alt_asconfack;
  631         u_int8_t fast_retran_loss_recovery;
  632         u_int8_t sat_t3_loss_recovery;
  633         u_int8_t dropped_special_cnt;
  634         u_int8_t seen_a_sack_this_pkt;
  635         u_int8_t stream_reset_outstanding;
  636         u_int8_t delayed_connection;
  637         u_int8_t ifp_had_enobuf;
  638         u_int8_t saw_sack_with_frags;
  639         /*
  640          * The mapping array is used to track out of order sequences above
  641          * last_acked_seq. 0 indicates packet missing 1 indicates packet
  642          * rec'd. We slide it up every time we raise last_acked_seq and 0
  643          * trailing locactions out.  If I get a TSN above the array
  644          * mappingArraySz, I discard the datagram and let retransmit happen.
  645          */
  646 };
  647 
  648 #endif

Cache object: 32f174290e64b62631013be2a046c7b2


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.