1*00328592Spooka /* $NetBSD: sockin_user.h,v 1.1 2014/03/13 01:40:30 pooka Exp $ */ 2*00328592Spooka 3*00328592Spooka /* 4*00328592Spooka * Copyright (c) 2008 Antti Kantee. All Rights Reserved. 5*00328592Spooka * 6*00328592Spooka * Redistribution and use in source and binary forms, with or without 7*00328592Spooka * modification, are permitted provided that the following conditions 8*00328592Spooka * are met: 9*00328592Spooka * 1. Redistributions of source code must retain the above copyright 10*00328592Spooka * notice, this list of conditions and the following disclaimer. 11*00328592Spooka * 2. Redistributions in binary form must reproduce the above copyright 12*00328592Spooka * notice, this list of conditions and the following disclaimer in the 13*00328592Spooka * documentation and/or other materials provided with the distribution. 14*00328592Spooka * 15*00328592Spooka * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 16*00328592Spooka * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17*00328592Spooka * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18*00328592Spooka * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19*00328592Spooka * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20*00328592Spooka * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21*00328592Spooka * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22*00328592Spooka * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23*00328592Spooka * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24*00328592Spooka * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25*00328592Spooka * SUCH DAMAGE. 26*00328592Spooka */ 27*00328592Spooka 28*00328592Spooka enum rumpcomp_sockin_getnametype { 29*00328592Spooka RUMPCOMP_SOCKIN_SOCKNAME, 30*00328592Spooka RUMPCOMP_SOCKIN_PEERNAME 31*00328592Spooka }; 32*00328592Spooka 33*00328592Spooka int rumpcomp_sockin_socket(int, int, int, int *); 34*00328592Spooka int rumpcomp_sockin_sendmsg(int, const struct msghdr *, int, size_t *); 35*00328592Spooka int rumpcomp_sockin_recvmsg(int, struct msghdr *, int, size_t *); 36*00328592Spooka int rumpcomp_sockin_connect(int, const struct sockaddr *, int); 37*00328592Spooka int rumpcomp_sockin_bind(int, const struct sockaddr *, int); 38*00328592Spooka int rumpcomp_sockin_accept(int, struct sockaddr *, int *, int *); 39*00328592Spooka int rumpcomp_sockin_listen(int, int); 40*00328592Spooka int rumpcomp_sockin_getname(int, struct sockaddr *, int *, 41*00328592Spooka enum rumpcomp_sockin_getnametype); 42*00328592Spooka int rumpcomp_sockin_setsockopt(int, int, int, const void *, int); 43*00328592Spooka int rumpcomp_sockin_poll(struct pollfd *, int, int, int *); 44