]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/NetworkDefines.dsc.inc
NetworkPkg: Add NETWORK_HTTP_ENABLE macro
[mirror_edk2.git] / NetworkPkg / NetworkDefines.dsc.inc
CommitLineData
1e948802
LG
1## @file\r
2# Network DSC include file for [Defines] section of all Architectures.\r
3#\r
4# This file can be included to the [Defines] section of a platform DSC file by\r
5# using "!include NetworkPkg/NetworkDefines.dsc.inc" to set default value of\r
6# flags if they are not defined somewhere else, and also check the value to see\r
7# if there is any conflict.\r
8#\r
9# These flags can be defined before the !include line, or changed on the command\r
10# line to enable or disable related feature support.\r
11# -D FLAG=VALUE\r
12# The default value of these flags are:\r
13# DEFINE NETWORK_ENABLE = TRUE\r
14# DEFINE NETWORK_SNP_ENABLE = TRUE\r
15# DEFINE NETWORK_IP4_ENABLE = TRUE\r
16# DEFINE NETWORK_IP6_ENABLE = TRUE\r
17# DEFINE NETWORK_TLS_ENABLE = TRUE\r
126115a9 18# DEFINE NETWORK_HTTP_ENABLE = FALSE\r
1e948802
LG
19# DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE\r
20# DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE\r
4ecb1ba5 21# DEFINE NETWORK_ISCSI_ENABLE = FALSE\r
1e948802
LG
22# DEFINE NETWORK_VLAN_ENABLE = TRUE\r
23#\r
24# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
126115a9 25# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
1e948802
LG
26#\r
27# SPDX-License-Identifier: BSD-2-Clause-Patent\r
28#\r
29##\r
30\r
31!ifndef NETWORK_ENABLE\r
32 #\r
33 # This flag is to enable or disable the whole network stack.\r
34 #\r
35 DEFINE NETWORK_ENABLE = TRUE\r
36!endif\r
37\r
38!ifndef NETWORK_SNP_ENABLE\r
39 #\r
40 # This flag is to include the common SNP driver or not.\r
41 #\r
42 DEFINE NETWORK_SNP_ENABLE = TRUE\r
43!endif\r
44\r
45!ifndef NETWORK_VLAN_ENABLE\r
46 #\r
47 # This flag is to enable or disable VLAN feature.\r
48 #\r
49 DEFINE NETWORK_VLAN_ENABLE = TRUE\r
50!endif\r
51\r
52!ifndef NETWORK_IP4_ENABLE\r
53 #\r
54 # This flag is to enable or disable IPv4 network stack.\r
55 #\r
56 DEFINE NETWORK_IP4_ENABLE = TRUE\r
57!endif\r
58\r
59!ifndef NETWORK_IP6_ENABLE\r
60 #\r
61 # This flag is to enable or disable IPv6 network stack.\r
62 #\r
63 DEFINE NETWORK_IP6_ENABLE = TRUE\r
64!endif\r
65\r
66!ifndef NETWORK_TLS_ENABLE\r
67 #\r
68 # This flag is to enable or disable TLS feature.\r
69 #\r
70 # Note: This feature depends on the OpenSSL building. To enable this feature, please\r
71 # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in\r
72 # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.\r
73 # The OpensslLib.inf library instance should be used since libssl is required.\r
74 #\r
75 DEFINE NETWORK_TLS_ENABLE = TRUE\r
76!endif\r
77\r
126115a9
AC
78!ifndef NETWORK_HTTP_ENABLE\r
79 #\r
80 # This flag is to enable or disable HTTP(S) feature.\r
81 # The default is set to FALSE to not affecting the existing\r
82 # platforms.\r
83 # NETWORK_HTTP_ENABLE set to FALSE is not affecting NETWORK_HTTP_BOOT_ENABLE\r
84 # when NETWORK_HTTP_BOOT_ENABLE is TRUE.\r
85 DEFINE NETWORK_HTTP_ENABLE = FALSE\r
86!endif\r
87\r
1e948802
LG
88!ifndef NETWORK_HTTP_BOOT_ENABLE\r
89 #\r
90 # This flag is to enable or disable HTTP(S) boot feature.\r
91 #\r
126115a9 92 #\r
1e948802
LG
93 DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE\r
94!endif\r
95\r
96!ifndef NETWORK_ALLOW_HTTP_CONNECTIONS\r
97 #\r
98 # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.\r
99 #\r
100 # Note: If NETWORK_ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed.\r
101 # Both the "https://" and "http://" URI schemes are permitted. Otherwise, HTTP\r
102 # connections are denied. Only the "https://" URI scheme is permitted.\r
103 #\r
104 DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE\r
105!endif\r
106\r
107!ifndef NETWORK_ISCSI_ENABLE\r
108 #\r
109 # This flag is to enable or disable iSCSI feature.\r
110 #\r
111 # Note: This feature depends on the OpenSSL building. To enable this feature, please\r
112 # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in\r
113 # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.\r
114 # Both OpensslLib.inf and OpensslLibCrypto.inf library instance can be used\r
115 # since libssl is not required for iSCSI.\r
116 #\r
4ecb1ba5 117 DEFINE NETWORK_ISCSI_ENABLE = FALSE\r
1e948802
LG
118!endif\r
119\r
120!if $(NETWORK_ENABLE) == TRUE\r
121 #\r
122 # Check the flags to see if there is any conflict.\r
123 #\r
124 !if ($(NETWORK_IP4_ENABLE) == FALSE) AND ($(NETWORK_IP6_ENABLE) == FALSE)\r
125 !error "Must enable at least IP4 or IP6 stack if NETWORK_ENABLE is set to TRUE!"\r
126 !endif\r
127\r
126115a9
AC
128 !if ($(NETWORK_HTTP_BOOT_ENABLE) == TRUE) OR ($(NETWORK_HTTP_ENABLE) == TRUE)\r
129 !if ($(NETWORK_TLS_ENABLE) == FALSE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) == FALSE)\r
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!"\r
131 !endif\r
1e948802
LG
132 !endif\r
133!endif\r