]>
Commit | Line | Data |
---|---|---|
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 | |
18 | # DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE\r | |
19 | # DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE\r | |
20 | # DEFINE NETWORK_ISCSI_ENABLE = TRUE\r | |
21 | # DEFINE NETWORK_VLAN_ENABLE = TRUE\r | |
22 | #\r | |
23 | # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r | |
24 | #\r | |
25 | # SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
26 | #\r | |
27 | ##\r | |
28 | \r | |
29 | !ifndef NETWORK_ENABLE\r | |
30 | #\r | |
31 | # This flag is to enable or disable the whole network stack.\r | |
32 | #\r | |
33 | DEFINE NETWORK_ENABLE = TRUE\r | |
34 | !endif\r | |
35 | \r | |
36 | !ifndef NETWORK_SNP_ENABLE\r | |
37 | #\r | |
38 | # This flag is to include the common SNP driver or not.\r | |
39 | #\r | |
40 | DEFINE NETWORK_SNP_ENABLE = TRUE\r | |
41 | !endif\r | |
42 | \r | |
43 | !ifndef NETWORK_VLAN_ENABLE\r | |
44 | #\r | |
45 | # This flag is to enable or disable VLAN feature.\r | |
46 | #\r | |
47 | DEFINE NETWORK_VLAN_ENABLE = TRUE\r | |
48 | !endif\r | |
49 | \r | |
50 | !ifndef NETWORK_IP4_ENABLE\r | |
51 | #\r | |
52 | # This flag is to enable or disable IPv4 network stack.\r | |
53 | #\r | |
54 | DEFINE NETWORK_IP4_ENABLE = TRUE\r | |
55 | !endif\r | |
56 | \r | |
57 | !ifndef NETWORK_IP6_ENABLE\r | |
58 | #\r | |
59 | # This flag is to enable or disable IPv6 network stack.\r | |
60 | #\r | |
61 | DEFINE NETWORK_IP6_ENABLE = TRUE\r | |
62 | !endif\r | |
63 | \r | |
64 | !ifndef NETWORK_TLS_ENABLE\r | |
65 | #\r | |
66 | # This flag is to enable or disable TLS feature.\r | |
67 | #\r | |
68 | # Note: This feature depends on the OpenSSL building. To enable this feature, please\r | |
69 | # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in\r | |
70 | # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.\r | |
71 | # The OpensslLib.inf library instance should be used since libssl is required.\r | |
72 | #\r | |
73 | DEFINE NETWORK_TLS_ENABLE = TRUE\r | |
74 | !endif\r | |
75 | \r | |
76 | !ifndef NETWORK_HTTP_BOOT_ENABLE\r | |
77 | #\r | |
78 | # This flag is to enable or disable HTTP(S) boot feature.\r | |
79 | #\r | |
80 | DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE\r | |
81 | !endif\r | |
82 | \r | |
83 | !ifndef NETWORK_ALLOW_HTTP_CONNECTIONS\r | |
84 | #\r | |
85 | # Indicates whether HTTP connections (i.e., unsecured) are permitted or not.\r | |
86 | #\r | |
87 | # Note: If NETWORK_ALLOW_HTTP_CONNECTIONS is TRUE, HTTP connections are allowed.\r | |
88 | # Both the "https://" and "http://" URI schemes are permitted. Otherwise, HTTP\r | |
89 | # connections are denied. Only the "https://" URI scheme is permitted.\r | |
90 | #\r | |
91 | DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE\r | |
92 | !endif\r | |
93 | \r | |
94 | !ifndef NETWORK_ISCSI_ENABLE\r | |
95 | #\r | |
96 | # This flag is to enable or disable iSCSI feature.\r | |
97 | #\r | |
98 | # Note: This feature depends on the OpenSSL building. To enable this feature, please\r | |
99 | # follow the instructions found in the file "OpenSSL-HOWTO.txt" located in\r | |
100 | # CryptoPkg\Library\OpensslLib to enable the OpenSSL building first.\r | |
101 | # Both OpensslLib.inf and OpensslLibCrypto.inf library instance can be used\r | |
102 | # since libssl is not required for iSCSI.\r | |
103 | #\r | |
104 | DEFINE NETWORK_ISCSI_ENABLE = TRUE\r | |
105 | !endif\r | |
106 | \r | |
107 | !if $(NETWORK_ENABLE) == TRUE\r | |
108 | #\r | |
109 | # Check the flags to see if there is any conflict.\r | |
110 | #\r | |
111 | !if ($(NETWORK_IP4_ENABLE) == FALSE) AND ($(NETWORK_IP6_ENABLE) == FALSE)\r | |
112 | !error "Must enable at least IP4 or IP6 stack if NETWORK_ENABLE is set to TRUE!"\r | |
113 | !endif\r | |
114 | \r | |
115 | !if ($(NETWORK_HTTP_BOOT_ENABLE) == TRUE) AND ($(NETWORK_TLS_ENABLE) == FALSE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) == FALSE)\r | |
116 | !error "Must enable TLS to support HTTPS, or allow unsecured HTTP connection, if NETWORK_HTTP_BOOT_ENABLE is set to TRUE!"\r | |
117 | !endif\r | |
118 | !endif\r |