diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-06-06 11:14:21 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-06-07 13:02:20 +0200 |
commit | d4ab0aef967e8d9fc0891d4232284ccefbc05fc6 (patch) | |
tree | 77de719f183bf1bf32f6f489dc81eaee208b69c4 /cpukit/libnetworking/rtems/rtems_bsdnet.h | |
parent | network: Include <sys/uio.h> explicitly (diff) | |
download | rtems-d4ab0aef967e8d9fc0891d4232284ccefbc05fc6.tar.bz2 |
network: Move RTEMS specifics
Move RTEMS specifics to <rtems/rtems_bsdnet.h>.
Introduce rtems_tap_ifreq. The interface tap support is RTEMS-specific
and only available in the legacy network stack.
Update #2833.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libnetworking/rtems/rtems_bsdnet.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet.h b/cpukit/libnetworking/rtems/rtems_bsdnet.h index 80886ec736..a97c058f78 100644 --- a/cpukit/libnetworking/rtems/rtems_bsdnet.h +++ b/cpukit/libnetworking/rtems/rtems_bsdnet.h @@ -6,13 +6,16 @@ #ifndef _RTEMS_BSDNET_H #define _RTEMS_BSDNET_H +#include <rtems.h> +#include <sys/cpuset.h> +#include <sys/ioccom.h> +#include <sys/socket.h> +#include <net/if.h> + #ifdef __cplusplus extern "C" { #endif -#include <rtems.h> -#include <sys/cpuset.h> - /* * If this file is included from inside the Network Stack proper or * a device driver, then __INSIDE_RTEMS_BSD_TCPIP_STACK__ should be @@ -325,6 +328,25 @@ void* rtems_bsdnet_malloc_mbuf(size_t size, int type); #define SO_SNDWAKEUP 0x1020 /* wakeup when ready to send */ #define SO_RCVWAKEUP 0x1021 /* wakeup when ready to receive */ +/* + * RTEMS additions for setting/getting `tap' function on incoming packets. + */ +struct ifnet; +struct ether_header; +struct mbuf; +struct rtems_tap_ifreq { + char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ + int (*ifr_tap)(struct ifnet *, struct ether_header *, struct mbuf *); +}; +#define SIOCSIFTAP _IOW('i', 88, struct rtems_tap_ifreq) /* set tap function */ +#define SIOCGIFTAP _IOW('i', 89, struct rtems_tap_ifreq) /* get tap function */ + +#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */ +#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */ +#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */ +#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */ +#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */ + struct socket; struct sockwakeup { |