mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
moved incomplete interface configuration via RT-LAB to seperate branch
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@181 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
536ad5db05
commit
aaf17ffee7
4 changed files with 1 additions and 41 deletions
|
@ -1,13 +0,0 @@
|
|||
/** OPAL Interface setup
|
||||
*
|
||||
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
||||
* @copyright 2014, Institute for Automation of Complex Power Systems, EONERC
|
||||
* @file
|
||||
*/
|
||||
|
||||
#ifndef _INTERFACE_H_
|
||||
#define _INTERFACE_H_
|
||||
|
||||
int if_setup(const char *op, const char *iface, const char *addr);
|
||||
|
||||
#endif /* _INTERFACE_H_ */
|
|
@ -51,7 +51,7 @@ INCLUDES = -I.
|
|||
LIBPATH = -L.
|
||||
CC_OPTS =
|
||||
LD_OPTS =
|
||||
OBJS = ${PROGRAM}.o Sched.o Interface.o Socket.o
|
||||
OBJS = s2ss.o msg.o sched.o socket.o
|
||||
|
||||
ADDLIB = -lOpalCore -lOpalUtils
|
||||
LIBS = -lOpalAsyncApiCore $(ADDLIB) $(TARGET_LIB)
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
/** OPAL Interface setup
|
||||
*
|
||||
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
||||
* @copyright 2014, Institute for Automation of Complex Power Systems, EONERC
|
||||
* @file
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "interface.h"
|
||||
|
||||
int if_setup(const char *op, const char *iface, const char *addr)
|
||||
{
|
||||
char cmd[256];
|
||||
|
||||
/* Setup remote address */
|
||||
snprintf(cmd, 256, "ip addr %s %s/32 dev %s", op, addr, iface);
|
||||
if (system(cmd))
|
||||
OpalPrint("Failed to add local address to interface");
|
||||
|
||||
/* Setup route for single IP address */
|
||||
snprintf(cmd, 256, "ip route %s %s/32 dev %s", op, addr, iface);
|
||||
if (system(cmd))
|
||||
OpalPrint("Failed to add route for remote address");
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -41,7 +41,6 @@
|
|||
#include "config.h"
|
||||
#include "msg.h"
|
||||
#include "socket.h"
|
||||
#include "interface.h"
|
||||
|
||||
/* This is just for initializing the shared memory access to communicate
|
||||
* with the RT-LAB model. It's easier to remember the arguments like this */
|
||||
|
|
Loading…
Add table
Reference in a new issue