struct htcp {
uint16_t alpha; /* Fixed point arith, << 7 */
uint8_t beta; /* Fixed point arith, << 7 */
uint8_t modeswitch; /* Delay modeswitch until we had at least one congestion event */
uint32_t last_cong; /* Time since last congestion event end */
uint32_t undo_last_cong;
uint16_t bytes_acked;
uint32_t bytecount;
uint32_t minRTT;
uint32_t maxRTT;
struct rtcc_cc { struct timeval tls; /* The time we started the sending */
uint64_t lbw; /* Our last estimated bw */
uint64_t lbw_rtt; /* RTT at bw estimate */
uint64_t bw_bytes; /* The total bytes since this sending began */
uint64_t bw_tot_time; /* The total time since sending began */
uint64_t new_tot_time; /* temp holding the new value */
uint64_t bw_bytes_at_last_rttc; /* What bw_bytes was at last rtt calc */
uint32_t cwnd_at_bw_set; /* Cwnd at last bw saved - lbw */
uint32_t vol_reduce; /* cnt of voluntary reductions */
uint16_t steady_step; /* The number required to be in steady state*/
uint16_t step_cnt; /* The current number */
uint8_t ret_from_eq; /* When all things are equal what do I return 0/1 - 1 no cc advance */
uint8_t use_dccc_ecn; /* Flag to enable DCCC ECN */
uint8_t tls_needs_set; /* Flag to indicate we need to set tls 0 or 1 means set at send 2 not */
uint8_t last_step_state; /* Last state if steady state stepdown is on */
uint8_t rtt_set_this_sack; /* Flag saying this sack had RTT calc on it */
uint8_t last_inst_ind; /* Last saved inst indication */
};
struct sctp_nets {
TAILQ_ENTRY(sctp_nets) sctp_next; /* next link */
/* mtu discovered so far */
uint32_t mtu;
uint32_t ssthresh; /* not sure about this one for split */
uint32_t last_cwr_tsn;
uint32_t cwr_window_tsn;
uint32_t ecn_ce_pkt_cnt;
uint32_t lost_cnt; /* smoothed average things for RTT and RTO itself */ int lastsa; int lastsv;
uint64_t rtt; /* last measured rtt value in us */
uint32_t RTO;
/* This is used for SHUTDOWN/SHUTDOWN-ACK/SEND or INIT timers */ struct sctp_timer rxt_timer;
/* last time in seconds I sent to it */ struct timeval last_sent_time; union cc_control_data { struct htcp htcp_ca; /* JRS - struct used in HTCP algorithm */ struct rtcc_cc rtcc; /* rtcc module cc stuff */
} cc_mod; int ref_count;
/* Congestion stats per destination */ /* *flightsizevariablesandsuch,sorryVern,Icouldnotavoid *thisifIwantedperformance:>
*/
uint32_t flight_size;
uint32_t cwnd; /* actual cwnd */
uint32_t prev_cwnd; /* cwnd before any processing */
uint32_t ecn_prev_cwnd; /* ECN prev cwnd at first ecn_echo seen in new window */
uint32_t partial_bytes_acked; /* in CA tracks when to incr a MTU */ /* tracking variables to avoid the aloc/free in sack processing */ unsignedint net_ack; unsignedint net_ack2;
struct timeval start_time; /* time when this net was created */
uint32_t marked_retrans; /* number or DATA chunks marked for
timer based retransmissions */
uint32_t marked_fastretrans;
uint32_t heart_beat_delay; /* Heart Beat delay in ms */
/* if this guy is ok or not ... status */
uint16_t dest_state; /* number of timeouts to consider the destination unreachable */
uint16_t failure_threshold; /* number of timeouts to consider the destination potentially failed */
uint16_t pf_threshold; /* error stats on the destination */
uint16_t error_count; /* UDP port number in case of UDP tunneling */
uint16_t port;
uint8_t fast_retran_loss_recovery;
uint8_t will_exit_fast_recovery; /* Flags that probably can be combined into dest_state */
uint8_t fast_retran_ip; /* fast retransmit in progress */
uint8_t hb_responded;
uint8_t saw_newack; /* CMT's SFR algorithm flag */
uint8_t src_addr_selected; /* if we split we move */
uint8_t indx_of_eligible_next_to_use;
uint8_t addr_is_local; /* its a local address (if known) could move
* in split */
/* *CMTvariables(iyengar@cis.udel.edu)
*/
uint8_t find_pseudo_cumack; /* CMT CUC algorithm. Flag used to *findanewpseudocumack.Thisflag *issetafteranewpseudo-cumack *hasbeenreceivedandindicates *thatthesendershouldfindthe *nextpseudo-cumackexpectedfor
* this destination */
uint8_t find_rtx_pseudo_cumack; /* CMT CUCv2 algorithm. Flag used to *findanewrtx-pseudocumack.This *flagissetafteranew *rtx-pseudo-cumackhasbeenreceived *andindicatesthatthesender *shouldfindthenext *rtx-pseudo-cumackexpectedforthis
* destination */
uint8_t new_pseudo_cumack; /* CMT CUC algorithm. Flag used to *indicateifanewpseudo-cumackor
* rtx-pseudo-cumack has been received */
uint8_t window_probe; /* Doing a window probe? */
uint8_t RTO_measured; /* Have we done the first measure */
uint8_t last_hs_used; /* index into the last HS table entry we used */
uint8_t lan_type;
uint8_t rto_needed; #ifdefined(__FreeBSD__) && !defined(__Userspace__)
uint32_t flowid;
uint8_t flowtype; #endif
};
struct sctp_data_chunkrec {
uint32_t tsn; /* the TSN of this transmit */
uint32_t mid; /* the message identifier of this transmit */
uint16_t sid; /* the stream number of this guy */
uint32_t ppid;
uint32_t context; /* from send */
uint32_t cwnd_at_send; /* *partoftheHighestsackedalgorithmtobeabletostrokecounts *ononesthatareFR'd.
*/
uint32_t fast_retran_tsn; /* sending_seq at the time of FR */ struct timeval timetodrop; /* time we drop it from queue */
uint32_t fsn; /* Fragment Sequence Number */
uint8_t doing_fast_retransmit;
uint8_t rcv_flags; /* flags pulled from data chunk on inbound for *outboundholdssendingflagsforPR-SCTP.
*/
uint8_t state_flags;
uint8_t chunk_was_revoked;
uint8_t fwd_tsn_cnt;
};
TAILQ_HEAD(sctpchunk_listhead, sctp_tmit_chunk);
/* The lower byte is used to enumerate PR_SCTP policies */ #define CHUNK_FLAGS_PR_SCTP_TTL SCTP_PR_SCTP_TTL #define CHUNK_FLAGS_PR_SCTP_BUF SCTP_PR_SCTP_BUF #define CHUNK_FLAGS_PR_SCTP_RTX SCTP_PR_SCTP_RTX
/* The upper byte is used as a bit mask */ #define CHUNK_FLAGS_FRAGMENT_OK 0x0100
struct sctp_tmit_chunk { union { struct sctp_data_chunkrec data; struct chk_id chunk_id;
} rec; struct sctp_association *asoc; /* bp to asoc this belongs to */ struct timeval sent_rcv_time; /* filled in if RTT being calculated */ struct mbuf *data; /* pointer to mbuf chain of data */ struct mbuf *last_mbuf; /* pointer to last mbuf in chain */ struct sctp_nets *whoTo;
TAILQ_ENTRY(sctp_tmit_chunk) sctp_next; /* next link */
int32_t sent; /* the send status */
uint16_t snd_count; /* number of times I sent */
uint16_t flags; /* flags, such as FRAGMENT_OK */
uint16_t send_size;
uint16_t book_size;
uint16_t mbcnt;
uint16_t auth_keyid;
uint8_t holds_key_ref; /* flag if auth keyid refcount is held */
uint8_t pad_inplace;
uint8_t do_rtt;
uint8_t book_size_scale;
uint8_t no_fr_allowed;
uint8_t copy_by_ref;
uint8_t window_probe;
};
struct sctp_queued_to_read { /* sinfo structure Pluse more */
uint16_t sinfo_stream; /* off the wire */
uint16_t sinfo_flags; /* SCTP_UNORDERED from wire use SCTP_EOF for
* EOR */
uint32_t sinfo_ppid; /* off the wire */
uint32_t sinfo_context; /* pick this up from assoc def context? */
uint32_t sinfo_timetolive; /* not used by kernel */
uint32_t sinfo_tsn; /* Use this in reassembly as first TSN */
uint32_t sinfo_cumtsn; /* Use this in reassembly as last TSN */
sctp_assoc_t sinfo_assoc_id; /* our assoc id */ /* Non sinfo stuff */
uint32_t mid; /* Fragment Index */
uint32_t length; /* length of data */
uint32_t held_length; /* length held in sb */
uint32_t top_fsn; /* Highest FSN in queue */
uint32_t fsn_included; /* Highest FSN in *data portion */ struct sctp_nets *whoFrom; /* where it came from */ struct mbuf *data; /* front of the mbuf chain of data with
* PKT_HDR */ struct mbuf *tail_mbuf; /* used for multi-part data */ struct mbuf *aux_data; /* used to hold/cache control if o/s does not take it from us */ struct sctp_tcb *stcb; /* assoc, used for window update */
TAILQ_ENTRY(sctp_queued_to_read) next;
TAILQ_ENTRY(sctp_queued_to_read) next_instrm; struct sctpchunk_listhead reasm;
uint16_t port_from;
uint16_t spec_flags; /* Flags to hold the notification field */
uint8_t do_not_ref_stcb;
uint8_t end_added;
uint8_t pdapi_aborted;
uint8_t pdapi_started;
uint8_t some_taken;
uint8_t last_frag_seen;
uint8_t first_frag_seen;
uint8_t on_read_q;
uint8_t on_strm_q;
};
/* This struct is used to track the traffic on outbound streams */ struct sctp_stream_out { struct sctp_streamhead outqueue; struct scheduling_parameters ss_params;
uint32_t chunks_on_queues; /* send queue and sent queue */ #ifdefined(SCTP_DETAILED_STR_STATS)
uint32_t abandoned_unsent[SCTP_PR_SCTP_MAX + 1];
uint32_t abandoned_sent[SCTP_PR_SCTP_MAX + 1]; #else /* Only the aggregation */
uint32_t abandoned_unsent[1];
uint32_t abandoned_sent[1]; #endif /* For associations using DATA chunks, the lower 16-bit of *next_mid_orderedareusedasthenextSSN.
*/
uint32_t next_mid_ordered;
uint32_t next_mid_unordered;
uint16_t sid;
uint8_t last_msg_incomplete;
uint8_t state;
};
#define SCTP_MAX_STREAMS_AT_ONCE_RESET 200
/* used to keep track of the addresses yet to try to add/delete */
TAILQ_HEAD(sctp_asconf_addrhead, sctp_asconf_addr); struct sctp_asconf_addr {
TAILQ_ENTRY(sctp_asconf_addr) next; struct sctp_asconf_addr_param ap; struct sctp_ifa *ifa; /* save the ifa for add/del ip */
uint8_t sent; /* has this been sent yet? */
uint8_t special_del; /* not to be used in lookup */
};
/* used to save ASCONF chunks for retransmission */
TAILQ_HEAD(sctp_asconf_head, sctp_asconf); struct sctp_asconf {
TAILQ_ENTRY(sctp_asconf) next;
uint32_t serial_number;
uint16_t snd_count; struct mbuf *data;
uint16_t len;
};
/* used to save ASCONF-ACK chunks for retransmission */
TAILQ_HEAD(sctp_asconf_ackhead, sctp_asconf_ack); struct sctp_asconf_ack {
TAILQ_ENTRY(sctp_asconf_ack) next;
uint32_t serial_number; struct sctp_nets *last_sent_to; struct mbuf *data;
uint16_t len;
};
/* *Herewehaveinformationabouteachindividualassociationthatwetrack. *Weprobablyinproductionwouldbemoredynamic.Butforeaseof *implementationwewillhaveafixedarraythatwehuntforinalinear *fashion.
*/ struct sctp_association { /* association state */ int state;
/* queue of pending addrs to add/delete */ struct sctp_asconf_addrhead asconf_queue;
struct timeval time_entered; /* time we entered state */ struct timeval time_last_rcvd; struct timeval time_last_sent; struct timeval time_last_sat_advance; struct sctp_nonpad_sndrcvinfo def_send;
/* stream arrays */ struct sctp_stream_in *strmin; struct sctp_stream_out *strmout;
uint8_t *mapping_array; /* primary destination to use */ struct sctp_nets *primary_destination; struct sctp_nets *alternate; /* If primary is down or PF */ /* For CMT */ struct sctp_nets *last_net_cmt_send_started; /* last place I got a data chunk from */ struct sctp_nets *last_data_chunk_from; /* last place I got a control from */ struct sctp_nets *last_control_chunk_from;
/* queue of chunks waiting to be sent into the local stack */ struct sctp_readhead pending_reply_queue;
/* JRS - the congestion control functions are in this struct */ struct sctp_cc_functions cc_functions; /* JRS - value to store the currently loaded congestion control module */
uint32_t congestion_control_module; /* RS - the stream scheduling functions are in this struct */ struct sctp_ss_functions ss_functions; /* RS - value to store the currently loaded stream scheduling module */
uint32_t stream_scheduling_module;
uint32_t vrf_id;
uint32_t cookie_preserve_req; /* ASCONF next seq I am sending out, inits at init-tsn */
uint32_t asconf_seq_out;
uint32_t asconf_seq_out_acked; /* ASCONF last received ASCONF from peer, starts at peer's TSN-1 */
uint32_t asconf_seq_in;
/* next seq I am sending in str reset messages */
uint32_t str_reset_seq_out; /* next seq I am expecting in str reset messages */
uint32_t str_reset_seq_in;
/* various verification tag information */
uint32_t my_vtag; /* The tag to be used. if assoc is re-initited *byremoteend,andIhaveunlockedthis
* will be regenerated to a new random value. */
uint32_t peer_vtag; /* The peers last tag */
uint32_t my_vtag_nonce;
uint32_t peer_vtag_nonce;
uint32_t assoc_id;
/* This is the SCTP fragmentation threshold */
uint32_t smallest_mtu;
uint32_t sb_cc; /* shadow of sb_cc */
uint32_t sb_send_resv; /* amount reserved on a send */
uint32_t my_rwnd_control_len; /* shadow of sb_mbcnt used for rwnd control */ #ifdef INET6
uint32_t default_flowlabel; #endif
uint32_t pr_sctp_cnt; int ctrl_queue_cnt; /* could be removed REM - NO IT CAN'T!! RRS */ /* *Alloutbounddatagramsqueueintothislistfromtheindividual *streamqueue.HeretheygetassignedaTSNandthenawait *sending.Thestreamseqcomeswhenitisfirstputinthe *individualstrqueue
*/ unsignedint stream_queue_cnt; unsignedint send_queue_cnt; unsignedint sent_queue_cnt; unsignedint sent_queue_cnt_removeable; /* *Numberonsentqueuethataremarkedforretranuntilthisvalue *is0weonlysendonepacketofretran'eddata.
*/ unsignedint sent_queue_retran_cnt;
unsignedint size_on_reasm_queue; unsignedint cnt_on_reasm_queue; unsignedint fwd_tsn_cnt; /* amount of data (bytes) currently in flight (on all destinations) */ unsignedint total_flight; /* Total book size in flight */ unsignedint total_flight_count; /* count of chunks used with
* book total */ /* count of destinaton nets and list of destination nets */ unsignedint numnets;
/* Total error count on this association */ unsignedint overall_error_count;
unsignedint cnt_msg_on_sb;
/* All stream count of chunks for delivery */ unsignedint size_on_all_streams; unsignedint cnt_on_all_streams;
/* Heart Beat delay in ms */
uint32_t heart_beat_delay;
/* autoclose */
uint32_t sctp_autoclose_ticks;
/* how many preopen streams we have */ unsignedint pre_open_streams;
/* How many streams I support coming into me */ unsignedint max_inbound_streams;
/* the cookie life I award for any cookie, in seconds */
uint32_t cookie_life; /* time to delay acks for */ unsignedint delayed_ack; unsignedint old_delayed_ack; unsignedint sack_freq; unsignedint data_pkts_seen;
unsignedint numduptsns; int dup_tsns[SCTP_MAX_DUP_TSNS];
uint32_t initial_init_rto_max; /* initial RTO for INIT's */
uint32_t initial_rto; /* initial send RTO */
uint32_t minrto; /* per assoc RTO-MIN */
uint32_t maxrto; /* per assoc RTO-MAX */
/* counts of actual built streams. Allocation may be more however */ /* could re-arrange to optimize space here. */
uint16_t streamincnt;
uint16_t streamoutcnt;
uint16_t strm_realoutsize;
uint16_t strm_pending_add_size; /* my maximum number of retrans of INIT and SEND */ /* copied from SCTP but should be individually setable */
uint16_t max_init_times;
uint16_t max_send_times;
/* max burst of new packets into the network */
uint32_t max_burst; /* max burst of fast retransmit packets */
uint32_t fr_max_burst;
uint8_t sat_network; /* RTT is in range of sat net or greater */
uint8_t sat_network_lockout; /* lockout code */
uint8_t burst_limit_applied; /* Burst limit in effect at last send? */ /* flag goes on when we are doing a partial delivery api */
uint8_t hb_random_values[4];
uint8_t fragmented_delivery_inprogress;
uint8_t fragment_flags;
uint8_t last_flags_delivered;
uint8_t hb_ect_randombit;
uint8_t hb_random_idx;
uint8_t default_dscp;
uint8_t asconf_del_pending; /* asconf delete last addr pending */
uint8_t trigger_reset; /* *Thisvalue,plusallotherack'dbutabovecum-ackisadded *togethertocrosscheckagainstthebitthatwehaveyetto *define(probablyintheSACK).Whenthecum-ackisupdated,this *sumisupdatedaswell.
*/
/* Flags whether an extension is supported or not */
uint8_t ecn_supported;
uint8_t prsctp_supported;
uint8_t auth_supported;
uint8_t asconf_supported;
uint8_t reconfig_supported;
uint8_t nrsack_supported;
uint8_t pktdrop_supported;
uint8_t idata_supported;
/* Zero checksum supported information */
uint8_t rcv_edmid;
uint8_t snd_edmid;
/* Did the peer make the stream config (add out) request */
uint8_t peer_req_out;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.