00001 #ifndef CROMP_SECURITY_IMPLEMENTATION_FILE 00002 #define CROMP_SECURITY_IMPLEMENTATION_FILE 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : cromp_security * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 2002-$now By Author. This program is free software; you can * 00011 * redistribute it and/or modify it under the terms of the GNU General Public * 00012 * License as published by the Free Software Foundation; either version 2 of * 00013 * the License or (at your option) any later version. This is online at: * 00014 * http://www.fsf.org/copyleft/gpl.html * 00015 * Please send any updates to: fred@gruntose.com * 00016 \*****************************************************************************/ 00017 00018 #include "cromp_security.h" 00019 #include "cromp_server.h" 00020 00021 #include <basis/log_base.h> 00022 #include <basis/function.h> 00023 #include <octopus/entity_defs.h> 00024 #include <sockets/address.h> 00025 #include <sockets/machine_uid.h> 00026 #include <sockets/tcpip_stack.h> 00027 00028 //#define DEBUG_CROMP_SECURITY 00029 // uncomment if you want the noisier version. 00030 00031 #undef LOG 00032 #define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger(), s) 00033 00034 cromp_security::cromp_security() 00035 : _stack(new tcpip_stack) 00036 { 00037 } 00038 00039 cromp_security::~cromp_security() 00040 { 00041 WHACK(_stack); 00042 } 00043 00044 bool cromp_security::add_entity(const octopus_entity &client, 00045 const byte_array &verification) 00046 { 00047 FUNCDEF("add_entity"); 00048 #ifdef DEBUG_CROMP_SECURITY 00049 LOG(istring("adding ") + client.mangled_form()); 00050 #endif 00051 return simple_entity_registry::add_entity(client, verification); 00052 } 00053 00054 00055 #endif //CROMP_SECURITY_IMPLEMENTATION_FILE 00056
1.5.1