blob: abb6d53f63c7178fcd10637b369a213e57619a91 [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 "detach_stage2_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_DS_resp_handler(MsgBuffer* message, GtpV2MessageHeader* hdr)
42{
43
44
45 struct gtp_incoming_msg_data_t dsr_info;
46 dsr_info.msg_type = delete_session_response;
47
48 /*****Message structure****/
49 log_msg(LOG_INFO, "Parse S11 DS resp message\n");
50
51 //TODO : check cause for the result verification
52
53 /*Check whether has teid flag is set.
54 * Also check whether this check is needed for DSR.
55 * */
56 dsr_info.ue_idx = hdr->teid;
57
58 dsr_info.destInstAddr = htonl(mmeAppInstanceNum_c);
59 dsr_info.srcInstAddr = htonl(s11AppInstanceNum_c);
60
61 /*Send CS response msg*/
62 send_tipc_message(g_resp_fd, mmeAppInstanceNum_c, (char *)&dsr_info,
63 GTP_READ_MSG_BUF_SIZE);
64 log_msg(LOG_INFO, "Send DS resp to mme-app stage8.\n");
65
66 return SUCCESS;
67}