Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Libraries
UERANSIM
Commits
f74badf4
Commit
f74badf4
authored
Dec 07, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPv6 support
parent
84e28938
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
src/utils/yaml_utils.cpp
src/utils/yaml_utils.cpp
+16
-0
src/utils/yaml_utils.hpp
src/utils/yaml_utils.hpp
+1
-0
No files found.
src/utils/yaml_utils.cpp
View file @
f74badf4
...
...
@@ -158,6 +158,22 @@ std::string GetIp4(const YAML::Node &node, const std::string &name)
return
ipFromIf
;
}
std
::
string
GetIp6
(
const
YAML
::
Node
&
node
,
const
std
::
string
&
name
)
{
std
::
string
s
=
GetString
(
node
,
name
);
int
version
=
utils
::
GetIpVersion
(
s
);
if
(
version
==
4
)
FieldError
(
name
,
"must be a valid IPv6 address or a valid network interface with a IPv6 address"
);
if
(
version
==
6
)
return
s
;
auto
ipFromIf
=
io
::
GetIp6OfInterface
(
s
);
if
(
ipFromIf
.
empty
())
FieldError
(
name
,
"must be a valid IPv6 address or a valid network interface with a IPv6 address"
);
return
ipFromIf
;
}
std
::
string
GetIp
(
const
YAML
::
Node
&
node
,
const
std
::
string
&
name
)
{
std
::
string
s
=
GetString
(
node
,
name
);
...
...
src/utils/yaml_utils.hpp
View file @
f74badf4
...
...
@@ -42,6 +42,7 @@ std::string GetString(const YAML::Node &node, const std::string &name, std::opti
std
::
optional
<
int
>
maxLength
);
std
::
string
GetIp4
(
const
YAML
::
Node
&
node
,
const
std
::
string
&
name
);
std
::
string
GetIp6
(
const
YAML
::
Node
&
node
,
const
std
::
string
&
name
);
std
::
string
GetIp
(
const
YAML
::
Node
&
node
,
const
std
::
string
&
name
);
bool
GetBool
(
const
YAML
::
Node
&
node
,
const
std
::
string
&
name
);
...
...
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