Added patch headers.
[linux-flexiantxendom0-3.2.10.git] / kdb / modules / lcrash / kl_htnode.h
1 /*
2  * $Id: kl_htnode.h 1122 2004-12-21 23:26:23Z tjm $
3  *
4  * This file is part of libutil.
5  * A library which provides auxiliary functions.
6  * libutil is part of lkcdutils -- utilities for Linux kernel crash dumps.
7  *
8  * Created by Silicon Graphics, Inc.
9  * Contributions by IBM, NEC, and others
10  *
11  * Copyright (C) 1999 - 2002 Silicon Graphics, Inc. All rights reserved.
12  * Copyright (C) 2001, 2002 IBM Deutschland Entwicklung GmbH, IBM Corporation
13  * Copyright 2000 Junichi Nomura, NEC Solutions <j-nomura@ce.jp.nec.com>
14  *
15  * This code is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU Lesser Public License as published by
17  * the Free Software Foundation; either version 2.1 of the License, or
18  * (at your option) any later version. See the file COPYING for more
19  * information.
20  */
21
22 #ifndef __KL_HTNODE_H
23 #define __KL_HTNODE_H
24
25 /* Node structure for use in hierarchical trees (htrees).
26  */
27 typedef struct htnode_s {
28         struct htnode_s *next;
29         struct htnode_s *prev;
30         struct htnode_s *parent;
31         struct htnode_s *children;
32         int                              seq;
33         int                              level;
34         int                              key;
35 } htnode_t;
36
37 /* Flag values
38  */
39 #define HT_BEFORE       0x1
40 #define HT_AFTER        0x2
41 #define HT_CHILD        0x4
42 #define HT_PEER         0x8
43
44 /* Function prototypes
45  */
46 htnode_t *kl_next_htnode(
47         htnode_t *              /* htnode pointer */);
48
49 htnode_t *kl_prev_htnode(
50         htnode_t *              /* htnode pointer */);
51
52 void ht_insert_peer(
53         htnode_t *              /* htnode pointer */,
54         htnode_t *              /* new htnode pointer*/,
55         int                     /* flags */);
56
57 void ht_insert_child(
58         htnode_t *              /* htnode pointer */,
59         htnode_t *              /* new htnode pointer*/,
60         int                     /* flags */);
61
62 int ht_insert(
63         htnode_t *              /* htnode pointer */,
64         htnode_t *              /* new htnode pointer*/,
65         int                     /* flags */);
66
67 void ht_insert_next_htnode(
68         htnode_t *      /* htnode pointer */,
69         htnode_t *      /* new htnode pointer*/);
70
71 #endif /* __KL_HTNODE_H */