feat(win32/networks): native parent resolution and USB/PCI ID correlation for Bluetooth adapters#1188
Open
eduardomozart wants to merge 11 commits into
Open
feat(win32/networks): native parent resolution and USB/PCI ID correlation for Bluetooth adapters#1188eduardomozart wants to merge 11 commits into
eduardomozart wants to merge 11 commits into
Conversation
Member
|
please, can you limit you in count of opened PR ? I don't have anymore time to review them anyway before the next release. |
Contributor
Author
|
No problem, I’m working on GLPI-Agent until this Friday when I should be assigned to other projects, after that I’ll have little to no time to work into it. |
4 tasks
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.
Description
What does this PR do?
This PR enhances the Windows Network Inventory module (
Networks.pm) to accurately resolve the manufacturer and model of virtual Bluetooth network interfaces by natively querying their physical parent hardware components.By accurately extracting the physical parent's identifiers and injecting them into the
NETWORKSpayload, this PR ensures that the GLPI server (specifically utilizing the duplicate-matching logic in GLPI PR #24494) can natively match the network card asset with the corresponding physical USB device. This allows the server to seamlessly remove the redundant standalone USB peripheral from the Computer assets!<NETWORKS> <DESCRIPTION>Bluetooth Device (Personal Area Network)</DESCRIPTION> <MACADDR>3C:0A:F3:8B:09:B8</MACADDR> - <MANUFACTURER>Microsoft</MANUFACTURER> - <MODEL>Bluetooth Device (Personal Area Network)</MODEL> + <MANUFACTURER>Realtek Semiconductor Corp.</MANUFACTURER> + <MODEL>Realtek Bluetooth Adapter</MODEL> <PNPDEVICEID>BTH\MS_BTHPAN\6&1aac2cac&0&2</PNPDEVICEID> <SPEED>3</SPEED> <STATUS>Down</STATUS> <TYPE>ethernet</TYPE> <VIRTUALDEV>0</VIRTUALDEV> </NETWORKS>Implementation Details:
Win32::APIwrappingcfgmgr32.dll(CM_Locate_DevNodeW,CM_Get_Parent, andCM_Get_Device_IDW).parentDeviceId(extractingVENDORID/PRODUCTID) and proactively query the agent's ID databases directly (usb.idsorpci.ids) viaGLPI::Agent::Tools::Generic.Win32_PnPEntityover WMI.networks.twith memory-safeWin32::APImethod mocks to fully validate the parent detection and resolution mechanisms.Why is this beneficial?
usb.ids/pci.ids) over raw WMI properties for all underlying peripheral components, guaranteeing the most accurate hardware branding possible.