1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

netem: fix defines and includes

This commit is contained in:
Steffen Vogel 2019-01-21 22:14:41 +01:00
parent b6b6e8dfb6
commit 4533e0ab12
5 changed files with 24 additions and 9 deletions

View file

@ -38,15 +38,19 @@
#include <villas/queue.h>
#include <villas/common.h>
#if defined(LIBNL3_ROUTE_FOUND) && defined(__linux__)
#define WITH_NETEM
#endif /* LIBNL3_ROUTE_FOUND */
#ifdef __cplusplus
extern "C" {
#endif
/* Forward declarations */
#ifdef __linux__
#ifdef WITH_NETEM
struct rtnl_qdisc;
struct rtnl_cls;
#endif /* __linux__ */
#endif /* WITH_NETEM */
struct node_direction {
int enabled;
@ -82,12 +86,12 @@ struct node
struct vlist signals; /**< Signal meta data for data which is __received__ by node_read(). */
#ifdef __linux__
#ifdef WITH_NETEM
int mark; /**< Socket mark for netem, routing and filtering */
struct rtnl_qdisc *tc_qdisc; /**< libnl3: Network emulator queuing discipline */
struct rtnl_cls *tc_classifier; /**< libnl3: Firewall mark classifier */
#endif /* __linux__ */
#endif /* WITH_NETEM */
struct node_type *_vt; /**< Virtual functions (C++ OOP style) */
void *_vd; /**< Virtual data (used by struct node::_vt functions) */

View file

@ -38,11 +38,6 @@
#include <villas/io.h>
#if defined(LIBNL3_ROUTE_FOUND) && defined(__linux__)
#include <villas/kernel/if.h>
#include <villas/kernel/nl.h>
#include <villas/kernel/tc.h>
#define WITH_NETEM
#define WITH_SOCKET_LAYER_ETH
#include <linux/if_packet.h>

View file

@ -33,6 +33,13 @@
#include <villas/signal.h>
#include <villas/memory.h>
#ifdef WITH_NETEM
#include <villas/kernel/if.h>
#include <villas/kernel/nl.h>
#include <villas/kernel/tc.h>
#include <villas/kernel/tc_netem.h>
#endif /* WITH_NETEM */
static int node_direction_init2(struct node_direction *nd, struct node *n)
{
#ifdef WITH_HOOKS

View file

@ -45,6 +45,10 @@
#include <villas/format_type.h>
#include <villas/super_node.h>
#ifdef WITH_NETEM
#include <villas/kernel/if.h>
#endif /* WITH_NETEM */
static pthread_t re_pthread;
/* Forward declartions */

View file

@ -42,6 +42,11 @@
#include <netinet/ether.h>
#endif /* WITH_SOCKET_LAYER_ETH */
#ifdef WITH_NETEM
#include <villas/kernel/if.h>
#include <villas/kernel/nl.h>
#endif /* WITH_NETEM */
/* Forward declartions */
static struct plugin p;