kgz.h revision 50479
148905Srnordier/* 248905Srnordier * Copyright (c) 1999 Global Technology Associates, Inc. 348905Srnordier * All rights reserved. 448905Srnordier * 548905Srnordier * Redistribution and use in source and binary forms, with or without 648905Srnordier * modification, are permitted provided that the following conditions 748905Srnordier * are met: 848905Srnordier * 1. Redistributions of source code must retain the above copyright 948905Srnordier * notice, this list of conditions and the following disclaimer. 1048905Srnordier * 2. Redistributions in binary form must reproduce the above copyright 1148905Srnordier * notice, this list of conditions and the following disclaimer in the 1248905Srnordier * documentation and/or other materials provided with the distribution. 1348905Srnordier * 1448905Srnordier * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND 1548905Srnordier * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1648905Srnordier * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1748905Srnordier * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 1848905Srnordier * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 1948905Srnordier * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 2048905Srnordier * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 2148905Srnordier * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 2248905Srnordier * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 2348905Srnordier * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 2448905Srnordier * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2548905Srnordier * 2650479Speter * $FreeBSD: head/usr.sbin/kgzip/kgz.h 50479 1999-08-28 01:35:59Z peter $ 2748905Srnordier */ 2848905Srnordier 2948905Srnordier#ifndef _KGZ_H_ 3048905Srnordier#define _KGZ_H_ 3148905Srnordier 3248905Srnordier#include <sys/types.h> 3348905Srnordier 3448905Srnordier/* 3548905Srnordier * KGZ definitions: kgzip(8) output. 3648905Srnordier */ 3748905Srnordier 3848905Srnordier/* Values for ident[]. */ 3948905Srnordier#define KGZ_ID0 'K' 4048905Srnordier#define KGZ_ID1 'G' 4148905Srnordier#define KGZ_ID2 'Z' 4248905Srnordier#define KGZ_ID3 '\0' 4348905Srnordier 4448905Srnordier/* KGZ header. */ 4548905Srnordierstruct kgz_hdr { 4648905Srnordier char ident[4]; /* identification */ 4748905Srnordier uint32_t dload; /* decoded image load address */ 4848905Srnordier uint32_t dsize; /* decoded image size */ 4948905Srnordier uint32_t isize; /* image size in memory */ 5048905Srnordier uint32_t entry; /* program entry point */ 5148905Srnordier uint32_t nsize; /* encoded image size */ 5248905Srnordier}; 5348905Srnordier 5448905Srnordierextern struct kgz_hdr kgz; /* header */ 5548905Srnordierextern uint8_t kgz_ndata[]; /* encoded image */ 5648905Srnordier 5748905Srnordier#endif /* !_KGZ_H_ */ 58