The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/libsa/libsa/mkext.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #ifndef _MKEXT_H_
    2 #define _MKEXT_H_ 1
    3 
    4 #include <sys/cdefs.h>
    5 #include <sys/types.h>
    6 
    7 #include <mach/machine.h>
    8 
    9 #define MKEXT_MAGIC 'MKXT'
   10 #define MKEXT_SIGN 'MOSX'
   11 
   12 #define MKEXT_EXTN ".mkext"
   13 
   14 // All binary values are big-endian
   15 
   16 // If all fields are 0 then this file slot is empty
   17 // If compsize is zero then the file isn't compressed.
   18 typedef struct mkext_file {
   19     size_t offset;         // 4 bytes
   20     size_t compsize;       // 4 bytes
   21     size_t realsize;       // 4 bytes
   22     time_t modifiedsecs;   // 4 bytes
   23 } mkext_file;
   24 
   25 // The plist file entry is mandatory, but module may be empty
   26 typedef struct mkext_kext {
   27     mkext_file plist;      // 16 bytes
   28     mkext_file module;     // 16 bytes
   29 } mkext_kext;
   30 
   31 typedef struct mkext_header {
   32     u_int32_t magic;          // 'MKXT'
   33     u_int32_t signature;      // 'MOSX'
   34     u_int32_t length;
   35     u_int32_t adler32;
   36     u_int32_t version;        // vers resource, currently '1.0.0', 0x01008000
   37     u_int32_t numkexts;
   38     cpu_type_t cputype;       // CPU_TYPE_ANY for fat executables
   39     cpu_subtype_t cpusubtype; // CPU_SUBTYPE_MULITPLE for executables
   40     mkext_kext kext[1];       // 64 bytes/entry
   41 } mkext_header;
   42 
   43 __BEGIN_DECLS
   44 __private_extern__ u_int8_t *
   45 compress_lzss(u_int8_t *dst, u_int32_t dstlen, u_int8_t *src, u_int32_t srclen);
   46 
   47 __private_extern__ int
   48 decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen);
   49 
   50 __private_extern__ u_int32_t
   51 adler32(u_int8_t *src, int32_t length);
   52 
   53 __END_DECLS
   54 
   55 #endif /* _MKEXT_H_ */

Cache object: 43d1761f9251fd29fc100ffa4fae4be3


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.