瀏覽代碼

[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 年之前
父節點
當前提交
0d7839678b
共有 1 個檔案被更改,包括 10 行新增0 行删除
  1. 10
    0
      src/include/ipxe/netdevice.h

+ 10
- 0
src/include/ipxe/netdevice.h 查看文件

@@ -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…
取消
儲存