Teach nut-scanner to discover locally connected subnets: implement -m auto mode#2513
Merged
jimklimov merged 30 commits intonetworkupstools:masterfrom Jul 8, 2024
Merged
Conversation
…}: report the IP address (range, single, none) in the log [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…pstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…roper support [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ions [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… options and others behave differently without them [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… introduce a way to scan several IP address ranges [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…on-threaded scans too [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ice() from adding a list to itself Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…etworkupstools#2244] We actually use DEFAULT_NETWORK_TIMEOUT from common.h same as in clients/upsclient.c Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…scans do not parallelize together [networkupstools#2244] See also: networkupstools#2511 Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ymbols in libnutscan to use them in nut-scanner [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… and logged reports to help troubleshooting [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… in the name, and use static structs and memcpy() to actually fix alignment warnings [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…n-/semi-valid inputs [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… actually fix alignment warnings Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…h detection of configured network interfaces Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…for debug printouts to be predictable on different platforms [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…t as a real upsdebugx() trail [networkupstools#2244] Originally I intended to use these to check that the address parsing code works, and drop the printf() of these messages. But if I collect them into a string and upsdebug() it - why not, can help troubleshooting in real life later, too. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…etworkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…{,6} so it is aligned how-ever the platform likes [networkupstools#2244]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ifaddrs()" [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…e handling whatever value of `-m` option [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ting discovered subnets into CIDR and adding to IP ranges for scanning [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…r/mask buffers [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
|
❌ Build nut 2.8.2.1879-master failed (commit 808d6725ae by @jimklimov) |
Member
Author
|
For WIN32 different methods are needed, mingw does not provide the POSIXish types and methods here:
For now will shunt the feature to have checkable it on POSIX systems at least. |
…es (for networking "-m auto" support) [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…o" support for WIN32 (needs different implementation) [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…mit selection of ranges to IPv4/IPv6 only [networkupstools#2244] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Member
Author
|
Added Worked "as is" even on MacOS: For that matter, to filter usable addresses by flags on MacOS, there seems to be a difference of |
|
✅ Build nut 2.8.2.1880-master completed (commit 6e8d6ec959 by @jimklimov) |
This was referenced Jul 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up from PR #2509 for issue #2244 to complete the feature. Separated because of need for longer testing and adaptation to different platforms and certain questions raised in #2509, while that PR has value of its own and can be merged to already allow multiple IP address range scans with one call to the tool.
Closes: #2244