summaryrefslogtreecommitdiff
path: root/apps/nshlib
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-06 10:12:10 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-06 10:12:10 -0600
commitb31b8ea5db6e7b42eee4195b7f2811b9d9a87396 (patch)
tree7dfb1c7d434075dc97996d6a3be6052582b554e0 /apps/nshlib
parent5b6529f173e35f3c15438869ea33dbf80d3be036 (diff)
downloadnuttx-b31b8ea5db6e7b42eee4195b7f2811b9d9a87396.tar.gz
nuttx-b31b8ea5db6e7b42eee4195b7f2811b9d9a87396.tar.bz2
nuttx-b31b8ea5db6e7b42eee4195b7f2811b9d9a87396.zip
NSH Networking: Also add an option to let platform-specific logic select the MAC address.
Diffstat (limited to 'apps/nshlib')
-rw-r--r--apps/nshlib/Kconfig493
-rw-r--r--apps/nshlib/nsh.h8
-rw-r--r--apps/nshlib/nsh_netinit.c20
3 files changed, 295 insertions, 226 deletions
diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig
index 7f35243fb..f710969f5 100644
--- a/apps/nshlib/Kconfig
+++ b/apps/nshlib/Kconfig
@@ -12,6 +12,8 @@ config NSH_LIBRARY
if NSH_LIBRARY
+menu "Command Line Configuration"
+
choice
prompt "Command Line Editor"
default NSH_READLINE if DEFAULT_SMALL
@@ -38,6 +40,98 @@ config NSH_CLE
endchoice
+config NSH_LINELEN
+ int "Max command line length"
+ default 64 if DEFAULT_SMALL
+ default 80 if !DEFAULT_SMALL
+ ---help---
+ The maximum length of one command line and of one output line.
+ Default: 64/80
+
+config NSH_DISABLE_SEMICOLON
+ bool "Disable multiple commands per line"
+ default y if DEFAULT_SMALL
+ default n if !DEFAULT_SMALL
+ ---help---
+ By default, you can enter multiple NSH commands on a line with each
+ command separated by a semicolon. You can disable this feature to
+ save a little memory on FLASH challenged platforms.
+
+config NSH_CMDPARMS
+ bool "Enable commands as parameters"
+ default n if DEFAULT_SMALL
+ default y if !DEFAULT_SMALL
+ depends on !DISABLE_MOUNTPOINT
+ ---help---
+ If selected, then the output from commands, from file applications, and
+ from NSH built-in commands can be used as arguments to other
+ commands. The entity to be executed is identified by enclosing the
+ command line in back quotes. For example,
+
+ set FOO `myprogram $BAR`
+
+ Will execute the program named myprogram passing it the value of the
+ environment variable BAR. The value of the environment variable FOO
+ is then set output of myprogram on stdout.
+
+ Because this feature commits significant resources, it is disabled by
+ default.
+
+config NSH_TMPDIR
+ string "Temporary file directory"
+ default "/tmp"
+ depends on NSH_CMDPARMS
+ ---help---
+ If NSH_CMDPARMS is selected, then function output will be retained
+ in a temporary file. In that case, this string must be provided to
+ specify the full path to a directory where temporary files can be
+ created. This would be a good application of RAM disk: To provide
+ temporary storage for function output.
+
+config NSH_MAXARGUMENTS
+ int "Maximum number of command arguments"
+ default 6
+ ---help---
+ The maximum number of NSH command arguments.
+ Default: 6
+
+config NSH_ARGCAT
+ bool "Concatenation of argument strings"
+ default n if DEFAULT_SMALL
+ default y if !DEFAULT_SMALL
+ ---help---
+ Support concatenation of strings with environment variables or command
+ output. For example:
+
+ set FOO XYZ
+ set BAR 123
+ set FOOBAR ABC_${FOO}_${BAR}
+
+ would set the environment variable FOO to XYZ, BAR to 123 and FOOBAR
+ to ABC_XYZ_123. If NSH_ARGCAT is not selected, then a slightly small
+ FLASH footprint results but then also only simple environment
+ variables like $FOO can be used on the command line.
+
+config NSH_NESTDEPTH
+ int "Maximum command nesting"
+ default 3
+ ---help---
+ The maximum number of nested if-then[-else]-fi sequences that
+ are permissable. Default: 3
+
+config NSH_DISABLEBG
+ bool "Disable background commands"
+ default y if DEFAULT_SMALL
+ default n if !DEFAULT_SMALL
+ ---help---
+ This can be set to 'y' to suppress support for background
+ commands. This setting disables the 'nice' command prefix and
+ the '&' command suffix. This would only be set on systems
+ where a minimal footprint is a necessity and background command
+ execution is not.
+
+endmenu # Command Line Configuration
+
config NSH_BUILTIN_APPS
bool "Enable built-in applications"
default n
@@ -326,84 +420,7 @@ config NSH_STRERROR
This setting depends upon the strerror() having been enabled
with LIBC_STRERROR.
-config NSH_LINELEN
- int "Max command line length"
- default 64 if DEFAULT_SMALL
- default 80 if !DEFAULT_SMALL
- ---help---
- The maximum length of one command line and of one output line.
- Default: 64/80
-
-config NSH_DISABLE_SEMICOLON
- bool "Disable multiple commands per line"
- default y if DEFAULT_SMALL
- default n if !DEFAULT_SMALL
- ---help---
- By default, you can enter multiple NSH commands on a line with each
- command separated by a semicolon. You can disable this feature to
- save a little memory on FLASH challenged platforms.
-
-config NSH_CMDPARMS
- bool "Enable commands as parameters"
- default n if DEFAULT_SMALL
- default y if !DEFAULT_SMALL
- depends on !DISABLE_MOUNTPOINT
- ---help---
- If selected, then the output from commands, from file applications, and
- from NSH built-in commands can be used as arguments to other
- commands. The entity to be executed is identified by enclosing the
- command line in back quotes. For example,
-
- set FOO `myprogram $BAR`
-
- Will execute the program named myprogram passing it the value of the
- environment variable BAR. The value of the environment variable FOO
- is then set output of myprogram on stdout.
-
- Because this feature commits significant resources, it is disabled by
- default.
-
-config NSH_TMPDIR
- string "Temporary file directory"
- default "/tmp"
- depends on NSH_CMDPARMS
- ---help---
- If NSH_CMDPARMS is selected, then function output will be retained
- in a temporary file. In that case, this string must be provided to
- specify the full path to a directory where temporary files can be
- created. This would be a good application of RAM disk: To provide
- temporary storage for function output.
-
-config NSH_MAXARGUMENTS
- int "Maximum number of command arguments"
- default 6
- ---help---
- The maximum number of NSH command arguments.
- Default: 6
-
-config NSH_ARGCAT
- bool "Concatenation of argument strings"
- default n if DEFAULT_SMALL
- default y if !DEFAULT_SMALL
- ---help---
- Support concatenation of strings with environment variables or command
- output. For example:
-
- set FOO XYZ
- set BAR 123
- set FOOBAR ABC_${FOO}_${BAR}
-
- would set the environment variable FOO to XYZ, BAR to 123 and FOOBAR
- to ABC_XYZ_123. If NSH_ARGCAT is not selected, then a slightly small
- FLASH footprint results but then also only simple environment
- variables like $FOO can be used on the command line.
-
-config NSH_NESTDEPTH
- int "Maximum command nesting"
- default 3
- ---help---
- The maximum number of nested if-then[-else]-fi sequences that
- are permissable. Default: 3
+menu "Scripting Support"
config NSH_DISABLESCRIPT
bool "Disable script support"
@@ -438,17 +455,6 @@ config NSH_DISABLE_LOOPS
endif # !NSH_DISABLESCRIPT
-config NSH_DISABLEBG
- bool "Disable background commands"
- default y if DEFAULT_SMALL
- default n if !DEFAULT_SMALL
- ---help---
- This can be set to 'y' to suppress support for background
- commands. This setting disables the 'nice' command prefix and
- the '&' command suffix. This would only be set on systems
- where a minimal footprint is a necessity and background command
- execution is not.
-
config NSH_MMCSDMINOR
int "MMC/SD minor device number"
default 0
@@ -468,8 +474,6 @@ config NSH_ROMFSETC
at /etc/init.d/rcS. The default startup script will mount
a FAT FS RAMDISK at /tmp but the logic is easily extensible.
-endif # NSH_LIBRARY
-
if NSH_ROMFSETC
config NSH_ROMFSRC
@@ -572,8 +576,9 @@ config NSH_FATMOUNTPT
FS will be mounted. Default is "/tmp".
endif # NSH_ROMFSETC
+endmenu # Scripting Support
-if NSH_LIBRARY
+menu "Console Configuration"
config NSH_CONSOLE
bool "Use console"
@@ -626,6 +631,63 @@ config USBDEV_MINOR
endif # NSH_USBCONSOLE
+config NSH_ALTCONDEV
+ bool "Alternative console device"
+ default n
+ depends on NSH_CONSOLE && !NSH_USBCONSOLE && !NSH_TELNET
+ ---help---
+ If CONFIG_NSH_CONSOLE is set to y, then CONFIG_NSH_ALTCONDEV may
+ also be selected to enable use of an alternate character device
+ to support the NSH console. If CONFIG_NSH_ALTCONDEV is selected,
+ then NSH_CONDEV must be set to select the serial device used to
+ support the NSH console. This may be useful, for example, to
+ separate the NSH command line from the system console when the
+ system console is used to provide debug output. Default: stdin
+ and stdout (probably "/dev/console")
+
+ NOTE 1: When any other device other than /dev/console is used
+ for a user interface, (1) linefeeds (\n) will not be expanded to
+ carriage return / linefeeds (\r\n). You will need to set
+ your terminal program to account for this. And (2) input is
+ not automatically echoed so you will have to turn local echo on.
+
+ NOTE 2: This option forces the console of all sessions to use
+ NSH_CONDEV. Hence, this option only makes sense for a system
+ that supports only a single session. This option is, in
+ particular, incompatible with Telnet sessions because each Telnet
+ session must use a different console device.
+
+if NSH_ALTCONDEV
+
+config NSH_CONDEV
+ string "Alternative console device name"
+ default "/dev/console"
+ ---help---
+ If CONFIG_NSH_CONSOLE is set to y, then CONFIG_NSH_ALTCONDEV may
+ also be selected to enable use of an alternate character device
+ to support the NSH console. If CONFIG_NSH_ALTCONDEV is selected,
+ then NSH_CONDEV must be set to select the serial device used to
+ support the NSH console. This should be set to the quoted name
+ of a readable/write-able character driver such as:
+ NSH_CONDEV="/dev/ttyS1". This is useful, for example, to separate
+ the NSH command line from the system console when the system console
+ is used to provide debug output. Default: stdin and stdout
+ (probably "/dev/console")
+
+ NOTE 1: When any other device other than /dev/console is used
+ for a user interface, (1) linefeeds (\n) will not be expanded to
+ carriage return / linefeeds (\r\n). You will need to set
+ your terminal program to account for this. And (2) input is
+ not automatically echoed so you will have to turn local echo on.
+
+ NOTE 2: This option forces the console of all sessions to use
+ NSH_CONDEV. Hence, this option only makes sense for a system
+ that supports only a single session. This option is, in
+ particular, incompatible with Telnet sessions because each Telnet
+ session must use a different console device.
+
+endif # NSH_ALTCONDEV
+
config NSH_USBKBD
bool "Use USB keyboard input"
default n
@@ -650,13 +712,14 @@ config NSH_USBKBD_DEVNAME
able keyboard driver. Default: "/dev/kbda".
endif #NSH_USBKBD
+endmenu # Console Configuration
-comment "USB Trace Support"
+menu "USB Device Trace Support"
+ depends on USBDEV && (DEBUG || USBDEV_TRACE)
config NSH_USBDEV_TRACE
bool "Enable Builtin USB Trace Support"
default n
- depends on USBDEV && (DEBUG || USBDEV_TRACE)
---help---
Enable builtin USB trace support in NSH. If selected, buffered USB
trace data will be presented each time a command is provided to NSH.
@@ -700,72 +763,132 @@ config NSH_USBDEV_TRACEINTERRUPTS
Show interrupt-related events
endif # NSH_USBDEV_TRACE
+endmenu # USB Device Trace Support
-config NSH_ALTCONDEV
- bool "Alternative console device"
+config NSH_ARCHINIT
+ bool "Have architecture-specific initialization"
default n
- depends on NSH_CONSOLE && !NSH_USBCONSOLE && !NSH_TELNET
---help---
- If CONFIG_NSH_CONSOLE is set to y, then CONFIG_NSH_ALTCONDEV may
- also be selected to enable use of an alternate character device
- to support the NSH console. If CONFIG_NSH_ALTCONDEV is selected,
- then NSH_CONDEV must be set to select the serial device used to
- support the NSH console. This may be useful, for example, to
- separate the NSH command line from the system console when the
- system console is used to provide debug output. Default: stdin
- and stdout (probably "/dev/console")
+ Set if your board provides architecture specific initialization
+ via the board-specific function nsh_archinitialize(). This
+ function will be called early in NSH initialization to allow
+ board logic to do such things as configure MMC/SD slots.
- NOTE 1: When any other device other than /dev/console is used
- for a user interface, (1) linefeeds (\n) will not be expanded to
- carriage return / linefeeds (\r\n). You will need to set
- your terminal program to account for this. And (2) input is
- not automatically echoed so you will have to turn local echo on.
+menu "Networking Configuration"
+ depends on NET
- NOTE 2: This option forces the console of all sessions to use
- NSH_CONDEV. Hence, this option only makes sense for a system
- that supports only a single session. This option is, in
- particular, incompatible with Telnet sessions because each Telnet
- session must use a different console device.
+config NSH_DHCPC
+ bool "Use DHCP to get IP address"
+ default n
+ depends on NSH_LIBRARY && NETUTILS_DHCPC
+ ---help---
+ Obtain the IP address via DHCP.
-if NSH_ALTCONDEV
+ Per RFC2131 (p. 9), the DHCP client must be prepared to receive DHCP
+ messages of up to 576 bytes (excluding Ethernet, IP, or UDP headers and FCS).
-config NSH_CONDEV
- string "Alternative console device name"
- default "/dev/console"
+config NSH_IPADDR
+ hex "Target IP address"
+ default 0x0a000002
+ depends on NSH_LIBRARY && NET && !NSH_DHCPC
---help---
- If CONFIG_NSH_CONSOLE is set to y, then CONFIG_NSH_ALTCONDEV may
- also be selected to enable use of an alternate character device
- to support the NSH console. If CONFIG_NSH_ALTCONDEV is selected,
- then NSH_CONDEV must be set to select the serial device used to
- support the NSH console. This should be set to the quoted name
- of a readable/write-able character driver such as:
- NSH_CONDEV="/dev/ttyS1". This is useful, for example, to separate
- the NSH command line from the system console when the system console
- is used to provide debug output. Default: stdin and stdout
- (probably "/dev/console")
+ If NSH_DHCPC is NOT set, then the static IP address must be provided.
+ This is a 32-bit integer value in host order. So, as an example,
+ 0x10000002 would be 10.0.0.2.
- NOTE 1: When any other device other than /dev/console is used
- for a user interface, (1) linefeeds (\n) will not be expanded to
- carriage return / linefeeds (\r\n). You will need to set
- your terminal program to account for this. And (2) input is
- not automatically echoed so you will have to turn local echo on.
+config NSH_DRIPADDR
+ hex "Router IP address"
+ default 0x0a000001
+ depends on NSH_LIBRARY && NET
+ ---help---
+ Default router IP address (aka, Gateway). This is a 32-bit integer
+ value in host order. So, as an example, 0x10000001 would be 10.0.0.1.
- NOTE 2: This option forces the console of all sessions to use
- NSH_CONDEV. Hence, this option only makes sense for a system
- that supports only a single session. This option is, in
- particular, incompatible with Telnet sessions because each Telnet
- session must use a different console device.
+config NSH_NETMASK
+ hex "Network mask"
+ default 0xffffff00
+ depends on NSH_LIBRARY && NET
+ ---help---
+ Network mask. This is a 32-bit integer value in host order. So, as
+ an example, 0xffffff00 would be 255.255.255.0.
-endif # NSH_ALTCONDEV
+config NSH_DNS
+ bool "Use DNS"
+ default n
+ depends on NSH_LIBRARY && NETUTILS_DNSCLIENT
+ ---help---
+ Configure to use a DNS.
-config NSH_ARCHINIT
- bool "Have architecture-specific initialization"
+config NSH_DNSIPADDR
+ hex "DNS IP address"
+ default 0xa0000001
+ depends on NSH_DNS
+ ---help---
+ Configure the DNS address. This is a 32-bit integer value in host
+ order. So, as an example, 0xa0000001 would be 10.0.0.1.
+
+config NSH_NOMAC
+ bool "Hardware has no MAC address"
default n
+ depends on NSH_LIBRARY && NET
---help---
- Set if your board provides architecture specific initialization
- via the board-specific function nsh_archinitialize(). This
- function will be called early in NSH initialization to allow
- board logic to do such things as configure MMC/SD slots.
+ Set if your Ethernet hardware has no built-in MAC address.
+ If set, a bogus MAC will be assigned.
+
+if NSH_NOMAC
+
+choice
+ prompt "MAC address selection"
+ default NSH_SWMAC
+ ---help---
+ If the hardware as no MAC address, then NSH must assign an address
+ to the hardware before it brings the network up. This choice allows
+ you select the source of that MAC address.
+
+config NSH_SWMAC
+ bool "Fixed address"
+ ---help---
+ With this choice, you can assign a fixed MAC address determined by
+ a NuttX configuration option.
+
+config NSH_ARCHMAC
+ bool "Platform-specific"
+ ---help---
+ This selection will enable a call to an interface exported by
+ platform-specific code to determine the MAC address. If this option
+ is selected, the the platform-specific code must provide the
+ function nsh_arch_macaddress() that will be called by the NSH
+ initialize logic to obtain the MAC address.
+
+ This option might be useful, as an example, if MAC addresses are
+ retained in Serial FLASH. Such address might be assigned during the
+ manufacturing process so that each board has a unique MAC address.
+
+endchoice # MAC address selection
+
+config NSH_MACADDR
+ hex "Fixed MAC address"
+ default 0x00e0deadbeef
+ depends on NSH_SWMAC
+ ---help---
+ If the hardware has no built-in MAC address and if the NSH_SWMAC
+ option is selected, then the fixed, software-assigned MAC address
+ MAC address must provided with this selection.
+
+endif # NSH_NOMAC
+
+config NSH_MAX_ROUNDTRIP
+ int "Max Ping Round-Trip (DSEC)"
+ default 20
+ depends on NSH_LIBRARY && NET && !NSH_DISABLE_PING
+ ---help---
+ This is the maximum round trip for a response to a ICMP ECHO request.
+ It is in units of deciseconds. The default is 20 (2 seconds).
+
+endmenu # Networking Configuration"
+
+menu "Telnet Configuration"
+ depends on NETUTILS_TELNETD
config NSH_TELNET
bool "Use Telnet console"
@@ -778,8 +901,6 @@ config NSH_TELNET
you may log into NuttX remotely using telnet in order to
access NSH.
-endif # NSH_LIBRARY
-
if NSH_TELNET
config NSH_TELNETD_PORT
@@ -849,77 +970,5 @@ config NSH_TELNET_FAILCOUNT
endif # NSH_TELNET_LOGIN
endif # NSH_TELNET
-
-config NSH_DHCPC
- bool "Use DHCP to get IP address"
- default n
- depends on NSH_LIBRARY && NETUTILS_DHCPC
- ---help---
- Obtain the IP address via DHCP.
-
- Per RFC2131 (p. 9), the DHCP client must be prepared to receive DHCP
- messages of up to 576 bytes (excluding Ethernet, IP, or UDP headers and FCS).
-
-config NSH_IPADDR
- hex "Target IP address"
- default 0x0a000002
- depends on NSH_LIBRARY && NET && !NSH_DHCPC
- ---help---
- If NSH_DHCPC is NOT set, then the static IP address must be provided.
- This is a 32-bit integer value in host order. So, as an example,
- 0x10000002 would be 10.0.0.2.
-
-config NSH_DRIPADDR
- hex "Router IP address"
- default 0x0a000001
- depends on NSH_LIBRARY && NET
- ---help---
- Default router IP address (aka, Gateway). This is a 32-bit integer
- value in host order. So, as an example, 0x10000001 would be 10.0.0.1.
-
-config NSH_NETMASK
- hex "Network mask"
- default 0xffffff00
- depends on NSH_LIBRARY && NET
- ---help---
- Network mask. This is a 32-bit integer value in host order. So, as
- an example, 0xffffff00 would be 255.255.255.0.
-
-config NSH_DNS
- bool "Use DNS"
- default n
- depends on NSH_LIBRARY && NETUTILS_DNSCLIENT
- ---help---
- Configure to use a DNS.
-
-config NSH_DNSIPADDR
- hex "DNS IP address"
- default 0xa0000001
- depends on NSH_DNS
- ---help---
- Configure the DNS address. This is a 32-bit integer value in host
- order. So, as an example, 0xa0000001 would be 10.0.0.1.
-
-config NSH_NOMAC
- bool "Hardware has no MAC address"
- default n
- depends on NSH_LIBRARY && NET
- ---help---
- Set if your ethernet hardware has no built-in MAC address.
- If set, a bogus MAC will be assigned.
-
-config NSH_MACADDR
- hex "Software assigned MAC address"
- default 0x00e0deadbeef
- depends on NSH_NOMAC
- ---help---
- Use this option to specific the software-assigned MAC address
- to be used, in case the hardware has no built-in MAC address.
-
-config NSH_MAX_ROUNDTRIP
- int "Max Ping Round-Trip (DSEC)"
- default 20
- depends on NSH_LIBRARY && NET && !NSH_DISABLE_PING
- ---help---
- This is the maximum round trip for a response to a ICMP ECHO request.
- It is in units of deciseconds. The default is 20 (2 seconds).
+endmenu # Telnet Configuration
+endif # NSH_LIBRARY
diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h
index 4b33f4452..1b76c19af 100644
--- a/apps/nshlib/nsh.h
+++ b/apps/nshlib/nsh.h
@@ -126,6 +126,10 @@
# define CONFIG_NSH_MACADDR 0x00e0deadbeef
#endif
+#ifndef CONFIG_NET
+# undef CONFIG_NSH_ARCHMAC
+#endif
+
/* Telnetd requires networking support */
#ifndef CONFIG_NET
@@ -694,6 +698,10 @@ int nsh_archinitialize(void);
# define nsh_archinitialize() (-ENOSYS)
#endif
+#ifdef CONFIG_NSH_ARCHMAC
+int nsh_arch_macaddress(uint8_t *mac);
+#endif
+
/* Basic session and message handling */
struct console_stdio_s;
diff --git a/apps/nshlib/nsh_netinit.c b/apps/nshlib/nsh_netinit.c
index d3340a0fc..c4e83d7e6 100644
--- a/apps/nshlib/nsh_netinit.c
+++ b/apps/nshlib/nsh_netinit.c
@@ -108,23 +108,35 @@
int nsh_netinit(void)
{
- struct in_addr addr;
+ struct in_addr addr;
#if defined(CONFIG_NSH_DHCPC)
- FAR void *handle;
+ FAR void *handle;
#endif
#if (defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_NOMAC)) && !defined(CONFIG_NET_SLIP)
- uint8_t mac[IFHWADDRLEN];
+ uint8_t mac[IFHWADDRLEN];
#endif
-/* Many embedded network interfaces must have a software assigned MAC */
+ /* Many embedded network interfaces must have a software assigned MAC */
#if defined(CONFIG_NSH_NOMAC) && !defined(CONFIG_NET_SLIP)
+#ifdef CONFIG_NSH_ARCHMAC
+ /* Let platform-specific logic assign the MAC address. */
+
+ (void)nsh_arch_macaddress(mac);
+
+#else
+ /* Use the configured, fixed MAC address */
+
mac[0] = (CONFIG_NSH_MACADDR >> (8 * 5)) & 0xff;
mac[1] = (CONFIG_NSH_MACADDR >> (8 * 4)) & 0xff;
mac[2] = (CONFIG_NSH_MACADDR >> (8 * 3)) & 0xff;
mac[3] = (CONFIG_NSH_MACADDR >> (8 * 2)) & 0xff;
mac[4] = (CONFIG_NSH_MACADDR >> (8 * 1)) & 0xff;
mac[5] = (CONFIG_NSH_MACADDR >> (8 * 0)) & 0xff;
+#endif
+
+ /* Set the MAC address */
+
netlib_setmacaddr(NET_DEVNAME, mac);
#endif