Deleted Added
full compact
readcis.h (185032) readcis.h (185033)
1/*
2 * Copyright (c) 1995 Andrew McRae. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*
2 * Copyright (c) 1995 Andrew McRae. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/usr.sbin/dumpcis/readcis.h 185032 2008-11-17 22:19:19Z imp $
26 * $FreeBSD: head/usr.sbin/dumpcis/readcis.h 185033 2008-11-17 22:46:29Z imp $
27 */
28
29struct tuple {
30 struct tuple *next;
31 unsigned char code;
32 int length;
33 unsigned char *data;
34};
35
36struct tuple_list {
37 struct tuple_list *next;
38 struct tuple *tuples;
39 off_t offs;
40 int flags;
41};
42
43struct tuple_info {
27 */
28
29struct tuple {
30 struct tuple *next;
31 unsigned char code;
32 int length;
33 unsigned char *data;
34};
35
36struct tuple_list {
37 struct tuple_list *next;
38 struct tuple *tuples;
39 off_t offs;
40 int flags;
41};
42
43struct tuple_info {
44 char *name;
44 const char *name;
45 unsigned char code;
46 unsigned char length; /* 255 means variable length */
47};
48
49/*
50 * Memory device descriptor.
51 */
52struct dev_mem {

--- 78 unchanged lines hidden (view full) ---

131
132#define tpl32(tp) ((*((tp) + 3) << 24) | \
133 (*((tp) + 2) << 16) | \
134 (*((tp) + 1) << 8) | *(tp))
135#define tpl24(tp) ((*((tp) + 2) << 16) | \
136 (*((tp) + 1) << 8) | *(tp))
137#define tpl16(tp) ((*((tp) + 1) << 8) | *(tp))
138
45 unsigned char code;
46 unsigned char length; /* 255 means variable length */
47};
48
49/*
50 * Memory device descriptor.
51 */
52struct dev_mem {

--- 78 unchanged lines hidden (view full) ---

131
132#define tpl32(tp) ((*((tp) + 3) << 24) | \
133 (*((tp) + 2) << 16) | \
134 (*((tp) + 1) << 8) | *(tp))
135#define tpl24(tp) ((*((tp) + 2) << 16) | \
136 (*((tp) + 1) << 8) | *(tp))
137#define tpl16(tp) ((*((tp) + 1) << 8) | *(tp))
138
139void *xmalloc(int);
139int dumpcisfile_main(int, char **);
140void dump(unsigned char *, int);
141void dumpcis(struct cis *);
142void freecis(struct cis *);
143struct cis *readcis(int);
144
140void dump(unsigned char *, int);
141void dumpcis(struct cis *);
142void freecis(struct cis *);
143struct cis *readcis(int);
144
145char *tuple_name(unsigned char);
145const char *tuple_name(unsigned char);
146u_int parse_num(int, u_char *, u_char **, int);
147
148int isdumpcisfile;
146u_int parse_num(int, u_char *, u_char **, int);
147
148int isdumpcisfile;