xref: /freebsd/contrib/libpcap/rpcapd/daemon.h (revision 6f9cba8f)
157e22627SCy Schubert /*
257e22627SCy Schubert  * Copyright (c) 2002 - 2003
357e22627SCy Schubert  * NetGroup, Politecnico di Torino (Italy)
457e22627SCy Schubert  * All rights reserved.
557e22627SCy Schubert  *
657e22627SCy Schubert  * Redistribution and use in source and binary forms, with or without
757e22627SCy Schubert  * modification, are permitted provided that the following conditions
857e22627SCy Schubert  * are met:
957e22627SCy Schubert  *
1057e22627SCy Schubert  * 1. Redistributions of source code must retain the above copyright
1157e22627SCy Schubert  * notice, this list of conditions and the following disclaimer.
1257e22627SCy Schubert  * 2. Redistributions in binary form must reproduce the above copyright
1357e22627SCy Schubert  * notice, this list of conditions and the following disclaimer in the
1457e22627SCy Schubert  * documentation and/or other materials provided with the distribution.
1557e22627SCy Schubert  * 3. Neither the name of the Politecnico di Torino nor the names of its
1657e22627SCy Schubert  * contributors may be used to endorse or promote products derived from
1757e22627SCy Schubert  * this software without specific prior written permission.
1857e22627SCy Schubert  *
1957e22627SCy Schubert  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2057e22627SCy Schubert  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2157e22627SCy Schubert  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2257e22627SCy Schubert  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2357e22627SCy Schubert  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2457e22627SCy Schubert  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2557e22627SCy Schubert  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2657e22627SCy Schubert  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2757e22627SCy Schubert  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2857e22627SCy Schubert  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2957e22627SCy Schubert  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3057e22627SCy Schubert  *
3157e22627SCy Schubert  */
3257e22627SCy Schubert 
3357e22627SCy Schubert #ifndef __DAEMON_H__
3457e22627SCy Schubert #define __DAEMON_H__
3557e22627SCy Schubert 
36*6f9cba8fSJoseph Mingrone #ifdef HAVE_CONFIG_H
37*6f9cba8fSJoseph Mingrone #include <config.h>
38*6f9cba8fSJoseph Mingrone #endif
39*6f9cba8fSJoseph Mingrone 
40*6f9cba8fSJoseph Mingrone #include "sslutils.h"
41*6f9cba8fSJoseph Mingrone 
4257e22627SCy Schubert //
4357e22627SCy Schubert // Returns 1 if the client closed the control connection explicitly, 0
4457e22627SCy Schubert // otherwise; the return value is used only by callers that call us
4557e22627SCy Schubert // for active mode.
4657e22627SCy Schubert //
4757e22627SCy Schubert int daemon_serviceloop(SOCKET sockctrl, int isactive, char *passiveClients,
48*6f9cba8fSJoseph Mingrone     int nullAuthAllowed, int uses_ssl);
4957e22627SCy Schubert 
5057e22627SCy Schubert void sleep_secs(int secs);
5157e22627SCy Schubert 
5257e22627SCy Schubert #endif
53