DocumentationGenerated on Thu Aug 31 00:02:33 2006 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Connection.h File Reference#include "generic.h" #include "Utilities.h" #include "Configuration.h" #include "Log.h" Include dependency graph for Connection.h: ![]() This graph shows which files directly or indirectly include this file: ![]() Go to the source code of this file.
Define Documentation
Value: private: type _##func; \ public: type func(void){ \ BABY_RDLOCK(this->lock); \ type t = _##func; \ BABY_UNLOCK(this->lock); \ return t;} \ public: void func(type var){ \ BABY_WRLOCK(this->lock); \ this->_##func = var; \ BABY_UNLOCK(this->lock); \ } Definition at line 43 of file Connection.h.
Enumeration Type Documentation
Definition at line 23 of file Connection.h. 00023 { // for mlsx 00024 FACT_TYPE, FACT_SIZE, FACT_MODIFY, FACT_UNIQUE, FACT_U_MODE, FACT_U_UID, 00025 FACT_U_GID, FACT_U_LINK, FACT_PERM, 00026 DATA_ACCT, BINARY, COMPRESSED, PASSIVE, ANONYMOUS, DATA_OPEN, EPSV_ONLY, 00027 RETR_TRANS, PAM_DONE, FAILURE 00028 #ifdef USE_TLS 00029 , TLS_ENABLED, TLS_INITED, TLS_PBSZ, TLS_PROT_D 00030 #endif // USE_TLS 00031 };
Function Documentation
Definition at line 385 of file babyftpd.cpp. References cache_db, and cache_lock. Referenced by Connection::engage_tls(). 00386 { 00387 int ret = -1; 00388 pthread_rwlock_rdlock(&cache_lock); 00389 for(vector<cache*>::iterator cache_it = cache_db.begin(); 00390 cache_it != cache_db.end(); cache_it++) 00391 if(memcmp(key.data, (*cache_it)->key.data, (*cache_it)->key.size) == 0) 00392 { 00393 pthread_rwlock_unlock(&cache_lock); 00394 pthread_rwlock_wrlock(&cache_lock); 00395 gnutls_free((*cache_it)->key.data); 00396 gnutls_free((*cache_it)->data.data); 00397 delete(*cache_it); 00398 cache_db.erase(cache_it); 00399 ret = 0; 00400 break; 00401 } 00402 pthread_rwlock_unlock(&cache_lock); 00403 00404 return(ret); 00405 }
Definition at line 366 of file babyftpd.cpp. References cache_db, cache_lock, and cache::data. Referenced by Connection::engage_tls(). 00367 { 00368 gnutls_datum data = { NULL, 0 }; 00369 00370 pthread_rwlock_rdlock(&cache_lock); 00371 for(vector<cache*>::iterator cache_it = cache_db.begin(); 00372 cache_it != cache_db.end(); cache_it++) 00373 if(memcmp(key.data, (*cache_it)->key.data, (*cache_it)->key.size) == 0) 00374 { 00375 data.size = (*cache_it)->data.size; 00376 data.data = static_cast<unsigned char*>(gnutls_malloc(data.size)); 00377 memcpy(data.data, (*cache_it)->data.data, data.size); 00378 break; 00379 } 00380 pthread_rwlock_unlock(&cache_lock); 00381 00382 return(data); 00383 }
Definition at line 347 of file babyftpd.cpp. References cache_db, cache_lock, cache::data, and cache::key. Referenced by Connection::engage_tls(). 00348 { 00349 struct cache *temp_cache = new cache; 00350 00351 temp_cache->key.data = static_cast<unsigned char*>(gnutls_malloc(key.size)); 00352 temp_cache->key.size = key.size; 00353 memcpy(temp_cache->key.data, key.data, key.size); 00354 00355 temp_cache->data.data = 00356 static_cast<unsigned char*>(gnutls_malloc(data.size)); 00357 temp_cache->data.size = data.size; 00358 memcpy(temp_cache->data.data, data.data, data.size); 00359 00360 pthread_rwlock_wrlock(&cache_lock); 00361 cache_db.push_back(temp_cache); 00362 pthread_rwlock_unlock(&cache_lock); 00363 return(0); 00364 }
Variable Documentation
Definition at line 45 of file babyftpd.h. Referenced by exit_baby(), lifebeat(), and Connection::~Connection().
Definition at line 41 of file babyftpd.h. Referenced by exit_baby(), lifebeat(), main(), and Connection::~Connection().
Definition at line 50 of file babyftpd.h. Referenced by Connection::engage_tls(), exit_baby(), lifebeat(), and main().
|
- Copyright © 2005, BabyFTPd
- Powered by: