-typedef kmod_info_t *kmod_info_array_t;
-
-#define KMOD_INFO_NAME kmod_info
-#define KMOD_INFO_VERSION 1
-
-#define KMOD_DECL(name, version) \
- static kmod_start_func_t name ## _module_start; \
- static kmod_stop_func_t name ## _module_stop; \
- kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1, \
- { #name }, { version }, -1, 0, 0, 0, 0, \
- name ## _module_start, \
- name ## _module_stop };
-
-#define KMOD_EXPLICIT_DECL(name, version, start, stop) \
- kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1, \
- { #name }, { version }, -1, 0, 0, 0, 0, \
- start, stop };
-
-// the following is useful for libaries that don't need their own start and stop functions
-#define KMOD_LIB_DECL(name, version) \
- kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1, \
- { #name }, { version }, -1, 0, 0, 0, 0, \
- kmod_default_start, \
- kmod_default_stop };
-
-
-// *************************************************************************************
-// kmod kernel to user commands
-// *************************************************************************************
-
-#define KMOD_LOAD_EXTENSION_PACKET 1
-#define KMOD_LOAD_WITH_DEPENDENCIES_PACKET 2
-
-// for generic packets
-#define KMOD_IOKIT_START_RANGE_PACKET 0x1000
-#define KMOD_IOKIT_END_RANGE_PACKET 0x1fff
-
-typedef struct kmod_load_extension_cmd {
- int type;
- char name[KMOD_MAX_NAME];
-} kmod_load_extension_cmd_t;
-
-typedef struct kmod_load_with_dependencies_cmd {
- int type;
- char name[KMOD_MAX_NAME];
- char dependencies[1][KMOD_MAX_NAME];
-} kmod_load_with_dependencies_cmd_t;
-
-typedef struct kmod_generic_cmd {
- int type;
- char data[1];
-} kmod_generic_cmd_t;
-
-#ifdef KERNEL_PRIVATE
-
-extern kmod_info_t *kmod_lookupbyname(const char * name);
-extern kmod_info_t *kmod_lookupbyid(kmod_t id);
-
-extern kmod_info_t *kmod_lookupbyname_locked(const char * name);
-extern kmod_info_t *kmod_lookupbyid_locked(kmod_t id);
-extern kmod_start_func_t kmod_default_start;
-extern kmod_stop_func_t kmod_default_stop;