* global.h: Move fcntl.h inclusion here. Define O_BINARY.
[midnight-commander.git] / vfs / tcputil.h
blob1170478d903069918f6452e5754ea66a506de5d9
1 /* Operations of the rpc manager */
3 #include <netinet/in.h> /* For sockaddr_in needed by get_remote_port */
5 /* Please note that the RPC manager does not use integers, it only uses */
6 /* 4-byte integers for the comunication */
7 enum {
8 RPC_END, /* End of RPC commands */
9 RPC_INT, /* Next argument is integer */
10 RPC_STRING, /* Next argument is a string */
11 RPC_BLOCK, /* Next argument is a len/block */
12 RPC_LIMITED_STRING /* same as STRING, but has a limit on the size it accepts */
15 int rpc_get (int sock, ...);
16 int rpc_send (int sock, ...);
17 void rpc_add_get_callback (int sock, void (*cback)(int));
18 int socket_read_block (int sock, char *dest, int len);
19 int socket_write_block (int sock, char *buffer, int len);
20 int send_string (int sock, char *string);
21 void tcp_init (void);
22 int get_remote_port (struct sockaddr_in *sin, int *version);
23 int open_tcp_link (char *host, int *port, int *version, char *caller);
24 char *get_host_and_username (char *path, char **host, char **user, int *port,
25 int default_port, int default_to_anon, char **pass);
27 extern int tcp_inited;
28 extern int got_sigpipe;