/home/tomh/openhip/hip-0.5/src/include/hip/hip_globals.h

Go to the documentation of this file.
00001 /*
00002  * Host Identity Protocol
00003  * Copyright (C) 2002-05 the Boeing Company
00004  * 
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  *  hip_globals.h
00016  *
00017  *  Author:     Jeff Ahrenholz, <jeffrey.m.ahrenholz@boeing.com>
00018  *  
00019  */
00020 #include <openssl/dsa.h>        /* DSA support                  */
00021 #include <openssl/dh.h>         /* Diffie-Hellman contexts      */
00022 #include <math.h>               /* for exponential macros (reg life) */
00023 #include <hip/hip_types.h>
00024 #include <hip/hip_stun.h>
00025 
00026 /* global variables */
00027 
00028 /* Registration global variables */
00029 extern long int num_entries;            /* number of entries to store in the registration table when -g option is activated (used in rvs mode) */
00030 
00031 extern int min_life;             /* to store info from rvs (used in normal mode) */
00032 extern int max_life;                    
00033 extern int reg_type;
00034 
00035 extern int add_reg_info;        /* to add the parameter (used in rvs mode) */
00036 extern int add_reg_request;                     /*      (used in normal mode) */ 
00037 extern int add_reg_response;                    /*      (used in rvs mode) */
00038 extern int add_reg_failed;                      /*      (used in rvs mode) */
00039 
00040 extern int resp_lifetime;       /* values received from a reg_response parameter (used in rvs mode) */
00041 extern int resp_reg_type;
00042 extern int fail_type;           /* values received from a reg_failed parameter (used in rvs mode) */
00043 extern int fail_reg_type;
00044 
00045 extern int repeat_reg;          /* in case we need to update the registration  (used in normal mode) */
00046 extern int repeat_type;
00047 
00048 extern int need_to_send_update2;
00049 
00050 /* Relaying global variables  (used only in rvs mode) */
00051 extern from fr;
00052 extern via fr2;
00053 extern int no_R1;
00054 
00055 /* Array storing HIP association structs (this is the state machine state) */
00056 extern hip_assoc hip_assoc_table[MAX_CONNECTIONS];
00057 extern int max_hip_assoc;
00058 extern const hip_hit zero_hit;
00059 
00060 /* Array storing HIP registrations structs */
00061 extern hip_reg hip_reg_table[MAX_REGISTRATIONS];
00062 extern long int num_hip_reg;
00063 
00064 /* Linked list of my host identities */
00065 extern hi_node *my_hi_head;
00066 
00067 /* Linked list of my addresses */
00068 extern sockaddr_list *my_addr_head;
00069 
00070 /* Linked list of peer host identities */
00071 extern hi_node *peer_hi_head;
00072 
00073 /* Filenames for configuration files */
00074 extern char conf_filename[255];
00075 extern char my_hi_filename[255];
00076 extern char known_hi_filename[255];
00077 
00078 /* Linked list of Diffie-Hellman contexts */
00079 extern dh_cache_entry *dh_cache;
00080 
00081 /* Diffie-Hellman constants */
00082 extern const unsigned char *dhprime[DH_MAX];
00083 extern const int dhprime_len[DH_MAX]; /* only used by new_dh_cache_entry()
00084                                            use DH_size() elsewhere */
00085 extern unsigned char dhgen[DH_MAX];
00086 
00087 extern int pfk_seqno; /* PFKEY messages need to be numbered */
00088 
00089 extern int s_hip, s_pfk; /* PFKEY and RAW socket handles */
00090 extern int s_hip_udp; /* socket for UDP-encapsulated HIP packets */
00091 #undef s_net
00092 extern int s_net; /* netlink socket */
00093 extern int s6_hip; /* RAW IPv6 socket handle */
00094 extern int s_stat; /* status socket */
00095 
00096 extern int is_behind_nat; /* determined with STUN : indicates whether the host is behind a NAT or not */
00097 extern StunAddress4 STUN_server_addr;
00098 
00099 /* Global options */
00100 extern struct hip_opt OPT;
00101 
00102 /* Global configuration data */
00103 extern struct hip_conf HCNF;
00104 
00105 #ifdef __UMH__
00106 extern int pfkeysp[2];
00107 extern int g_state;
00108 #endif
00109 #ifdef __CYGWIN__
00110 extern int netlsp[2];
00111 #endif
00112 #ifdef __WIN32__
00113 extern int netlsp[2];
00114 #endif
00115 
00116 const unsigned char khi_context_id[16];

Generated on Mon Oct 22 11:43:43 2007 for OpenHIP by  doxygen 1.5.1