[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] question about struct if_head
On Fri, 28 Sep 2001, Cheng Li wrote:
> The "class Channel" (in channel.h) has a member declared as below:
>
> class Channel {
> ...
> public:
> struct if_head ifhead_
> ...
> }
>
> It is strange that I can not find the actual definition of the "struct
> if_hend" even though I have greped all the files in the ~/ns directory.
> Could anyone give me some explain?
you could try grepping for "struct if_head" instead. spelling helps.
$ grep if_head *.h
channel.h: struct if_head ifhead_;
node.h: inline const struct if_head& ifhead() const { return
ifhead_; }
node.h: struct if_head ifhead_; // list of phys for this node
phy.h:LIST_HEAD(if_head, Phy);
phy.h: inline void insertchnl(struct if_head *head) {
phy.h: inline void insertnode(struct if_head* head) {
that's all just horribly ugly. So, if_head is really a faked-up
pointer to a LIST_HEAD structure, as defined in ~/ns/lib/bsd-list.h.
L.
<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>