rump.ping6 supports "-S" option.

This commit is contained in:
knakahara 2015-11-04 01:14:02 +00:00
parent 8ec268554e
commit fad49cfc60
4 changed files with 13 additions and 8 deletions

View File

@ -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 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
#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 @@ main(int argc, char *argv[])
/* 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");
}

View File

@ -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 @@ __RCSID("$NetBSD: ping6_hostops.c,v 1.1 2015/08/06 14:45:54 ozaki-r Exp $");
const struct prog_ops prog_ops = {
.op_socket = socket,
.op_bind = bind,
.op_setsockopt = setsockopt,
.op_getsockname = getsockname,
.op_poll = poll,

View File

@ -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 @@ const struct prog_ops prog_ops = {
.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,

View File

@ -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 @@ struct prog_ops {
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 @@ extern const struct prog_ops prog_ops;
#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 @@ extern const struct prog_ops prog_ops;
#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