/* Packet-ID state for receiver. *Otherthanlockmember,canbezeroedtoinitialize.
*/ struct ovpn_pktid_recv { /* "sliding window" bitmask of recent packet IDs received */
u8 history[REPLAY_WINDOW_BYTES]; /* bit position of deque base in history */ unsignedint base; /* extent (in bits) of deque in history */ unsignedint extent; /* expiration of history in jiffies */ unsignedlong expire; /* highest sequence number received */
u32 id; /* highest time stamp received */
u32 time; /* we will only accept backtrack IDs > id_floor */
u32 id_floor; unsignedint max_backtrack; /* protects entire pktd ID state */
spinlock_t lock;
};
/* Get the next packet ID for xmit */ staticinlineint ovpn_pktid_xmit_next(struct ovpn_pktid_xmit *pid, u32 *pktid)
{ const u32 seq_num = atomic_fetch_add_unless(&pid->seq_num, 1, 0); /* when the 32bit space is over, we return an error because the packet *IDisusedtocreatethecipherIVandwedonotwanttoreusethe *samevaluemorethanonce
*/ if (unlikely(!seq_num)) return -ERANGE;
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.