Commit 735c7a2c authored by Ryan Jackson's avatar Ryan Jackson
Browse files

Fixed compile problems with last commit

parent 2880e1e1
......@@ -2,13 +2,13 @@
#ifdef FREEBSD
#include "lib.hh"
#include "DummynetPipe.hh"
extern "C"
{
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/param.h>
#include <sys/mbuf.h>
#include <unistd.h>
/*
#include <netinet/ip_compat.h>
#include <netinet/in.h>
......@@ -31,6 +31,10 @@ extern "C"
#include <arpa/inet.h>
}
#include "lib.hh"
#include "DummynetPipe.hh"
#if __FreeBSD_version >= 601000
#define DN_PIPE_NEXT(p) ((p)->next.sle_next)
#else
......@@ -57,7 +61,7 @@ DummynetPipe::~DummynetPipe()
void DummynetPipe::reset(void)
{
cahr *data;
char *data;
struct dn_pipe *pipe;
data = getAllPipes();
......@@ -121,7 +125,7 @@ void DummynetPipe::resetParameter(Parameter const & newParameter)
setPipe(pipe);
}
char * callGetsockopt(char * data, size_t * count)
char * DummynetPipe::callGetsockopt(char * data, size_t * count)
{
if (getsockopt(dummynetSocket, IPPROTO_IP, IP_DUMMYNET_GET,
data, count) < 0)
......@@ -157,7 +161,7 @@ struct dn_pipe * DummynetPipe::findPipe(char *data)
pipe = NULL;
p = (struct dn_pipe *) data;
while ( DN_PIPE_NEXT(p) == (struct dn_pipe *)DN_IS_PIPE ) {
while ( DN_PIPE_NEXT(p) == (struct dn_pipe *)DN_IS_PIPE )
{
if (dummynetPipeNumber == p->pipe_nr) {
pipe = p;
......
......@@ -15,6 +15,7 @@ public:
virtual void reset(void);
virtual void resetParameter(Parameter const & newParameter);
private:
char * callGetsockopt(char * data, size_t * count);
void updateParameter(struct dn_pipe *pipe, Parameter const & parameter);
void setPipe(struct dn_pipe *pipe);
char * getAllPipes(void);
......
......@@ -2,7 +2,8 @@
all: delay-agent
OBJS := $(wildcard *.o)
SRCS := $(wildcard *.cc)
OBJS := $(SRCS:%.cc=%.o)
LIBS = -lcrypto -lpubsub
CXXFLAGS = -DELVIN_COMPAT -Wall -I../../lib/ -I../../../../
......
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