00001 /* 00002 * FADE - Secure Overlay Cloud Storage with File Assured Deletion 00003 * Copyright (C) 2010 Yang Tang 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 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 00026 #ifndef FADE_COMMON_H 00027 #define FADE_COMMON_H 00028 00029 const int DEFAULT_PORT = 52741; 00030 const int BACKLOG = 3; 00031 const int REQUEST_BUFFER_LENGTH = 256; 00032 const int RESPONSE_BUFFER_LENGTH = 1600; 00033 const int POLICY_NAME_LENGTH = 128; 00034 const int ADDRESS_LENGTH = 256; 00035 const int CHALLENGE_LENGTH = 128; 00036 00037 enum ephemerizer_response_type 00038 { 00039 EPHEMERIZER_RESPONSE_FAILED, 00040 EPHEMERIZER_RESPONSE_OK, 00041 EPHEMERIZER_RESPONSE_OK_CPABE 00042 }; 00043 00044 enum client_command_return_value_type 00045 { 00046 COMMAND_OK, 00047 COMMAND_QUIT, 00048 COMMAND_USAGE, 00049 COMMAND_FAILED 00050 }; 00051 00052 int sendn(int sd, const void *buf, unsigned int buf_len); 00053 int recvn(int sd, void *buf, unsigned int buf_len); 00054 00055 #endif /* FADE_COMMON_H */