projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49d9301
)
packets: New IP header macros.
author
Ben Pfaff
<blp@nicira.com>
Mon, 14 Jul 2008 20:54:22 +0000
(13:54 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Fri, 18 Jul 2008 20:42:37 +0000
(13:42 -0700)
include/packets.h
patch
|
blob
|
history
diff --git
a/include/packets.h
b/include/packets.h
index cd7829521bc70f4fae71e65ea4afdefdaf9ea6d6..fac8f414be932da6a537795a865c4f1b3884c509 100644
(file)
--- a/
include/packets.h
+++ b/
include/packets.h
@@
-164,10
+164,13
@@
BUILD_ASSERT_DECL(VLAN_ETH_HEADER_LEN == sizeof(struct vlan_eth_header));
#define IP_VER(ip_ihl_ver) ((ip_ihl_ver) >> 4)
#define IP_IHL(ip_ihl_ver) ((ip_ihl_ver) & 15)
+#define IP_IHL_VER(ihl, ver) (((ver) << 4) | (ihl))
#define IP_TYPE_TCP 6
#define IP_TYPE_UDP 17
+#define IP_VERSION 4
+
#define IP_HEADER_LEN 20
struct ip_header {
uint8_t ip_ihl_ver;