summaryrefslogtreecommitdiffstats
path: root/testsuite/rcconf02
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-04-27 13:57:28 +1000
committerChris Johns <chrisj@rtems.org>2017-04-27 13:57:28 +1000
commit443757313e0f2c4da58cf25009e2964026043957 (patch)
tree45b1fea0aee399ace1bbac6eb047e1f89700ed04 /testsuite/rcconf02
parentrc_conf: Do not use a local variable for the rc_conf context. (diff)
downloadrtems-libbsd-443757313e0f2c4da58cf25009e2964026043957.tar.bz2
rc_conf: Add support for ifconfig_<interface>_alias[0-9]+.
The interface alias allows extra IP addresses to be set on and interface and it also allows the MAC address to be set. Examples: ifconfig_em0="inet 10.10.5.33 netmask 255.255.255.0" ifconfig_em0_alias0="ether 10:22:33:44:55:66" ifconfig_em0_alias1="inet 10.1.1.111 netmask 0xffffffff"
Diffstat (limited to 'testsuite/rcconf02')
-rw-r--r--testsuite/rcconf02/test_main.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/testsuite/rcconf02/test_main.c b/testsuite/rcconf02/test_main.c
index 0b7c6d17..ad177d25 100644
--- a/testsuite/rcconf02/test_main.c
+++ b/testsuite/rcconf02/test_main.c
@@ -75,8 +75,11 @@
#define IFACE_IPV4(iface) \
"ifconfig_" # iface "=\"inet " NET_CFG_SELF_IP " netmask " NET_CFG_NETMASK "\"\n"
+#define IFACE_ALIAS(iface) \
+ "ifconfig_" # iface "_alias0=\"ether 10:22:33:44:55:66\"\n" \
+ "ifconfig_" # iface "_alias1=\"inet 10.1.1.111 netmask 0xffffffff\"\n"
-#define RC_CONF_IFACES \
+#define RC_CONF_IFACES_IPV4 \
IFACE_IPV4(dmc0) \
IFACE_IPV4(sm0) \
IFACE_IPV4(cgem0) \
@@ -84,6 +87,18 @@
IFACE_IPV4(em0) \
IFACE_IPV4(re0)
+#define RC_CONF_IFACES_ALIAS \
+ IFACE_ALIAS(dmc0) \
+ IFACE_ALIAS(sm0) \
+ IFACE_ALIAS(cgem0) \
+ IFACE_ALIAS(fec0) \
+ IFACE_ALIAS(em0) \
+ IFACE_ALIAS(re0)
+
+#define RC_CONF_IFACES \
+ RC_CONF_IFACES_IPV4 \
+ RC_CONF_IFACES_ALIAS
+
#define IFACE_VLAN(iface) \
"vlans_" # iface "=\"101 102\"\n" \
"ifconfig_" # iface "_101=\"inet 192.0.101.1/24\"\n" \