Changeset c50f1b4 in rtems-libbsd


Ignore:
Timestamp:
Jan 20, 2014, 12:09:13 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
c4ee445
Parents:
c1bdbab
git-author:
Sebastian Huber <sebastian.huber@…> (01/20/14 12:09:13)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/30/14 14:04:19)
Message:

Add rtems_bsd_get_ethernet_addr()

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rc1bdbab rc50f1b4  
    6161LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-conf.c
    6262LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-delay.c
     63LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-get-ethernet-addr.c
    6364LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-get-file.c
    6465LIB_C_FILES += rtemsbsd/rtems/rtems-bsd-init.c
  • freebsd-to-rtems.py

    rc1bdbab rc50f1b4  
    648648                'rtems/rtems-bsd-conf.c',
    649649                'rtems/rtems-bsd-delay.c',
     650                'rtems/rtems-bsd-get-ethernet-addr.c',
    650651                'rtems/rtems-bsd-get-file.c',
    651652                'rtems/rtems-bsd-init.c',
  • rtemsbsd/include/rtems/bsd/util.h

    rc1bdbab rc50f1b4  
    3333#define _RTEMS_BSD_UTIL_H_
    3434
     35#include <sys/types.h>
     36
     37#include <net/ethernet.h>
     38
     39#include <stdint.h>
     40
    3541#ifdef __cplusplus
    3642extern "C" {
    3743#endif /* __cplusplus */
     44
     45/**
     46 * @brief Gets the Ethernet address of an interface identified by its name.
     47 *
     48 * This function uses getifaddrs().  The interface type is not checked, so it
     49 * is only safe to use this function for Ethernet type interfaces.
     50 *
     51 * @param[in] ifname The name of the interface.
     52 * @parma[out] eaddr The Ethernet address of this interface.
     53 *
     54 * @retval 0 Successful operation.
     55 * @retval -1 An error occurred.  The errno is set to indicate the error.
     56 */
     57int
     58rtems_bsd_get_ethernet_addr(const char *ifname, uint8_t eaddr[ETHER_ADDR_LEN]);
    3859
    3960#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.