Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
31707f9f
Commit
31707f9f
authored
Jan 29, 2013
by
JINMEI Tatuya
Browse files
[2310] added notes about htonl() portability considerations
parent
2ca96761
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/memory/zone_data.cc
View file @
31707f9f
...
...
@@ -138,6 +138,9 @@ namespace {
// A helper to convert a TTL value in network byte order and set it in
// ZoneData::min_ttl_. We can use util::OutputBuffer, but copy the logic
// here to guarantee it is exception free.
// Note: essentially this function is a local (re)implementation of the
// standard htonl() library function, but we avoid relying on it in case it's
// not available (it's not in the C++ standard library).
void
setTTLInNetOrder
(
uint32_t
val
,
uint32_t
*
result
)
{
uint8_t
buf
[
4
];
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment