2008-11-30 22:31:20 +00:00
|
|
|
/** \file server/sock.h
|
2008-11-30 14:22:01 +00:00
|
|
|
* function declarations for LCDproc sockets code
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* This file is part of LCDd, the lcdproc server.
|
2001-12-27 23:30:36 +00:00
|
|
|
*
|
2008-11-30 22:31:20 +00:00
|
|
|
* This file is released under the GNU General Public License.
|
|
|
|
|
* Refer to the COPYING file distributed with this package.
|
2001-12-27 23:30:36 +00:00
|
|
|
*
|
2011-01-05 23:34:37 +00:00
|
|
|
* Copyright (c) 1999, William Ferrell, Selene Scriven
|
2005-03-13 21:23:56 +00:00
|
|
|
* 2004, F5 Networks, Inc. - IP-address verification
|
2008-11-30 14:22:01 +00:00
|
|
|
* 2008, Peter Marschall
|
2001-12-27 23:30:36 +00:00
|
|
|
*/
|
|
|
|
|
|
2003-07-30 19:57:13 +00:00
|
|
|
#ifndef SOCK_H
|
|
|
|
|
#define SOCK_H
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2001-05-25 03:14:27 +00:00
|
|
|
#include "shared/sockets.h"
|
2012-02-22 22:25:32 +00:00
|
|
|
#define INC_TYPES_ONLY 1
|
2008-11-30 14:22:01 +00:00
|
|
|
#include "client.h"
|
2012-02-22 22:25:32 +00:00
|
|
|
#undef INC_TYPES_ONLY
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2001-12-30 00:15:25 +00:00
|
|
|
/* Server functions...*/
|
2003-08-10 02:29:32 +00:00
|
|
|
int sock_init(char* bind_addr, int bind_port);
|
2007-04-02 21:29:53 +00:00
|
|
|
int sock_shutdown(void);
|
2003-08-10 02:29:32 +00:00
|
|
|
int sock_create_inet_socket(char* bind_addr, unsigned int port);
|
2007-04-02 21:29:53 +00:00
|
|
|
int sock_poll_clients(void);
|
2008-11-30 14:22:01 +00:00
|
|
|
int sock_destroy_client_socket(Client *client);
|
2005-03-13 21:23:56 +00:00
|
|
|
int verify_ipv4(const char *addr);
|
|
|
|
|
int verify_ipv6(const char *addr);
|
1999-12-09 23:15:14 +00:00
|
|
|
|
|
|
|
|
#endif
|