Add IP proto utils function
This commit is contained in:
@@ -269,7 +269,7 @@ static inline void tcp_hdr_set_opt_data(struct tcphdr *hdr, const char *ptr)
|
||||
static inline int tcp_hdr_to_str(const struct tcphdr *hdr, char *buf, size_t size)
|
||||
{
|
||||
memset(buf, 0, size);
|
||||
return snprintf(buf, size, "TCP: src_port=%u dst_port=%u seq=%u ack=%u hdr_len=%u flags=0x%02x(%s%s%s%s%s%s) window=%u checksum=%u urg_ptr=%u opt_len=%u",
|
||||
return snprintf(buf, size, "TCP: src_port=%u dst_port=%u seq=%u ack=%u hdr_len=%u flags=0x%02x(%s%s%s%s%s%s) window=%u checksum=0x%x urg_ptr=%u opt_len=%u",
|
||||
tcp_hdr_get_src_port(hdr), tcp_hdr_get_dst_port(hdr),
|
||||
tcp_hdr_get_seq(hdr), tcp_hdr_get_ack(hdr),
|
||||
tcp_hdr_get_hdr_len(hdr), tcp_hdr_get_flags(hdr),
|
||||
|
||||
Reference in New Issue
Block a user