We have communicated a bit with ru in private mail. He insist on some OO like model: if we invent some generic properties for all interface nodes, they must be inherited, rather than supported by the node itself.
So I have proposed a different approach, and ru liked it. What will you say about it? Two new fields in struct ng_type are introduced: - u_int32_t family, a generic node type. All current nodes have this field as 0, they have no similar properties. For example, interface node family has value of 1. - void *family_data, a pointer to a family specific data. In case of interface family, it'll be struct ifnet *. A macro for assigning to a specific family is written. This macro sets type and sets pointer to proper data. Within this approach we have got kind of inherited properties. The only thing node needs to join some family, is to set its family and pass pointer to data. After this, it will support all family messages. Family specific messages really never reach the node code. They are handled in ng_base.c. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"