Add eviction filter

This commit is contained in:
luwenpeng
2024-01-11 16:46:33 +08:00
parent 76d5fb36bb
commit 02f8d40c1e
23 changed files with 666 additions and 44 deletions

View File

@@ -34,16 +34,26 @@ extern "C"
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
static inline uint16_t tcp_hdr_get_sport(const struct tcphdr *hdr)
static inline uint16_t tcp_hdr_get_host_order_sport(const struct tcphdr *hdr)
{
return ntohs(hdr->th_sport);
}
static inline uint16_t tcp_hdr_get_dport(const struct tcphdr *hdr)
static inline uint16_t tcp_hdr_get_host_order_dport(const struct tcphdr *hdr)
{
return ntohs(hdr->th_dport);
}
static inline uint16_t tcp_hdr_get_net_order_sport(const struct tcphdr *hdr)
{
return hdr->th_sport;
}
static inline uint16_t tcp_hdr_get_net_order_dport(const struct tcphdr *hdr)
{
return hdr->th_dport;
}
static inline uint32_t tcp_hdr_get_seq(const struct tcphdr *hdr)
{
return ntohl(hdr->th_seq);