[haiku-development] Re: Relationship between network device , network interface , network interface address and their configuration

  • From: sayan chaudhuri <sayanchaudhuri758@xxxxxxxxx>
  • To: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • Date: Thu, 29 Feb 2024 19:11:13 +0530

Hi Adrien,
                Thanks for the clarification .

 Thanks,
Sayan Chaudhuri

On Thu, Feb 29, 2024 at 7:06 PM Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
wrote:

Le jeudi 29 février 2024 14:27:54 (+01:00), sayan chaudhuri a écrit :

So, this line of code that stores only the configured device name and not
a pair of  configured(device name, address) is a blocker for the review
request (https://review.haiku-os.org/c/haiku/+/7259?tab=comments) .
I am thinking of a solution like this
1. inside function NetServer::_ConfigureInterfacesFromSettings, we have
the below two lines
         if (_ConfigureInterface(interface) == B_OK)
                  devicesSet.Add(device);
instead of this , may be we can have devicesSet type as a map of
(BNetworkDevice,BNetworkInterfaceAddress) and then add the configured
device and address family pairs from the message variable "interface" to
devicesSet. I do not know / could not find if any map class already exists
in Haiku.
2. Similarly inside NetServer::_ConfigureDevices, instead of checking
only for the device
if (entry.GetName(name) != B_OK
|| entry.GetPath(&path) != B_OK
|| entry.GetStat(&stat) != B_OK
|| devicesAlreadyConfigured.HasString(path.Path()))
 we can check for combination of device and address family being present
. if the pair is not present . then move on to auto_configure them,

Would like to have community feedback on this approach .


Hello,

I think this is the 4th time you send the same message.

This is not needed. Either no one had time to reply yet, or no one knows
how to answer your questions. In any case, re-sending the same message over
and over will not help.

If you get no reply, probably it means that your question requires some
research and reading of code to understand exactly what information you
need. Maybe you can try to provide a better overview for people who have
not followed the past discussion in the forum and in the merge request
(anyone who wants to reply now need to read both, which is about a hundred
posts I think. This will take a lot of time).

Maybe you can provide a better explanation of the problem and the needed
changes?

I will try to reply later, but I have not managed to find enough free time
to dig into this code and see what changes I would consider making.

--
Adrien / PulkoMandy


Other related posts: