1*a447b73fSratchov /* $OpenBSD: listen.h,v 1.3 2016/01/08 13:14:11 ratchov Exp $ */ 287bc9f6aSratchov /* 387bc9f6aSratchov * Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org> 487bc9f6aSratchov * 587bc9f6aSratchov * Permission to use, copy, modify, and distribute this software for any 687bc9f6aSratchov * purpose with or without fee is hereby granted, provided that the above 787bc9f6aSratchov * copyright notice and this permission notice appear in all copies. 887bc9f6aSratchov * 987bc9f6aSratchov * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1087bc9f6aSratchov * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1187bc9f6aSratchov * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1287bc9f6aSratchov * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1387bc9f6aSratchov * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1487bc9f6aSratchov * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1587bc9f6aSratchov * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1687bc9f6aSratchov */ 1787bc9f6aSratchov #ifndef LISTEN_H 1887bc9f6aSratchov #define LISTEN_H 1987bc9f6aSratchov 2087bc9f6aSratchov struct file; 2187bc9f6aSratchov 2287bc9f6aSratchov struct listen { 2387bc9f6aSratchov struct listen *next; 2487bc9f6aSratchov struct file *file; 2587bc9f6aSratchov char *path; 2687bc9f6aSratchov int fd; 27f728557cSratchov int slowaccept; 2887bc9f6aSratchov }; 2987bc9f6aSratchov 3087bc9f6aSratchov extern struct listen *listen_list; 3187bc9f6aSratchov 32*a447b73fSratchov int listen_new_un(char *); 33*a447b73fSratchov int listen_new_tcp(char *, unsigned int); 3487bc9f6aSratchov int listen_init(struct listen *); 3587bc9f6aSratchov void listen_close(struct listen *); 3687bc9f6aSratchov 3787bc9f6aSratchov #endif /* !defined(LISTEN_H) */ 38