mad.h

Go to the documentation of this file.
00001 
00034 #ifndef _MAD_H_
00035 #define _MAD_H_
00036 
00037 #ifdef LINUX
00038 #include <netinet/in.h>
00039 #endif
00040 
00041 #include "utils.h"
00042 #include "defines.h"
00043 
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047 
00052 extern BOOL lib_init;
00053 
00059 typedef struct alc_arguments {
00060   unsigned long long tsi;                               
00061   unsigned long long start_time;                        
00062   unsigned long long stop_time;                 
00064   const char *port;                     
00065   const char *addr;                     
00066   const char *intface;                  
00067   const char *intface_name;             
00068   unsigned int addr_family;             
00069   unsigned char addr_type;              
00070   unsigned char mode;                   
00071   unsigned char nb_channel;             
00072   unsigned char cc_id;                  
00073   unsigned char rx_memory_mode;         
00074   int verbosity;                        
00075   const char *src_addr;                 
00076   char base_dir[MAX_PATH_LENGTH];       
00077   BOOL accept_expired_fdt_inst;                 
00079 #ifdef SSM
00080   BOOL use_ssm;                         
00081 #endif
00082     
00083   unsigned int tx_rate;                 
00084   unsigned char ttl;                    
00085   unsigned short nb_tx;                 
00086   BOOL simul_losses;                    
00087   double loss_ratio1;                   
00088   double loss_ratio2;                   
00089   unsigned short fec_ratio;             
00090   unsigned short es_len;                
00091   unsigned int max_sb_len;              
00092   unsigned char fec_enc_id;             
00093   unsigned short fec_inst_id;           
00094   BOOL use_fec_oti_ext_hdr;             
00095   unsigned char encode_content;         
00096   BOOL half_word;                                               
00097   BOOL optimize_tx_rate;                                
00098   BOOL calculate_session_size;
00099 
00100 } alc_arguments_t;
00101 
00102 #ifdef _MSC_VER
00103 
00107 typedef struct {
00108   long long quot;
00109   long long rem;
00110 }lldiv_t;
00111 #endif
00112 
00118 void alc_init(void);
00119 
00127 double sec(void);
00128 
00138 int increase_ipv6_address(struct in6_addr *ipv6);
00139 
00149 int randomloss(double lossprob);
00150 
00151 #ifdef _MSC_VER
00152 /*
00153  * This function computes the quotient and remainder of an integer division.
00154  * 
00155  * @param num numerator
00156  * @param denom denumerator
00157  *
00158  * @return lldiv_t structure
00159  *
00160  */
00161 
00162 lldiv_t lldiv(long long num, long long denom);
00163 #endif
00164 
00165 #ifdef __cplusplus
00166 }; //extern "C"
00167 #endif
00168 
00169 #endif
00170 

Generated on Fri Mar 9 20:08:51 2007 for MAD-FCL by  doxygen 1.5.0