Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / pptp-client / vector.h
blobb18899fbc78db2e43b5d499fa4b8515dad3ddf83
1 /* vector.h ..... store a vector of PPTP_CALL information and search it
2 * efficiently.
3 * C. Scott Ananian <cananian@alumni.princeton.edu>
5 * $Id: vector.h,v 1.1.1.1 2000/12/23 08:19:51 scott Exp $
6 */
8 #ifndef INC_VECTOR_H
9 #define INC_VECTOR_H
11 #include "pptp_ctrl.h" /* for definition of PPTP_CALL */
13 typedef struct vector_struct VECTOR;
15 VECTOR *vector_create();
16 void vector_destroy(VECTOR *v);
18 int vector_size(VECTOR *v);
20 /* vector_insert and vector_search return TRUE on success, FALSE on failure. */
21 int vector_insert(VECTOR *v, int key, PPTP_CALL * call);
22 int vector_remove(VECTOR *v, int key);
23 int vector_search(VECTOR *v, int key, PPTP_CALL ** call);
24 /* vector_contains returns FALSE if not found, TRUE if found. */
25 int vector_contains(VECTOR *v, int key);
26 /* find first unused key. Returns TRUE on success, FALSE if no. */
27 int vector_scan(VECTOR *v, int lo, int hi, int *key);
28 /* get a specific PPTP_CALL ... useful only when iterating. */
29 PPTP_CALL * vector_get_Nth(VECTOR *v, int n);
31 #endif /* INC_VECTOR_H */