File: rpm.h

package info (click to toggle)
busybox 1:1.17.1-8+deb6u11
  • links: PTS
  • area: main
  • in suites: squeeze-lts
  • size: 15,608 kB
  • ctags: 26,465
  • sloc: ansic: 182,252; sh: 6,047; cpp: 1,428; makefile: 1,031; yacc: 570; lex: 355; perl: 309; python: 251; awk: 29
file content (38 lines) | stat: -rw-r--r-- 1,049 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* vi: set sw=4 ts=4: */
/*
 * RPM structs and consts
 *
 * Copyright (C) 2001 by Laurence Anderson
 *
 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
 */

/* RPM file starts with this struct: */
struct rpm_lead {
	uint32_t magic;
	uint8_t  major, minor;
	uint16_t type;
	uint16_t archnum;
	char     name[66];
	uint16_t osnum;
	uint16_t signature_type;
	char     reserved[16];
};
struct BUG_rpm_lead {
	char bug[sizeof(struct rpm_lead) == 96 ? 1 : -1];
};
#define RPM_LEAD_MAGIC      0xedabeedb
#define RPM_LEAD_MAGIC_STR  "\355\253\356\333"

/* Then follows the header: */
struct rpm_header {
	uint32_t magic_and_ver; /* 3 byte magic: 0x8e 0xad 0xe8; 1 byte version: 0x01 */
	uint32_t reserved;      /* 4 bytes reserved */
	uint32_t entries;       /* Number of entries in header (4 bytes) */
	uint32_t size;          /* Size of store (4 bytes) */
};
struct BUG_rpm_header {
	char bug[sizeof(struct rpm_header) == 16 ? 1 : -1];
};
#define RPM_HEADER_MAGICnVER  0x8eade801
#define RPM_HEADER_MAGIC_STR  "\216\255\350"