Changeset 8cdd142 in rtems-libbsd


Ignore:
Timestamp:
Jan 21, 2015, 1:24:38 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
b8e0c66
Parents:
eebe576
git-author:
Sebastian Huber <sebastian.huber@…> (01/21/15 13:24:38)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/21/15 14:00:19)
Message:

Add rtems_bsd_get_mac_address()

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    reebe576 r8cdd142  
    7272LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-get-ethernet-addr.c
    7373LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-get-file.c
     74LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-get-mac-address.c
    7475LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-get-task-priority.c
    7576LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-get-task-stack-size.c
  • freebsd-to-rtems.py

    reebe576 r8cdd142  
    670670                'rtems/rtems-bsd-get-ethernet-addr.c',
    671671                'rtems/rtems-bsd-get-file.c',
     672                'rtems/rtems-bsd-get-mac-address.c',
    672673                'rtems/rtems-bsd-get-task-priority.c',
    673674                'rtems/rtems-bsd-get-task-stack-size.c',
  • rtemsbsd/include/rtems/bsd/bsd.h

    reebe576 r8cdd142  
    104104size_t rtems_bsd_get_task_stack_size(const char *name);
    105105
     106/**
     107 * @brief Returns the Ethernet MAC address for a specified device.
     108 *
     109 * Applications may provide their own implementation of this function.  For
     110 * example they can define their implementation in the same module which calls
     111 * rtems_bsd_initialize().
     112 *
     113 * The default implementation returns
     114 * { 0x0e, 0xb0, 0xba, 0x5e, 0xba, 0x11 + unit }.
     115 *
     116 * This is a workaround.  A better approach would be to use a device tree and a
     117 * bus device similar to the FreeBSD SIMPLEBUS(4).
     118 *
     119 * @param[in] name The device name.
     120 * @param[in] unit The device unit.
     121 * @param[out] mac_addr The Ethernet MAC address.
     122 */
     123void rtems_bsd_get_mac_address(const char *name, int unit,
     124    uint8_t mac_addr[6]);
     125
    106126#ifdef __cplusplus
    107127}
Note: See TracChangeset for help on using the changeset viewer.