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_ISCSI_MD5_ENABLE = TRUE
23# DEFINE NETWORK_VLAN_ENABLE = TRUE
25# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
26# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
28# SPDX-License-Identifier: BSD-2-Clause-Patent
34 # This flag is to enable or disable the whole network stack.
36 DEFINE NETWORK_ENABLE =
TRUE
39!ifndef NETWORK_SNP_ENABLE
41 # This flag is to include the common SNP driver or not.
43 DEFINE NETWORK_SNP_ENABLE =
TRUE
46!ifndef NETWORK_VLAN_ENABLE
48 # This flag is to enable or disable VLAN feature.
50 DEFINE NETWORK_VLAN_ENABLE =
TRUE
53!ifndef NETWORK_IP4_ENABLE
55 # This flag is to enable or disable IPv4 network stack.
57 DEFINE NETWORK_IP4_ENABLE =
TRUE
60!ifndef NETWORK_IP6_ENABLE
62 # This flag is to enable or disable IPv6 network stack.
64 DEFINE NETWORK_IP6_ENABLE =
TRUE
67!ifndef NETWORK_TLS_ENABLE
69 # This flag is to enable or disable TLS feature.
71 # Note: This feature depends on the OpenSSL building. To enable this feature, please
72 # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in
73 # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
74 # The OpensslLib.inf library instance should be used since libssl is required.
76 DEFINE NETWORK_TLS_ENABLE =
TRUE
79!ifndef NETWORK_HTTP_ENABLE
81 # This flag is to enable or disable HTTP(S) feature.
82 # The default is set to FALSE to not affecting the existing
84 # NETWORK_HTTP_ENABLE set to FALSE is not affecting NETWORK_HTTP_BOOT_ENABLE
85 # when NETWORK_HTTP_BOOT_ENABLE is TRUE.
86 DEFINE NETWORK_HTTP_ENABLE =
FALSE
89!ifndef NETWORK_HTTP_BOOT_ENABLE
91 # This flag is to enable or disable HTTP(S) boot feature.
94 DEFINE NETWORK_HTTP_BOOT_ENABLE =
TRUE
97!ifndef NETWORK_ALLOW_HTTP_CONNECTIONS
99 # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.
101 # Note: If NETWORK_ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed.
102 # Both the "https://" and "http://" URI schemes are permitted. Otherwise, HTTP
103 # connections are denied. Only the "https://" URI scheme is permitted.
105 DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS =
FALSE
108!ifndef NETWORK_ISCSI_ENABLE
110 # This flag is to enable or disable iSCSI feature.
112 # Note: This feature depends on the OpenSSL building. To enable this feature, please
113 # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in
114 # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.
115 # Both OpensslLib.inf and OpensslLibCrypto.inf library instance can be used
116 # since libssl is not required for iSCSI.
118 DEFINE NETWORK_ISCSI_ENABLE =
FALSE
121!ifndef NETWORK_ISCSI_MD5_ENABLE
123 # This flag enables the deprecated MD5 hash algorithm in iSCSI CHAP
126 # Note: The NETWORK_ISCSI_MD5_ENABLE flag only makes a difference if
127 # NETWORK_ISCSI_ENABLE is TRUE; otherwise, NETWORK_ISCSI_MD5_ENABLE is
130 # With NETWORK_ISCSI_MD5_ENABLE set to TRUE, MD5 is enabled as the
131 # least preferred CHAP hash algorithm. With NETWORK_ISCSI_MD5_ENABLE
132 # set to FALSE, MD5 is disabled statically, at build time.
134 # The default value is TRUE, because RFC 7143 mandates MD5, and because
135 # several vendors' iSCSI targets only support MD5, for CHAP.
137 DEFINE NETWORK_ISCSI_MD5_ENABLE =
TRUE
140!
if $(NETWORK_ENABLE) ==
TRUE
142 # Check the flags to see if there is any conflict.
144 !
if ($(NETWORK_IP4_ENABLE) ==
FALSE) AND ($(NETWORK_IP6_ENABLE) ==
FALSE)
145 !error
"Must enable at least IP4 or IP6 stack if NETWORK_ENABLE is set to TRUE!"
148 !
if ($(NETWORK_HTTP_BOOT_ENABLE) ==
TRUE) OR ($(NETWORK_HTTP_ENABLE) ==
TRUE)
149 !
if ($(NETWORK_TLS_ENABLE) ==
FALSE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) ==
FALSE)
150 !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!"