tcp, udp, util: Fixes for bitmap handling on big-endian, casts
Bitmap manipulating functions would otherwise refer to inconsistent sets of bits on big-endian architectures. While at it, fix up a couple of casts. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
3
passt.h
3
passt.h
@@ -67,7 +67,8 @@ extern char pkt_buf [PKT_BUF_BYTES];
|
||||
|
||||
extern char *ip_proto_str[];
|
||||
#define IP_PROTO_STR(n) \
|
||||
(((n) <= IPPROTO_SCTP && ip_proto_str[(n)]) ? ip_proto_str[(n)] : "?")
|
||||
(((uint8_t)(n) <= IPPROTO_SCTP && ip_proto_str[(n)]) ? \
|
||||
ip_proto_str[(n)] : "?")
|
||||
|
||||
#include <resolv.h> /* For MAXNS below */
|
||||
|
||||
|
Reference in New Issue
Block a user