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

@@ -24,16 +24,26 @@ extern "C"
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
static inline uint16_t udp_hdr_get_sport(const struct udphdr *hdr)
static inline uint16_t udp_hdr_get_host_order_sport(const struct udphdr *hdr)
{
return ntohs(hdr->uh_sport);
}
static inline uint16_t udp_hdr_get_dport(const struct udphdr *hdr)
static inline uint16_t udp_hdr_get_host_order_dport(const struct udphdr *hdr)
{
return ntohs(hdr->uh_dport);
}
static inline uint16_t udp_hdr_get_net_order_sport(const struct udphdr *hdr)
{
return hdr->uh_sport;
}
static inline uint16_t udp_hdr_get_net_order_dport(const struct udphdr *hdr)
{
return hdr->uh_dport;
}
static inline uint16_t udp_hdr_get_len(const struct udphdr *hdr)
{
return ntohs(hdr->uh_ulen);