Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
emulab-devel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emmanuel Cecchet
emulab-devel
Commits
d382afb8
Commit
d382afb8
authored
15 years ago
by
David Johnson
Browse files
Options
Downloads
Patches
Plain Diff
Fixup some of this pcap and pthread stuff, and don't build nfsdump on
linux.
parent
1756fefb
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sensors/nfstrace/GNUmakefile.in
+9
-1
9 additions, 1 deletion
sensors/nfstrace/GNUmakefile.in
sensors/nfstrace/nfsdump2/Makefile.in
+14
-3
14 additions, 3 deletions
sensors/nfstrace/nfsdump2/Makefile.in
sensors/nfstrace/nfsdump2/mypcap.c
+19
-0
19 additions, 0 deletions
sensors/nfstrace/nfsdump2/mypcap.c
with
42 additions
and
4 deletions
sensors/nfstrace/GNUmakefile.in
+
9
−
1
View file @
d382afb8
...
@@ -13,9 +13,17 @@ SUBDIR = sensors/nfstrace
...
@@ -13,9 +13,17 @@ SUBDIR = sensors/nfstrace
NFSTRACESUPPORT = @NFSTRACESUPPORT@
NFSTRACESUPPORT = @NFSTRACESUPPORT@
SYSTEM = $(shell uname -s)
STUFF = nfstrace.proxy nfsdump2db nfsdump nfstrace.init
# XXX ugh, but we don't use this and nfsdump won't compile on linux
ifeq ($(SYSTEM),Linux)
STUFF = nfstrace.proxy nfsdump2db nfstrace.init
endif
include $(OBJDIR)/Makeconf
include $(OBJDIR)/Makeconf
all:
nfstrace.proxy nfsdump2db nfsdump nfstrace.init
all:
$(STUFF)
include $(TESTBED_SRCDIR)/GNUmakerules
include $(TESTBED_SRCDIR)/GNUmakerules
...
...
This diff is collapsed.
Click to expand it.
sensors/nfstrace/nfsdump2/Makefile.in
+
14
−
3
View file @
d382afb8
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
#
# @(#) $Header: /home/cvs_mirrors/cvs-public.flux.utah.edu/CVS/testbed/sensors/nfstrace/nfsdump2/Makefile.in,v 1.2
2006-02-02 16:16:17 stack
Exp $ (LBL)
# @(#) $Header: /home/cvs_mirrors/cvs-public.flux.utah.edu/CVS/testbed/sensors/nfstrace/nfsdump2/Makefile.in,v 1.2
.18.1 2009-11-06 00:00:57 johnsond
Exp $ (LBL)
#
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
# Various configurable paths (remember to edit Makefile.in, not Makefile)
...
@@ -37,12 +37,23 @@ CCOPT = @V_CCOPT@
...
@@ -37,12 +37,23 @@ CCOPT = @V_CCOPT@
INCLS
=
-I
.
@V_INCLS@
INCLS
=
-I
.
@V_INCLS@
DEFS
=
@DEFS@
DEFS
=
@DEFS@
SYSTEM
=
$(
shell
uname
-s
)
# Standard CFLAGS
# Standard CFLAGS
CFLAGS
=
$(
CCOPT
)
$(
DEFS
)
$(
INCLS
)
-g
-I
/usr/local/include/pthread
-I
/usr/local/include/pthread/linuxthreads
CFLAGS
=
$(
CCOPT
)
$(
DEFS
)
$(
INCLS
)
-g
ifneq
($(SYSTEM),Linux)
CFLAGS
+=
-I
/usr/local/include/pthread
-I
/usr/local/include/pthread/linuxthreads
endif
# Standard LDFLAGS
# Standard LDFLAGS
#LDFLAGS = @LDFLAGS@ -pthread
#LDFLAGS = @LDFLAGS@ -pthread
LDFLAGS
=
@LDFLAGS@
-L
/usr/local/lib
-llthread
-llgcc_r
LDFLAGS
=
@LDFLAGS@
ifneq
($(SYSTEM),Linux)
LDFLAGS
+=
-L
/usr/local/lib
-llthread
-llgcc_r
else
LDFLAGS
+=
-lpthread
endif
# Standard LIBS
# Standard LIBS
LIBS
=
@LIBS@
LIBS
=
@LIBS@
...
...
This diff is collapsed.
Click to expand it.
sensors/nfstrace/nfsdump2/mypcap.c
+
19
−
0
View file @
d382afb8
...
@@ -3,8 +3,16 @@
...
@@ -3,8 +3,16 @@
#include
<errno.h>
#include
<errno.h>
#include
<stdlib.h>
#include
<stdlib.h>
#ifdef __linux__
#include
<unistd.h>
#include
<pthread.h>
#include
<pcap.h>
#include
<pcap-int.h>
#include
<pcap-bpf.h>
#else
#include
<linuxthreads/pthread.h>
#include
<linuxthreads/pthread.h>
#include
<pcap-int.h>
#include
<pcap-int.h>
#endif
#include
"listNode.h"
#include
"listNode.h"
...
@@ -122,12 +130,23 @@ int mypcap_read(pcap_t *pd, void *user)
...
@@ -122,12 +130,23 @@ int mypcap_read(pcap_t *pd, void *user)
/*
/*
* Loop through each packet.
* Loop through each packet.
*/
*/
#ifdef __linux__
#define BPF_ALIGNMENT sizeof(long)
#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
#define bhp ((struct pcap_pkthdr *)bp)
#else
#define bhp ((struct bpf_hdr *)bp)
#define bhp ((struct bpf_hdr *)bp)
#endif
ep
=
bp
+
cc
;
ep
=
bp
+
cc
;
while
(
bp
<
ep
)
{
while
(
bp
<
ep
)
{
register
int
caplen
,
hdrlen
;
register
int
caplen
,
hdrlen
;
#ifdef __linux__
caplen
=
bhp
->
caplen
;
hdrlen
=
bhp
->
len
;
#else
caplen
=
bhp
->
bh_caplen
;
caplen
=
bhp
->
bh_caplen
;
hdrlen
=
bhp
->
bh_hdrlen
;
hdrlen
=
bhp
->
bh_hdrlen
;
#endif
/*
/*
* XXX A bpf_hdr matches a pcap_pkthdr.
* XXX A bpf_hdr matches a pcap_pkthdr.
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment