1 /* crypto/pqueue/pqueue.h */
\r
3 * DTLS implementation written by Nagendra Modadugu
\r
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
\r
6 /* ====================================================================
\r
7 * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
\r
9 * Redistribution and use in source and binary forms, with or without
\r
10 * modification, are permitted provided that the following conditions
\r
13 * 1. Redistributions of source code must retain the above copyright
\r
14 * notice, this list of conditions and the following disclaimer.
\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
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
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
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
35 * 6. Redistributions of any form whatsoever must retain the following
\r
37 * "This product includes software developed by the OpenSSL Project
\r
38 * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
\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
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
60 #ifndef HEADER_PQUEUE_H
\r
61 #define HEADER_PQUEUE_H
\r
67 #include <openssl/pq_compat.h>
\r
69 typedef struct _pqueue *pqueue;
\r
71 typedef struct _pitem
\r
75 struct _pitem *next;
\r
78 typedef struct _pitem *piterator;
\r
80 pitem *pitem_new(PQ_64BIT priority, void *data);
\r
81 void pitem_free(pitem *item);
\r
83 pqueue pqueue_new(void);
\r
84 void pqueue_free(pqueue pq);
\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
93 void pqueue_print(pqueue pq);
\r
95 #endif /* ! HEADER_PQUEUE_H */
\r