mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 17:42:47 +03:00
[settings] Formalise notion of setting applicability
Expose a function setting_applies() to allow a caller to determine whether or not a particular setting is applicable to a particular settings block. Restrict DHCP-backed settings blocks to accepting only DHCP-based settings. Restrict network device settings blocks to accepting only DHCP-based settings and network device-specific settings such as "mac". Inspired-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -206,6 +206,7 @@ struct setting net80211_ssid_setting __setting = {
|
||||
.name = "ssid",
|
||||
.description = "802.11 SSID (network name)",
|
||||
.type = &setting_type_string,
|
||||
.tag = NET80211_SETTING_TAG_SSID,
|
||||
};
|
||||
|
||||
/** Whether to use active scanning
|
||||
@@ -218,6 +219,7 @@ struct setting net80211_active_setting __setting = {
|
||||
.name = "active-scan",
|
||||
.description = "Use an active scan during 802.11 association",
|
||||
.type = &setting_type_int8,
|
||||
.tag = NET80211_SETTING_TAG_ACTIVE_SCAN,
|
||||
};
|
||||
|
||||
/** The cryptographic key to use
|
||||
@@ -230,6 +232,7 @@ struct setting net80211_key_setting __setting = {
|
||||
.name = "key",
|
||||
.description = "Encryption key for protected 802.11 networks",
|
||||
.type = &setting_type_string,
|
||||
.tag = NET80211_SETTING_TAG_KEY,
|
||||
};
|
||||
|
||||
/** @} */
|
||||
|
||||
Reference in New Issue
Block a user