1*fad49cfcSknakahara /* $NetBSD: ping6_rumpops.c,v 1.2 2015/11/04 01:14:02 knakahara Exp $ */ 22a4e5e0fSozaki-r 32a4e5e0fSozaki-r /* 42a4e5e0fSozaki-r * Copyright (c) 2015 The NetBSD Foundation, Inc. 52a4e5e0fSozaki-r * All rights reserved. 62a4e5e0fSozaki-r * 72a4e5e0fSozaki-r * Redistribution and use in source and binary forms, with or without 82a4e5e0fSozaki-r * modification, are permitted provided that the following conditions 92a4e5e0fSozaki-r * are met: 102a4e5e0fSozaki-r * 1. Redistributions of source code must retain the above copyright 112a4e5e0fSozaki-r * notice, this list of conditions and the following disclaimer. 122a4e5e0fSozaki-r * 2. Redistributions in binary form must reproduce the above copyright 132a4e5e0fSozaki-r * notice, this list of conditions and the following disclaimer in the 142a4e5e0fSozaki-r * documentation and/or other materials provided with the distribution. 152a4e5e0fSozaki-r * 162a4e5e0fSozaki-r * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 172a4e5e0fSozaki-r * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 182a4e5e0fSozaki-r * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 192a4e5e0fSozaki-r * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 202a4e5e0fSozaki-r * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 212a4e5e0fSozaki-r * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 222a4e5e0fSozaki-r * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 232a4e5e0fSozaki-r * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 242a4e5e0fSozaki-r * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 252a4e5e0fSozaki-r * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 262a4e5e0fSozaki-r * POSSIBILITY OF SUCH DAMAGE. 272a4e5e0fSozaki-r */ 282a4e5e0fSozaki-r 292a4e5e0fSozaki-r #include <sys/cdefs.h> 302a4e5e0fSozaki-r #ifndef lint 31*fad49cfcSknakahara __RCSID("$NetBSD: ping6_rumpops.c,v 1.2 2015/11/04 01:14:02 knakahara Exp $"); 322a4e5e0fSozaki-r #endif /* !lint */ 332a4e5e0fSozaki-r 342a4e5e0fSozaki-r #include <sys/types.h> 352a4e5e0fSozaki-r #include <sys/socket.h> 362a4e5e0fSozaki-r 372a4e5e0fSozaki-r #include <poll.h> 382a4e5e0fSozaki-r #include <unistd.h> 392a4e5e0fSozaki-r 402a4e5e0fSozaki-r #include <rump/rump.h> 412a4e5e0fSozaki-r #include <rump/rump_syscalls.h> 422a4e5e0fSozaki-r #include <rump/rumpclient.h> 432a4e5e0fSozaki-r 442a4e5e0fSozaki-r #include "prog_ops.h" 452a4e5e0fSozaki-r 462a4e5e0fSozaki-r const struct prog_ops prog_ops = { 472a4e5e0fSozaki-r .op_init = rumpclient_init, 482a4e5e0fSozaki-r 492a4e5e0fSozaki-r .op_socket = rump_sys_socket, 50*fad49cfcSknakahara .op_bind = rump_sys_bind, 512a4e5e0fSozaki-r .op_setsockopt= rump_sys_setsockopt, 522a4e5e0fSozaki-r .op_getsockname=rump_sys_getsockname, 532a4e5e0fSozaki-r .op_poll = rump_sys_poll, 542a4e5e0fSozaki-r .op_sendmsg = rump_sys_sendmsg, 552a4e5e0fSozaki-r .op_recvmsg = rump_sys_recvmsg, 562a4e5e0fSozaki-r .op_connect = rump_sys_connect, 572a4e5e0fSozaki-r .op_close = rump_sys_close, 582a4e5e0fSozaki-r .op_getuid = rump_sys_getuid, 592a4e5e0fSozaki-r .op_setuid = rump_sys_setuid, 602a4e5e0fSozaki-r .op_seteuid = rump_sys_seteuid, 612a4e5e0fSozaki-r }; 62