/usr/include/ClearSilver/util/neo_net.h is in clearsilver-dev 0.10.5-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | /*
* Copyright 2001-2004 Brandon Long
* All Rights Reserved.
*
* ClearSilver Templating System
*
* This code is made available under the terms of the ClearSilver License.
* http://www.clearsilver.net/license.hdf
*
*/
#ifndef __NEO_NET_H_
#define __NEO_NET_H_ 1
__BEGIN_DECLS
#define NET_BUFSIZE 4096
typedef struct _neo_sock {
int fd;
int data_timeout;
int conn_timeout;
UINT32 remote_ip;
int remote_port;
/* incoming buffer */
UINT8 ibuf[NET_BUFSIZE];
int ib;
int il;
/* outbound buffer */
UINT8 obuf[NET_BUFSIZE];
int ol;
} NSOCK;
NEOERR *ne_net_listen(int port, int *fd);
NEOERR *ne_net_accept(NSOCK **sock, int fd, int data_timeout);
NEOERR *ne_net_connect(NSOCK **sock, const char *host, int port,
int conn_timeout, int data_timeout);
NEOERR *ne_net_close(NSOCK **sock);
NEOERR *ne_net_read(NSOCK *sock, UINT8 *buf, int buflen);
NEOERR *ne_net_read_line(NSOCK *sock, char **buf);
NEOERR *ne_net_read_binary(NSOCK *sock, UINT8 **b, int *blen);
NEOERR *ne_net_read_str_alloc(NSOCK *sock, char **s, int *len);
NEOERR *ne_net_read_int(NSOCK *sock, int *i);
NEOERR *ne_net_write(NSOCK *sock, const char *b, int blen);
NEOERR *ne_net_write_line(NSOCK *sock, const char *s);
NEOERR *ne_net_write_binary(NSOCK *sock, const char *b, int blen);
NEOERR *ne_net_write_str(NSOCK *sock, const char *s);
NEOERR *ne_net_write_int(NSOCK *sock, int i);
NEOERR *ne_net_flush(NSOCK *sock);
void ne_net_shutdown(void);
__END_DECLS
#endif /* __NEO_NET_H_ */
|