Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2022 12:11:45 -0400
From:      "Farhan Khan" <farhan@farhan.codes>
To:        freebsd-wireless@freebsd.org
Subject:   Understanding ic_node_alloc method
Message-ID:  <c5575bdc-5c06-4e47-af6b-c435f8755ab7@www.fastmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I am trying to understand the purpose of ic->ic_node_alloc and it is not clear to me what its purpose is.

After looking through a few examples, I see that there is a "struct DRIVERNAME_node" that gets allocated. The first member of this struct must be a "struct ieee80211_node ni". Then the function either returns the allocated DRIVERNAME_node pointer or or &DRIVER_NAME_node->ni (same address since `ni` must be the first value in the struct). This part is clear.

Internally, different functions assign different values and I have not been able to determine a consistency between them. Can someone please explain to me the purpose of this function? What is being kept track of? When is it triggered?

Open-ended question, please explain.
Thank you!
--
Farhan Khan
PGP Fingerprint: 1312 89CE 663E 1EB2 179C 1C83 C41D 2281 F8DA C0DE




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c5575bdc-5c06-4e47-af6b-c435f8755ab7>