[Bug 281541] rpcinfo: format of argument to -a flag is undocumented
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 281541] rpcinfo: format of argument to -a flag is undocumented"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Oct 2024 03:40:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281541 Graham Percival <gperciva@tarsnap.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gperciva@tarsnap.com --- Comment #1 from Graham Percival <gperciva@tarsnap.com> --- Your understanding looks correct. I found the definition of "universal address format" in RFC 5665. In particular, for IPv4, it's: h1.h2.h3.h4.p1.p2 where hX is the normal IPv4, and .p1.p2 is the port. Interestingly, the RFC says > Assuming big-endian ordering, p1 and p2 are, respectively, > the first and second octets each converted to ASCII-decimal. > https://www.rfc-editor.org/rfc//rfc5665#section-5.2.3.3 Shouldn't the RFC *specify* whether it's big-endian or little-endian? Anyway, in terms of the actual code, when we do `rpcinfo -a address ...`, we end up in usr.bin/rpcinfo/rpcinfo.c line 1236, where `address` is passed to uaddr2taddr(). In turn, uaddr2taddr() is defined in both sys/rpc/rpc_generic.c and lib/libc/rpc/rpc_generic.c. Those files are similar, but not identical... but they don't seem to differ significantly in their implementations of uaddr2taddr(). And yes, it looks big-endian; p2 ends up being `portlo` and p1 is `porthi` in the code. -- You are receiving this mail because: You are the assignee for the bug.