modules/up/dbupdate.h

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

FUNCTIONS

This source file includes following functions.

   1 #ifndef UPDATE_UPPER_H
   2 #define UPDATE_UPPER_H
   3 
   4 
   5 #include <stdio.h>
   6 #include <stdlib.h> 
   7 #include <string.h> 
   8 #include <stubs.h>
   9 #include <string>
  10 #include <glib.h>
  11 #include <iostream.h>
  12 #include <fstream>
  13 
  14 #include <netdb.h> 
  15 #include <sys/types.h> 
  16 #include <netinet/in.h> 
  17 #include <sys/socket.h> 
  18 #include <errno.h> 
  19 #include <unistd.h>
  20 
  21 #include <config.h>
  22 #include <istream.h>
  23 #include "rpsl/object.hh"
  24 #include "util/rusage.hh"
  25 #include "util/debug.hh"
  26 #include "util/trace.hh"
  27 #include "util/Argv.hh"
  28 #include "util/version.hh"
  29 #ifdef IRR_NEEDED
  30 #include "irr/irr.hh"
  31 #include "irr/rawhoisc.hh"
  32 #endif // IRR_NEEDED
  33 #include "rpsl/schema.hh"
  34 #include "erroutines.h"
  35 #include "AU_util.h"
  36 #include "ack.h"
  37 #define private private_xx
  38 #define or or_xx
  39 #define not not_xx
  40 #include "mm.h"
  41 #undef not
  42 #undef or
  43 #include "mysql_driver.h"
  44 //#include "mail_parser.h"
  45 #undef private
  46 
  47 
  48 #define MAXDATASIZE 100 /* max number of bytes we can get at once */
  49 
  50 #define OVR_OK 0 /* override succeded */
  51 
  52 
  53 #define ACK_FILE_PREFIX "ack"
  54 
  55 typedef enum {
  56   UP_AUTH_OK=0, /* Auth succeded */
  57   UP_MOR, /* got more than one object from the db, where extected only one */
  58   UP_NSO, /* no such object */
  59   UP_AUF, /* auth failed */
  60   UP_NIY, /* not implemented yet */
  61   UP_ABN, /* as-block does not exist */
  62   UP_HOF, /* hierarchical auth failed */
  63   UP_OVF, /* override failed */
  64   UP_OVS, /* override syntax error */
  65   UP_NOM, /* no match. the old & nw versions of the object are not the same */
  66   UP_ANE, /* AUTO NIC hdl error */
  67   UP_FWD, /* mntner or as-block creation will be forwarded to <HUMAILBOX> */
  68   UP_SYN, /* syntax error in the object */
  69   UP_NAM, /* name of a person/role object cannot be changed */
  70   UP_INT  /* internal error */
  71 
  72 } return_codes;
  73 
  74 typedef struct _up_ripupd_result_struct {
  75   int result;
  76   char * error_str;
  77 } up_ripupd_result_struct;
  78 
  79 
  80 #ifdef __cplusplus
  81 extern "C" {
  82 #endif
  83 
  84 
  85 
  86 up_ripupd_result_struct * send_object_db(char * arg, char * assigned_NIC, char * operation);
  87 
  88 char * get_class_type(Object *arg);
  89 
  90 char * get_search_key(Object *arg, char * type, const char * text);
  91 
  92 GSList *get_attributes(Object * o, const char * attrib, const char * text);
  93 
  94 char * send_and_get(char * host, int port, char * arg);
  95 
  96 int count_objects(char * arg);
  97 
  98 char * take_object(char * arg);
  99 
 100 char * get_as_block(char *autnum_object);
 101 
 102 char * get_less_specific_domain(char *domain_object);
 103 
 104 char * get_less_specific_set(char *set_object, char *type);
 105 
 106 char * get_less_specific(char *inetnum_object, char *type);
 107 
 108 GSList *get_mntners(char * object);
 109 
 110 GSList *get_auths(char * object);
 111 
 112 GSList *get_attr_list(char * object, char * attr_type);
 113 
 114 GSList *get_mnt_lowers(char * object);
 115 
 116 char *get_override(char * object);
 117 
 118 int check_override(char * string);
 119 
 120 GSList * add_to_auth_vector(GSList * list_of_auth_struct, GSList * auths, char * mntner_name);
 121 
 122 GSList * get_auth_vector(GSList * mntners);
 123 
 124 GSList * get_mntnfy_vector(GSList * mntners);
 125 
 126 int check_auth(char *new_object, char *old_object, char *type, credentials_struct credentials);
 127 
 128 char * get_old_version(char * arg);
 129 
 130 //int process_object(char * arg, credentials_struct credentials, GHashTable * NIC_hdl_hash, char * ack_file_name);
 131 
 132 void process_mail_header(credentials_struct * credentials_ptr ,char * header);
 133 
 134 int has_ref_to_AUTO_nic_hdl(const char * object);
 135 
 136 char * find_email_address(const char * from_line);
 137 
 138 char * replace_refs_to_AUTO_NIC_hdl(char * changed_obj, char * arg, GHashTable * auto_nic_hash);
 139 
 140 int identical(const char * old_version, const char * new_version);
 141 
 142 int has_AUTO_NIC_hdl(const char * object);
 143 
 144 char * replace_AUTO_NIC_hdl(char * arg, char * auto_nic_hdl);
 145 
 146 char * get_class_type_char(char * object);
 147 
 148 void up_string_pack(char *dest, const char *source);
 149 
 150 void UP_add_to_upd_log(const char * filename); 
 151 
 152 void UP_log_networkupdate(const char * object, const char * host);
 153 
 154 #ifdef __cplusplus
 155 }
 156 #endif
 157 
 158 
 159 #endif

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