summaryrefslogtreecommitdiffstats
path: root/util.h
blob: aadab9c970b88a3240cd0825dd7ed812dae386ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef _util_h_
#define _util_h_

/* util.c */
extern void set_nonblocking (int fd);
extern void set_blocking (int fd);
extern int fd_can_read (int fd);
extern ssize_t read_with_timeout (int fd, void *_b, size_t len, unsigned timeout);
extern int fd_drain (int fd);
extern int open_tty (const char *path, int baud);
extern int open_tcp_client (const char *host, unsigned port);
extern int open_tcp_server (unsigned port);
extern int daemonish (int nochdir, int noclose);
extern int local_isalnum (char c);

#endif /* _util_h_ */