1 | ## @file
|
---|
2 | # Network DSC include file for [Defines] section of all Architectures.
|
---|
3 | #
|
---|
4 | # This file can be included to the [Defines] section of a platform DSC file by
|
---|
5 | # using "!include NetworkPkg/NetworkDefines.dsc.inc" to set default value of
|
---|
6 | # flags if they are not defined somewhere else, and also check the value to see
|
---|
7 | # if there is any conflict.
|
---|
8 | #
|
---|
9 | # These flags can be defined before the !include line, or changed on the command
|
---|
10 | # line to enable or disable related feature support.
|
---|
11 | # -D FLAG=VALUE
|
---|
12 | # The default value of these flags are:
|
---|
13 | # DEFINE NETWORK_ENABLE = TRUE
|
---|
14 | # DEFINE NETWORK_SNP_ENABLE = TRUE
|
---|
15 | # DEFINE NETWORK_IP4_ENABLE = TRUE
|
---|
16 | # DEFINE NETWORK_IP6_ENABLE = TRUE
|
---|
17 | # DEFINE NETWORK_TLS_ENABLE = TRUE
|
---|
18 | # DEFINE NETWORK_HTTP_ENABLE = FALSE
|
---|
19 | # DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE
|
---|
20 | # DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
|
---|
21 | # DEFINE NETWORK_ISCSI_ENABLE = FALSE
|
---|
22 | # DEFINE NETWORK_ISCSI_MD5_ENABLE = TRUE
|
---|
23 | # DEFINE NETWORK_VLAN_ENABLE = TRUE
|
---|
24 | # DEFINE NETWORK_PXE_BOOT_ENABLE = TRUE
|
---|
25 | #
|
---|
26 | # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
---|
27 | # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
---|
28 | #
|
---|
29 | # SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
30 | #
|
---|
31 | ##
|
---|
32 |
|
---|
33 | !ifndef NETWORK_ENABLE
|
---|
34 | #
|
---|
35 | # This flag is to enable or disable the whole network stack.
|
---|
36 | #
|
---|
37 | DEFINE NETWORK_ENABLE = TRUE
|
---|
38 | !endif
|
---|
39 |
|
---|
40 | !ifndef NETWORK_SNP_ENABLE
|
---|
41 | #
|
---|
42 | # This flag is to include the common SNP driver or not.
|
---|
43 | #
|
---|
44 | DEFINE NETWORK_SNP_ENABLE = TRUE
|
---|
45 | !endif
|
---|
46 |
|
---|
47 | !ifndef NETWORK_VLAN_ENABLE
|
---|
48 | #
|
---|
49 | # This flag is to enable or disable VLAN feature.
|
---|
50 | #
|
---|
51 | DEFINE NETWORK_VLAN_ENABLE = TRUE
|
---|
52 | !endif
|
---|
53 |
|
---|
54 | !ifndef NETWORK_IP4_ENABLE
|
---|
55 | #
|
---|
56 | # This flag is to enable or disable IPv4 network stack.
|
---|
57 | #
|
---|
58 | DEFINE NETWORK_IP4_ENABLE = TRUE
|
---|
59 | !endif
|
---|
60 |
|
---|
61 | !ifndef NETWORK_IP6_ENABLE
|
---|
62 | #
|
---|
63 | # This flag is to enable or disable IPv6 network stack.
|
---|
64 | #
|
---|
65 | DEFINE NETWORK_IP6_ENABLE = TRUE
|
---|
66 | !endif
|
---|
67 |
|
---|
68 | !ifndef NETWORK_TLS_ENABLE
|
---|
69 | #
|
---|
70 | # This flag is to enable or disable TLS feature.
|
---|
71 | #
|
---|
72 | # Note: This feature depends on the OpenSSL building. To enable this feature, please
|
---|
73 | # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in
|
---|
74 | # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
|
---|
75 | # The OpensslLib.inf library instance should be used since libssl is required.
|
---|
76 | #
|
---|
77 | DEFINE NETWORK_TLS_ENABLE = TRUE
|
---|
78 | !endif
|
---|
79 |
|
---|
80 | !ifndef NETWORK_HTTP_ENABLE
|
---|
81 | #
|
---|
82 | # This flag is to enable or disable HTTP(S) feature.
|
---|
83 | # The default is set to FALSE to not affecting the existing
|
---|
84 | # platforms.
|
---|
85 | # NETWORK_HTTP_ENABLE set to FALSE is not affecting NETWORK_HTTP_BOOT_ENABLE
|
---|
86 | # when NETWORK_HTTP_BOOT_ENABLE is TRUE.
|
---|
87 | DEFINE NETWORK_HTTP_ENABLE = FALSE
|
---|
88 | !endif
|
---|
89 |
|
---|
90 | !ifndef NETWORK_HTTP_BOOT_ENABLE
|
---|
91 | #
|
---|
92 | # This flag is to enable or disable HTTP(S) boot feature.
|
---|
93 | #
|
---|
94 | #
|
---|
95 | DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE
|
---|
96 | !endif
|
---|
97 |
|
---|
98 | !ifndef NETWORK_ALLOW_HTTP_CONNECTIONS
|
---|
99 | #
|
---|
100 | # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.
|
---|
101 | #
|
---|
102 | # Note: If NETWORK_ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed.
|
---|
103 | # Both the "https://" and "http://" URI schemes are permitted. Otherwise, HTTP
|
---|
104 | # connections are denied. Only the "https://" URI scheme is permitted.
|
---|
105 | #
|
---|
106 | DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
|
---|
107 | !endif
|
---|
108 |
|
---|
109 | !ifndef NETWORK_ISCSI_ENABLE
|
---|
110 | #
|
---|
111 | # This flag is to enable or disable iSCSI feature.
|
---|
112 | #
|
---|
113 | # Note: This feature depends on the OpenSSL building. To enable this feature, please
|
---|
114 | # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in
|
---|
115 | # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
|
---|
116 | # Both OpensslLib.inf and OpensslLibCrypto.inf library instance can be used
|
---|
117 | # since libssl is not required for iSCSI.
|
---|
118 | #
|
---|
119 | DEFINE NETWORK_ISCSI_ENABLE = FALSE
|
---|
120 | !endif
|
---|
121 |
|
---|
122 | !ifndef NETWORK_ISCSI_MD5_ENABLE
|
---|
123 | #
|
---|
124 | # This flag enables the deprecated MD5 hash algorithm in iSCSI CHAP
|
---|
125 | # authentication.
|
---|
126 | #
|
---|
127 | # Note: The NETWORK_ISCSI_MD5_ENABLE flag only makes a difference if
|
---|
128 | # NETWORK_ISCSI_ENABLE is TRUE; otherwise, NETWORK_ISCSI_MD5_ENABLE is
|
---|
129 | # ignored.
|
---|
130 | #
|
---|
131 | # With NETWORK_ISCSI_MD5_ENABLE set to TRUE, MD5 is enabled as the
|
---|
132 | # least preferred CHAP hash algorithm. With NETWORK_ISCSI_MD5_ENABLE
|
---|
133 | # set to FALSE, MD5 is disabled statically, at build time.
|
---|
134 | #
|
---|
135 | # The default value is TRUE, because RFC 7143 mandates MD5, and because
|
---|
136 | # several vendors' iSCSI targets only support MD5, for CHAP.
|
---|
137 | #
|
---|
138 | DEFINE NETWORK_ISCSI_MD5_ENABLE = TRUE
|
---|
139 | !endif
|
---|
140 |
|
---|
141 | !ifndef NETWORK_PXE_BOOT_ENABLE
|
---|
142 | #
|
---|
143 | # This flag is to enable or disable PXE boot feature.
|
---|
144 | #
|
---|
145 | DEFINE NETWORK_PXE_BOOT_ENABLE = TRUE
|
---|
146 | !endif
|
---|
147 |
|
---|
148 | !if $(NETWORK_ENABLE) == TRUE
|
---|
149 | #
|
---|
150 | # Check the flags to see if there is any conflict.
|
---|
151 | #
|
---|
152 | !if ($(NETWORK_IP4_ENABLE) == FALSE) AND ($(NETWORK_IP6_ENABLE) == FALSE)
|
---|
153 | !error "Must enable at least IP4 or IP6 stack if NETWORK_ENABLE is set to TRUE!"
|
---|
154 | !endif
|
---|
155 |
|
---|
156 | !if ($(NETWORK_HTTP_BOOT_ENABLE) == TRUE) OR ($(NETWORK_HTTP_ENABLE) == TRUE)
|
---|
157 | !if ($(NETWORK_TLS_ENABLE) == FALSE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) == FALSE)
|
---|
158 | !error "Must enable TLS to support HTTPS, or allow unsecured HTTP connection, if NETWORK_HTTP_BOOT_ENABLE or NETWORK_HTTP_ENABLE is set to TRUE!"
|
---|
159 | !endif
|
---|
160 | !endif
|
---|
161 | !endif
|
---|