File: relay.h

package info (click to toggle)
tcputils 0.6.2%2Bgit20120127.c28952d-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 264 kB
  • sloc: ansic: 1,277; sh: 348; makefile: 102
file content (21 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
struct relay {
	/* IN: file descriptor to read from */
	int	  source;
	/* IN: file descriptor to read to */
	int	  dest;
	/* IN+OUT: errno for failed read. -1 if EOF reached. */
	int	  readerror;
	/* IN+OUT: errno for failed write.  EPIPE if receiver is dead. */
	int	  writeerror;
	/* IN: for private use by the callback function */
	void	* userdata;
};


extern	int	relay_once(struct relay	*,
			   int,
			   struct timeval *,
			   int (*)(struct relay*, char*, size_t));
extern	int	relay_all(struct relay *,
			  int,
			  int (*)(struct relay*, char*, size_t));