Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
735c7a2c
Commit
735c7a2c
authored
Apr 03, 2008
by
Ryan Jackson
Browse files
Fixed compile problems with last commit
parent
2880e1e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
event/delay-agent/new/DummynetPipe.cc
View file @
735c7a2c
...
...
@@ -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
)
{
c
a
hr
*
data
;
ch
a
r
*
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
;
...
...
event/delay-agent/new/DummynetPipe.hh
View file @
735c7a2c
...
...
@@ -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
);
...
...
event/delay-agent/new/Makefile
View file @
735c7a2c
...
...
@@ -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
../../../../
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment