osmo_sock_get_name() order

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Tue Jun 20 22:33:32 UTC 2017


In january, osmo_sock_get_name() was introduced and prints the connection info
for a given fd, which looks like this:

  127.0.0.1:2905<->127.0.0.1:60661

However, when I first saw this in a log, I was confused: I expect the local
address and port to be on the left, while in this string it is on the right.

Is it only me and I should get used to it, or can we reverse that so the local
part is on the left? I could argue that in most GSM graphics and ladder
diagrams, the client side is on the left, and that we would typically use this
string on the client side to indicate where we connected to. Is this even true?
Should there be an arg to pick the preferred order? :P

I'll submit a patch if anyone agrees.

~N

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20170621/6362dba2/attachment.bin>


More information about the OpenBSC mailing list