[-]
[+]
|
Changed |
nepim.spec
|
|
|
Deleted |
nepim-0.44.tar.gz
^
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/CHANGES
^
|
@@ -1,5 +1,5 @@
#
-# $Id: CHANGES,v 1.97 2007/10/18 21:51:43 evertonm Exp $
+# $Id: CHANGES,v 1.112 2008/06/09 17:24:17 evertonm Exp $
#
WishList
@@ -7,6 +7,36 @@
- Establish TCP connections asynchronously.
- Send/receive TCP greetings asynchronously.
- Run server as daemon.
+- Clean-up the greetings parser into a table.
+
+0.49
+====
++ Try to join every SSM source+group combination.
+
+0.48
+====
++ HAVE_IP_MREQ enables multicast compilation under Solaris 10.
+
+0.47
+====
++ Support for Source-Specific Multicast (SSM)
+ + server: nepim -j fe80::1+ff01::1111
+ nepim -j 10.10.10.10+232.1.1.1,2000
+ (RFC 4607: SSM for IP)
+ (RFC 3376: IGMPv3)
+
+0.46
+====
++ Options for client-side (-cmss) and server-side (-smss) TCP MSS.
+
+0.45
+====
++ Cosmetic: Partial label 'prt' changed to 'cur'.
+
+0.44
+====
++ Cosmetic clean-up.
++ Compilation fix for Solaris.
0.43
====
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/README
^
|
@@ -1,5 +1,5 @@
#
-# $Id: README,v 1.32 2007/08/30 15:08:00 evertonm Exp $
+# $Id: README,v 1.34 2008/06/10 13:18:11 evertonm Exp $
#
INTRODUCTION
@@ -10,7 +10,8 @@
nepim operates in client/server mode, is able to handle
multiple parallel traffic streams, reports periodic partial
- statistics along the testing, and supports IPv6.
+ statistics along the testing, accepts rich tuing from
+ command-line, supports multicast and IPv6.
LICENSE
@@ -248,6 +249,13 @@
client$ nepim -M -c ff01::1111 -r 100000
+ * Use the "-j source+group" syntax to join an Source-Specific
+ Multicast (source,group) pair. Examples:
+
+ server$ nepim -j fe80::1+ff01::1111
+
+ server$ nepim -j 10.10.10.10+232.1.1.1,2000
+
* The "-k" switch provides a simple password mechanism for
client authentication. Just use the same password at both
sides:
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/Makefile
^
|
@@ -1,5 +1,5 @@
#
-# $Id: Makefile,v 1.30 2007/08/31 14:47:34 evertonm Exp $
+# $Id: Makefile,v 1.34 2008/05/27 13:32:25 evertonm Exp $
#
# If the following aren't defined, nepim
@@ -8,22 +8,31 @@
# the environment supports them.
#
# HAVE_IP_MREQN
+# HAVE_IP_MREQ
# HAVE_IPV6_MREQ
# HAVE_SIGHANDLER_T
# HAVE_SUSECONDS_T
+# HAVE_GROUP_SOURCE_REQ
#
# The following are for portable definitions
# of uint8_t/uint16_t/uint32_t:
#
# HAVE_STDINT -- for systems with <stdint.h>
# HAVE_INTTYPES -- for systems with <inttypes.h>
+#
+# The definition below specifies how to access
+# the 4 32-bit address pieces under struct in6_addr:
+#
+# HAVE_INET6_IN6_U -- in6_u.u6_addr32[i]
+# HAVE_INET6_S6_UN -- _S6_un._S6_u32[i]
+# HAVE_INET6_U6_ADDR -- __u6_addr.__u6_addr32[i]
#
# The following is specific for Solaris,
# which seems to demand a "uchar" argument
# for setsockopt(IP_MULTICAST_TTL):
#
# HAVE_UCHAR_MCAST_TTL
-#
+#
# Systems with dlopen(3) support should have
# ENABLE_DLOPEN defined as -DHAVE_DLOPEN.
# Otherwise, tcpwrapper support is disabled.
@@ -47,7 +56,7 @@
ifeq ($(PLATFORM),SunOS)
SPARC64 = -m64 -mcpu=v9
CFLAGS += -DHAVE_SUSECONDS_T -DHAVE_UCHAR_MCAST_TTL -DHAVE_INTTYPES \
- $(SPARC64)
+ -DHAVE_IP_MREQ -DHAVE_INET6_S6_UN $(SPARC64)
LDFLAGS += $(SPARC64) -R$(OOP_LIB)
LDFLAGS += -lsocket -lnsl
ifdef ENABLE_DLOPEN
@@ -57,29 +66,29 @@
ifeq ($(PLATFORM),Linux)
CFLAGS += -DHAVE_STDINT -DHAVE_SUSECONDS_T \
- -DHAVE_SIGHANDLER_T -DHAVE_IP_MREQN
+ -DHAVE_SIGHANDLER_T -DHAVE_IP_MREQN -DHAVE_IP_MREQ -DHAVE_INET6_IN6_U
ifdef ENABLE_DLOPEN
LDFLAGS += -ldl
endif
endif
ifeq ($(PLATFORM),NetBSD)
-CFLAGS += -DHAVE_INTTYPES -DHAVE_UCHAR_MCAST_TTL
+CFLAGS += -DHAVE_INTTYPES -DHAVE_UCHAR_MCAST_TTL -DHAVE_INET6_U6_ADDR
endif
ifeq ($(PLATFORM),OpenBSD)
-CFLAGS += -DHAVE_INTTYPES -DHAVE_UCHAR_MCAST_TTL
+CFLAGS += -DHAVE_INTTYPES -DHAVE_UCHAR_MCAST_TTL -DHAVE_INET6_U6_ADDR
endif
ifeq ($(PLATFORM),FreeBSD)
-CFLAGS += -DHAVE_INTTYPES
+CFLAGS += -DHAVE_INTTYPES -DHAVE_INET6_U6_ADDR
endif
OBJ = main.o conf.o sock.o session.o pipe.o \
common.o client.o server.o slot.o \
udp_server.o udp_client.o greet.o \
array.o usock.o str.o udp_header.o int.o \
- tcpwrap.o rand.o
+ tcpwrap.o rand.o version.o
TARGET = nepim
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/client.c
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: client.c,v 1.70 2007/10/18 21:51:43 evertonm Exp $ */
+/* $Id: client.c,v 1.71 2008/03/27 20:57:19 evertonm Exp $ */
#include <stdio.h>
#include <sys/types.h>
@@ -461,6 +461,7 @@
opt.write_floor = nepim_global.server_write_floor;
opt.write_ceil = nepim_global.server_write_ceil;
opt.report_partial_min_max = nepim_global.report_partial_min_max;
+ opt.mss = nepim_global.server_tcp_mss;
if (nepim_global.password) {
opt.password_buf = (char *) nepim_global.password;
@@ -936,7 +937,8 @@
nepim_global.win_send,
nodelay,
nepim_global.tos,
- nepim_global.socket_keepalive);
+ nepim_global.socket_keepalive,
+ nepim_global.client_tcp_mss);
if (sd < 0) {
if (ai->ai_family == AF_UNIX)
fprintf(stderr,
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/common.c
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: common.c,v 1.91 2007/10/18 21:51:43 evertonm Exp $ */
+/* $Id: common.c,v 1.95 2007/11/28 15:47:19 evertonm Exp $ */
#include <stdio.h>
#include <stdlib.h>
@@ -39,7 +39,7 @@
#include "rand.h"
-const char * const NEPIM_LABEL_PARTIAL = "prt";
+const char * const NEPIM_LABEL_PARTIAL = "cur";
const char * const NEPIM_LABEL_TOTAL = "avg";
const char * const NEPIM_LABEL_TOTAL_BROKEN = "avg(broken)";
const char * const NEPIM_LABEL_MIN = "min";
@@ -51,11 +51,6 @@
static int line = 0;
-const char *nepim_version()
-{
- return "0.43";
-}
-
static void header(FILE *out, int ident, int udp)
{
if (!(line++ % 10)) {
@@ -206,16 +201,23 @@
min, max);
{
- float loss_ratio = pkt_lost;
- float ooo_ratio = pkt_ooo;
+ float loss_ratio;
+ float ooo_ratio;
#if 0
- loss_ratio *= 100;
- ooo_ratio *= 100;
+ fprintf(stderr, "DEBUG common.c pkt_expected = %llu\n", pkt_expected);
#endif
-
- loss_ratio /= pkt_expected;
- ooo_ratio /= pkt_expected;
+
+ if (pkt_expected) {
+ loss_ratio = pkt_lost;
+ ooo_ratio = pkt_ooo;
+ loss_ratio /= pkt_expected;
+ ooo_ratio /= pkt_expected;
+ }
+ else {
+ loss_ratio = 0;
+ ooo_ratio = 0;
+ }
MIN_UPDATE(loss_ratio, min->pkt_loss);
MIN_UPDATE(ooo_ratio, min->pkt_ooo);
@@ -223,13 +225,6 @@
MAX_UPDATE(loss_ratio, max->pkt_loss);
MAX_UPDATE(ooo_ratio, max->pkt_ooo);
-#if 0
- fprintf(out,
- " %-5.4f %-5.4f",
- loss_ratio,
- ooo_ratio);
-#endif
-
dump_ratio(out, loss_ratio);
dump_ratio(out, ooo_ratio);
}
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/common.h
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: common.h,v 1.30 2007/10/18 21:51:43 evertonm Exp $ */
+/* $Id: common.h,v 1.31 2007/11/28 15:47:19 evertonm Exp $ */
#ifndef NEPIM_COMMON_H
#define NEPIM_COMMON_H
@@ -44,8 +44,6 @@
extern const char * const NEPIM_MSG_KEEPALIVES_SCHED;
extern const char * const NEPIM_MSG_KEEPALIVES_MISS;
-const char *nepim_version();
-
void nepim_pipe_stat(FILE *out, struct timeval now,
const char *label, int sd,
long long bytes_recv, long long bytes_sent,
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/conf.c
^
|
@@ -91,6 +91,8 @@
0, /* udp_dst_random_addr (0=fixed,1=random) */
0, /* udp_dst_random_port (0=fixed,1=random) */
0, /* report_partial_min_max (boolean) */
+ -1, /* client_tcp_mss */
+ -1, /* server_tcp_mss */
0, /* oop source */
0 /* source interface */
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/conf.h
^
|
@@ -96,6 +96,8 @@
int udp_dst_random_addr; /* 0=fixed,1=random */
int udp_dst_random_port; /* 0=fixed,1=random */
int report_partial_min_max; /* boolean */
+ int client_tcp_mss; /* bytes */
+ int server_tcp_mss; /* bytes */
oop_source_sys *oop_sys;
oop_source *oop_src;
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/greet.c
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: greet.c,v 1.21 2007/10/18 21:51:43 evertonm Exp $ */
+/* $Id: greet.c,v 1.23 2008/03/27 20:57:19 evertonm Exp $ */
#include <stdlib.h>
#include <stdio.h>
@@ -52,6 +52,7 @@
const char *GREET_WRITE_FLOOR = "write_floor=";
const char *GREET_WRITE_CEIL = "write_ceil=";
const char *GREET_PARTIAL_MINMAX = "partial_minmax=";
+const char *GREET_MSS = "mss=";
const char *GREET_PASSWORD = "password=";
#define NEPIM_GREET_PARSE_OK (0)
@@ -81,6 +82,7 @@
" %s%d %s%d %s%d"
" %s%d %s%d %s%d %s%d"
" %s%d"
+ " %s%d"
" %s%s\n",
GREET_SERVER_SEND, opt->must_send,
GREET_BIT_RATE, opt->bit_rate,
@@ -105,12 +107,9 @@
GREET_WRITE_FLOOR, opt->write_floor,
GREET_WRITE_CEIL, opt->write_ceil,
GREET_PARTIAL_MINMAX, opt->report_partial_min_max,
+ GREET_MSS, opt->mss,
GREET_PASSWORD, opt->password_buf);
-#if 1
- fprintf(stderr, "DEBUG [%s]\n", buf);
-#endif
-
if (pr < 1)
return NEPIM_GREET_WRITE_IO;
if (pr >= buf_size)
@@ -153,6 +152,7 @@
const int GREET_WRITE_FLOOR_LEN = strlen(GREET_WRITE_FLOOR);
const int GREET_WRITE_CEIL_LEN = strlen(GREET_WRITE_CEIL);
const int GREET_PARTIAL_MINMAX_LEN = strlen(GREET_PARTIAL_MINMAX);
+ const int GREET_MSS_LEN = strlen(GREET_MSS);
const int GREET_PASSWORD_LEN = strlen(GREET_PASSWORD);
int server_send = -2;
@@ -178,6 +178,7 @@
int write_floor = -2;
int write_ceil = -2;
int partial_minmax = -2;
+ int mss = -2;
assert(opt->password_buf);
assert(opt->password_buf_size > 0);
@@ -322,6 +323,11 @@
continue;
}
+ if (!strncmp(tok, GREET_MSS, GREET_MSS_LEN)) {
+ mss = atoi(tok + GREET_MSS_LEN);
+ continue;
+ }
+
if (!strncmp(tok, GREET_PASSWORD, GREET_PASSWORD_LEN)) {
const char *tmp_past_end = tmp + sizeof(tmp);
const char *pass;
@@ -404,6 +410,7 @@
opt->write_floor = write_floor;
opt->write_ceil = write_ceil;
opt->report_partial_min_max = (partial_minmax == -2) ? 0 : partial_minmax;
+ opt->mss = mss;
return NEPIM_GREET_PARSE_OK;
}
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/greet.h
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: greet.h,v 1.20 2007/10/18 21:51:43 evertonm Exp $ */
+/* $Id: greet.h,v 1.21 2008/03/27 20:57:19 evertonm Exp $ */
#ifndef NEPIM_GREET_H
#define NEPIM_GREET_H
@@ -49,6 +49,7 @@
int write_floor;
int write_ceil;
int report_partial_min_max;
+ int mss;
char *password_buf;
int password_buf_size;
};
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/main.c
^
|
@@ -21,7 +21,7 @@
/*
nepim - network pipemeter
- $Id: main.c,v 1.69 2007/10/18 21:51:43 evertonm Exp $
+ $Id: main.c,v 1.73 2008/05/20 13:17:29 evertonm Exp $
*/
#include <stdlib.h>
@@ -44,6 +44,7 @@
#include "str.h"
#include "int.h"
#include "udp_header.h"
+#include "version.h"
static int UDP_OVERHEAD = 28; /* 20 ip + 8 udp */
static int TCP_OVERHEAD = 44; /* 20 ip + 24 tcp */
@@ -93,6 +94,7 @@
" 1 = WANT (use per-route hints)\n"
" 2 = DO (always do PMTU discovery, DF=1)\n"
" -t ttl TTL for sending packets (defaults to system)\n"
+ " -smss bytes set server-side TCP maximum segment size (MSS)\n"
" -w size TCP write size (defaults to %d bytes)\n"
" -z size TCP read size (defaults to %d bytes)\n"
" -W size UDP write size (defaults to %d bytes)\n"
@@ -149,6 +151,7 @@
" 'interval' can't be lower than %ld us\n"
" -K udp-ka-time UDP keepalive timeout (defaults to %ld us)\n"
" 'udp-ka-time' can't be lower than %ld us\n"
+ " -cmss bytes set client-side TCP maximum segment size (MSS)\n"
" -mM report periodic (per-interval) min-MAX rates\n"
" -N nagle TCP nagle mode (defaults to %d)\n"
" nagle: -1 = use system's default\n"
@@ -164,6 +167,9 @@
"server-only options:\n"
" -f [lib-name] enable TCP wrapper filtering\n"
" -j addr-list join multicast groups (defaults to empty)\n"
+ " to join an SSM (source,group) pair, use: -j source+group\n"
+ " examples: -j fe80::1+ff01::1111\n"
+ " -j 10.10.10.10+232.1.1.1,2000\n"
" -U path-list bind UNIX stream sockets to specified addresses\n"
#if 0
" -G path-list bind UNIX datagram sockets to specified addresses\n"
@@ -229,7 +235,7 @@
show_version_brief(out);
fprintf(out,
- "Copyright (C) 2005 Everton da Silva marques\n"
+ "Copyright (C) 2005 Everton da Silva Marques\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
@@ -660,6 +666,28 @@
continue;
}
+ if (!strcmp(arg, "-cmss")) {
+ ++i;
+ if (i >= argc) {
+ fprintf(stderr, "%s: missing client TCP MSS\n",
+ nepim_global.prog_name);
+ exit(1);
+ }
+ nepim_global.client_tcp_mss = atoi(argv[i]);
+ continue;
+ }
+
+ if (!strcmp(arg, "-smss")) {
+ ++i;
+ if (i >= argc) {
+ fprintf(stderr, "%s: missing server TCP MSS\n",
+ nepim_global.prog_name);
+ exit(1);
+ }
+ nepim_global.server_tcp_mss = atoi(argv[i]);
+ continue;
+ }
+
if (!strncmp(arg, "-F", 2)) {
nepim_global.udp_mode = 1; /* -u (UDP) */
nepim_global.simplex_client_send = 1; /* -s (client-send) */
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/server.c
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: server.c,v 1.81 2007/10/18 21:51:44 evertonm Exp $ */
+/* $Id: server.c,v 1.84 2008/05/30 16:19:07 evertonm Exp $ */
#include <stdio.h>
#include <stdlib.h>
@@ -439,7 +439,8 @@
"seed=0x%08x verify_data=%d random_fill=%d fill_byte=0x%02x pause_duration=%d "
"sock_ka=%d nagle=%d overhead=%d "
"sweep_random=%d sweep_step=%d write_floor=%d write_ceil=%d "
- "p_minmax=%d password=%s\n",
+ "p_minmax=%d mss=%d "
+ "password=%s\n",
sd, opt.must_send, opt.bit_rate, opt.pkt_rate,
opt.stat_interval, opt.test_duration,
opt.write_delay, opt.keepalive_must_send,
@@ -448,7 +449,7 @@
opt.verify_data, opt.random_fill, opt.fill_byte, opt.pause_duration,
opt.socket_keepalive, opt.nagle, opt.overhead,
opt.sweep_random, opt.sweep_step, opt.write_floor, opt.write_ceil,
- opt.report_partial_min_max,
+ opt.report_partial_min_max, opt.mss,
password_buf);
nepim_conf_write_sweep_auto(0 /* udp=false */,
@@ -477,7 +478,8 @@
nodelay = (opt.nagle == -1) ? -1 : !opt.nagle;
result = nepim_socket_tcp_opt(nepim_global.verbose_stderr,
- sockaddr_family, sd, nodelay);
+ sockaddr_family, sd, nodelay,
+ opt.mss);
if (result) {
fprintf(stderr,
"%d: %s: %s: could not set tcp options: %d\n",
@@ -1028,7 +1030,11 @@
nepim_global.win_recv,
nepim_global.win_send,
nodelay,
- nepim_global.tos);
+ nepim_global.tos,
+ nepim_global.server_tcp_mss,
+ -1, /* iface_index */
+ 0, /* ssm_src_addr */
+ -1 /* ssm_src_addrlen */);
if (sd < 0) {
fprintf(stderr,
"%s %s: TCP listener socket failed for %s,%d: %d\n",
@@ -1087,7 +1093,11 @@
nepim_global.win_recv,
nepim_global.win_send,
nodelay,
- nepim_global.tos);
+ nepim_global.tos,
+ nepim_global.server_tcp_mss,
+ -1, /* iface_index */
+ 0, /* ssm_src_addr */
+ -1 /* ssm_src_addrlen */);
if (sd < 0) {
fprintf(stderr,
"%s %s: UNIX stream listener socket failed for path=%s\n",
@@ -1107,8 +1117,10 @@
}
-extern int nepim_udp_listener(const char *hostname,
- const char *portname, int join);
+extern int nepim_udp_listener(const char *ssm_source,
+ const char *hostname,
+ const char *portname,
+ int join);
static void parse_listeners(const char *list, int *udp, int *tcp, int join)
{
@@ -1130,11 +1142,34 @@
if (addr_split_port(buf, sizeof(buf), &portname))
portname = (char *) nepim_global.portname;
+ /*
+ buf: host
+ portname: port
+ */
+
+ if (join) {
+ char *group;
+ char *ssm_source;
+
+ if (addr_split_sourcegroup(buf, sizeof(buf), &group)) {
+ ssm_source = 0;
+ group = buf;
+ }
+ else {
+ ssm_source = buf;
+ }
+ *tcp += spawn_tcp_listener(group, portname);
+ *udp += nepim_udp_listener(ssm_source, group, portname, 1 /* join */);
+
+ continue; /* for */
+ }
+
*tcp += spawn_tcp_listener(buf, portname);
- *udp += nepim_udp_listener(buf, portname, join);
- }
-}
+ *udp += nepim_udp_listener(0, buf, portname, 0 /* join */);
+ } /* for */
+}
+
static int parse_unix_listeners(const char *list)
{
int listeners = 0;
@@ -1276,9 +1311,11 @@
tcp_listeners += spawn_tcp_listener(INET6_ANY, nepim_global.portname);
tcp_listeners += spawn_tcp_listener(INET_ANY, nepim_global.portname);
if (!nepim_global.no_inet6)
- udp_listeners += nepim_udp_listener(INET6_ANY, nepim_global.portname,
+ udp_listeners += nepim_udp_listener(0 /* ssm_source */,
+ INET6_ANY, nepim_global.portname,
0 /* no join */);
- udp_listeners += nepim_udp_listener(INET_ANY, nepim_global.portname,
+ udp_listeners += nepim_udp_listener(0 /* ssm_source */,
+ INET_ANY, nepim_global.portname,
0 /* no join */);
}
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/slot.c
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: slot.c,v 1.50 2007/08/17 18:28:25 evertonm Exp $ */
+/* $Id: slot.c,v 1.51 2007/10/22 16:08:46 evertonm Exp $ */
#include <stdlib.h>
#include <stdio.h>
@@ -254,7 +254,15 @@
int i;
for (i = 0; i < 4; ++i) {
uint32_t random_addr = nepim_urand_next(&slot->session.udp_dst_random_ctx);
+#ifdef HAVE_INET6_IN6_U /* Linux */
slot->session.remote.inet6.sin6_addr.in6_u.u6_addr32[i] = random_addr;
+#elif HAVE_INET6_S6_UN /* Solaris */
+ slot->session.remote.inet6.sin6_addr._S6_un._S6_u32[i] = random_addr;
+#elif HAVE_INET6_U6_ADDR /* FreeBSD */
+ slot->session.remote.inet6.sin6_addr.__u6_addr.__u6_addr32[i] = random_addr;
+#else
+ assert(0);
+#endif
}
}
break;
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/sock.c
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: sock.c,v 1.43 2007/08/31 14:47:34 evertonm Exp $ */
+/* $Id: sock.c,v 1.47 2008/05/27 13:32:25 evertonm Exp $ */
#include <assert.h>
#include <netdb.h>
@@ -55,6 +55,9 @@
#ifndef IPV6_ADD_MEMBERSHIP
#define IPV6_ADD_MEMBERSHIP 20
#endif
+#ifndef MCAST_JOIN_SOURCE_GROUP
+#define MCAST_JOIN_SOURCE_GROUP 46
+#endif
#ifndef HAVE_IP_MREQN
struct ip_mreqn {
@@ -64,6 +67,13 @@
};
#endif
+#ifndef HAVE_IP_MREQ
+struct ip_mreq {
+ struct in_addr imr_multiaddr; /* group to join */
+ struct in_addr imr_interface; /* interface to join on */
+}
+#endif
+
#ifndef HAVE_IPV6_MREQ
struct ipv6_mreq {
struct in6_addr ipv6mr_multiaddr;
@@ -71,6 +81,14 @@
};
#endif
+#ifndef HAVE_GROUP_SOURCE_REQ
+struct group_source_req {
+ uint32_t gsr_interface;
+ struct sockaddr_storage gsr_group;
+ struct sockaddr_storage gsr_source;
+};
+#endif /* HAVE_GROUP_SOURCE_REQ */
+
#define NEPIM_SOCK_ERR_NONE (0)
#define NEPIM_SOCK_ERR_UNSPEC (-1)
#define NEPIM_SOCK_ERR_SOCKET (-2)
@@ -86,11 +104,12 @@
#define NEPIM_SOCK_ERR_TTL (-12)
#define NEPIM_SOCK_ERR_MCAST_TTL (-13)
#define NEPIM_SOCK_ERR_MCAST_JOIN (-14)
-#define NEPIM_SOCK_ERR_WIN_RECV (-15)
-#define NEPIM_SOCK_ERR_WIN_SEND (-16)
-#define NEPIM_SOCK_ERR_TOS (-17)
-#define NEPIM_SOCK_ERR_SOCK_KA (-18)
-#define NEPIM_SOCK_ERR_MSS (-19)
+#define NEPIM_SOCK_ERR_MCAST_JOIN_SOURCEGROUP (-15)
+#define NEPIM_SOCK_ERR_WIN_RECV (-16)
+#define NEPIM_SOCK_ERR_WIN_SEND (-17)
+#define NEPIM_SOCK_ERR_TOS (-18)
+#define NEPIM_SOCK_ERR_SOCK_KA (-19)
+#define NEPIM_SOCK_ERR_MSS (-20)
int nepim_sock_get_port(const struct sockaddr *addr)
{
@@ -343,7 +362,7 @@
static int create_socket(FILE *err, int domain, int type, int protocol,
int pmtu_mode, int ttl, int win_recv,
- int win_send, int nodelay, int tos)
+ int win_send, int nodelay, int tos, int mss)
{
int sd;
int result;
@@ -363,7 +382,7 @@
}
if (type == SOCK_STREAM) {
- result = nepim_socket_tcp_opt(err, domain, sd, nodelay);
+ result = nepim_socket_tcp_opt(err, domain, sd, nodelay, mss);
if (result) {
close(sd);
return result;
@@ -392,7 +411,7 @@
}
static int socket_mcast_join(int sd, int family,
- const struct sockaddr *addr, int addr_len)
+ const struct sockaddr *addr)
{
union {
struct sockaddr_in inet;
@@ -402,13 +421,18 @@
switch (family) {
case PF_INET:
{
+#ifdef HAVE_IP_MREQN
struct ip_mreqn opt;
-
opt.imr_multiaddr = sa->inet.sin_addr;
opt.imr_address.s_addr = htons(INADDR_ANY);
opt.imr_ifindex = 0;
-
return setsockopt(sd, SOL_IP, IP_ADD_MEMBERSHIP, &opt, sizeof(opt));
+#else
+ struct ip_mreq opt;
+ opt.imr_multiaddr = sa->inet.sin_addr;
+ opt.imr_interface.s_addr = htons(INADDR_ANY);
+ return setsockopt(sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &opt, sizeof(opt));
+#endif
}
break;
case PF_INET6:
@@ -434,6 +458,46 @@
return NEPIM_SOCK_ERR_MCAST_JOIN;
}
+static int socket_mcast_join_sourcegroup(int sd, int family, int iface_index,
+ const struct sockaddr *src,
+ const struct sockaddr *grp)
+{
+ struct group_source_req group_source_req;
+
+ group_source_req.gsr_interface = iface_index;
+
+ switch (family) {
+ case PF_INET:
+ {
+ assert(sizeof(group_source_req.gsr_source) >= sizeof(struct sockaddr_in));
+ assert(sizeof(group_source_req.gsr_group) >= sizeof(struct sockaddr_in));
+
+ memcpy(&group_source_req.gsr_source, src, sizeof(struct sockaddr_in));
+ memcpy(&group_source_req.gsr_group, grp, sizeof(struct sockaddr_in));
+
+ return setsockopt(sd, SOL_IP, MCAST_JOIN_SOURCE_GROUP,
+ &group_source_req, sizeof(group_source_req));
+ }
+ case PF_INET6:
+ {
+ assert(sizeof(group_source_req.gsr_source) >= sizeof(struct sockaddr_in6));
+ assert(sizeof(group_source_req.gsr_group) >= sizeof(struct sockaddr_in6));
+
+ memcpy(&group_source_req.gsr_source, src, sizeof(struct sockaddr_in6));
+ memcpy(&group_source_req.gsr_group, grp, sizeof(struct sockaddr_in6));
+
+ return setsockopt(sd, SOL_IPV6, MCAST_JOIN_SOURCE_GROUP,
+ &group_source_req, sizeof(group_source_req));
+ }
+ default:
+ assert(0);
+ }
+
+ assert(0);
+
+ return NEPIM_SOCK_ERR_MCAST_JOIN_SOURCEGROUP;
+}
+
int nepim_create_socket(FILE *err,
const struct sockaddr *addr, int addr_len,
int family,
@@ -445,21 +509,63 @@
int win_recv,
int win_send,
int nodelay,
- int tos)
+ int tos,
+ int mss,
+ int iface, const struct sockaddr *ssm_src_addr, int ssm_src_addrlen)
{
int sd;
int result;
sd = create_socket(err, family, type, protocol, pmtu_mode, ttl,
- win_recv, win_send, nodelay, tos);
+ win_recv, win_send, nodelay, tos, mss);
if (sd < 0)
return sd;
+#if 0
+ {
+ char buf1[500];
+ char buf2[500];
+ nepim_sock_dump_addr(buf1, sizeof(buf1), ssm_src_addr, ssm_src_addrlen);
+ nepim_sock_dump_addr(buf2, sizeof(buf2), addr, addr_len);
+ fprintf(stderr, "DEBUG %s %s: mcast_join=%d mcast_join_sourcegroup(%d,%s,%s,%d)\n",
+ __FILE__, __PRETTY_FUNCTION__,
+ mcast_join, sd, buf1, buf2, nepim_sock_get_port(addr));
+ }
+#endif
+
if (mcast_join) {
assert(type == SOCK_DGRAM);
- assert(protocol == IPPROTO_UDP);
+
+ /* Linux 2.4 getaddrinfo yields IPPROTO_UDP */
+ /* Solaris 10 getaddrinfo yields IPPROTO_IP */
+ assert(protocol == IPPROTO_IP || protocol == IPPROTO_UDP);
+
+ /* SSM join (S,G) ? */
+ if (ssm_src_addr) {
+
+ if (socket_mcast_join_sourcegroup(sd, family, iface, ssm_src_addr, addr)) {
+
+ if (err) {
+ char buf1[500];
+ char buf2[500];
+ int e = errno;
+
+ nepim_sock_dump_addr(buf1, sizeof(buf1), ssm_src_addr, ssm_src_addrlen);
+ nepim_sock_dump_addr(buf2, sizeof(buf2), addr, addr_len);
+
+ fprintf(err, "%s: %s: mcast_join_sourcegroup(%d,%s,%s,%d): errno=%d: %s\n",
+ __FILE__, __PRETTY_FUNCTION__,
+ sd, buf1, buf2, nepim_sock_get_port(addr),
+ e, strerror(e));
+ }
+
+ close(sd);
+ return NEPIM_SOCK_ERR_MCAST_JOIN_SOURCEGROUP;
+ }
+ } /* ssm_src_addr */
- if (socket_mcast_join(sd, family, addr, addr_len)) {
+ /* Regular mcast join (*,G) */
+ else if (socket_mcast_join(sd, family, addr)) {
if (err) {
char buf[500];
@@ -526,14 +632,17 @@
int win_recv,
int win_send,
int nodelay,
- int tos)
+ int tos,
+ int mss,
+ int iface, const struct sockaddr *ssm_src_addr, int ssm_src_addrlen)
{
int sd;
sd = nepim_create_socket(err, addr, addr_len, family,
type, protocol, pmtu_mode,
ttl, 0, win_recv, win_send,
- nodelay, tos);
+ nodelay, tos, mss,
+ iface, ssm_src_addr, ssm_src_addrlen);
if (sd < 0)
return sd;
@@ -633,7 +742,31 @@
return NEPIM_SOCK_ERR_NONE;
}
-int nepim_socket_tcp_opt(FILE *err, int family, int sd, int nodelay)
+static int nepim_socket_mss(FILE *err, int sd, int mss)
+{
+ if (mss < 0)
+ return NEPIM_SOCK_ERR_NONE;
+
+ if (err)
+ fprintf(err, "%s: %s: setsockopt(%d, SOL_TCP, TCP_MAXSEG, %d)\n",
+ __FILE__, __PRETTY_FUNCTION__, sd, mss);
+
+ if (setsockopt(sd, SOL_TCP, TCP_MAXSEG, &mss, sizeof(mss))) {
+
+ if (err) {
+ int e = errno;
+ fprintf(err, "%s: %s: setsockopt: TCP_MAXSEG: mss=%d: sd=%d: errno=%d: %s\n",
+ __FILE__, __PRETTY_FUNCTION__,
+ mss, sd, e, strerror(e));
+ }
+
+ return NEPIM_SOCK_ERR_MSS;
+ }
+
+ return NEPIM_SOCK_ERR_NONE;
+}
+
+int nepim_socket_tcp_opt(FILE *err, int family, int sd, int nodelay, int mss)
{
if (set_tcp_nodelay(err, sd, nodelay)) {
/*
@@ -643,6 +776,14 @@
return NEPIM_SOCK_ERR_NODELAY;
}
+ if (nepim_socket_mss(err, sd, mss)) {
+ /*
+ Tolerate failure in setting TCP_MAXSEG for PF_UNIX sockets
+ */
+ if (family != PF_UNIX)
+ return NEPIM_SOCK_ERR_MSS;
+ }
+
return NEPIM_SOCK_ERR_NONE;
}
@@ -702,7 +843,8 @@
int win_send,
int nodelay,
int tos,
- int socket_keepalive)
+ int socket_keepalive,
+ int mss)
{
int sd;
int result;
@@ -710,7 +852,10 @@
sd = nepim_create_socket(err, bind, bind_len,
family, type, protocol, pmtu_mode, ttl,
0 /* mcast_join: false */,
- win_recv, win_send, nodelay, tos);
+ win_recv, win_send, nodelay, tos, mss,
+ -1, /* iface */
+ 0, /* ssm_src_addr */
+ -1 /* ssm_src_addrlen */);
if (sd < 0)
return sd;
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/sock.h
^
|
@@ -30,7 +30,7 @@
int nepim_socket_mcast_ttl(int sd, int mcast_ttl);
int nepim_socket_pmtu(int sd, int pmtu_mode);
int nepim_socket_opt(FILE *err, int sd, int pmtu_mode, int ttl, int tos);
-int nepim_socket_tcp_opt(FILE *err, int family, int sd, int nodelay);
+int nepim_socket_tcp_opt(FILE *err, int family, int sd, int nodelay, int mss);
int nepim_socket_keepalive(FILE *err, int sd, int keepalive);
int nepim_socket_pmtu_get_mode(int sd);
@@ -49,7 +49,9 @@
int win_recv,
int win_send,
int nodelay,
- int tos);
+ int tos,
+ int mss,
+ int iface, const struct sockaddr *ssm_src_addr, int ssm_src_addrlen);
int nepim_create_listener_socket(FILE *err,
struct sockaddr *addr,
int addr_len,
@@ -62,7 +64,9 @@
int win_recv,
int win_send,
int nodelay,
- int tos);
+ int tos,
+ int mss,
+ int iface, const struct sockaddr *ssm_src_addr, int ssm_src_addrlen);
int nepim_connect_client_socket(FILE *err,
const struct sockaddr *bind, int bind_len,
struct sockaddr *addr, int addr_len,
@@ -75,7 +79,8 @@
int win_send,
int nodelay,
int tos,
- int socket_keepalive);
+ int socket_keepalive,
+ int mss);
int nepim_sock_get_port(const struct sockaddr *addr);
void nepim_sock_set_port(const struct sockaddr *addr, int port);
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/str.c
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: str.c,v 1.8 2006/06/12 14:58:32 evertonm Exp $ */
+/* $Id: str.c,v 1.9 2008/05/20 11:20:49 evertonm Exp $ */
#include <stdlib.h>
#include <stdio.h>
@@ -164,11 +164,21 @@
return nepim_str_split(',', buf, buf_size, next);
}
+int nepim_str_split_plus(char *buf, int buf_size, char **next)
+{
+ return nepim_str_split('+', buf, buf_size, next);
+}
+
int addr_split_port(char *buf, int buf_size, char **port)
{
return nepim_str_split_comma(buf, buf_size, port);
}
+int addr_split_sourcegroup(char *buf, int buf_size, char **group)
+{
+ return nepim_str_split_plus(buf, buf_size, group);
+}
+
static int multiplier_affix(const char *str)
{
const char *i;
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/str.h
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: str.h,v 1.6 2006/06/12 14:58:32 evertonm Exp $ */
+/* $Id: str.h,v 1.7 2008/05/20 11:20:49 evertonm Exp $ */
#ifndef NEPIM_STR_H
#define NEPIM_STR_H
@@ -30,6 +30,7 @@
int addr_list_get(const char *list, int i, char *buf, int buf_size);
char *addr_list_append(char *list, const char *tail);
int addr_split_port(char *buf, int buf_size, char **port);
+int addr_split_sourcegroup(char *buf, int buf_size, char **group);
long long nepim_unit_ll(const char *str);
int nepim_unit_int(const char *str);
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/udp_client.c
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: udp_client.c,v 1.84 2007/10/18 21:51:44 evertonm Exp $ */
+/* $Id: udp_client.c,v 1.85 2008/03/27 20:57:20 evertonm Exp $ */
#include <stdio.h>
#include <string.h>
@@ -428,6 +428,7 @@
opt.write_floor = nepim_global.server_write_floor;
opt.write_ceil = nepim_global.server_write_ceil;
opt.report_partial_min_max = nepim_global.report_partial_min_max;
+ opt.mss = nepim_global.server_tcp_mss;
if (nepim_global.password) {
opt.password_buf = (char *) nepim_global.password;
@@ -1306,7 +1307,8 @@
nepim_global.win_send,
0 /* tcp nodelay */,
nepim_global.tos,
- nepim_global.socket_keepalive);
+ nepim_global.socket_keepalive,
+ nepim_global.client_tcp_mss);
if (sd < 0) {
if (ai->ai_family == AF_UNIX)
fprintf(stderr,
|
[-]
[+]
|
Changed |
nepim-0.49.tar.gz/src/udp_server.c
^
|
@@ -18,7 +18,7 @@
MA 02110-1301 USA
*-GNU-GPL-END-*/
-/* $Id: udp_server.c,v 1.107 2007/10/18 21:51:44 evertonm Exp $ */
+/* $Id: udp_server.c,v 1.110 2008/06/09 17:24:17 evertonm Exp $ */
#include <stdio.h>
@@ -812,7 +812,8 @@
"seed=0x%08x verify_data=%d random_fill=%d fill_byte=0x%02x pause_duration=%d "
"sock_ka=%d overhead=%d "
"sweep_random=%d sweep_step=%d write_floor=%d write_ceil=%d "
- "p_minmax=%d password=%s\n",
+ "p_minmax=%d mss=%d "
+ "password=%s\n",
sd,
local_slot, remote_slot,
peer,
@@ -826,7 +827,7 @@
opt->pause_duration, opt->socket_keepalive,
opt->overhead,
opt->sweep_random, opt->sweep_step, opt->write_floor, opt->write_ceil,
- opt->report_partial_min_max,
+ opt->report_partial_min_max, opt->mss,
password_buf);
nepim_conf_write_sweep_auto(1 /* udp=true */,
@@ -1087,8 +1088,12 @@
return OOP_CONTINUE;
}
-int nepim_udp_listener(const char *hostname, const char *portname,
- int mcast_join)
+static int udp_listener(const char *ssm_source,
+ const struct sockaddr *ssm_source_addr,
+ int ssm_source_addrlen,
+ const char *hostname,
+ const char *portname,
+ int mcast_join)
{
struct addrinfo hints;
struct addrinfo *ai_res;
@@ -1096,6 +1101,13 @@
int result;
int udp_listeners = 0;
+#if 0
+ fprintf(stderr,
+ "DEBUG %s %s: mcast_join=%d ssm_source=%s host/group=%s port=%s\n",
+ __FILE__, __PRETTY_FUNCTION__,
+ mcast_join, ssm_source, hostname, portname);
+#endif
+
memset(&hints, 0, sizeof(hints));
hints.ai_socktype = SOCK_DGRAM;
@@ -1108,13 +1120,14 @@
result = getaddrinfo(hostname, portname, &hints, &ai_res);
if (result) {
- fprintf(stderr, "%s: getaddrinfo(%s,%s): %s\n",
- __PRETTY_FUNCTION__,
+ fprintf(stderr, "%s %s: getaddrinfo(%s,%s): %s\n",
+ __FILE__, __PRETTY_FUNCTION__,
hostname, portname, gai_strerror(result));
return 0;
}
for (ai = ai_res; ai; ai = ai->ai_next) {
+ char ssm_source_addrstr[500];
char addr_str[500];
int sd;
@@ -1124,9 +1137,20 @@
if (nepim_global.no_inet4 && (ai->ai_family == PF_INET))
continue;
- nepim_sock_dump_addr(addr_str, sizeof addr_str,
+ if (ssm_source)
+ nepim_sock_dump_addr(ssm_source_addrstr, sizeof(ssm_source_addrstr),
+ ssm_source_addr, ssm_source_addrlen);
+
+ nepim_sock_dump_addr(addr_str, sizeof(addr_str),
ai->ai_addr, ai->ai_addrlen);
+#if 0
+ fprintf(stderr,
+ "DEBUG %s %s: ssm_addr=%s host/group_addr=%s\n",
+ __FILE__, __PRETTY_FUNCTION__,
+ ssm_source_addrstr, addr_str);
+#endif
+
sd = nepim_create_socket(nepim_global.verbose_stderr,
ai->ai_addr, ai->ai_addrlen,
ai->ai_family, ai->ai_socktype,
@@ -1137,13 +1161,24 @@
nepim_global.win_recv,
nepim_global.win_send,
0 /* tcp nodelay */,
- nepim_global.tos);
+ nepim_global.tos,
+ nepim_global.server_tcp_mss,
+ 0 /* "any" interface index */,
+ ssm_source_addr,
+ ssm_source_addrlen);
if (sd < 0) {
- fprintf(stderr,
- "%s %s: UDP listener socket failed for %s,%d: %d\n",
- __FILE__, __PRETTY_FUNCTION__,
- addr_str, nepim_sock_get_port(ai->ai_addr), sd);
- break;
+ if (ssm_source)
+ fprintf(stderr,
+ "%s %s: UDP listener socket failed for %s+%s,%d: %d\n",
+ __FILE__, __PRETTY_FUNCTION__,
+ ssm_source_addrstr,
+ addr_str, nepim_sock_get_port(ai->ai_addr), sd);
+ else
+ fprintf(stderr,
+ "%s %s: UDP listener socket failed for %s,%d: %d\n",
+ __FILE__, __PRETTY_FUNCTION__,
+ addr_str, nepim_sock_get_port(ai->ai_addr), sd);
+ continue;
}
nepim_global.oop_src->on_fd(nepim_global.oop_src,
@@ -1154,9 +1189,15 @@
++udp_listeners;
- fprintf(stderr,
- "%d: UDP socket listening on %s,%d\n",
- sd, addr_str, nepim_sock_get_port(ai->ai_addr));
+ if (ssm_source)
+ fprintf(stderr,
+ "%d: UDP socket listening on %s+%s,%d\n",
+ sd, ssm_source_addrstr,
+ addr_str, nepim_sock_get_port(ai->ai_addr));
+ else
+ fprintf(stderr,
+ "%d: UDP socket listening on %s,%d\n",
+ sd, addr_str, nepim_sock_get_port(ai->ai_addr));
nepim_sock_show_opt(nepim_global.verbose_stderr, stderr, sd);
}
@@ -1166,6 +1207,66 @@
return udp_listeners;
}
+int nepim_udp_listener(const char *ssm_source,
+ const char *hostname,
+ const char *portname,
+ int mcast_join)
+{
+ struct addrinfo hints;
+ struct addrinfo *ai_res;
+ struct addrinfo *ai;
+ int result;
+ int udp_listeners = 0;
+
+ if (!ssm_source)
+ return udp_listener(0 /* ssm_source */,
+ 0 /* ssm_source_addr */,
+ -1 /* ssm_source_addrlen */,
+ hostname,
+ portname,
+ mcast_join);
+
+ memset(&hints, 0, sizeof(hints));
+
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = IPPROTO_UDP;
+ hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
+ hints.ai_family = PF_UNSPEC;
+ hints.ai_addrlen = 0;
+ hints.ai_addr = 0;
+ hints.ai_canonname = 0;
+
+ result = getaddrinfo(ssm_source, 0, &hints, &ai_res);
+ if (result) {
+ fprintf(stderr, "%s: getaddrinfo(%s): %s\n",
+ __PRETTY_FUNCTION__,
+ ssm_source, gai_strerror(result));
+ return 0;
+ }
+
+ /* Scan ssm_source addresses */
+
+ for (ai = ai_res; ai; ai = ai->ai_next) {
+
+ if (nepim_global.no_inet6 && (ai->ai_family == PF_INET6))
+ continue;
+
+ if (nepim_global.no_inet4 && (ai->ai_family == PF_INET))
+ continue;
+
+ udp_listeners += udp_listener(ssm_source,
+ ai->ai_addr,
+ ai->ai_addrlen,
+ hostname,
+ portname,
+ mcast_join);
+ }
+
+ freeaddrinfo(ai_res);
+
+ return udp_listeners;
+}
+
int nepim_unix_dgram_listener(const char *path)
{
struct sockaddr_un un_sock_addr;
@@ -1197,7 +1298,11 @@
nepim_global.win_recv,
nepim_global.win_send,
0 /* tcp nodelay */,
- nepim_global.tos);
+ nepim_global.tos,
+ nepim_global.server_tcp_mss,
+ -1 /* ssm iface index */,
+ 0 /* ssm_source_addr */,
+ -1 /* ssm_source_addrlen */);
if (sd < 0) {
fprintf(stderr,
"%s %s: UNIX datagram listener socket failed for path=%s\n",
|
[-]
[+]
|
Added |
nepim-0.49.tar.gz/src/version.c
^
|
@@ -0,0 +1,28 @@
+/*-GNU-GPL-BEGIN-*
+nepim - network pipemeter - measuring network bandwidth between hosts
+Copyright (C) 2007 Everton da Silva Marques
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; see the file COPYING; if not, write to the
+Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+MA 02110-1301 USA
+*-GNU-GPL-END-*/
+
+/* $Id: version.c,v 1.5 2008/05/30 16:23:39 evertonm Exp $ */
+
+#include "version.h"
+
+const char *nepim_version()
+{
+ return "0.49";
+}
|
[-]
[+]
|
Added |
nepim-0.49.tar.gz/src/version.h
^
|
@@ -0,0 +1,28 @@
+/*-GNU-GPL-BEGIN-*
+nepim - network pipemeter - measuring network bandwidth between hosts
+Copyright (C) 2007 Everton da Silva Marques
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; see the file COPYING; if not, write to the
+Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+MA 02110-1301 USA
+*-GNU-GPL-END-*/
+
+/* $Id: version.h,v 1.1 2007/11/28 15:47:19 evertonm Exp $ */
+
+#ifndef NEPIM_VERSION_H
+#define NEPIM_VERSION_H
+
+const char *nepim_version();
+
+#endif /* NEPIM_VERSION_H */
|