utils.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * utils.h
  3. * Miscellaneous utils.
  4. *
  5. * Matej Pfajfar <mp292@cam.ac.uk>
  6. */
  7. /*
  8. * Changes :
  9. * $Log$
  10. * Revision 1.1 2002/06/26 22:45:50 arma
  11. * Initial revision
  12. *
  13. * Revision 1.8 2002/03/21 07:20:59 badbytes
  14. * Added a dependency to <sys/time.h>.
  15. *
  16. * Revision 1.7 2002/03/03 00:06:45 mp292
  17. * Modifications to support re-transmission.
  18. *
  19. * Revision 1.6 2002/01/29 02:22:41 mp292
  20. * Bugfix.
  21. *
  22. * Revision 1.5 2002/01/29 00:58:23 mp292
  23. * Timeout parametes to read_tout() and write_tout() are now pointers.
  24. *
  25. * Revision 1.4 2002/01/27 19:24:16 mp292
  26. * Added read_tout(), write_tout() which read/write from a blocking socket but
  27. * impose a timeout on the I/O operation.
  28. *
  29. * Revision 1.3 2002/01/26 19:30:09 mp292
  30. * Reviewed according to Secure-Programs-HOWTO.
  31. *
  32. * Revision 1.2 2001/12/18 10:37:47 badbytes
  33. * Header files now only apply if they were not previously included from somewhere else.
  34. *
  35. * Revision 1.1 2001/12/14 09:18:00 badbytes
  36. * *** empty log message ***
  37. *
  38. */
  39. #ifndef __UTILS_H
  40. #include <sys/types.h>
  41. #include <sys/un.h>
  42. #include <sys/time.h>
  43. unsigned char *stolower(unsigned char *str);
  44. int read_tout(int s, unsigned char *buf, size_t buflen, int flags, struct timeval *conn_tout);
  45. int write_tout(int s, unsigned char *buf, size_t buflen, struct timeval *conn_tout);
  46. #define __UTILS_H
  47. #endif