1*134e1779SJakub Wojciech Klama /* 2*134e1779SJakub Wojciech Klama * Copyright 2016 Jakub Klama <jceel@FreeBSD.org> 3*134e1779SJakub Wojciech Klama * All rights reserved 4*134e1779SJakub Wojciech Klama * 5*134e1779SJakub Wojciech Klama * Redistribution and use in source and binary forms, with or without 6*134e1779SJakub Wojciech Klama * modification, are permitted providing that the following conditions 7*134e1779SJakub Wojciech Klama * are met: 8*134e1779SJakub Wojciech Klama * 1. Redistributions of source code must retain the above copyright 9*134e1779SJakub Wojciech Klama * notice, this list of conditions and the following disclaimer. 10*134e1779SJakub Wojciech Klama * 2. Redistributions in binary form must reproduce the above copyright 11*134e1779SJakub Wojciech Klama * notice, this list of conditions and the following disclaimer in the 12*134e1779SJakub Wojciech Klama * documentation and/or other materials provided with the distribution. 13*134e1779SJakub Wojciech Klama * 14*134e1779SJakub Wojciech Klama * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15*134e1779SJakub Wojciech Klama * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16*134e1779SJakub Wojciech Klama * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17*134e1779SJakub Wojciech Klama * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 18*134e1779SJakub Wojciech Klama * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19*134e1779SJakub Wojciech Klama * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20*134e1779SJakub Wojciech Klama * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21*134e1779SJakub Wojciech Klama * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 22*134e1779SJakub Wojciech Klama * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 23*134e1779SJakub Wojciech Klama * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24*134e1779SJakub Wojciech Klama * POSSIBILITY OF SUCH DAMAGE. 25*134e1779SJakub Wojciech Klama * 26*134e1779SJakub Wojciech Klama */ 27*134e1779SJakub Wojciech Klama 28*134e1779SJakub Wojciech Klama #ifndef LIB9P_SOCKET_H 29*134e1779SJakub Wojciech Klama #define LIB9P_SOCKET_H 30*134e1779SJakub Wojciech Klama 31*134e1779SJakub Wojciech Klama #include <sys/types.h> 32*134e1779SJakub Wojciech Klama #include <sys/socket.h> 33*134e1779SJakub Wojciech Klama #include "../lib9p.h" 34*134e1779SJakub Wojciech Klama 35*134e1779SJakub Wojciech Klama int l9p_start_server(struct l9p_server *server, const char *host, 36*134e1779SJakub Wojciech Klama const char *port); 37*134e1779SJakub Wojciech Klama void l9p_socket_accept(struct l9p_server *server, int conn_fd, 38*134e1779SJakub Wojciech Klama struct sockaddr *client_addr, socklen_t client_addr_len); 39*134e1779SJakub Wojciech Klama 40*134e1779SJakub Wojciech Klama #endif /* LIB9P_SOCKET_H */ 41