git://git.onelab.eu
/
sliver-openvswitch.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Initial import
[sliver-openvswitch.git]
/
include
/
xtoxll.h
1
#ifndef XTOXLL_H
2
#define XTOXLL_H 1
3
4
#include <arpa/inet.h>
5
#include <sys/types.h>
6
7
static inline uint64_t
8
htonll(uint64_t n)
9
{
10
return htonl(1) == 1 ? n : ((uint64_t) htonl(n) << 32) | htonl(n >> 32);
11
}
12
13
static inline uint64_t
14
ntohll(uint64_t n)
15
{
16
return htonl(1) == 1 ? n : ((uint64_t) ntohl(n) << 32) | ntohl(n >> 32);
17
}
18
19
#endif /* xtonll.h */