home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / w00w00 / sectools / fragrouter / list.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-07-26  |  2.2 KB  |  67 lines

  1. /*
  2.   list.h
  3.  
  4.   Dug Song <dugsong@anzen.com>
  5.  
  6.   Copyright (c) 1999 Anzen Computing. All rights reserved.
  7.  
  8.   Redistribution and use in source and binary forms, with or without
  9.   modification, are permitted provided that the following conditions
  10.   are met:
  11.   
  12.   1. Redistributions of source code must retain the above copyright
  13.      notice, this list of conditions and the following disclaimer.
  14.   2. Redistributions in binary form must reproduce the above copyright
  15.      notice, this list of conditions and the following disclaimer in the
  16.      documentation and/or other materials provided with the distribution.
  17.   3. All advertising materials mentioning features or use of this software
  18.      must display the following acknowledgement:
  19.      This product includes software developed by Anzen Computing.
  20.   4. Neither the name of Anzen Computing nor the names of its
  21.      contributors may be used to endorse or promote products derived
  22.      from this software without specific prior written permission.
  23.  
  24.   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  25.   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  26.   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  27.   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  28.   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29.   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  30.   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  31.   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  32.   IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  33.   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  34.   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35.  
  36.   $Id: list.h,v 1.2 1999/05/27 02:32:17 dugsong Exp $
  37. */
  38.  
  39. #ifndef LIST_H
  40. #define LIST_H
  41.  
  42. struct list_st {
  43.   struct list_st *head;
  44.   struct list_st *prev;
  45.   struct list_st *next;
  46.   unsigned char *data;
  47.   int len;
  48. };
  49.  
  50. typedef struct list_st ELEM;
  51.  
  52. ELEM *list_elem(unsigned char *data, int len);
  53.  
  54. ELEM *list_add(ELEM *elem, ELEM *new);
  55.  
  56. int list_free(ELEM *elem);
  57.  
  58. ELEM *list_last(ELEM *elem);
  59.  
  60. ELEM *list_dup(ELEM *elem);
  61.  
  62. ELEM *list_swap(ELEM *elem);
  63.  
  64. ELEM *list_randomize(ELEM *elem);
  65.  
  66. #endif /* LIST_H */
  67.