MCPcopy Create free account
hub / github.com/F-Stack/f-stack / check_window

Function check_window

freebsd/netipsec/ipsec.c:1190–1201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1188 */
1189
1190static inline int
1191check_window(const struct secreplay *replay, uint64_t seq)
1192{
1193 int index, bit_location;
1194
1195 bit_location = seq & IPSEC_BITMAP_LOC_MASK;
1196 index = (seq >> IPSEC_REDUNDANT_BIT_SHIFTS)
1197 & IPSEC_BITMAP_INDEX_MASK(replay->bitmap_size);
1198
1199 /* This packet already seen? */
1200 return ((replay->bitmap)[index] & (1 << bit_location));
1201}
1202
1203static inline void
1204advance_window(const struct secreplay *replay, uint64_t seq)

Callers 2

ipsec_chkreplayFunction · 0.85
ipsec_updatereplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected