blob: cdc6536b356bac217dcb87e9c258549729635c02 [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301/*
2 * Copyright (c) 2019, Infosys Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18#ifndef __UE_S11_H_
19#define __UE_S11_H_
20
21#include <stdint.h>
22#include "log.h"
23#include "s11_structs.h"
24
25/*No of threads handling S11 GTPv2 messages coming in*/
26#define S11_THREADPOOL_SIZE 5
27
28#define S11_GTPV2C_BUF_LEN 4096
29
30/*GTPv2c message types*/
31#define S11_GTP_CREATE_SESSION_REQ 32
32#define S11_GTP_CREATE_SESSION_RESP 33
33#define S11_GTP_MODIFY_BEARER_RESP 35
34#define S11_GTP_DELETE_SESSION_RESP 37
35#define S11_GTP_RELEASE_BEARER_REQ 170
36#define S11_GTP_RELEASE_BEARER_RESP 171
37#define S11_GTP_DDN 176
38
39/*GTPv2c IE message types*/
40#define S11_IE_CAUSE 2
41#define S11_IE_FTEID_C 87
42#define S11_IE_PAA 79
43#define S11_IE_APN_RESTRICTION 127
44#define S11_IE_BEARER_CTX 93
45#define S11_IE_EPS_BEARER_ID 73
46
47int
48init_s11();
49
50void
51handle_s11_message(void *message);
52
53int
54init_s11();
55
56void
57handle_s11_message(void *message);
58
59int
60s11_transation(char * buf, unsigned int len);
61
62void* create_session_handler(void *);
63void* modify_bearer_handler(void *);
64void* release_bearer_handler(void *);
65void* delete_session_handler(void *);
66void* ddn_ack_handler(void *);
67/*int s11_CS_resp_handler(char *message);
68int s11_MB_resp_handler(char *message);
69int s11_DS_resp_handler(char *message);
70int s11_RB_resp_handler(char *message);
71int s11_DDN_handler(char *message);
72*/
73
74
75void
76bswap8_array(uint8_t *src, uint8_t *dest, uint32_t len);
77
78int parse_gtpv2c_IEs(char *msg, int len, struct s11_proto_IE *proto_ies);
79
80#endif /*S11_H*/