mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
Convert remaining network-byte-order "uint<N>_t"s into "ovs_be<N>"s.
I looked at almost every uint<N>_t in the tree to determine whether it was really in network byte order, and converted the ones that were. The only remaining ones, modulo my mistakes, are in openflow.h. I'm not sure whether we should convert those, because there might be some value in remaining close to upstream for this header.
This commit is contained in:
@@ -430,10 +430,10 @@ get_unix_name_len(socklen_t sun_len)
|
||||
: 0);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
guess_netmask(uint32_t ip)
|
||||
ovs_be32
|
||||
guess_netmask(ovs_be32 ip_)
|
||||
{
|
||||
ip = ntohl(ip);
|
||||
uint32_t ip = ntohl(ip_);
|
||||
return ((ip >> 31) == 0 ? htonl(0xff000000) /* Class A */
|
||||
: (ip >> 30) == 2 ? htonl(0xffff0000) /* Class B */
|
||||
: (ip >> 29) == 6 ? htonl(0xffffff00) /* Class C */
|
||||
|
Reference in New Issue
Block a user