mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2026-01-04 04:13:23 +00:00
tc_util: add functions for big endian masked numbers
Add functions for big endian masked numbers as a pre-step towards masked port numbers. Signed-off-by: Eli Britstein <elibr@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
b20dcd0b31
commit
75fb816d9f
12
tc/tc_util.c
12
tc/tc_util.c
@ -985,3 +985,15 @@ void print_masked_u8(const char *name, struct rtattr *attr,
|
||||
print_masked_type(UINT8_MAX, __rta_getattr_u8_u32, name, attr,
|
||||
mask_attr, newline);
|
||||
}
|
||||
|
||||
static __u32 __rta_getattr_be16_u32(const struct rtattr *attr)
|
||||
{
|
||||
return rta_getattr_be16(attr);
|
||||
}
|
||||
|
||||
void print_masked_be16(const char *name, struct rtattr *attr,
|
||||
struct rtattr *mask_attr, bool newline)
|
||||
{
|
||||
print_masked_type(UINT16_MAX, __rta_getattr_be16_u32, name, attr,
|
||||
mask_attr, newline);
|
||||
}
|
||||
|
||||
@ -133,4 +133,6 @@ void print_masked_u16(const char *name, struct rtattr *attr,
|
||||
struct rtattr *mask_attr, bool newline);
|
||||
void print_masked_u8(const char *name, struct rtattr *attr,
|
||||
struct rtattr *mask_attr, bool newline);
|
||||
void print_masked_be16(const char *name, struct rtattr *attr,
|
||||
struct rtattr *mask_attr, bool newline);
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user