Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
cpp-libs
actor-incubator
Commits
fd2f5137
Commit
fd2f5137
authored
Sep 22, 2019
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use resolve to get local addresses for any addr
parent
86e62c53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
libcaf_net/src/ip.cpp
libcaf_net/src/ip.cpp
+4
-7
No files found.
libcaf_net/src/ip.cpp
View file @
fd2f5137
...
@@ -226,13 +226,10 @@ std::vector<ip_address> local_addresses(string_view host) {
...
@@ -226,13 +226,10 @@ std::vector<ip_address> local_addresses(string_view host) {
}
}
std
::
vector
<
ip_address
>
local_addresses
(
ip_address
host
)
{
std
::
vector
<
ip_address
>
local_addresses
(
ip_address
host
)
{
auto
v6_any
=
ip_address
{{
0
},
{
0
}};
static
auto
v6_any
=
ip_address
{{
0
},
{
0
}};
auto
v4_any
=
ip_address
{
make_ipv4_address
(
0
,
0
,
0
,
0
)};
static
auto
v4_any
=
ip_address
{
make_ipv4_address
(
0
,
0
,
0
,
0
)};
// TODO: If is any addr, call resolve with PR #23.
if
(
host
==
v4_any
||
host
==
v6_any
)
if
(
host
==
v4_any
)
return
resolve
(
""
);
return
{
ip_address
{
make_ipv4_address
(
0
,
0
,
0
,
0
)}};
if
(
host
==
v6_any
)
return
{
ip_address
{}};
auto
link_local
=
ip_address
({
0xfe
,
0x8
,
0x0
,
0x0
},
{
0x0
,
0x0
,
0x0
,
0x0
});
auto
link_local
=
ip_address
({
0xfe
,
0x8
,
0x0
,
0x0
},
{
0x0
,
0x0
,
0x0
,
0x0
});
auto
ll_prefix
=
ip_subnet
(
link_local
,
10
);
auto
ll_prefix
=
ip_subnet
(
link_local
,
10
);
// Unless explicitly specified we are going to skip link-local addresses.
// Unless explicitly specified we are going to skip link-local addresses.
...
...
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