Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
958cb250
Commit
958cb250
authored
6 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
dhtnode: show both IPv4, IPv6 bound ports
parent
6a5724a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/dhtnode.cpp
+7
-1
7 additions, 1 deletion
tools/dhtnode.cpp
with
7 additions
and
1 deletion
tools/dhtnode.cpp
+
7
−
1
View file @
958cb250
...
@@ -49,7 +49,13 @@ void print_id_req() {
...
@@ -49,7 +49,13 @@ void print_id_req() {
}
}
void
print_node_info
(
const
std
::
shared_ptr
<
DhtRunner
>&
dht
,
const
dht_params
&
params
)
{
void
print_node_info
(
const
std
::
shared_ptr
<
DhtRunner
>&
dht
,
const
dht_params
&
params
)
{
std
::
cout
<<
"OpenDHT node "
<<
dht
->
getNodeId
()
<<
" running on port "
<<
dht
->
getBoundPort
()
<<
std
::
endl
;
std
::
cout
<<
"OpenDHT node "
<<
dht
->
getNodeId
()
<<
" running on "
;
auto
port4
=
dht
->
getBoundPort
(
AF_INET
);
auto
port6
=
dht
->
getBoundPort
(
AF_INET6
);
if
(
port4
==
port6
)
std
::
cout
<<
"port "
<<
port4
<<
std
::
endl
;
else
std
::
cout
<<
"IPv4 port "
<<
port4
<<
", IPv6 port "
<<
port6
<<
std
::
endl
;
if
(
params
.
generate_identity
)
if
(
params
.
generate_identity
)
std
::
cout
<<
"Public key ID "
<<
dht
->
getId
()
<<
std
::
endl
;
std
::
cout
<<
"Public key ID "
<<
dht
->
getId
()
<<
std
::
endl
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment