SoftPerfect Bandwidth Manager

Network adapter ID

Started by Christopher

Christopher

Network adapter ID   14 January 2022, 12:50

Within the Bandwidth Manager.DB, the rule table has an ADAPTER_ID column. I am trying to figure out what the column value translates to in terms of the actual adapter.

For instance, it shows 1381106261, what value is this referring to? I thought maybe it would store the interface index or something, but nothing I can get from powershell etc. returns 1381106261.

Thank you for your assistance!
SoftPerfect Support forum - Ann avatar image
Ann

Re: Network adapter ID   14 January 2022, 12:51

We were unable to use interface index as it turned out that adapter indices can change between reboots or system upgrades.

Instead we take the system adapter name (GUID) and compute a 32-bit hash value of it. The names and their hashes remain the same throughout the lifespan of the system.

If you just need to know the mapping once off in a single system, the simplest way would be to create a rule and assign an adapter to it to see what ID gets written into the database.

Alternatively we can simply add a new table in the database listing all available adapters and their IDs.
Christopher

Re: Network adapter ID   14 January 2022, 12:57

So the InterfaceGuid is used (in this test system case, the value returned by Get-NetworkAdapter is {2C58A09A-A27F-44CD-A457-CD2DEF8302AD})

We know the interface name (Ethernet), just need a way to pragmatically set the ADAPTER_ID in the table from the InterfaceGuid.
SoftPerfect Support forum - Ann avatar image
Ann

Re: Network adapter ID   14 January 2022, 13:13

As mentioned earlier, the simplest way would be to add a new table to the database listing all available interfaces and their IDs. We use a custom hashing function for the ID and calculating it outside the software would be complicated.

So if you download and install the latest build, you will see there is a new table ADAPTER that has all the information you need.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

  *******   **     **  **     **  **    **  **    ** 
 **     **  **     **   **   **   **   **   **   **  
 **         **     **    ** **    **  **    **  **   
 ********   **     **     ***     *****     *****    
 **     **  **     **    ** **    **  **    **  **   
 **     **  **     **   **   **   **   **   **   **  
  *******    *******   **     **  **    **  **    ** 

Message: