blob: 1d9cfc0a4698cf14dc0cec3bbb61bbb1bb773336 [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 <pthread.h>
22#include <string.h>
23#include <unistd.h>
24#include <arpa/inet.h>
25
26#include "log.h"
27#include "err_codes.h"
28#include "message_queues.h"
29#include "s1ap_ie.h"
30
31void*
32ie_parse_global_enb_id(char *msg, int len)
33{
34 /*8 bytes
35 1- ignore
36 2,3,4 - plmn
37 5,6,7,8 - mactoeNBID*/
38 static struct ie_global_enb_id global_enb_id;
39
40 memcpy(&(global_enb_id.plmn), msg, sizeof(int));
41 memcpy(&(global_enb_id.macro_enb_id), msg+(sizeof(int)), MACRO_ENB_ID_SIZE);
42 global_enb_id.plmn = ntohl(global_enb_id.plmn);
43 //global_enb_id.macro_enb_id = ntohl(global_enb_id.macro_enb_id);
44 log_msg(LOG_INFO, "plmn %x\n", global_enb_id.plmn);
45 log_msg(LOG_INFO, "Macro enb id %x-%x-%x-%x\n", global_enb_id.macro_enb_id[0],
46 global_enb_id.macro_enb_id[4],global_enb_id.macro_enb_id[8],global_enb_id.macro_enb_id[12]);
47
48 return (void*)&global_enb_id;
49}
50
51void*
52ie_parse_enb_name(char *msg, int len)
53{
54 return NULL;
55}
56
57void*
58ie_parse_supported_TAs(char *msg, int len)
59{
60 return NULL;
61}
62
63void*
64ie_parse_pagins_DRX(char *msg, int len)
65{
66 return NULL;
67}