Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ping6 rump.ping6 supports "-S" option.
details: https://anonhg.NetBSD.org/src/rev/6d8dbec9fc5b
branches: trunk
changeset: 341388:6d8dbec9fc5b
user: knakahara <knakahara%NetBSD.org@localhost>
date: Wed Nov 04 01:14:02 2015 +0000
description:
rump.ping6 supports "-S" option.
diffstat:
sbin/ping6/ping6.c | 6 +++---
sbin/ping6/ping6_hostops.c | 5 +++--
sbin/ping6/ping6_rumpops.c | 5 +++--
sbin/ping6/prog_ops.h | 5 ++++-
4 files changed, 13 insertions(+), 8 deletions(-)
diffs (112 lines):
diff -r 7a552f7a6f83 -r 6d8dbec9fc5b sbin/ping6/ping6.c
--- a/sbin/ping6/ping6.c Tue Nov 03 21:36:59 2015 +0000
+++ b/sbin/ping6/ping6.c Wed Nov 04 01:14:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ping6.c,v 1.88 2015/08/06 14:45:54 ozaki-r Exp $ */
+/* $NetBSD: ping6.c,v 1.89 2015/11/04 01:14:02 knakahara Exp $ */
/* $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */
/*
@@ -77,7 +77,7 @@
#else
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ping6.c,v 1.88 2015/08/06 14:45:54 ozaki-r Exp $");
+__RCSID("$NetBSD: ping6.c,v 1.89 2015/11/04 01:14:02 knakahara Exp $");
#endif
#endif
@@ -636,7 +636,7 @@
/* set the source address if specified. */
if ((options & F_SRCADDR) &&
- bind(s, (struct sockaddr *)&src, srclen) != 0) {
+ prog_bind(s, (struct sockaddr *)&src, srclen) != 0) {
err(1, "bind");
}
diff -r 7a552f7a6f83 -r 6d8dbec9fc5b sbin/ping6/ping6_hostops.c
--- a/sbin/ping6/ping6_hostops.c Tue Nov 03 21:36:59 2015 +0000
+++ b/sbin/ping6/ping6_hostops.c Wed Nov 04 01:14:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ping6_hostops.c,v 1.1 2015/08/06 14:45:54 ozaki-r Exp $ */
+/* $NetBSD: ping6_hostops.c,v 1.2 2015/11/04 01:14:02 knakahara Exp $ */
/*
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ping6_hostops.c,v 1.1 2015/08/06 14:45:54 ozaki-r Exp $");
+__RCSID("$NetBSD: ping6_hostops.c,v 1.2 2015/11/04 01:14:02 knakahara Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -42,6 +42,7 @@
const struct prog_ops prog_ops = {
.op_socket = socket,
+ .op_bind = bind,
.op_setsockopt = setsockopt,
.op_getsockname = getsockname,
.op_poll = poll,
diff -r 7a552f7a6f83 -r 6d8dbec9fc5b sbin/ping6/ping6_rumpops.c
--- a/sbin/ping6/ping6_rumpops.c Tue Nov 03 21:36:59 2015 +0000
+++ b/sbin/ping6/ping6_rumpops.c Wed Nov 04 01:14:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ping6_rumpops.c,v 1.1 2015/08/06 14:45:54 ozaki-r Exp $ */
+/* $NetBSD: ping6_rumpops.c,v 1.2 2015/11/04 01:14:02 knakahara Exp $ */
/*
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ping6_rumpops.c,v 1.1 2015/08/06 14:45:54 ozaki-r Exp $");
+__RCSID("$NetBSD: ping6_rumpops.c,v 1.2 2015/11/04 01:14:02 knakahara Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -47,6 +47,7 @@
.op_init = rumpclient_init,
.op_socket = rump_sys_socket,
+ .op_bind = rump_sys_bind,
.op_setsockopt= rump_sys_setsockopt,
.op_getsockname=rump_sys_getsockname,
.op_poll = rump_sys_poll,
diff -r 7a552f7a6f83 -r 6d8dbec9fc5b sbin/ping6/prog_ops.h
--- a/sbin/ping6/prog_ops.h Tue Nov 03 21:36:59 2015 +0000
+++ b/sbin/ping6/prog_ops.h Wed Nov 04 01:14:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: prog_ops.h,v 1.1 2015/08/06 14:45:54 ozaki-r Exp $ */
+/* $NetBSD: prog_ops.h,v 1.2 2015/11/04 01:14:02 knakahara Exp $ */
/*
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -36,6 +36,7 @@
int (*op_init)(void);
int (*op_socket)(int, int, int);
+ int (*op_bind)(int, const struct sockaddr *, socklen_t);
int (*op_setsockopt)(int, int, int, const void *, socklen_t);
int (*op_getsockname)(int, struct sockaddr * restrict,
socklen_t * restrict);
@@ -56,6 +57,7 @@
#define prog_init prog_ops.op_init
#define prog_socket prog_ops.op_socket
+#define prog_bind prog_ops.op_bind
#define prog_setsockopt prog_ops.op_setsockopt
#define prog_getsockname prog_ops.op_getsockname
#define prog_shutdown prog_ops.op_shutdown
@@ -70,6 +72,7 @@
#else
#define prog_init ((int (*)(void))NULL)
#define prog_socket socket
+#define prog_bind bind
#define prog_setsockopt setsockopt
#define prog_getsockname getsockname
#define prog_shutdown shutdown
Home |
Main Index |
Thread Index |
Old Index