2 # Network DSC include file for [Defines] section of all Architectures.
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.
9 # These flags can be defined before the !include line, or changed on the command
10 # line to enable or disable related feature support.
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_VLAN_ENABLE = TRUE
24 # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
25 # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
27 # SPDX-License-Identifier: BSD-2-Clause-Patent
31 !ifndef NETWORK_ENABLE
33 # This flag is to enable or disable the whole network stack.
35 DEFINE NETWORK_ENABLE = TRUE
38 !ifndef NETWORK_SNP_ENABLE
40 # This flag is to include the common SNP driver or not.
42 DEFINE NETWORK_SNP_ENABLE = TRUE
45 !ifndef NETWORK_VLAN_ENABLE
47 # This flag is to enable or disable VLAN feature.
49 DEFINE NETWORK_VLAN_ENABLE = TRUE
52 !ifndef NETWORK_IP4_ENABLE
54 # This flag is to enable or disable IPv4 network stack.
56 DEFINE NETWORK_IP4_ENABLE = TRUE
59 !ifndef NETWORK_IP6_ENABLE
61 # This flag is to enable or disable IPv6 network stack.
63 DEFINE NETWORK_IP6_ENABLE = TRUE
66 !ifndef NETWORK_TLS_ENABLE
68 # This flag is to enable or disable TLS feature.
70 # Note: This feature depends on the OpenSSL building. To enable this feature, please
71 # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in
72 # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
73 # The OpensslLib.inf library instance should be used since libssl is required.
75 DEFINE NETWORK_TLS_ENABLE = TRUE
78 !ifndef NETWORK_HTTP_ENABLE
80 # This flag is to enable or disable HTTP(S) feature.
81 # The default is set to FALSE to not affecting the existing
83 # NETWORK_HTTP_ENABLE set to FALSE is not affecting NETWORK_HTTP_BOOT_ENABLE
84 # when NETWORK_HTTP_BOOT_ENABLE is TRUE.
85 DEFINE NETWORK_HTTP_ENABLE = FALSE
88 !ifndef NETWORK_HTTP_BOOT_ENABLE
90 # This flag is to enable or disable HTTP(S) boot feature.
93 DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE
96 !ifndef NETWORK_ALLOW_HTTP_CONNECTIONS
98 # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.
100 # Note: If NETWORK_ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed.
101 # Both the "https://" and "http://" URI schemes are permitted. Otherwise, HTTP
102 # connections are denied. Only the "https://" URI scheme is permitted.
104 DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
107 !ifndef NETWORK_ISCSI_ENABLE
109 # This flag is to enable or disable iSCSI feature.
111 # Note: This feature depends on the OpenSSL building. To enable this feature, please
112 # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in
113 # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
114 # Both OpensslLib.inf and OpensslLibCrypto.inf library instance can be used
115 # since libssl is not required for iSCSI.
117 DEFINE NETWORK_ISCSI_ENABLE = FALSE
120 !if $(NETWORK_ENABLE) == TRUE
122 # Check the flags to see if there is any conflict.
124 !if ($(NETWORK_IP4_ENABLE) == FALSE) AND ($(NETWORK_IP6_ENABLE) == FALSE)
125 !error "Must enable at least IP4 or IP6 stack if NETWORK_ENABLE is set to TRUE!"
128 !if ($(NETWORK_HTTP_BOOT_ENABLE) == TRUE) OR ($(NETWORK_HTTP_ENABLE) == TRUE)
129 !if ($(NETWORK_TLS_ENABLE) == FALSE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) == FALSE)
130 !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!"