Changeset b2eb48c in rtems-libbsd for rtemsbsd/include/rtems/dhcpcd.h


Ignore:
Timestamp:
May 2, 2018, 7:01:32 AM (18 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
c1e05b9ea378b2971e3d7704779112b4bc4296da, 4a77611a223ea883fb548679b516d326a020d447
Children:
e1d62e8
Parents:
8bd38d6
git-author:
Sebastian Huber <sebastian.huber@…> (05/02/18 07:01:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/08/18 05:37:17)
Message:

dhcpcd: Add hooks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/include/rtems/dhcpcd.h

    r8bd38d6 rb2eb48c  
    4141#define _RTEMS_DHCPCD_H_
    4242
     43#include <sys/cdefs.h>
     44#include <sys/queue.h>
     45
    4346#include <rtems.h>
    4447
     
    7679rtems_status_code rtems_dhcpcd_start(const rtems_dhcpcd_config *config);
    7780
     81typedef struct rtems_dhcpcd_hook {
     82        SLIST_ENTRY(rtems_dhcpcd_hook) node;
     83        const char *name;
     84        void (*handler)(struct rtems_dhcpcd_hook *hook, char *const *env);
     85} rtems_dhcpcd_hook;
     86
     87/**
     88 * @brief Adds a DHCP client hook.
     89 *
     90 * The hook handler is invoked with an environment list (NULL terminated) of
     91 * strings ('\0' terminated).  Each string of the environment list has usually
     92 * the format "key=value", e.g. "interface=eth0", "reason=BOUND".
     93 *
     94 * The hook handler are called by the DHCP client task.  It is safe to
     95 * add/remove hooks in the hook handler.
     96 */
     97void rtems_dhcpcd_add_hook(rtems_dhcpcd_hook *hook);
     98
     99/**
     100 * @brief Removes a DHCP client hook.
     101 */
     102void rtems_dhcpcd_remove_hook(rtems_dhcpcd_hook *hook);
     103
    78104/** @} */
    79105
Note: See TracChangeset for help on using the changeset viewer.