Network order or Host order for raw xlat style
shankarapailoor at gmail.com
Wed Jan 2 21:33:26 UTC 2019
Attached is a patch to handle xlat_styles for sin_port and sin_addr
fields in sockaddr_in decoding. Let me know what you all think.
On Wed, Jan 2, 2019 at 10:24 AM Eugene Syromiatnikov <esyr at redhat.com> wrote:
> On Wed, Jan 02, 2019 at 10:19:46AM -0800, shankarapailoor wrote:
> > Hi,
> > strace currently decodes sockaddr fields of sin_port and sin_addr in
> > macro form of htonl(X) and inet_addr("Y") even when using -Xraw which
> > seems wrong. I'm working on fixing this but I wonder: should the raw
> > value of these fields should be the network ordered value or host
> > ordered value?
> htonl() is used precisely for signifying byte order. If there's not such
> sign, host order is assumed. The same for inet_addr().
> As an alternative, the data in question can be printed as a hex string
> or a byte array.
> > Regards,
> > Shankara Pailoor
> > --
> > Strace-devel mailing list
> > Strace-devel at lists.strace.io
> > https://lists.strace.io/mailman/listinfo/strace-devel
> Strace-devel mailing list
> Strace-devel at lists.strace.io
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10405 bytes
Desc: not available
More information about the Strace-devel