1 | #ifndef PM_H
2 | #define PM_H
3 |
4 | #include "mysql_driver.h"
5 |
6 | /***************************************
7 | $Revision: 1.2 $
8 |
9 | Protocol whois module (pw). Whois protocol.
10 |
11 | Status: NOT REVUED, NOT TESTED
12 |
13 | +html+ <DL COMPACT>
14 | +html+ <DT>Online References:
15 | +html+ <DD><UL>
16 | +html+ </UL>
17 | +html+ </DL>
18 | +html+ <PRE>
19 | Author:
20 | ottrey
21 | marek
22 | andrei
23 | +html+ </PRE>
24 |
25 | ******************/ /******************
26 | Copyright (c) 1999 RIPE NCC
27 |
28 | All Rights Reserved
29 |
30 | Permission to use, copy, modify, and distribute this software and its
31 | documentation for any purpose and without fee is hereby granted,
32 | provided that the above copyright notice appear in all copies and that
33 | both that copyright notice and this permission notice appear in
34 | supporting documentation, and that the name of the author not be
35 | used in advertising or publicity pertaining to distribution of the
36 | software without specific, written prior permission.
37 |
38 | THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
40 | AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
41 | DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
42 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
43 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
44 | ***************************************/
45 | /*+ String sizes +*/
46 | #define STR_S 63
47 | #define STR_M 255
48 | #define STR_L 1023
49 | #define STR_XL 4095
50 | #define STR_XXL 16383
51 |
52 | /*+ Maximum size of input that can be recieved from the client. +*/
53 | #define MAX_INPUT_SIZE 1024
54 |
55 | typedef struct _nrtm_q_t {
56 | int source;
57 | int version;
58 | long first;
59 | long last;
60 | } nrtm_q_t;
61 |
62 | #define PM_get_current_serial(connection) PM_get_minmax_serial(connection, 1)
63 | #define PM_get_oldest_serial(connection) PM_get_minmax_serial(connection, 0)
64 |
65 |
66 | long PM_get_minmax_serial(SQ_connection_t *sql_connection, int max);
67 | char *PM_get_serial_object(SQ_connection_t *sql_connection, long serial_number, int *operation);
68 |
69 |
70 | void PM_interact(int sock);
71 |
72 | #endif /* PM_H */