• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • Directories
  • File List
  • Globals

sctp_options.h

00001 /* 
00002  * $Id$
00003  * 
00004  * Copyright (C) 2008 iptelorg GmbH
00005  *
00006  * Permission to use, copy, modify, and distribute this software for any
00007  * purpose with or without fee is hereby granted, provided that the above
00008  * copyright notice and this permission notice appear in all copies.
00009  *
00010  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
00011  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00012  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
00013  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00014  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00015  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00016  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00017  */
00018 /* 
00019  * sctp options
00020  */
00021 /*
00022  * History:
00023  * --------
00024  *  2008-08-07  initial version (andrei)
00025  *  2009-05-26  runtime cfg support (andrei)
00026  */
00027 
00028 #ifndef _sctp_options_h
00029 #define _sctp_options_h
00030 
00031 #ifndef NO_SCTP_CONN_REUSE
00032 /* SCTP connection reuse by default */
00033 #define SCTP_CONN_REUSE
00034 #endif
00035 
00036 #define DEFAULT_SCTP_AUTOCLOSE 180 /* seconds */
00037 #define DEFAULT_SCTP_SEND_TTL  32000 /* in ms (32s)  */
00038 #define DEFAULT_SCTP_SEND_RETRIES 0
00039 #define MAX_SCTP_SEND_RETRIES 9
00040 
00041 
00042 struct cfg_group_sctp{
00043         int so_rcvbuf;
00044         int so_sndbuf;
00045         unsigned int autoclose; /* in seconds */
00046         unsigned int send_ttl; /* in milliseconds */
00047         unsigned int send_retries;
00048         int assoc_tracking; /* track associations */
00049         int assoc_reuse; /* reuse the request connection for sending the reply,
00050                                             depends on assoc_tracking */
00051         int max_assocs; /* maximum associations, -1 means disabled */
00052         unsigned int srto_initial; 
00053         unsigned int srto_max;     
00054         unsigned int srto_min;     
00055         unsigned int asocmaxrxt; 
00056         unsigned int init_max_attempts; 
00057         unsigned int init_max_timeo; 
00058         unsigned int hbinterval;  
00059         unsigned int pathmaxrxt;  
00060         unsigned int sack_delay; 
00061         unsigned int sack_freq; 
00062         unsigned int max_burst; 
00063 };
00064 
00065 extern struct cfg_group_sctp sctp_default_cfg;
00066 
00067 /* sctp config handle */
00068 extern void* sctp_cfg;
00069 
00070 void init_sctp_options(void);
00071 void sctp_options_check(void);
00072 int sctp_register_cfg(void);
00073 void sctp_options_get(struct cfg_group_sctp *s);
00074 int sctp_get_os_defaults(struct cfg_group_sctp *s);
00075 int sctp_get_cfg_from_sock(int s, struct cfg_group_sctp* cfg);
00076 
00077 #endif /* _sctp_options_h */

Generated on Tue May 22 2012 13:10:14 for SIP Router by  doxygen 1.7.1