blob: 5c2532745a8ee271ebb7ff136ab37b20c484c2ca [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301/*
2 * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
3 * Copyright (c) 2017 Intel Corporation
4 * Copyright (c) 2019, Infosys Ltd.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19#include <stdio.h>
20#include <stdlib.h>
21#include <arpa/inet.h>
22#include <unistd.h>
23#include <string.h>
24#include <pthread.h>
25
26#include "err_codes.h"
27#include "options.h"
28#include "ipc_api.h"
29#include "message_queues.h"
30#include "s11.h"
31#include "s11_config.h"
32#include "msgType.h"
33//#include "stage8_info.h"
34#include "../../gtpV2Codec/gtpV2StackWrappers.h"
35/*Globals and externs*/
36extern int g_resp_fd;
37
38/*End : globals and externs*/
39
40int
41s11_MB_resp_handler(MsgBuffer* message, GtpV2MessageHeader* hdr)
42{
43
44 struct gtp_incoming_msg_data_t mbr_info;
45
46 /*****Message structure***
47 */
48 log_msg(LOG_INFO, "Parse S11 MB resp message\n");
49
50 //TODO : check cause foor the result verification
51
52 /*Check whether has teid flag is set. Also check whether this check is needed for CSR.*/
53 mbr_info.ue_idx = hdr->teid;
54 mbr_info.msg_type = modify_bearer_response;
55
56 mbr_info.destInstAddr = htonl(mmeAppInstanceNum_c);
57 mbr_info.srcInstAddr = htonl(s11AppInstanceNum_c);
58 /*Send CS response msg*/
59 send_tipc_message(g_resp_fd, mmeAppInstanceNum_c, (char *)&mbr_info, GTP_READ_MSG_BUF_SIZE);
60 log_msg(LOG_INFO, "Send MB resp to mme-app stage8.\n");
61
62 return SUCCESS;
63}