-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddressbook.h
43 lines (36 loc) · 1.46 KB
/
addressbook.h
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
39
40
41
42
43
/*
* Copyright (C) 2002 John Todd Larason <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H
extern struct mapping addressbook_entry_flag_bitmapping[];
struct addressbook_header {
/* 0 */ u32 version; /* guess - treated as magic */
/* 4 */ u32 local_port;
/* 8 */ u32 remote_addresses;
}; /* 12 */
struct addressbook_entry
{
/* 0 */ u8 name[21];
/* 21 */ u64 serial_number; /* Actually only 48 bits, 6 bytes,
* (with the top byte 0 in current
* SNs */
/* 27 */ u8 unused1;
/* 28 */ u32 flags; /* 1 = blocked */
}; /* 32 */
int parse_addressbook_header(unsigned char ** p, struct addressbook_header * h);
int parse_addressbook_entry(unsigned char ** p, struct addressbook_entry * e);
void dump_addressbook_header(struct addressbook_header * h);
void dump_isn(char * tag, u64 sn);
void dump_addressbook_entry(struct addressbook_entry * e);
#endif