Browse Source

[settings] Create space for IPv6 in settings display order

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
ecfc81d76f
4 changed files with 26 additions and 22 deletions
  1. 20
    16
      src/include/ipxe/settings.h
  2. 3
    3
      src/net/ipv4.c
  3. 1
    1
      src/net/ndp.c
  4. 2
    2
      src/net/udp/dns.c

+ 20
- 16
src/include/ipxe/settings.h View File

@@ -62,18 +62,22 @@ struct setting {
62 62
 
63 63
 #define SETTING_NETDEV		01 /**< Network device settings */
64 64
 #define SETTING_NETDEV_EXTRA	02 /**< Network device additional settings */
65
-#define SETTING_IP		03 /**< IPv4 settings */
66
-#define SETTING_IP_EXTRA	04 /**< IPv4 additional settings */
67
-#define SETTING_BOOT		05 /**< Generic boot settings */
68
-#define SETTING_BOOT_EXTRA	06 /**< Generic boot additional settings */
69
-#define SETTING_SANBOOT		07 /**< SAN boot settings */
70
-#define SETTING_SANBOOT_EXTRA	08 /**< SAN boot additional settings */
71
-#define SETTING_HOST		09 /**< Host identity settings */
72
-#define SETTING_HOST_EXTRA	10 /**< Host identity additional settings */
73
-#define SETTING_AUTH		11 /**< Authentication settings */
74
-#define SETTING_AUTH_EXTRA	12 /**< Authentication additional settings */
75
-#define SETTING_CRYPTO		13 /**< Cryptography settings */
76
-#define SETTING_MISC		14 /**< Miscellaneous settings */
65
+#define SETTING_IP4		03 /**< IPv4 settings */
66
+#define SETTING_IP4_EXTRA	04 /**< IPv4 additional settings */
67
+#define SETTING_IP6		05 /**< IPv6 settings */
68
+#define SETTING_IP6_EXTRA	06 /**< IPv6 additional settings */
69
+#define SETTING_IP		07 /**< IPv4 settings */
70
+#define SETTING_IP_EXTRA	08 /**< IPv4 additional settings */
71
+#define SETTING_BOOT		09 /**< Generic boot settings */
72
+#define SETTING_BOOT_EXTRA	10 /**< Generic boot additional settings */
73
+#define SETTING_SANBOOT		11 /**< SAN boot settings */
74
+#define SETTING_SANBOOT_EXTRA	12 /**< SAN boot additional settings */
75
+#define SETTING_HOST		13 /**< Host identity settings */
76
+#define SETTING_HOST_EXTRA	14 /**< Host identity additional settings */
77
+#define SETTING_AUTH		15 /**< Authentication settings */
78
+#define SETTING_AUTH_EXTRA	16 /**< Authentication additional settings */
79
+#define SETTING_CRYPTO		17 /**< Cryptography settings */
80
+#define SETTING_MISC		18 /**< Miscellaneous settings */
77 81
 
78 82
 /** @} */
79 83
 
@@ -421,13 +425,13 @@ extern const struct setting_type setting_type_busdevfn __setting_type;
421 425
 extern const struct setting_type setting_type_dnssl __setting_type;
422 426
 
423 427
 extern const struct setting
424
-ip_setting __setting ( SETTING_IP, ip );
428
+ip_setting __setting ( SETTING_IP4, ip );
425 429
 extern const struct setting
426
-netmask_setting __setting ( SETTING_IP, netmask );
430
+netmask_setting __setting ( SETTING_IP4, netmask );
427 431
 extern const struct setting
428
-gateway_setting __setting ( SETTING_IP, gateway );
432
+gateway_setting __setting ( SETTING_IP4, gateway );
429 433
 extern const struct setting
430
-dns_setting __setting ( SETTING_IP_EXTRA, dns );
434
+dns_setting __setting ( SETTING_IP4_EXTRA, dns );
431 435
 extern const struct setting
432 436
 hostname_setting __setting ( SETTING_HOST, hostname );
433 437
 extern const struct setting

+ 3
- 3
src/net/ipv4.c View File

@@ -788,7 +788,7 @@ int format_ipv4_setting ( const struct setting_type *type __unused,
788 788
 }
789 789
 
790 790
 /** IPv4 address setting */
791
-const struct setting ip_setting __setting ( SETTING_IP, ip ) = {
791
+const struct setting ip_setting __setting ( SETTING_IP4, ip ) = {
792 792
 	.name = "ip",
793 793
 	.description = "IP address",
794 794
 	.tag = DHCP_EB_YIADDR,
@@ -796,7 +796,7 @@ const struct setting ip_setting __setting ( SETTING_IP, ip ) = {
796 796
 };
797 797
 
798 798
 /** IPv4 subnet mask setting */
799
-const struct setting netmask_setting __setting ( SETTING_IP, netmask ) = {
799
+const struct setting netmask_setting __setting ( SETTING_IP4, netmask ) = {
800 800
 	.name = "netmask",
801 801
 	.description = "Subnet mask",
802 802
 	.tag = DHCP_SUBNET_MASK,
@@ -804,7 +804,7 @@ const struct setting netmask_setting __setting ( SETTING_IP, netmask ) = {
804 804
 };
805 805
 
806 806
 /** Default gateway setting */
807
-const struct setting gateway_setting __setting ( SETTING_IP, gateway ) = {
807
+const struct setting gateway_setting __setting ( SETTING_IP4, gateway ) = {
808 808
 	.name = "gateway",
809 809
 	.description = "Default gateway",
810 810
 	.tag = DHCP_ROUTERS,

+ 1
- 1
src/net/ndp.c View File

@@ -785,7 +785,7 @@ static int ndp_register_settings ( struct net_device *netdev,
785 785
 }
786 786
 
787 787
 /** DNS server setting */
788
-const struct setting ndp_dns6_setting __setting ( SETTING_IP_EXTRA, dns6 ) = {
788
+const struct setting ndp_dns6_setting __setting ( SETTING_IP6_EXTRA, dns6 ) = {
789 789
 	.name = "dns6",
790 790
 	.description = "DNS server",
791 791
 	.tag = NDP_TAG ( NDP_OPT_RDNSS,

+ 2
- 2
src/net/udp/dns.c View File

@@ -1048,7 +1048,7 @@ const struct setting_type setting_type_dnssl __setting_type = {
1048 1048
 };
1049 1049
 
1050 1050
 /** IPv4 DNS server setting */
1051
-const struct setting dns_setting __setting ( SETTING_IP_EXTRA, dns ) = {
1051
+const struct setting dns_setting __setting ( SETTING_IP4_EXTRA, dns ) = {
1052 1052
 	.name = "dns",
1053 1053
 	.description = "DNS server",
1054 1054
 	.tag = DHCP_DNS_SERVERS,
@@ -1056,7 +1056,7 @@ const struct setting dns_setting __setting ( SETTING_IP_EXTRA, dns ) = {
1056 1056
 };
1057 1057
 
1058 1058
 /** IPv6 DNS server setting */
1059
-const struct setting dns6_setting __setting ( SETTING_IP_EXTRA, dns6 ) = {
1059
+const struct setting dns6_setting __setting ( SETTING_IP6_EXTRA, dns6 ) = {
1060 1060
 	.name = "dns6",
1061 1061
 	.description = "DNS server",
1062 1062
 	.tag = DHCPV6_DNS_SERVERS,

Loading…
Cancel
Save