diff options
author | Ben Pfaff <blp@nicira.com> | 2013-06-27 15:27:15 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-09-17 16:17:26 -0700 |
commit | b826639572ab3ef1ca2a0b1251b7980696a25c5b (patch) | |
tree | 83038aca730c40f9866fd58d7c83c077a737ef4d /include/openvswitch/types.h | |
parent | 7c0180333bc13b8d5897f9a1448ac70a37f892be (diff) | |
download | openvswitch-b826639572ab3ef1ca2a0b1251b7980696a25c5b.tar.gz |
openvswitch/types.h: New macros OVS_BE16_MAX, OVS_BE32_MAX, OVS_BE64_MAX.
These seem slightly nicer than e.g. htons(UINT16_MAX).
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'include/openvswitch/types.h')
-rw-r--r-- | include/openvswitch/types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/openvswitch/types.h b/include/openvswitch/types.h index d5644a108..d9a5dc883 100644 --- a/include/openvswitch/types.h +++ b/include/openvswitch/types.h @@ -38,6 +38,10 @@ typedef __be16 ovs_be16; typedef __be32 ovs_be32; typedef __be64 ovs_be64; + +#define OVS_BE16_MAX ((OVS_FORCE ovs_be16) 0xffff) +#define OVS_BE32_MAX ((OVS_FORCE ovs_be32) 0xffffffff) +#define OVS_BE64_MAX ((OVS_FORCE ovs_be64) 0xffffffffffffffffULL) /* These types help with a few funny situations: * |