Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
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
cpp-libs
Actor Framework
Commits
4d286a3d
Commit
4d286a3d
authored
Feb 06, 2019
by
Joseph Noir
Committed by
Joseph Noir
Feb 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify byte order for ipv4 address bit access
parent
46dba713
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
libcaf_core/caf/ipv4_address.hpp
libcaf_core/caf/ipv4_address.hpp
+5
-3
No files found.
libcaf_core/caf/ipv4_address.hpp
View file @
4d286a3d
...
@@ -46,6 +46,7 @@ public:
...
@@ -46,6 +46,7 @@ public:
explicit
ipv4_address
(
array_type
bytes
);
explicit
ipv4_address
(
array_type
bytes
);
/// Constructs an IPv4 address from bits in network byte order.
static
ipv4_address
from_bits
(
uint32_t
bits
)
{
static
ipv4_address
from_bits
(
uint32_t
bits
)
{
ipv4_address
result
;
ipv4_address
result
;
result
.
bits
(
bits
);
result
.
bits
(
bits
);
...
@@ -60,13 +61,14 @@ public:
...
@@ -60,13 +61,14 @@ public:
/// Returns whether this is a multicast address.
/// Returns whether this is a multicast address.
bool
is_multicast
()
const
noexcept
;
bool
is_multicast
()
const
noexcept
;
/// Returns the bits of the IP address in a single integer.
/// Returns the bits of the IP address in a single integer arranged in network
/// byte order.
inline
uint32_t
bits
()
const
noexcept
{
inline
uint32_t
bits
()
const
noexcept
{
return
bits_
;
return
bits_
;
}
}
/// Sets all bits of the IP address
in a single 32-bit write.
/// Sets all bits of the IP address
with a single 32-bit write. Expects
///
@private
///
argument in network byte order.
inline
void
bits
(
uint32_t
value
)
noexcept
{
inline
void
bits
(
uint32_t
value
)
noexcept
{
bits_
=
value
;
bits_
=
value
;
}
}
...
...
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