Module: sip-router
Branch: kamailio_3.0
Commit: d0f78f622c9223f58a037c6f0dc827240ab68c6a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d0f78f6…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Nov 12 16:29:40 2009 +0100
sctp rpc: core.sctp_options debugging version
core.sctp_options can now have 1 optional parameter. If the
parameter is missing it works as before: displays ser's idea of
all the sctp config options. If the parameter is present it should
have one of the following values: "default" (default send socket),
"first" (first sctp socket) or addr[:port]. In this case the
kernel sctp options for that particular socket will be displayed,
with 0 used for the options that are userspace only.
E.g.: sercmd core.sctp_options 127.0.0.1
(cherry picked from commit 44226358e60f5b69a4c383c892003ad2226c9089)
---
core_cmd.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/core_cmd.c b/core_cmd.c
index ca06bf4..8533802 100644
--- a/core_cmd.c
+++ b/core_cmd.c
@@ -680,7 +680,13 @@ static void core_tcp_options(rpc_t* rpc, void* c)
static const char* core_sctp_options_doc[] = {
- "Returns active sctp options.", /* Documentation string */
+ "Returns active sctp options. With one parameter"
+ " it returns the sctp options set in the kernel for a specific socket"
+ "(debugging), with 0 filled in for non-kernel related options."
+ " The parameter can be: \"default\" | \"first\" | address[:port] ."
+ " With no parameters it returns ser's idea of the current sctp options"
+ " (intended non-debugging use).",
+ /* Documentation string */
0 /* Method signature(s) */
};
@@ -689,9 +695,54 @@ static void core_sctp_options(rpc_t* rpc, void* c)
#ifdef USE_SCTP
void *handle;
struct cfg_group_sctp t;
-
+ char* param;
+ struct socket_info* si;
+ char* host;
+ str hs;
+ int hlen;
+ int port;
+ int proto;
+
+ param=0;
if (!sctp_disable){
- sctp_options_get(&t);
+ /* look for optional socket parameter */
+ if (rpc->scan(c, "*s", ¶m)>0){
+ si=0;
+ if (strcasecmp(param, "default")==0){
+ si=sendipv4_sctp?sendipv4_sctp:sendipv6_sctp;
+ }else if (strcasecmp(param, "first")==0){
+ si=sctp_listen;
+ }else{
+ if (parse_phostport(param, &host, &hlen, &port, &proto)!=0){
+ rpc->fault(c, 500, "bad param (use address, address:port,"
+ " default or first)");
+ return;
+ }
+ if (proto && proto!=PROTO_SCTP){
+ rpc->fault(c, 500, "bad protocol in param (only SCTP"
+ " allowed)");
+ return;
+ }
+ hs.s=host;
+ hs.len=hlen;
+ si=grep_sock_info(&hs, port, PROTO_SCTP);
+ if (si==0){
+ rpc->fault(c, 500, "not listening on sctp %s", param);
+ return;
+ }
+ }
+ if (si==0 || si->socket==-1){
+ rpc->fault(c, 500, "could not find a sctp socket");
+ return;
+ }
+ memset(&t, 0, sizeof(t));
+ if (sctp_get_cfg_from_sock(si->socket, &t)!=0){
+ rpc->fault(c, 500, "failed to get socket options");
+ return;
+ }
+ }else{
+ sctp_options_get(&t);
+ }
rpc->add(c, "{", &handle);
rpc->struct_add(handle, "ddddddddddddddddddd",
"sctp_socket_rcvbuf", t.so_rcvbuf,
Module: sip-router
Branch: kamailio_3.0
Commit: 1b83a39eafb5c2ff77f3f8028dbcb39e864f3d5e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1b83a39…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Nov 12 16:24:08 2009 +0100
sctp: workaround SCTP_DELAYED_SACK lksctp typo
- workaround typo in linux libsctp api: SCTP_DELAYED_ACK is
used/defined instead of SCTP_DELAYED_SACK.
- to support older kernels (< 2.6.27), if setting/getting the
socket options with SCTP_DELAYED_SACK fails, fallback to
SCTP_DELAYED_ACK_TIME for sctp sack_delay and report an error if
the user tries to set sack_freq (not supported on older
kernels).
- split sctp_get_os_default() into sctp_get_os_default() and
sctp_get_cfg_from_sock() for debugging purposes.
(cherry picked from commit cc16495666e948f2c18dc0bacebecfac85ff59a5)
---
sctp_options.c | 48 ++++++++++++-----
sctp_options.h | 1 +
sctp_server.c | 156 +++++++++++++++++++++++++++++++++++++------------------
sctp_sockopts.h | 44 +++++++++++++++
4 files changed, 185 insertions(+), 64 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=1b8…
Module: sip-router
Branch: kamailio_3.0
Commit: 306ef4698b53fcb616ef53baa7dead895771e46d
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=306ef46…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Nov 12 17:24:27 2009 +0100
core rpc: core.shmmem can take an optional size parameter
core.shmmem can take now an optional size parameter, which can
have one of the following values: b - bytes, k or kb - kilobytes,
m or mb - megabytes, g or gb - gigabytes. By default (no
parameter) the values displayed are in bytes. Note that when using
something different from bytes the value are truncated (no
floating point).
The new parameter can be used as workaround on 64 bits systems
when sr is started with more then 2Gb of memory (due to the RPC
interface limitation to int32 in this case the values displayed
would be negative or 0).
E.g:
sercmd> core.shmmem k
(cherry picked from commit 02eec212e4eaf999de4162287232c172760ca9d4)
---
core_cmd.c | 47 ++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/core_cmd.c b/core_cmd.c
index bc2bd13..ca06bf4 100644
--- a/core_cmd.c
+++ b/core_cmd.c
@@ -435,21 +435,54 @@ static void core_shmmem(rpc_t* rpc, void* c)
{
struct mem_info mi;
void *handle;
-
+ char* param;
+ long rs;
+
+ rs=0;
+ /* look for optional size/divisor parameter */
+ if (rpc->scan(c, "*s", ¶m)>0){
+ switch(*param){
+ case 'b':
+ case 'B':
+ rs=0;
+ break;
+ case 'k':
+ case 'K':
+ rs=10; /* K -> 1024 */
+ break;
+ case 'm':
+ case 'M':
+ rs=20; /* M -> 1048576 */
+ break;
+ case 'g':
+ case 'G':
+ rs=30; /* G -> 1024M */
+ break;
+ default:
+ rpc->fault(c, 500, "bad param, (use b|k|m|g)");
+ return;
+ }
+ if (param[1] && ((param[1]!='b' && param[1]!='B') || param[2])){
+ rpc->fault(c, 500, "bad param, (use b|k|m|g)");
+ return;
+ }
+ }
shm_info(&mi);
rpc->add(c, "{", &handle);
rpc->struct_add(handle, "dddddd",
- "total", (unsigned int)mi.total_size,
- "free", (unsigned int)mi.free,
- "used", (unsigned int)mi.used,
- "real_used",(unsigned int)mi.real_used,
- "max_used", (unsigned int)mi.max_used,
+ "total", (unsigned int)(mi.total_size>>rs),
+ "free", (unsigned int)(mi.free>>rs),
+ "used", (unsigned int)(mi.used>>rs),
+ "real_used",(unsigned int)(mi.real_used>>rs),
+ "max_used", (unsigned int)(mi.max_used>>rs),
"fragments", (unsigned int)mi.total_frags
);
}
static const char* core_shmmem_doc[] = {
- "Returns shared memory info.", /* Documentation string */
+ "Returns shared memory info. It has an optional parameter that specifies"
+ " the measuring unit: b - bytes (default), k or kb, m or mb, g or gb. "
+ "Note: when using something different from bytes, the value is truncated.",
0 /* Method signature(s) */
};
Module: sip-router
Branch: kamailio_3.0
Commit: c25d7a7a03cedee7d691196aff3549a1239d4e5a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c25d7a7…
Author: Klaus Darilion <klaus.mailinglists(a)pernau.at>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Nov 11 19:47:28 2009 +0100
make: db_flatstore moved in the standard package
db_flatstore was in db_modules package and ser standard package.
I think it should be removed from db_modules packages as it does
not have any dependencies on db-libraries.
Signed-off-by: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
(cherry picked from commit efaf2651e318574289579730c93d6a73d4734de4)
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 6d8c9f3..9c1f2b3 100644
--- a/Makefile
+++ b/Makefile
@@ -156,7 +156,7 @@ module_group_standard_dep=acc_db acc_radius auth_db auth_radius avp_db \
presence_b2b rls speeddial uri_db xcap xmlrpc
# For db use (db modules, excluding drivers)
-module_group_db=acc_db auth_db avp_db db_ops db_flatstore db_text \
+module_group_db=acc_db auth_db avp_db db_ops db_text \
uri_db domain lcr msilo speeddial
#dbtext (s) not migrated yet to the new db interface
Module: sip-router
Branch: sr_3.0
Commit: a85444180860da454831c5c0b366a6cc2f7f189f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a854441…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Mon Nov 16 00:45:27 2009 +0200
* modules_k/nathelper
Added two new functions add_contact_alias() and handle_ruri_alias() and
two new pseudo variables $rr_count and $rr_top_count that can be used to
implement tcp connection sharing and produce correct Request URI for
in-dialog requests to NATed UAs.
---
modules_k/nathelper/README | 871 ++++++++++++++++-----------
modules_k/nathelper/doc/nathelper.xml | 19 +
modules_k/nathelper/doc/nathelper_admin.xml | 127 ++++-
modules_k/nathelper/nathelper.c | 297 +++++++++-
4 files changed, 959 insertions(+), 355 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=a85…