mcfsutil.h 781 B

123456789101112131415161718192021222324
  1. #ifndef MC_VFS_MCFSUTIL_H
  2. #define MC_VFS_MCFSUTIL_H
  3. /*
  4. * FIXME: This protocol uses 32-bit integers for the communication.
  5. * It is a problem on systems with large file support, which is now
  6. * default. This means that lseek is broken unless --disable-largefile
  7. * is used. 64-bit systems are probably broken even more.
  8. */
  9. enum {
  10. RPC_END, /* End of RPC commands */
  11. RPC_INT, /* Next argument is integer */
  12. RPC_STRING, /* Next argument is a string */
  13. RPC_BLOCK, /* Next argument is a len/block */
  14. RPC_LIMITED_STRING /* same as STRING, but has a size limit */
  15. };
  16. int rpc_get (int sock, ...);
  17. int rpc_send (int sock, ...);
  18. int socket_read_block (int sock, char *dest, int len);
  19. int socket_write_block (int sock, const char *buffer, int len);
  20. #endif