Skip to content

Move inet_ntopXX() methods to common.{c,h} #2916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 24, 2025

Conversation

jimklimov
Copy link
Member

@jimklimov jimklimov commented Apr 24, 2025

There is a fair amount of ritual to memcpy() (for alignment) the socket structures for different address families, to extract the IP (or other) address from them with inet_ntop() afterwards. Relocating these methods into one spot allows to simplify repetitions of that code in NUT codebase, as well as commonly extend later (e.g. AF_UNIX?..) should we want to.

Follows up from #2915 (includes it) and #2847.

The problem seems to have been introduced in #2012 (part of NUT v2.8.2).

@jimklimov jimklimov added enhancement C-str Issues and PRs about C/C++ methods, headers and data types dealing with strings and memory blocks labels Apr 24, 2025
@jimklimov jimklimov added this to the 2.8.4 milestone Apr 24, 2025
…normally

Avoid firing up QEMU builders on the NUT CI farm, unless we want QEMU tests

Signed-off-by: Jim Klimov <[email protected]>
@jimklimov jimklimov added the CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) label Apr 24, 2025
@jimklimov jimklimov merged commit 72fbc58 into networkupstools:master Apr 24, 2025
30 checks passed
@jimklimov jimklimov deleted the common-inet_ntopX branch April 24, 2025 22:22
@jimklimov jimklimov added impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) impacts-release-2.8.3 Issues reported against NUT release 2.8.3 (maybe vanilla or with minor packaging tweaks) labels Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-str Issues and PRs about C/C++ methods, headers and data types dealing with strings and memory blocks CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) enhancement impacts-release-2.8.2 Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks) impacts-release-2.8.3 Issues reported against NUT release 2.8.3 (maybe vanilla or with minor packaging tweaks)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants