#ifndef _KERN_MACH_HEADER_
#define _KERN_MACH_HEADER_
#include <mach/mach_types.h>
#include <mach-o/loader.h>
#if KERNEL
struct mach_header **getmachheaders(void);
vm_offset_t getlastaddr(void);
struct segment_command *firstseg(void);
struct segment_command *firstsegfromheader(struct mach_header *header);
struct segment_command *nextseg(struct segment_command *sgp);
struct segment_command *nextsegfromheader(
struct mach_header *header,
struct segment_command *seg);
struct segment_command *getsegbyname(char *seg_name);
struct segment_command *getsegbynamefromheader(
struct mach_header *header,
char *seg_name);
void *getsegdatafromheader(struct mach_header *, char *, int *);
struct section *getsectbyname(char *seg_name, char *sect_name);
struct section *getsectbynamefromheader(
struct mach_header *header,
char *seg_name,
char *sect_name);
void *getsectdatafromheader(struct mach_header *, char *, char *, int *);
struct section *firstsect(struct segment_command *sgp);
struct section *nextsect(struct segment_command *sgp, struct section *sp);
struct fvmlib_command *fvmlib(void);
struct fvmlib_command *fvmlibfromheader(struct mach_header *header);
struct segment_command *getfakefvmseg(void);
#ifdef MACH_KDB
struct symtab_command *getsectcmdsymtabfromheader(struct mach_header *);
boolean_t getsymtab(struct mach_header *, vm_offset_t *, int *,
vm_offset_t *, vm_size_t *);
#endif
#endif
#endif