1 /* vi: set sw=4 ts=4: */
3 * (SEA)ttle i(MA)ge is the image which used in project seattle.
5 * Created by David Hsieh <david_hsieh@alphanetworks.com>
6 * Copyright (C) 2008-2009 Alpha Networks, Inc.
8 * This file is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either'
11 * version 2.1 of the License, or (at your option) any later version.
13 * The GNU C Library is distributed in the hope that it will be useful,'
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with the GNU C Library; if not, write to the Free
20 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24 #ifndef __SEAMA_HEADER_FILE__
25 #define __SEAMA_HEADER_FILE__
29 #define SEAMA_MAGIC 0x5EA3A417
32 * SEAMA looks like the following map.
33 * All the data of the header should be in network byte order.
35 * +-------------+-------------+------------
37 * +-------------+-------------+ |
38 * | reserved | meta size | |
39 * +-------------+-------------+ header
40 * | image size (0 bytes) | |
41 * +-------------+-------------+ |
43 * +-------------+-------------+------------
45 * +-------------+-------------+ | |
46 * | reserved | meta size | | |
47 * +-------------+-------------+ | |
49 * +-------------+-------------+ header |
51 * | 16 bytes of MD5 digest | | |
54 * +-------------+-------------+ | |
56 * +-------------+-------------+------- |
58 * | Image of the 1st entity | |
62 * +-------------+-------------+-------------
64 * +-------------+-------------+ | |
65 * | reserved | meta size | | |
66 * +-------------+-------------+ | |
68 * +-------------+-------------+ header |
70 * | 16 bytes of MD5 digest | | |
73 * +-------------+-------------+ | |
75 * +-------------+-------------+------- |
77 * | Image of the 2nd entity | |
81 * +-------------+-------------+-------------
88 * |<-------- 32 bits -------->|
89 * +-------------+-------------+
91 * +-------------+-------------+
92 * | reserved | meta size |
93 * +-------------+-------------+
95 * +-------------+-------------+
98 typedef struct seama_hdr seamahdr_t;
101 uint32_t magic; /* should always be SEAMA_MAGIC. */
102 uint16_t reserved; /* reserved for */
103 uint16_t metasize; /* size of the META data */
104 uint32_t size; /* size of the image */
105 } __attribute__ ((packed));