]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[netdevice] Add MAX_NET_HEADER_LEN and MAX_LL_NET_HEADER_LEN
authorMichael Brown <mcb30@ipxe.org>
Fri, 19 Nov 2010 15:45:01 +0000 (15:45 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 19 Nov 2010 16:08:05 +0000 (16:08 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/netdevice.h

index 8cec33eee3ec04b777bc0df38f4b3bafb410e50b..4649377a678d10bedc329bd34b7f52b2338f35c1 100644 (file)
@@ -45,6 +45,16 @@ struct device;
 /** Maximum length of a network-layer address */
 #define MAX_NET_ADDR_LEN 4
 
+/** Maximum length of a network-layer header
+ *
+ * The longest currently-supported network-layer header is for IPv6 at
+ * 40 bytes.
+ */
+#define MAX_NET_HEADER_LEN 40
+
+/** Maximum combined length of a link-layer and network-layer header */
+#define MAX_LL_NET_HEADER_LEN ( MAX_LL_HEADER_LEN + MAX_NET_HEADER_LEN )
+
 /**
  * A network-layer protocol
  *