File: sock.h

package info (click to toggle)
lcdproc 0.5.9-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,064 kB
  • sloc: ansic: 59,645; sh: 1,740; perl: 681; makefile: 417
file content (32 lines) | stat: -rw-r--r-- 868 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/** \file server/sock.h
 * function declarations for LCDproc sockets code
 */

/* This file is part of LCDd, the lcdproc server.
 *
 * This file is released under the GNU General Public License.
 * Refer to the COPYING file distributed with this package.
 *
 * Copyright (c) 1999, William Ferrell, Selene Scriven
 *               2004, F5 Networks, Inc. - IP-address verification
 *               2008, Peter Marschall
 */

#ifndef SOCK_H
#define SOCK_H

#include "shared/sockets.h"
#define INC_TYPES_ONLY 1
#include "client.h"
#undef INC_TYPES_ONLY

/* Server functions...*/
int sock_init(char* bind_addr, int bind_port);
int sock_shutdown(void);
int sock_create_inet_socket(char* bind_addr, unsigned int port);
int sock_poll_clients(void);
int sock_destroy_client_socket(Client *client);
int verify_ipv4(const char *addr);
int verify_ipv6(const char *addr);

#endif