tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Modularizing net80211 (was: link_set info needed)

On Sep 18, 11:45am, David Laight wrote:
} Subject: Re: Modularizing net80211 (was: link_set info needed)
} > 
} > This mechanism only works for modules that are "separate" from the 
} > kernel (loaded via "boot" or from "filesys").  "builtin" modules still 
} > need to use the link_set mechanism.
} Shouldn't be that hard to put the contructor list address into a
} link_set - that would make it easy to get them called for 'built in'
} modules.
} Thinks a bit further...
} Have each module define a snall structure that contains (say):
} - it's name
} - the address of a list of modules it depends on
} - the address of its constructors
} - the address of its destructios

     You mean something like this, which is what modules do today:

/* Module header structure. */
typedef struct modinfo {
         u_int           mi_version;
         modclass_t      mi_class;
         int             (*mi_modcmd)(modcmd_t, void *);
         const char      *mi_name;
         const char      *mi_required;
} const modinfo_t;

mi_required is a comma seperated list of dependencies.  This structure
could be expanded.

}-- End of excerpt from David Laight

Home | Main Index | Thread Index | Old Index