Add support for parsing PW Ethernet and Enhanced MPLS parsing

This commit is contained in:
luwenpeng
2024-06-02 00:07:33 +08:00
parent f3b92a8a15
commit 18fe1e2e41
13 changed files with 615 additions and 250 deletions

View File

@@ -262,6 +262,10 @@ static inline void tcp_hdr_set_opt_data(struct tcphdr *hdr, const char *ptr)
memcpy((char *)hdr + sizeof(struct tcphdr), ptr, tcp_hdr_get_opt_len(hdr));
}
/******************************************************************************
* print
******************************************************************************/
static inline int tcp_hdr_to_str(const struct tcphdr *hdr, char *buf, size_t size)
{
memset(buf, 0, size);