[netperf-dev] netperf2 commit notice r373 - trunk/src
raj at netperf.org
raj at netperf.org
Mon Dec 20 16:05:00 PST 2010
Author: raj
Date: 2010-12-20 16:05:00 -0800 (Mon, 20 Dec 2010)
New Revision: 373
Modified:
trunk/src/netsh.c
trunk/src/netsh.h
trunk/src/nettest_omni.c
Log:
teach netsh about the NETPERF_mumble direction defines
Modified: trunk/src/netsh.c
===================================================================
--- trunk/src/netsh.c 2010-12-20 23:43:26 UTC (rev 372)
+++ trunk/src/netsh.c 2010-12-21 00:05:00 UTC (rev 373)
@@ -469,18 +469,16 @@
(strcasecmp(arg1,"send") == 0) ||
(strcasecmp(arg1,"stream") == 0) ||
(strcasecmp(arg1,"transmit") == 0)) {
- /* yes, a magic number - we need to make NETPERF_XMIT known to
- netsh */
- left = 0x2;
+ left = NETPERF_XMIT;
}
else if ((strcasecmp(arg1,"recv") == 0) ||
(strcasecmp(arg1,"receive") == 0) ||
(strcasecmp(arg1,"maerts") == 0)) {
/* yes, another magic number... */
- left = 0x4;
+ left = NETPERF_RECV;
}
else if (strcasecmp(arg1,"rr") == 0) {
- left = 0x6;
+ left = NETPERF_XMIT|NETPERF_RECV;
}
else {
/* we now "ass-u-me" it is a number that can be parsed by strtol()
Modified: trunk/src/netsh.h
===================================================================
--- trunk/src/netsh.h 2010-12-20 23:43:26 UTC (rev 372)
+++ trunk/src/netsh.h 2010-12-21 00:05:00 UTC (rev 373)
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1993,1995 Hewlett-Packard Company
+ Copyright (C) 1993-2010 Hewlett-Packard Company
*/
/* libraried performance include file */
@@ -28,6 +28,20 @@
#define REM_RECV_ALIGN 4 /* alignment for remote receive */
#define REM_SEND_ALIGN 4 /* alignment for remote sends */
+/* which way are we going and what are we doing in this handbasket?-) */
+#define NETPERF_XMIT 0x2
+#define NETPERF_RECV 0x4
+
+#define NETPERF_IS_RR(x) (((x & NETPERF_XMIT) && (x & NETPERF_RECV)) || \
+ (!((x & NETPERF_XMIT) || (x & NETPERF_RECV))))
+
+#define NETPERF_RECV_ONLY(x) ((x & NETPERF_RECV) && !(x & NETPERF_XMIT))
+
+#define NETPERF_XMIT_ONLY(x) ((x & NETPERF_XMIT) && !(x & NETPERF_RECV))
+
+#define NETPERF_CC(x) (!(x & NETPERF_XMIT) && !(x & NETPERF_RECV))
+
+
/* misc defines for the hell of it */
#ifndef MAXLONG
#define MAXLONG 4294967295UL
Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c 2010-12-20 23:43:26 UTC (rev 372)
+++ trunk/src/nettest_omni.c 2010-12-21 00:05:00 UTC (rev 373)
@@ -318,18 +318,7 @@
#endif
#define NETPERF_WAITALL 0x1
-#define NETPERF_XMIT 0x2
-#define NETPERF_RECV 0x4
-#define NETPERF_IS_RR(x) (((x & NETPERF_XMIT) && (x & NETPERF_RECV)) || \
- (!((x & NETPERF_XMIT) || (x & NETPERF_RECV))))
-
-#define NETPERF_RECV_ONLY(x) ((x & NETPERF_RECV) && !(x & NETPERF_XMIT))
-
-#define NETPERF_XMIT_ONLY(x) ((x & NETPERF_XMIT) && !(x & NETPERF_RECV))
-
-#define NETPERF_CC(x) (!(x & NETPERF_XMIT) && !(x & NETPERF_RECV))
-
extern void get_uuid_string(char *string, size_t size);
/* a boatload of globals while I settle things out */
More information about the netperf-dev
mailing list