Commit e8178c98 authored by Sebastian Smolorz's avatar Sebastian Smolorz Committed by Philippe Gerum

net: Split internal rtnet.h and install rtdm/net.h and rtdm/uapi/net.h

For external projects wanting to use RTnet with its special
features like RTnet IOCTLs it is necessary to provide the API
headers in the Xenomai installation directory.
parent 630f0a33
/*
* RTnet - real-time networking subsystem
* Copyright (C) 2005-2011 Jan Kiszka <jan.kiszka@web.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _COBALT_RTDM_NET_H
#define _COBALT_RTDM_NET_H
#include <rtdm/rtdm.h>
#include <rtdm/uapi/net.h>
#include <rtdm/driver.h>
struct rtnet_callback {
void (*func)(struct rtdm_fd *, void *);
void *arg;
};
#define RTNET_RTIOC_CALLBACK _IOW(RTIOC_TYPE_NETWORK, 0x12, \
struct rtnet_callback)
/* utility functions */
/* provided by rt_ipv4 */
unsigned long rt_inet_aton(const char *ip);
/* provided by rt_packet */
int rt_eth_aton(unsigned char *addr_buf, const char *mac);
#define RTNET_RTDM_VER 914
#endif /* _COBALT_RTDM_NET_H */
......@@ -10,6 +10,7 @@ includesub_HEADERS += \
gpio.h \
gpiopwm.h \
ipc.h \
net.h \
serial.h \
spi.h \
testing.h \
......
/***
*
* rtdm/net.h
*
* RTnet - real-time networking subsystem
* Copyright (C) 2005-2011 Jan Kiszka <jan.kiszka@web.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* As a special exception to the GNU General Public license, the RTnet
* project allows you to use this header file in unmodified form to produce
* application programs executing in user-space which use RTnet services by
* normal system calls. The resulting executable will not be covered by the
* GNU General Public License merely as a result of this header file use.
* Instead, this header file use will be considered normal use of RTnet and
* not a "derived work" in the sense of the GNU General Public License.
*
*/
#ifndef _RTDM_NET_H
#define _RTDM_NET_H
#include <rtdm/rtdm.h>
#include <rtdm/uapi/net.h>
#endif /* !_RTDM_NET_H */
......@@ -10,6 +10,7 @@ includesub_HEADERS += \
gpio.h \
gpiopwm.h \
ipc.h \
net.h \
serial.h \
spi.h \
testing.h \
......
/***
*
* rtnet.h
*
* RTnet - real-time networking subsystem
* Copyright (C) 2005-2011 Jan Kiszka <jan.kiszka@web.de>
......@@ -39,27 +37,8 @@
*
*/
#ifndef __RTNET_H_
#define __RTNET_H_
#include <rtdm/rtdm.h>
/* RTDM_API_VER < 5 is lacking generic time types */
#if !(defined RTDM_API_VER) || (RTDM_API_VER < 5)
#ifndef __KERNEL__
#include <stdint.h>
#endif /* !__KERNEL__ */
typedef uint64_t nanosecs_abs_t;
typedef int64_t nanosecs_rel_t;
#define RTDM_TIMEOUT_INFINITE 0
#define RTDM_TIMEOUT_NONE (-1)
#endif /* !RTDM_API_VER */
#ifndef _RTDM_UAPI_NET_H
#define _RTDM_UAPI_NET_H
/* sub-classes: RTDM_CLASS_NETWORK */
#define RTDM_SUBCLASS_RTNET 0
......@@ -93,29 +72,4 @@ typedef int64_t nanosecs_rel_t;
/* argument construction for RTNET_RTIOC_XMITPARAMS */
#define SOCK_XMIT_PARAMS(priority, channel) ((priority) | ((channel) << 16))
#ifdef __KERNEL__
#include <rtdm/driver.h>
struct rtnet_callback {
void (*func)(struct rtdm_fd *, void *);
void *arg;
};
#define RTNET_RTIOC_CALLBACK _IOW(RTIOC_TYPE_NETWORK, 0x12, \
struct rtnet_callback)
/* utility functions */
/* provided by rt_ipv4 */
unsigned long rt_inet_aton(const char *ip);
/* provided by rt_packet */
int rt_eth_aton(unsigned char *addr_buf, const char *mac);
#define RTNET_RTDM_VER 914
#endif /* __KERNEL__ */
#endif /* __RTNET_H_ */
#endif /* !_RTDM_UAPI_NET_H */
......@@ -34,7 +34,7 @@
#include <linux/of_net.h>
#include <rtdev.h>
#include <rtnet.h>
#include <rtdm/net.h>
#include <rtnet_port.h>
#include <rtskb.h>
#include "rt_macb.h"
......
......@@ -36,7 +36,7 @@
#include <linux/pinctrl/consumer.h>
#include <rtdev.h>
#include <rtnet.h>
#include <rtdm/net.h>
#include <rtnet_port.h>
#include <rtskb.h>
......
......@@ -44,8 +44,6 @@
#include <rtdm/rtdm.h>
#include <rtnet.h> /* for nanosecs wrapping */
/* sub-classes: RTDM_CLASS_RTMAC */
#define RTDM_SUBCLASS_TDMA 0
......
......@@ -31,12 +31,10 @@
#include <linux/list.h>
#include <rtdev.h>
#include <rtnet.h>
#include <rtdm/net.h>
#include <rtdm/driver.h>
#include <stack_mgr.h>
#include <rtdm/driver.h>
struct rtsocket {
unsigned short protocol;
......
......@@ -29,7 +29,7 @@
#include <linux/skbuff.h>
#include <rtnet.h>
#include <rtdm/net.h>
#include <rtnet_internal.h>
......
......@@ -23,7 +23,7 @@
#define __TIMERWHEEL_H_
#include <linux/list.h>
#include <rtnet.h>
#include <rtdm/net.h>
#define TIMERWHEEL_TIMER_UNUSED -1
......
......@@ -23,7 +23,7 @@
#include <linux/netdevice.h>
#include <rtdev.h>
#include <rtnet.h>
#include <rtdm/net.h>
#include <rtnet_internal.h>
/***
......
......@@ -32,7 +32,7 @@
#include <linux/tcp.h>
#include <asm/bitops.h>
#include <rtnet.h>
#include <rtdm/net.h>
#include <rtnet_internal.h>
#include <rtnet_iovec.h>
#include <rtnet_socket.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment