Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
9433e64f
Commit
9433e64f
authored
Sep 08, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary file
parent
7db4fc19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
76 deletions
+0
-76
src/utils/conversions.hpp
src/utils/conversions.hpp
+0
-76
No files found.
src/utils/conversions.hpp
deleted
100644 → 0
View file @
7db4fc19
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file conversions.hpp
\brief
\author Shivam Gandhi
\company KCL
\email: shivam.gandhi@kcl.ac.uk
*/
#ifndef FILE_CONVERSIONS_HPP_SEEN
#define FILE_CONVERSIONS_HPP_SEEN
#include <stdint.h>
#include <string>
#include <netinet/in.h>
#include "3gpp_23.003.h"
/* Used to format an uint32_t containing an ipv4 address */
#define IN_ADDR_FMT "%u.%u.%u.%u"
#define PRI_IN_ADDR(aDDRESS) \
(uint8_t)((aDDRESS.s_addr) & 0x000000ff), \
(uint8_t)(((aDDRESS.s_addr) & 0x0000ff00) >> 8), \
(uint8_t)(((aDDRESS.s_addr) & 0x00ff0000) >> 16), \
(uint8_t)(((aDDRESS.s_addr) & 0xff000000) >> 24)
#define IPV4_ADDR_DISPLAY_8(aDDRESS) \
(aDDRESS)[0], (aDDRESS)[1], (aDDRESS)[2], (aDDRESS)[3]
/* Convert an integer on 32 bits to the given bUFFER */
#define INT32_TO_BUFFER(x, buf) \
(buf)[0] = (x) >> 24, (buf)[1] = (x) >> 16, (buf)[2] = (x) >> 8, \
(buf)[3] = (x)
class
conv
{
public:
static
void
hexa_to_ascii
(
uint8_t
*
from
,
char
*
to
,
size_t
length
);
static
int
ascii_to_hex
(
uint8_t
*
dst
,
const
char
*
h
);
static
struct
in_addr
fromString
(
const
std
::
string
addr4
);
static
bool
plmnFromString
(
plmn_t
&
p
,
const
std
::
string
mcc
,
const
std
::
string
mnc
);
static
std
::
string
toString
(
const
struct
in_addr
&
inaddr
);
static
std
::
string
toString
(
const
struct
in6_addr
&
in6addr
);
static
std
::
string
mccToString
(
const
uint8_t
digit1
,
const
uint8_t
digit2
,
const
uint8_t
digit3
);
static
std
::
string
mncToString
(
const
uint8_t
digit1
,
const
uint8_t
digit2
,
const
uint8_t
digit3
);
/*
* Convert a string to hex representing this string
* @param [const std::string&] input_str Input string
* @param [std::string&] output_str String represents string in hex format
* @return void
*/
static
void
convert_string_2_hex
(
const
std
::
string
&
input_str
,
std
::
string
&
output_str
);
};
#endif
/* FILE_CONVERSIONS_HPP_SEEN */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment