Browse Source

[netdevice] Add MAX_NET_HEADER_LEN and MAX_LL_NET_HEADER_LEN

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
0d7839678b
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      src/include/ipxe/netdevice.h

+ 10
- 0
src/include/ipxe/netdevice.h View File

@@ -45,6 +45,16 @@ struct device;
45 45
 /** Maximum length of a network-layer address */
46 46
 #define MAX_NET_ADDR_LEN 4
47 47
 
48
+/** Maximum length of a network-layer header
49
+ *
50
+ * The longest currently-supported network-layer header is for IPv6 at
51
+ * 40 bytes.
52
+ */
53
+#define MAX_NET_HEADER_LEN 40
54
+
55
+/** Maximum combined length of a link-layer and network-layer header */
56
+#define MAX_LL_NET_HEADER_LEN ( MAX_LL_HEADER_LEN + MAX_NET_HEADER_LEN )
57
+
48 58
 /**
49 59
  * A network-layer protocol
50 60
  *

Loading…
Cancel
Save