Add support for parsing IP Authentication Header

This commit is contained in:
luwenpeng
2024-06-04 15:48:34 +08:00
parent ae2e36b382
commit 8c4f4c9f72
6 changed files with 99 additions and 47 deletions

View File

@@ -40,6 +40,7 @@ static inline uint8_t ipv4_hdr_get_version(const struct ip *hdr)
return hdr->ip_v;
}
// IP Options are included in the hdr_len field
static inline uint8_t ipv4_hdr_get_hdr_len(const struct ip *hdr)
{
return hdr->ip_hl << 2;