support IPv4 & IPv6 frag reassemble

This commit is contained in:
luwenpeng
2024-02-22 18:52:04 +08:00
parent 5e5ac458f2
commit 5cd0571b4d
21 changed files with 2116 additions and 95 deletions

View File

@@ -126,6 +126,11 @@ static inline uint8_t ipv4_hdr_get_opt_len(const struct ip *hdr)
static inline const char *ipv4_hdr_get_opt_data(const struct ip *hdr)
{
if (ipv4_hdr_get_opt_len(hdr) == 0)
{
return NULL;
}
return (const char *)hdr + sizeof(struct ip);
}