sctp_options.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2008 iptelorg GmbH
  5. *
  6. * Permission to use, copy, modify, and distribute this software for any
  7. * purpose with or without fee is hereby granted, provided that the above
  8. * copyright notice and this permission notice appear in all copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  11. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  12. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  13. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  14. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  15. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  16. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /*
  19. * sctp options
  20. */
  21. /*
  22. * History:
  23. * --------
  24. * 2008-08-07 initial version (andrei)
  25. */
  26. #ifndef _sctp_options_h
  27. #define _sctp_options_h
  28. #define DEFAULT_SCTP_AUTOCLOSE 180 /* seconds */
  29. #define DEFAULT_SCTP_SEND_TTL 32000 /* in ms (32s) */
  30. #define DEFAULT_SCTP_SEND_RETRIES 0
  31. #define MAX_SCTP_SEND_RETRIES 9
  32. struct sctp_cfg_options{
  33. int sctp_so_rcvbuf;
  34. int sctp_so_sndbuf;
  35. unsigned int sctp_autoclose; /* in seconds */
  36. unsigned int sctp_send_ttl; /* in milliseconds */
  37. unsigned int sctp_send_retries;
  38. };
  39. extern struct sctp_cfg_options sctp_options;
  40. void init_sctp_options();
  41. void sctp_options_check();
  42. void sctp_options_get(struct sctp_cfg_options *s);
  43. #endif /* _sctp_options_h */