## include/protocol_mirror.h

/* [<][>][^][v][top][bottom][index][help] */

## FUNCTIONS

This source file includes following functions.

1. PM_get_current_serial
2. PM_get_oldest_serial

       1 /***************************************
       2   $Revision: 1.7 $
       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_PM_INPUT_SIZE  256
      56
      57 /* server needs to yield one serial less just in case the last one causes the crash */
      58 #define SAFE_BACKLOG 1
      59
      60
      61
      62 typedef struct _nrtm_q_t {
      63  char *source;
      64  int version;
      65  long first;
      66  long last;
      67 } nrtm_q_t;
      68
      69 #define PM_get_current_serial(connection) PM_get_minmax_serial(connection, 1)
         /* [<][>][^][v][top][bottom][index][help] */
      70 #define PM_get_oldest_serial(connection) PM_get_minmax_serial(connection, 0)
         /* [<][>][^][v][top][bottom][index][help] */
      71
      72
      73 long PM_get_minmax_serial(SQ_connection_t *sql_connection, int max);
      74 char *PM_get_serial_object(SQ_connection_t *sql_connection, long serial_number, int *operation);
      75 GString *PM_get_nrtm_sources(ip_addr_t *client_address, char *source);
      76
      77 void PM_interact(int sock);
      78
      79 #endif /* PM_H */

/* [<][>][^][v][top][bottom][index][help] */