11.4Sandvar/*	$NetBSD: route_rumpops.c,v 1.4 2022/10/31 21:22:05 andvar Exp $	*/
21.1Spooka
31.1Spooka/*
41.1Spooka * Copyright (c) 2010 The NetBSD Foundation, Inc.
51.1Spooka * All rights reserved.
61.1Spooka *
71.1Spooka * Redistribution and use in source and binary forms, with or without
81.1Spooka * modification, are permitted provided that the following conditions
91.1Spooka * are met:
101.1Spooka * 1. Redistributions of source code must retain the above copyright
111.1Spooka *    notice, this list of conditions and the following disclaimer.
121.1Spooka * 2. Redistributions in binary form must reproduce the above copyright
131.1Spooka *    notice, this list of conditions and the following disclaimer in the
141.1Spooka *    documentation and/or other materials provided with the distribution.
151.1Spooka *
161.1Spooka * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
171.1Spooka * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
181.1Spooka * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
191.1Spooka * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
201.1Spooka * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
211.1Spooka * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
221.1Spooka * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
231.1Spooka * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
241.1Spooka * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
251.1Spooka * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
261.1Spooka * POSSIBILITY OF SUCH DAMAGE.
271.1Spooka */
281.1Spooka
291.1Spooka#include <sys/cdefs.h>
301.1Spooka#ifndef lint
311.4Sandvar__RCSID("$NetBSD: route_rumpops.c,v 1.4 2022/10/31 21:22:05 andvar Exp $");
321.1Spooka#endif /* !lint */
331.1Spooka
341.1Spooka#include <sys/types.h>
351.1Spooka#include <sys/socket.h>
361.1Spooka
371.1Spooka#include <unistd.h>
381.1Spooka
391.1Spooka#include <rump/rump.h>
401.1Spooka#include <rump/rump_syscalls.h>
411.1Spooka#include <rump/rumpclient.h>
421.1Spooka
431.1Spooka#include "prog_ops.h"
441.1Spooka
451.1Spookaconst struct prog_ops prog_ops = {
461.2Schristos	.op_init =		rumpclient_init,
471.1Spooka
481.2Schristos	.op_socket =		rump_sys_socket,
491.2Schristos	.op_setsockopt =	rump_sys_setsockopt,
501.1Spooka
511.2Schristos	.op_open =		rump_sys_open,
521.2Schristos	.op_getpid =		rump_sys_getpid,
531.1Spooka
541.2Schristos	.op_read =		rump_sys_read,
551.2Schristos	.op_write =		rump_sys_write,
561.1Spooka
571.3Smartin	.op_shutdown =		rump_sys_shutdown,
581.3Smartin
591.2Schristos	.op_sysctl =		rump_sys___sysctl,
601.2Schristos
611.3Smartin	/*
621.3Smartin	 * The following are only indirected through ops because
631.4Sandvar	 * sanitizers get confused otherwise.
641.3Smartin	 */
651.3Smartin	.op_sysctlbyname =	sysctlbyname,
661.3Smartin
671.3Smartin	.op_sysctlgetmibinfo =	sysctlgetmibinfo,
681.3Smartin
691.3Smartin	.op_sysctlnametomib =	sysctlnametomib,
701.1Spooka};
71