1 /*
2 Copyright (c) 2003, Michael Bretterklieber <michael@bretterklieber.com>
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8 
9 1. Redistributions of source code must retain the above copyright
10    notice, this list of conditions and the following disclaimer.
11 2. Redistributions in binary form must reproduce the above copyright
12    notice, this list of conditions and the following disclaimer in the
13    documentation and/or other materials provided with the distribution.
14 3. The names of the authors may not be used to endorse or promote products
15    derived from this software without specific prior written permission.
16 
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 
28 This code cannot simply be copied and put under the GNU Public License or
29 any other GPL-like (LGPL, GPL2) License.
30 
31     $Id$
32 */
33 
34 #include "radlib.h"
35 #include "radlib_private.h"
36 
37 #ifndef PHP_RADIUS_H
38 #define PHP_RADIUS_H
39 
40 #define phpext_radius_ptr &radius_module_entry
41 
42 #define PHP_RADIUS_VERSION "1.4.0b1"
43 
44 #ifdef PHP_WIN32
45 #define PHP_RADIUS_API __declspec(dllexport)
46 #else
47 #define PHP_RADIUS_API
48 #endif
49 
50 #ifdef ZTS
51 #include "TSRM.h"
52 #endif
53 
54 extern zend_module_entry radius_module_entry;
55 
56 PHP_MINIT_FUNCTION(radius);
57 PHP_MSHUTDOWN_FUNCTION(radius);
58 PHP_MINFO_FUNCTION(radius);
59 
60 PHP_FUNCTION(radius_auth_open);
61 PHP_FUNCTION(radius_acct_open);
62 PHP_FUNCTION(radius_close);
63 PHP_FUNCTION(radius_strerror);
64 PHP_FUNCTION(radius_config);
65 PHP_FUNCTION(radius_add_server);
66 PHP_FUNCTION(radius_create_request);
67 PHP_FUNCTION(radius_put_string);
68 PHP_FUNCTION(radius_put_int);
69 PHP_FUNCTION(radius_put_attr);
70 PHP_FUNCTION(radius_put_addr);
71 PHP_FUNCTION(radius_put_vendor_string);
72 PHP_FUNCTION(radius_put_vendor_int);
73 PHP_FUNCTION(radius_put_vendor_attr);
74 PHP_FUNCTION(radius_put_vendor_addr);
75 PHP_FUNCTION(radius_send_request);
76 PHP_FUNCTION(radius_get_attr);
77 PHP_FUNCTION(radius_get_tagged_attr_data);
78 PHP_FUNCTION(radius_get_tagged_attr_tag);
79 PHP_FUNCTION(radius_get_vendor_attr);
80 PHP_FUNCTION(radius_cvt_addr);
81 PHP_FUNCTION(radius_cvt_int);
82 PHP_FUNCTION(radius_cvt_string);
83 PHP_FUNCTION(radius_salt_encrypt_attr);
84 PHP_FUNCTION(radius_request_authenticator);
85 PHP_FUNCTION(radius_server_secret);
86 PHP_FUNCTION(radius_demangle);
87 PHP_FUNCTION(radius_demangle_mppe_key);
88 
89 #ifdef ZTS
90 #define RADIUS_G(v) TSRMG(radius_globals_id, zend_radius_globals *, v)
91 #else
92 #define RADIUS_G(v) (radius_globals.v)
93 #endif
94 
95 #define RADIUS_OPTION_NONE	RAD_OPTION_NONE
96 #define RADIUS_OPTION_TAGGED	RAD_OPTION_TAG
97 #define RADIUS_OPTION_SALT	RAD_OPTION_SALT
98 
99 #endif	/* PHP_RADIUS_H */
100 
101 
102 /*
103  * Local variables:
104  * tab-width: 4
105  * c-basic-offset: 4
106  * indent-tabs-mode: t
107  * End:
108  */
109 
110 /* vim: set ts=8 sw=8 noet: */
111