-
Notifications
You must be signed in to change notification settings - Fork 4
/
hss.h
55 lines (48 loc) · 985 Bytes
/
hss.h
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
#ifndef HSS_H
#define HSS_H
#include "utils.h"
#include "packet.h"
#include "thread_pool.h"
#include "server.h"
#include "db_mysql.h"
struct UEData {
unsigned long long imsi;
unsigned long long msisdn;
unsigned long long autn_num;
unsigned long long rand_num;
unsigned long long autn_xres;
unsigned long long key_id;
UEData();
UEData(const UEData&);
friend void swap(UEData&, UEData&);
UEData& operator=(UEData);
UEData(UEData&&);
~UEData();
};
struct HSS {
Server hss_server;
UEData ue_data;
MySql db_client;
MYSQL_ROW query_res;
string query;
string res_row;
time_t curr_time;
tm *local_time;
int curr_sec;
int num_fields;
HSS();
HSS(const HSS&);
friend void swap(HSS&, HSS&);
HSS& operator=(HSS);
HSS(HSS&&);
void startup_hss_server(ClientDetails&);
void setup_db_client();
void handle_db_error();
void recv_req_from_mme();
void set_key_id();
void set_autn_tokens();
void set_autn_xres();
void send_res_to_mme();
~HSS();
};
#endif //HSS_H