* copy vendor drop to trunk
[lab.git] / Dev / utvpn / utvpn-unix-v101-7101-public / src / Mayaqua / openssl / pqueue.h
1 /* crypto/pqueue/pqueue.h */\r
2 /* \r
3  * DTLS implementation written by Nagendra Modadugu\r
4  * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.  \r
5  */\r
6 /* ====================================================================\r
7  * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.\r
8  *\r
9  * Redistribution and use in source and binary forms, with or without\r
10  * modification, are permitted provided that the following conditions\r
11  * are met:\r
12  *\r
13  * 1. Redistributions of source code must retain the above copyright\r
14  *    notice, this list of conditions and the following disclaimer. \r
15  *\r
16  * 2. Redistributions in binary form must reproduce the above copyright\r
17  *    notice, this list of conditions and the following disclaimer in\r
18  *    the documentation and/or other materials provided with the\r
19  *    distribution.\r
20  *\r
21  * 3. All advertising materials mentioning features or use of this\r
22  *    software must display the following acknowledgment:\r
23  *    "This product includes software developed by the OpenSSL Project\r
24  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"\r
25  *\r
26  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to\r
27  *    endorse or promote products derived from this software without\r
28  *    prior written permission. For written permission, please contact\r
29  *    openssl-core@OpenSSL.org.\r
30  *\r
31  * 5. Products derived from this software may not be called "OpenSSL"\r
32  *    nor may "OpenSSL" appear in their names without prior written\r
33  *    permission of the OpenSSL Project.\r
34  *\r
35  * 6. Redistributions of any form whatsoever must retain the following\r
36  *    acknowledgment:\r
37  *    "This product includes software developed by the OpenSSL Project\r
38  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"\r
39  *\r
40  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\r
41  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
42  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
43  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\r
44  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
45  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
46  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
47  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
48  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\r
49  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
50  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\r
51  * OF THE POSSIBILITY OF SUCH DAMAGE.\r
52  * ====================================================================\r
53  *\r
54  * This product includes cryptographic software written by Eric Young\r
55  * (eay@cryptsoft.com).  This product includes software written by Tim\r
56  * Hudson (tjh@cryptsoft.com).\r
57  *\r
58  */\r
59 \r
60 #ifndef HEADER_PQUEUE_H\r
61 #define HEADER_PQUEUE_H\r
62 \r
63 #include <stdio.h>\r
64 #include <stdlib.h>\r
65 #include <string.h>\r
66 \r
67 #include <openssl/pq_compat.h>\r
68 \r
69 typedef struct _pqueue *pqueue;\r
70 \r
71 typedef struct _pitem\r
72         {\r
73         PQ_64BIT priority;\r
74         void *data;\r
75         struct _pitem *next;\r
76         } pitem;\r
77 \r
78 typedef struct _pitem *piterator;\r
79 \r
80 pitem *pitem_new(PQ_64BIT priority, void *data);\r
81 void   pitem_free(pitem *item);\r
82 \r
83 pqueue pqueue_new(void);\r
84 void   pqueue_free(pqueue pq);\r
85 \r
86 pitem *pqueue_insert(pqueue pq, pitem *item);\r
87 pitem *pqueue_peek(pqueue pq);\r
88 pitem *pqueue_pop(pqueue pq);\r
89 pitem *pqueue_find(pqueue pq, PQ_64BIT priority);\r
90 pitem *pqueue_iterator(pqueue pq);\r
91 pitem *pqueue_next(piterator *iter);\r
92 \r
93 void   pqueue_print(pqueue pq);\r
94 \r
95 #endif /* ! HEADER_PQUEUE_H */\r