modules_k/registrar/reg_mod.h

Go to the documentation of this file.
00001 /* 
00002  * $Id$ 
00003  *
00004  * registrar module interface
00005  *
00006  * Copyright (C) 2001-2003 FhG Fokus
00007  *
00008  * This file is part of Kamailio, a free SIP server.
00009  *
00010  * Kamailio is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  *
00015  * Kamailio is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License 
00021  * along with this program; if not, write to the Free Software 
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  * History:
00025  * --------
00026  *
00027  * 2005-07-11  added sip_natping_flag for nat pinging with SIP method
00028  *             instead of UDP package (bogdan)
00029  * 2006-11-28  Added statistics tracking for the number of accepted/rejected
00030  *             registrations, as well as for the max expiry time, max contacts,
00031  *             and default expiry time. (Jeffrey Magder - SOMA Networks)
00032  * 2007-02-24  sip_natping_flag moved into branch flags, so migrated to 
00033  *             nathelper module (bogdan)
00034  */
00035 
00043 #ifndef REG_MOD_H
00044 #define REG_MOD_H
00045 
00046 #include "../../parser/msg_parser.h"
00047 #include "../../qvalue.h"
00048 #include "../../usr_avp.h"
00049 #include "../usrloc/usrloc.h"
00050 #include "../../modules/sl/sl.h"
00051 
00052 /* if DB support is used, this values must not exceed the 
00053  * storage capacity of the DB columns! See db/schema/entities.xml */
00054 #define CONTACT_MAX_SIZE       255
00055 #define RECEIVED_MAX_SIZE      255
00056 #define USERNAME_MAX_SIZE      64
00057 #define DOMAIN_MAX_SIZE        128
00058 #define CALLID_MAX_SIZE        255
00059 #define UA_MAX_SIZE            255
00060 
00061 #define PATH_MODE_STRICT        2
00062 #define PATH_MODE_LAZY          1
00063 #define PATH_MODE_OFF           0
00064 
00065 #define REG_SAVE_MEM_FL     (1<<0)
00066 #define REG_SAVE_NORPL_FL   (1<<1)
00067 #define REG_SAVE_REPL_FL    (1<<2)
00068 #define REG_SAVE_ALL_FL     ((1<<3)-1)
00069 
00070 extern int nat_flag;
00071 extern int tcp_persistent_flag;
00072 extern int received_avp;
00073 extern int reg_use_domain;
00074 extern float def_q;
00075 
00076 extern unsigned short rcv_avp_type;
00077 extern int_str rcv_avp_name;
00078 extern unsigned short reg_callid_avp_type;
00079 extern int_str reg_callid_avp_name;
00080 
00081 extern str rcv_param;
00082 extern int method_filtering;
00083 extern int path_enabled;
00084 extern int path_mode;
00085 extern int path_use_params;
00086 extern int reg_gruu_enabled;
00087 
00088 extern str sock_hdr_name;
00089 extern int sock_flag;
00090 
00091 extern str reg_xavp_cfg;
00092 extern str reg_xavp_rcd;
00093 
00094 extern usrloc_api_t ul;
00096 extern sl_api_t slb;
00097 
00098 extern stat_var *accepted_registrations;
00099 extern stat_var *rejected_registrations;
00100 extern stat_var *default_expire_stat;
00101 extern stat_var *max_expires_stat;
00102 
00103 #endif /* REG_MOD_H */