~ubuntu-branches/debian/sid/kamailio/sid

« back to all changes in this revision

Viewing changes to modules/sctp/sctp_options.h

  • Committer: Package Import Robot
  • Author(s): Victor Seva
  • Date: 2014-01-06 11:47:13 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140106114713-t8xidp4arzrnyeya
Tags: 4.1.1-1
* New upstream release
* debian/patches:
  - add upstream fixes
* Added tls outbound websocket autheph dnssec modules
  - openssl exception added to their license
* removing sparc and ia64 from supported archs
  for mono module (Closes: #728915)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 *  2009-05-26  runtime cfg support (andrei)
 
26
 */
 
27
 
 
28
#ifndef _sctp_options_h
 
29
#define _sctp_options_h
 
30
 
 
31
#ifndef NO_SCTP_CONN_REUSE
 
32
/* SCTP connection reuse by default */
 
33
#define SCTP_CONN_REUSE
 
34
#endif
 
35
 
 
36
#define DEFAULT_SCTP_AUTOCLOSE 180 /* seconds */
 
37
#define DEFAULT_SCTP_SEND_TTL  32000 /* in ms (32s)  */
 
38
#define DEFAULT_SCTP_SEND_RETRIES 0
 
39
#define MAX_SCTP_SEND_RETRIES 9
 
40
 
 
41
 
 
42
struct cfg_group_sctp{
 
43
        int so_rcvbuf;
 
44
        int so_sndbuf;
 
45
        unsigned int autoclose; /* in seconds */
 
46
        unsigned int send_ttl; /* in milliseconds */
 
47
        unsigned int send_retries;
 
48
        int assoc_tracking; /* track associations */
 
49
        int assoc_reuse; /* reuse the request connection for sending the reply,
 
50
                                            depends on assoc_tracking */
 
51
        int max_assocs; /* maximum associations, -1 means disabled */
 
52
        unsigned int srto_initial; /** initial retr. timeout */
 
53
        unsigned int srto_max;     /** max retr. timeout */
 
54
        unsigned int srto_min;     /** min retr. timeout */
 
55
        unsigned int asocmaxrxt; /** max. retr. attempts per association */
 
56
        unsigned int init_max_attempts; /** max., INIT retr. attempts */
 
57
        unsigned int init_max_timeo; /** rto max for INIT */
 
58
        unsigned int hbinterval;  /** heartbeat interval in msecs */
 
59
        unsigned int pathmaxrxt;  /** max. retr. attempts per path */
 
60
        unsigned int sack_delay; /** msecs after which a delayed SACK is sent */
 
61
        unsigned int sack_freq; /** no. of packets after which a SACK is sent */
 
62
        unsigned int max_burst; /** maximum burst of packets per assoc. */
 
63
};
 
64
 
 
65
extern struct cfg_group_sctp sctp_default_cfg;
 
66
 
 
67
/* sctp config handle */
 
68
extern void* sctp_cfg;
 
69
 
 
70
void init_sctp_options(void);
 
71
void sctp_options_check(void);
 
72
int sctp_register_cfg(void);
 
73
void sctp_options_get(struct cfg_group_sctp *s);
 
74
int sctp_get_os_defaults(struct cfg_group_sctp *s);
 
75
int sctp_get_cfg_from_sock(int s, struct cfg_group_sctp* cfg);
 
76
 
 
77
#endif /* _sctp_options_h */