modules/ud/ud.h

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

FUNCTIONS

This source file includes following functions.
  1. IS_DUMMY_ALLOWED
  2. IS_UPDATE
  3. IS_STANDALONE
  4. ACT_CREATE
  5. ACT_UPDATE
  6. ACT_DELETE
  7. ACT_UPD_NHR

/***************************************
  $Revision: 1.7 $

  Status: NOT REVUED, NOT TESTED

 Author(s):       Andrei Robachevsky

  ******************/ /******************
  Modification History:
        andrei (17/01/2000) Created.
  ******************/ /******************
  Copyright (c) 2000                              RIPE NCC
 
  All Rights Reserved
  
  Permission to use, copy, modify, and distribute this software and its
  documentation for any purpose and without fee is hereby granted,
  provided that the above copyright notice appear in all copies and that
  both that copyright notice and this permission notice appear in
  supporting documentation, and that the name of the author not be
  used in advertising or publicity pertaining to distribution of the
  software without specific, written prior permission.
  
  THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
  AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
  DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 ***************************************/
#ifndef _UD_H
#define _UD_H

/* Error codes definition */
#define ERROR_U_MEM     0x0001 /* memory allocation error */
#define ERROR_U_DBS     0x0002 /* database (sql) error */
#define ERROR_U_OBJ     0x0004 /* referential integrity failure */
#define ERROR_U_AUT     0x0008 /* membership authirization failure */

#define ERROR_U_BADOP   0x0010 /* unknown operation */
#define ERROR_U_COP     0x0020 /* conflicting operation (e.g. deletig non-existent object) */
#define ERROR_U_NSUP    0x0040 /* object type not supported */
#define ERROR_U_BUG     0x0080 /*  software bug - report to developer */

/* definition of mode bits */
#define B_DUMMY                 0x01
#define B_UPDATE                0x02
#define B_STANDALONE            0x04

/* macros for update mode operation */
#define IS_DUMMY_ALLOWED(a)     ((a)&(B_DUMMY))
/* [<][>][^][v][top][bottom][index][help] */
#define IS_UPDATE(a)            ((a)&(B_UPDATE))
/* [<][>][^][v][top][bottom][index][help] */
#define IS_STANDALONE(a)        ((a)&(B_STANDALONE))
/* [<][>][^][v][top][bottom][index][help] */


/* XXX SQL transaction types */

#define TR_UPDATE   1000
#define TR_INSERT   2000
#define TR_CREATE   TR_INSERT
#define TR_DELETE   3000



/* Transaction action (tr.action ) */
#define TA_CREATE       0x01
#define TA_UPDATE       0x02
#define TA_DELETE       0x04
#define TA_UPD_NHR      0x08




/* macros for transaction operation bitmask (tr.action) */
#define ACT_CREATE(a)           ((a)&0x01)
/* [<][>][^][v][top][bottom][index][help] */
#define ACT_UPDATE(a)           ((a)&0x02)
/* [<][>][^][v][top][bottom][index][help] */
#define ACT_DELETE(a)           ((a)&0x04)
/* [<][>][^][v][top][bottom][index][help] */
#define ACT_UPD_NHR(a)          ((a)&0x08) /* update Nic Handle Repository  */
/* [<][>][^][v][top][bottom][index][help] */

 

#define OP_ADD          1
#define OP_DEL          2
#define OP_UPD          3
#define OP_NOOP         4


void UD_do_nrtm();
void UD_do_updates(void *args);


#endif /* _UD_H */


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