sysprog21 / vwifi

A virtual wireless device driver for Linux
MIT License
205 stars 39 forks source link

Modify indexing for function vwifi_interface_add #58

Open vax-r opened 9 months ago

vax-r commented 9 months ago

Summary

Since we implement a counter for wiphy in our project, which is vwifi_wiphy_counter. The relationship between virtual interfaces and wiphy is always one-to-one, so the indexing for virtual interfaces can be the same as wiphy.

Originally, the index for virtual interface is passed as a function parameters into the function vwifi_interface_add(). Now we modify the function, instead of using parameters as index for virtual interface, we use the value of vwifi_wiphy_counter to keep a better consistency.

jserv commented 9 months ago

Can you check if the proposed change works with namespace?

vax-r commented 9 months ago

Can you check if the proposed change works with namespace?

Do you mean can we use the same approach on the index for namespace such as ns0 and ns1?

jserv commented 9 months ago

Do you mean can we use the same approach on the index for namespace such as ns0 and ns1?

Indeed, it is important to recognize that the primary aim of implementing vwifi is to facilitate its deployment within containerized or virtualized environments.

vax-r commented 9 months ago

Do you mean can we use the same approach on the index for namespace such as ns0 and ns1?

Indeed, it is important to recognize that the primary aim of implementing vwifi is to facilitate its deployment within containerized or virtualized environments.

No problem, let me try to make it possible.

jserv commented 5 months ago

I would like to ask @jychen0611 to rework this pull request.