#include <mach/kmod.h> also included by
<mach/mach.h>mach/kmod.h
NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce
support for mandatory and extensible security protections. This notice
is included in support of clause 2.2 (b) of the Apple Public License,
Version 2.0.
macroKMOD_MAX_NAME
*********************************************************************
Basic macros & typedefs
*********************************************************************
#define KMOD_MAX_NAME 64
macroKMOD_RETURN_SUCCESS
#define KMOD_RETURN_SUCCESS KERN_SUCCESS
macroKMOD_RETURN_FAILURE
#define KMOD_RETURN_FAILURE KERN_FAILURE
typedefkmod_t
typedef int kmod_t
typedefkmod_start_func_t
typedef kern_return_t kmod_start_func_t(struct kmod_info * ki, void * data)
typedefkmod_stop_func_t
typedef kern_return_t kmod_stop_func_t(struct kmod_info * ki, void * data)
structkmod_reference
Run-time struct only; never saved to a file
| struct kmod_reference * | next | |
| struct kmod_info * | info |
typedefkmod_reference_t
typedef struct kmod_reference kmod_reference_t;
structkmod_info
The kmod_info_t structure is only safe to use inside the running
kernel. If you need to work with a kmod_info_t structure outside
the kernel, please use the compatibility definitions below.
| struct kmod_info * | next | |
| int32_t | info_version | version of this structure |
| uint32_t | id | |
| char[64] | name | |
| char[64] | version | |
| int32_t | reference_count | # linkage refs to this |
| kmod_reference_t * | reference_list | who this refs (links on) |
| vm_address_t | address | starting address |
| vm_size_t | size | total size |
| vm_size_t | hdr_size | unwired hdr size |
| kmod_start_func_t * | start | |
| kmod_stop_func_t * | stop |
typedefkmod_info_t
typedef struct kmod_info kmod_info_t;
structkmod_info_32_v1
A compatibility definition of kmod_info_t for 32-bit kexts.
| uint32_t | next_addr | |
| int32_t | info_version | |
| uint32_t | id | |
| uint8_t[64] | name | |
| uint8_t[64] | version | |
| int32_t | reference_count | |
| uint32_t | reference_list_addr | |
| uint32_t | address | |
| uint32_t | size | |
| uint32_t | hdr_size | |
| uint32_t | start_addr | |
| uint32_t | stop_addr |
typedefkmod_info_32_v1_t
typedef struct kmod_info_32_v1 kmod_info_32_v1_t;
structkmod_info_64_v1
A compatibility definition of kmod_info_t for 64-bit kexts.
| uint64_t | next_addr | |
| int32_t | info_version | |
| uint32_t | id | |
| uint8_t[64] | name | |
| uint8_t[64] | version | |
| int32_t | reference_count | |
| uint64_t | reference_list_addr | |
| uint64_t | address | |
| uint64_t | size | |
| uint64_t | hdr_size | |
| uint64_t | start_addr | |
| uint64_t | stop_addr |
typedefkmod_info_64_v1_t
typedef struct kmod_info_64_v1 kmod_info_64_v1_t;
macroKMOD_INFO_NAME
*********************************************************************
Kmod structure declaration macros
*********************************************************************
#define KMOD_INFO_NAME kmod_info
macroKMOD_INFO_VERSION
#define KMOD_INFO_VERSION 1
macroKMOD_DECL
#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, -1U, { #name }, { version }, -1, 0, 0, 0, 0, name ## _module_start, name ## _module_stop };
macroKMOD_EXPLICIT_DECL
#define KMOD_EXPLICIT_DECL(name, version, start, stop) kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1U, { #name }, { version }, -1, 0, 0, 0, 0, start, stop };
typedefkmod_args_t
*********************************************************************
These 3 should be dropped but they're referenced by MIG declarations.
*********************************************************************
typedef void * kmod_args_t
typedefkmod_control_flavor_t
typedef int kmod_control_flavor_t
typedefkmod_info_array_t
typedef kmod_info_t * kmod_info_array_t