summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/bsd/bsd.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-21 14:24:38 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-21 15:00:19 +0100
commit8cdd1420c703246d1a360ff964cd8b7f4f6307bd (patch)
tree65163ebe7b59fbaf2a1a7e211a14112974ff6500 /rtemsbsd/include/rtems/bsd/bsd.h
parentZONE(9): Honor cache alignment (diff)
downloadrtems-libbsd-8cdd1420c703246d1a360ff964cd8b7f4f6307bd.tar.bz2
Add rtems_bsd_get_mac_address()
Diffstat (limited to 'rtemsbsd/include/rtems/bsd/bsd.h')
-rw-r--r--rtemsbsd/include/rtems/bsd/bsd.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/rtemsbsd/include/rtems/bsd/bsd.h b/rtemsbsd/include/rtems/bsd/bsd.h
index 2e161e97..38247a83 100644
--- a/rtemsbsd/include/rtems/bsd/bsd.h
+++ b/rtemsbsd/include/rtems/bsd/bsd.h
@@ -103,6 +103,26 @@ rtems_task_priority rtems_bsd_get_task_priority(const char *name);
*/
size_t rtems_bsd_get_task_stack_size(const char *name);
+/**
+ * @brief Returns the Ethernet MAC address for a specified device.
+ *
+ * Applications may provide their own implementation of this function. For
+ * example they can define their implementation in the same module which calls
+ * rtems_bsd_initialize().
+ *
+ * The default implementation returns
+ * { 0x0e, 0xb0, 0xba, 0x5e, 0xba, 0x11 + unit }.
+ *
+ * This is a workaround. A better approach would be to use a device tree and a
+ * bus device similar to the FreeBSD SIMPLEBUS(4).
+ *
+ * @param[in] name The device name.
+ * @param[in] unit The device unit.
+ * @param[out] mac_addr The Ethernet MAC address.
+ */
+void rtems_bsd_get_mac_address(const char *name, int unit,
+ uint8_t mac_addr[6]);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */