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

Go to the documentation of this file.
00001 /*
00002  * Host Identity Protocol
00003  * Copyright (C) 2005 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_status.h
00016  *
00017  *  Authors: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
00018  * 
00019  * Status thread definitions.
00020  * This file is shared by hipd, the Windows service, and status reporting
00021  * helper apps.
00022  *
00023  */
00024 
00025 #ifndef __HIP_STATUS_H_
00026 #define __HIP_STATUS_H_
00027 
00028 /*
00029  * Globals
00030  */
00031 #define WIN_STATUS_PORT 4052
00032 #define STATUS_PORT 4051
00033 
00034 /*
00035  * Types and macros
00036  */
00037 struct status_tlv 
00038 {
00039         unsigned short tlv_type;
00040         unsigned short tlv_len;
00041 };
00042 
00043 #define ADD_ITEM(a, b, c) memcpy(&a[c], &b, sizeof(b)); c += sizeof(b);
00044 
00045 /*
00046  * Status request types serviced by hipd
00047  */
00048 enum requests {
00049         HIP_STATUS_REQ_MIN,
00050         HIP_STATUS_REQ_PEERS,
00051         HIP_STATUS_REQ_MYIDS,
00052         HIP_STATUS_REQ_MYADDRS,
00053         HIP_STATUS_REQ_ASSOC,
00054         HIP_STATUS_REQ_OPTS,
00055         HIP_STATUS_REQ_CONF,
00056         HIP_STATUS_REQ_MAX
00057 };
00058 
00059 enum settings {
00060         HIP_STATUS_CONFIG_MIN = HIP_STATUS_REQ_MAX,
00061         HIP_STATUS_CONFIG_OPTS,
00062         HIP_STATUS_CONFIG_MAX
00063 };
00064 
00065 /*
00066  * Status request types handled by the Windows service
00067  */
00068 enum win_requests {
00069         STAT_MIN,
00070         STAT_THREADS,
00071         STAT_SADB,
00072         STAT_DST,
00073         STAT_LSI,
00074         STAT_PEERS,
00075         STAT_IDS,
00076         STAT_MAX
00077 };
00078 
00079 enum responses {
00080         HIP_STATUS_REPLY_MIN,
00081         HIP_STATUS_REPLY_ERROR,
00082         HIP_STATUS_REPLY_STRING,
00083         HIP_STATUS_REPLY_SADB,
00084         HIP_STATUS_REPLY_ADDR,
00085         HIP_STATUS_REPLY_DST_ENTRY,
00086         HIP_STATUS_REPLY_LSI_ENTRY,
00087         HIP_STATUS_REPLY_HI,
00088         HIP_STATUS_REPLY_ASSOC,
00089         HIP_STATUS_REPLY_OPTS,
00090         HIP_STATUS_REPLY_DONE,
00091         HIP_STATUS_REPLY_MAX
00092 };
00093 
00094 
00095 /* Problems with multiple definitions of the arrays below */
00096 #ifndef __UMH__ 
00097 
00098 /*
00099  * Useful text definitions
00100  */
00101 const char enc_alg_texts[7][28] = {   
00102         "",
00103         "AES CBC with HMAC SHA1",
00104         "3DES CBC with HMAC SHA1",
00105         "3DES CBC with HMAC MD5",
00106         "BLOWFISH CBC with HMAC SHA1",
00107         "NULL with HMAC SHA1",
00108         "NULL with HMAC MD5",
00109 };
00110 
00111 const char state_texts[9][16] = {
00112         "Unassociated",
00113         "I1 Sent",
00114         "I2 Sent",
00115         "R2 Sent",
00116         "Established",
00117         "Rekeying",
00118         "Closing",
00119         "Closed",
00120         "E Failed",
00121 };
00122 
00123 #endif
00124 
00125 #endif /* __HIP_STATUS_H_ */

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