Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: mojo/services/public/interfaces/network/net_address.mojom

Issue 645423003: Make Mojo's NetAddress use local endianness for the port. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/public/interfaces/network/net_address.mojom
diff --git a/mojo/services/public/interfaces/network/net_address.mojom b/mojo/services/public/interfaces/network/net_address.mojom
index a358e9e5280694c5756b083a908770ef8a4b87c1..d85824212318b0b1b4e61a54d050ff0e887d1192 100644
--- a/mojo/services/public/interfaces/network/net_address.mojom
+++ b/mojo/services/public/interfaces/network/net_address.mojom
@@ -10,17 +10,22 @@ enum NetAddressFamily {
IPV6
};
-// All members are expressed in network byte order, i.e., the most significant
-// byte is stored in the smallest address. For example, if we store 127.0.0.1 in
-// |addr|, 127 should be at index 0.
struct NetAddressIPv4 {
+ // The port number. This is in the local machine's endianness.
uint16 port;
+
+ // The address is expressed in network byte order, so the most significant
+ // byte ("127" in the address "127.0.0.1") will be at index 0.
array<uint8, 4> addr;
};
// All members are expressed in network byte order.
struct NetAddressIPv6 {
+ // The port number. This is in the local machine's endianness.
uint16 port;
+
+ // The address is expressed in network byte order, so the most significant
+ // byte is at index 0.
array<uint8, 16> addr;
};
« no previous file with comments | « mojo/services/network/net_address_type_converters.cc ('k') | mojo/services/public/interfaces/network/udp_socket.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698