/* RFC 2960 12.2 Parameters necessary per association (i.e. the TCB) *MappingAnarrayofbitsorbytesindicatingwhichoutof *ArrayorderTSN'shavebeenreceived(relativetothe *LastRcvdTSN).Ifnogapsexist,i.e.nooutof *orderpacketshavebeenreceived,thisarray *willbesettoallzero.Thisstructuremaybe *intheformofacircularbufferorbitarray.
*/ struct sctp_tsnmap { /* This array counts the number of chunks with each TSN. *Itpointsatoneofthetwobufferswithwhichwewill *ping-pongbetween.
*/ unsignedlong *tsn_map;
/* This is the TSN at tsn_map[0]. */
__u32 base_tsn;
/* Last Rcvd : This is the last TSN received in *TSN:sequence.Thisvalueissetinitiallyby *:takingthepeer'sInitialTSN,receivedin *:theINITorINITACKchunk,andsubtracting *:onefromit. * *Throughoutmostofthespecificationthisiscalledthe *"CumulativeTSNACKPoint".Inthiscase,we *ignoretheadvicein12.2infavouroftheterm *usedinthebulkofthetext.
*/
__u32 cumulative_tsn_ack_point;
/* This is the highest TSN we've marked. */
__u32 max_tsn_seen;
/* This is the minimum number of TSNs we can track. This corresponds *tothesizeoftsn_map.Note:theoverflow_mapallowsusto *potentiallytrackmorethanthisquantity.
*/
__u16 len;
/* Data chunks pending receipt. used by SCTP_STATUS sockopt */
__u16 pending_data;
/* Record duplicate TSNs here. We clear this after *everySACK.StoreuptoSCTP_MAX_DUP_TSNSworthof *information.
*/
__u16 num_dup_tsns;
__be32 dup_tsns[SCTP_MAX_DUP_TSNS];
};
struct sctp_tsnmap_iter {
__u32 start;
};
/* Initialize a block of memory as a tsnmap. */ struct sctp_tsnmap *sctp_tsnmap_init(struct sctp_tsnmap *, __u16 len,
__u32 initial_tsn, gfp_t gfp);
void sctp_tsnmap_free(struct sctp_tsnmap *map);
/* Test the tracking state of this TSN. *Returns: *0iftheTSNhasnotyetbeenseen *>0iftheTSNhasbeenseen(duplicate) *<0iftheTSNisinvalid(toolargetotrack)
*/ int sctp_tsnmap_check(conststruct sctp_tsnmap *, __u32 tsn);
/* Mark this TSN as seen. */ int sctp_tsnmap_mark(struct sctp_tsnmap *, __u32 tsn, struct sctp_transport *trans);
/* Mark this TSN and all lower as seen. */ void sctp_tsnmap_skip(struct sctp_tsnmap *map, __u32 tsn);
/* How many duplicate TSNs are stored? */ staticinline __u16 sctp_tsnmap_num_dups(struct sctp_tsnmap *map)
{ return map->num_dup_tsns;
}
/* Return pointer to duplicate tsn array as needed by SACK. */ staticinline __be32 *sctp_tsnmap_get_dups(struct sctp_tsnmap *map)
{
map->num_dup_tsns = 0; return map->dup_tsns;
}
/* How many gap ack blocks do we have recorded? */
__u16 sctp_tsnmap_num_gabs(struct sctp_tsnmap *map, struct sctp_gap_ack_block *gabs);
/* Refresh the count on pending data. */
__u16 sctp_tsnmap_pending(struct sctp_tsnmap *map);
/* Is there a gap in the TSN map? */ staticinlineint sctp_tsnmap_has_gap(conststruct sctp_tsnmap *map)
{ return map->cumulative_tsn_ack_point != map->max_tsn_seen;
}
/* Mark a duplicate TSN. Note: limit the storage of duplicate TSN *information.
*/ staticinlinevoid sctp_tsnmap_mark_dup(struct sctp_tsnmap *map, __u32 tsn)
{ if (map->num_dup_tsns < SCTP_MAX_DUP_TSNS)
map->dup_tsns[map->num_dup_tsns++] = htonl(tsn);
}
/* Renege a TSN that was seen. */ void sctp_tsnmap_renege(struct sctp_tsnmap *, __u32 tsn);
/* Is there a gap in the TSN map? */ int sctp_tsnmap_has_gap(conststruct sctp_tsnmap *);
#endif/* __sctp_tsnmap_h__ */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-09-28)
¤
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.