Quellcode durchsuchen

[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 vor 14 Jahren
Ursprung
Commit
0d7839678b
1 geänderte Dateien mit 10 neuen und 0 gelöschten Zeilen
  1. 10
    0
      src/include/ipxe/netdevice.h

+ 10
- 0
src/include/ipxe/netdevice.h Datei anzeigen

@@ -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
  *

Laden…
Abbrechen
Speichern