File: avp_get_base_data_format.h

package info (click to toggle)
kamailio 4.2.0-2%2Bdeb8u3
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 56,276 kB
  • sloc: ansic: 552,836; xml: 166,484; sh: 8,659; makefile: 7,676; sql: 6,235; perl: 3,487; yacc: 3,428; python: 1,457; cpp: 1,219; php: 1,047; java: 449; pascal: 194; cs: 40; awk: 27
file content (123 lines) | stat: -rw-r--r-- 4,432 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
 * $Id$
 *
 * The initial version of this code was written by Dragos Vingarzan
 * (dragos(dot)vingarzan(at)fokus(dot)fraunhofer(dot)de and the
 * Fruanhofer Institute. It was and still is maintained in a separate
 * branch of the original SER. We are therefore migrating it to
 * Kamailio/SR and look forward to maintaining it from here on out.
 * 2011/2012 Smile Communications, Pty. Ltd.
 * ported/maintained/improved by 
 * Jason Penton (jason(dot)penton(at)smilecoms.com and
 * Richard Good (richard(dot)good(at)smilecoms.com) as part of an 
 * effort to add full IMS support to Kamailio/SR using a new and
 * improved architecture
 * 
 * NB: Alot of this code was originally part of OpenIMSCore,
 * FhG Focus. Thanks for great work! This is an effort to 
 * break apart the various CSCF functions into logically separate
 * components. We hope this will drive wider use. We also feel
 * that in this way the architecture is more complete and thereby easier
 * to manage in the Kamailio/SR environment
 *
 * This file is part of Kamailio, a free SIP server.
 *
 * Kamailio is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version
 *
 * Kamailio is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License 
 * along with this program; if not, write to the Free Software 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * 
 */

#ifndef __AVP_GET_BASE_DATA_FORMAT_H
#define __AVP_GET_BASE_DATA_FORMAT_H

	#include "../cdp/cdp_load.h"
	#include "avp_new_base_data_format.h"

	#define EPOCH_UNIX_TO_EPOCH_NTP 2208988800u // according to http://www.cis.udel.edu/~mills/y2k.html
	
	/* 
	 * RFC 3588 Basic AVP Data Types
	 * 
	 * http://tools.ietf.org/html/rfc3588#section-4.2
	 * 
	 */
	
	int cdp_avp_get_OctetString(AAA_AVP *avp,str *data);
	typedef int (*cdp_avp_get_OctetString_f)(AAA_AVP *avp,str *data);
	
	
	int cdp_avp_get_Integer32(AAA_AVP *avp,int32_t *data);
	typedef int (*cdp_avp_get_Integer32_f)(AAA_AVP *avp,int32_t *data);
	
	
	int cdp_avp_get_Integer64(AAA_AVP *avp,int64_t *data);
	typedef int (*cdp_avp_get_Integer64_f)(AAA_AVP *avp,int64_t *data);
	
	
	int cdp_avp_get_Unsigned32(AAA_AVP *avp,uint32_t *data);
	typedef int (*cdp_avp_get_Unsigned32_f)(AAA_AVP *avp,uint32_t *data);
	
	
	int cdp_avp_get_Unsigned64(AAA_AVP *avp,uint64_t *data);
	typedef int (*cdp_avp_get_Unsigned64_f)(AAA_AVP *avp,uint64_t *data);
	
	
	int cdp_avp_get_Float32(AAA_AVP *avp,float *data);
	typedef int (*cdp_avp_get_Float32_f)(AAA_AVP *avp,float *data);
	
	
	int cdp_avp_get_Float64(AAA_AVP *avp,double *data);
	typedef int (*cdp_avp_get_Float64_f)(AAA_AVP *avp,double *data);
	
	
	int cdp_avp_get_Grouped(AAA_AVP *avp,AAA_AVP_LIST *data);
	typedef int (*cdp_avp_get_Grouped_f)(AAA_AVP *avp,AAA_AVP_LIST *data);
	
	
	void cdp_avp_free_Grouped(AAA_AVP_LIST *list);
	typedef void (*cdp_avp_free_Grouped_f)(AAA_AVP_LIST *list);
	
	/*
	 * RFC 3588 Derived AVP Data Formats
	 * 
	 * http://tools.ietf.org/html/rfc3588#section-4.3
	 * 
	 */
	
	int cdp_avp_get_Address(AAA_AVP *avp,ip_address *data);
	typedef int (*cdp_avp_get_Address_f)(AAA_AVP *avp,ip_address *data);
	
	int cdp_avp_get_Time(AAA_AVP *avp,time_t *data);
	typedef int (*cdp_avp_get_Time_f)(AAA_AVP *avp,time_t *data);
	
	int cdp_avp_get_UTF8String(AAA_AVP *avp,str *data);
	typedef int (*cdp_avp_get_UTF8String_f)(AAA_AVP *avp,str *data);
	
	int cdp_avp_get_DiameterIdentity(AAA_AVP *avp,str *data);
	typedef int (*cdp_avp_get_DiameterIdentity_f)(AAA_AVP *avp,str *data);
	
	int cdp_avp_get_DiameterURI(AAA_AVP *avp,str *data);
	typedef int (*cdp_avp_get_DiameterURI_f)(AAA_AVP *avp,str *data);
	
	int cdp_avp_get_Enumerated(AAA_AVP *avp,int32_t *data);
	typedef int (*cdp_avp_get_Enumerated_f)(AAA_AVP *avp,int32_t *data);
	
	int cdp_avp_get_IPFilterRule(AAA_AVP *avp,str *data);
	typedef int (*cdp_avp_get_IPFilterRule_f)(AAA_AVP *avp,str *data);
	
	int cdp_avp_get_QoSFilterRule(AAA_AVP *avp,str *data);
	typedef int (*cdp_avp_get_QoSFilterRule_f)(AAA_AVP *avp,str *data);
	

#endif /* __AVP_GET_DATA_FORMAT_H */