annotate extensions/app_diameap/diameap_mysql.h @ 1534:c83e60f28632

dict_dcca_3gpp: simplify rule creation Refactor local_rules_definition to simplify rule creation (to avoid c99 struct initialisers that result in long lines). No change to generated rules.
author Luke Mewburn <luke@mewburn.net>
date Mon, 20 Apr 2020 12:12:42 +1000
parents 0117a7746b21
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
425
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
1 /*****************************************************************************************************
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
2 * Software License Agreement (BSD License)
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
3 * Author : Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
4 *
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
5 * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
6 * All rights reserved.
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
7 *
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
8 * Redistribution and use of this software in source and binary forms, with or without
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
9 * modification, are permitted provided that the following conditions are met:
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
10 *
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
11 * 1. Redistributions of source code must retain the above copyright
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
12 * notice, this list of conditions and the following disclaimer.
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
13 *
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
14 * 2. Redistributions in binary form must reproduce the above copyright
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
15 * notice, this list of conditions and the following disclaimer in the
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
16 * documentation and/or other materials provided with the distribution.
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
17 *
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
18 * 3. All advertising materials mentioning features or use of this software
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
19 * must display the following acknowledgement:
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
20 * This product includes software developed by Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>.
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
21 *
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
22 * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
23 * names of its contributors may be used to endorse or promote products
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
24 * derived from this software without specific prior written permission.
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
25 *
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS'' AND ANY
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
27 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
28 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
29 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
30 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
31 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
32 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
33 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
35 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
36 *****************************************************************************************************/
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
37
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
38
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
39 #ifndef DIAMEAP_MYSQL_H_
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
40 #define DIAMEAP_MYSQL_H_
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
41
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
42 #include "libdiameap.h"
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
43 #include <mysql.h>
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
44
438
e7814e24e57b Corrected compilation warnings on app_diameap
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents: 425
diff changeset
45 /* MySQL Database connection */
e7814e24e57b Corrected compilation warnings on app_diameap
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents: 425
diff changeset
46 MYSQL *db_conn;
425
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
47
438
e7814e24e57b Corrected compilation warnings on app_diameap
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents: 425
diff changeset
48 int diameap_get_eap_user(struct eap_user * user, char * username);
425
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
49
438
e7814e24e57b Corrected compilation warnings on app_diameap
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents: 425
diff changeset
50 int diameap_mysql_connect();
425
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
51
438
e7814e24e57b Corrected compilation warnings on app_diameap
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents: 425
diff changeset
52 int diameap_mysql_reconnect();
425
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
53
438
e7814e24e57b Corrected compilation warnings on app_diameap
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents: 425
diff changeset
54 int diameap_set_mysql_param(char * user, char * passwd, char * server, char * database);
425
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
55
438
e7814e24e57b Corrected compilation warnings on app_diameap
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents: 425
diff changeset
56 void diameap_mysql_disconnect();
425
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
57
438
e7814e24e57b Corrected compilation warnings on app_diameap
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents: 425
diff changeset
58 /* */
1027
0117a7746b21 Fix a number of errors and warnings introduced/highlighted by recent commits
Sebastien Decugis <sdecugis@freediameter.net>
parents: 438
diff changeset
59 int diameap_authentication_get_attribs(struct eap_user *user,
425
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
60 struct fd_list * attribute_list);
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
61
438
e7814e24e57b Corrected compilation warnings on app_diameap
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents: 425
diff changeset
62 /* */
1027
0117a7746b21 Fix a number of errors and warnings introduced/highlighted by recent commits
Sebastien Decugis <sdecugis@freediameter.net>
parents: 438
diff changeset
63 int diameap_authorization_get_attribs(struct eap_user *user,
425
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
64 struct fd_list * attribute_list);
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
65
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
66
0c6e50a5291d New app_diameap Diameter EAP Application
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
parents:
diff changeset
67 #endif /* DIAMEAP_MYSQL_H_ */
"Welcome to our mercurial repository"