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