sctp_server.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 one to many
  20. */
  21. /*
  22. * History:
  23. * --------
  24. * 2008-08-07 initial version (andrei)
  25. */
  26. #ifndef _sctp_server_h
  27. #define _sctp_server_h
  28. #include "../../ip_addr.h"
  29. struct sctp_gen_info{
  30. int sctp_connections_no;
  31. int sctp_tracked_no;
  32. int sctp_total_connections;
  33. };
  34. int init_sctp(void);
  35. void destroy_sctp(void);
  36. int sctp_check_compiled_sockopts(char* buf, int size);
  37. int sctp_check_support(void);
  38. int sctp_init_sock(struct socket_info* sock_info);
  39. int sctp_rcv_loop(void);
  40. int sctp_msg_send(struct dest_info* dst, char* buf, unsigned len);
  41. /* generic sctp information (stats a.s.o) */
  42. void sctp_get_info(struct sctp_gen_info* sinf);
  43. void destroy_sctp(void);
  44. int sctp_setsockopt(int s, int level, int optname,
  45. void* optval, socklen_t optlen, char* err_prefix);
  46. void sctp_con_tracking_flush(void);
  47. #endif /* _sctp_server_h */