Change in libosmocore[master]: add osmo_ip_port API
gerrit-no-reply at lists.osmocom.org
Fri Mar 8 11:20:18 UTC 2019
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13123 )
Change subject: add osmo_ip_port API
Patch Set 4:
PS4, Line 47: osmo_ip_port
> - sockaddr stores the port in network byte order, each log line would have to remember to call ntohs […]
my point was not that people should use sockaddr_storage directly, but that instead of this proposed patch, one could probably simply have a set of utility functions that work on sockaddr_storage instead of a custom-invented struct. The string-to-binary and binary-to-string conversions could then be hidden by that API.
There is no compilation problem with "ARM" per se. There might be problems if you're building something intended for a Linux/Posix-style operating system on a "bare iron" embedded system, such as the builds we do for the osmocombb firmware (and possibly more firmware projects in the near future). As those sysdtems have no IP adresses to begin with, the safe chocie is to simply not build anything related to networking on them.
I'd like to see other people's comments on this. I personally don't think it looks like something that I'd want to see as part of the standard libosmocore infrastructure. At least not unless I see a strong reason against my "have same API but use sockaddr_storage + conversion underneath" proposal.
PS4, Line 80: osmo_ip_port_to_32
> normal convention in osmocom is lke memcpy(): Output argument is first, followed by input argument[s […]
this comment holds true whether or not we use sockaddr_storage, and whether or not we merge it to libosmocore or osmo-mgw.git
To view, visit https://gerrit.osmocom.org/13123
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-CC: Harald Welte <laforge at gnumonks.org>
Gerrit-Comment-Date: Fri, 08 Mar 2019 11:20:18 +0000
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log