Source File include/protocol_mirror.h

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