$binary_remote_addr byte order (big-endian guaranteed?)

In what format is $binary_remote_addr? Test shows network byte order
(big-endian), but is that guaranteed?

English wiki doesn’t say, and my Russian leaves much to be desired.

helen

Posted at Nginx Forum:

Hello!

On Fri, Nov 05, 2010 at 04:06:44AM -0400, helen wrote:

In what format is $binary_remote_addr? Test shows network byte order
(big-endian), but is that guaranteed?

It’s remote address as returned by accept(), either s_addr for
ipv4 or s6_addr for ipv6. Both are guaranteed to be in network
byte order[1]. Value for unix socket connections is unspecified.

[1]
http://www.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html

English wiki doesn’t say, and my Russian leaves much to be desired.

Use the Source, Luke! :wink:

Maxim D.