/**************************************************************************** mod_dav_pgsql (DASL) for apache 2.X CopyRight(C) 2005 SolutionBox Inc. All Rights reserved. CopyRight(C) 2006 Netomi Inc. All Rights reserved. Author : elenoa lazyfake (elenoa@solutionbox.co.kr) $Id: share.h,v 1.6 2007/03/19 08:43:12 elenoa Exp $ Redistribution and use in source and binary forms, with or with out modification, are not permitted in outside of SolutionBox Inc. ****************************************************************************/ #ifndef __SHARE_STATISTIC_H__ #define __SHARE_STATISTIC_H__ #define STAT_STAMP(a) (((a) + 299) / 300) #define STAT_LOC(a) ((a) - (((a) >> 1) << 1)) #define OUTB 0 #define INB 1 #define MTU 1500 #define MSS 1460 //#define CONTENT_TO_TRAFFIC(s) (s + (((s) + MSS - 1) / MSS) * (MTU - MSS)) //#define CONTENT_TO_TRAFFIC(s) ((((s) + MSS - 1) / MSS) * MTU) #define CONTENT_TO_TRAFFIC(s) ((int)(s * 1.1)) #ifndef __OPENDISK_SOLUTION_NOT_USE_TS__ struct service_network_stat { int nServiceSeq; int nUserSeq; uint32_t timestamp; // 5ºÐ ´ÜÀ§ 1¾¿ Áõ°¡. uint64_t down_content_size; // ´©Àû½Ã down content size ´©Àû uint64_t up_content_size; // ´©Àû½Ã up contents size ´©Àû uint64_t down_traffic; // ´©Àû½Ã (down_content_size * 1.1)¸¦ ´©Àû uint64_t up_traffic; // ´©Àû½Ã (up_traffic * 1.1)¸¦ ´©Àû }; /* transfer statistics */ int dav_initialize_shared_statistic(dav_repos_server_conf *dsc, server_rec *s, apr_pool_t *p); void dav_cleanup_shared_statistic(); int dav_shared_ts_access_statistic(request_rec *r); void dav_shared_ts_open_stream(request_rec *r, int bound); void dav_shared_ts_close_stream(request_rec *r, int bound); void dav_shared_ts_transfer_data(request_rec *r, int bound, apr_size_t size, apr_size_t org_size); #endif // !__OPENDISK_SOLUTION_NOT_USE_TS__ #endif // __SHARE_STATISTIC_H__