[netperf-talk] Netperf compilation problems
Rick Jones
rick.jones2 at hp.com
Tue Aug 3 10:25:03 PDT 2010
Tim Schneider wrote:
> Hello,
>
> I'm currently working on my Bachelor's Thesis where I'm trying to compare
> different Transportprotocolls in a Wireless-Mesh-Network. When I searched for
> Testsoftware, I found Netperf to be suitable for my needs. But, when I tried
> to use it, it didn't work right away...
>
> First I had some compilation problems. Compiling just standard Netperf works
> fine, but once I add SCTP, omni or DCCP, I get errors.
>
> When I add --enable-omni or --enable-sctp, I get an error saying:
>
> netlib.c: In function ‘inet_ptos’:
> netlib.c:518: error: ‘IPPROTO_SCTP’ undeclared (first use in this function)
> netlib.c:518: error: (Each undeclared identifier is reported only once
> netlib.c:518: error: for each function it appears in.)
>
My top-of-trunk ntlib.c has this:
break;
#if defined(IPPROTO_SCTP)
case IPPROTO_SCTP:
return("IPPROTO_SCTP");
break;
#endif
the use of IPPROTO_SCTP is protected under an #if defined, so if it didn't
really exist I would have expected that code to not be seen after pre-processing.
> When I add --enable-DCCP, I get the above error above and a warning
>
> In file included from netlib.c:174:
> netsh.h:57:2: warning: #warning This platform is missing one of sock_dccp ipproto_dccp or sol_dccp
>
That comes from there not being a "proper" define found for one or more of those:
/* include netinet/in.h to see if SOCK_DCCP and IPPROTO_DCCP are there */
#include <netinet/in.h>
#ifndef SOCK_DCCP
#define DCCP_WARNING
#define SOCK_DCCP 6
#endif
#ifndef IPPROTO_DCCP
#define DCCP_WARNING
#define IPPROTO_DCCP 33 /* defined by the IANA */
#endif
#ifndef SOL_DCCP
#define DCCP_WARNING
#define SOL_DCCP 269
#endif
#ifdef DCCP_WARNING
#warning This platform is missing one of sock_dccp ipproto_dccp or sol_dccp
#endif
and netperf warning that it is ass-u-me-ing about the values.
> I was able to work around this problem, by adding the line
>
> #define IPPROTO_SCTP 132
>
> to netlib.h, but this is a rather ugly workaround.
>
> Am I doing anything wrong here? Is my system missing something?
Possibly, but then perhaps netperf has :)
Are you sure the "dev" environment for SCTP is installed on the system
> I am trying to compile on a x86 Laptop with Ubuntu 10.04 installed. The
> Kernelversion is 2.6.32-22.
During compilation, what netperf cares more about is what include files it
finds. FWIW, I happen to have a 10.04 laptop on which ./configure --enable-omni
and/or --enable-sctp results in a clean compilation using the top-of-trunk. And
I can confirm that the #if defined(IPPROTO_SCTP) code in netlib.c was being
compiled-in.
happy benchmarking,
rick jones
>
> I would be glad about any hints about what could be wrong.
>
> I also have some testing Problems but I'll address those in another e-mail,
> since the topics aren't really related.
>
> Thank you,
>
> Tim Schneider
>
> _______________________________________________
> netperf-talk mailing list
> netperf-talk at netperf.org
> http://www.netperf.org/cgi-bin/mailman/listinfo/netperf-talk
More information about the netperf-talk
mailing list