$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:
http://forum.nginx.org/read.php?2,147895,147895#msg-147895

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs