dostraffic.c File Reference

#include "dostraffic.h"

Include dependency graph for dostraffic.c:

Go to the source code of this file.

Functions

void CBRTrafficGen (int NetworkDia, double H, int NoAttackers, int Master, double rate, struct DDOS_Traffic *traffic)
void CBRTrafficInet (int NetworkDia, int NoAttackers, int Master, double rate, struct DDOS_Traffic *traffic)


Function Documentation

void CBRTrafficGen int  NetworkDia,
double  H,
int  NoAttackers,
int  Master,
double  rate,
struct DDOS_Traffic traffic
 

Definition at line 4 of file dostraffic.c.

References flow_list_insert(), and Power_law_no_hops().

00004                                                                                                                     {
00005   struct flow_list *listroot = NULL;
00006 
00007   int no_hops;
00008   double flow,delay,total_bw;
00009   int i,cntr;
00010 
00011   for(i=0;i<NoAttackers;i++){
00012     no_hops = Power_law_no_hops(NetworkDia,H);
00013     if(Master==1)
00014       no_hops+=Power_law_no_hops(NetworkDia,H);
00015     delay = (double) no_hops;
00016     flow = rate;
00017     flow_list_insert(delay,flow,&listroot);
00018     cntr++;    
00019   }
00020 
00021    traffic->Events = get_all_events(listroot);
00022    traffic->NoEvents = get_no_events(listroot);
00023 }

Here is the call graph for this function:

void CBRTrafficInet int  NetworkDia,
int  NoAttackers,
int  Master,
double  rate,
struct DDOS_Traffic traffic
 

Definition at line 26 of file dostraffic.c.

References flow_list_insert(), and Inet_default_no_hops().

00026                                                                                                            {
00027   struct flow_list *listroot = NULL;
00028   
00029   int no_hops;
00030   double flow,delay,total_bw;
00031   int i,cntr;
00032   
00033   for(i=0;i<NoAttackers;i++){
00034     no_hops = Inet_default_no_hops(NetworkDia);
00035     if(Master==1)
00036       no_hops+=Inet_default_no_hops(NetworkDia);
00037     delay = (double) no_hops;
00038     flow = rate;
00039     flow_list_insert(delay,flow,&listroot);
00040     cntr++;    
00041   }
00042 
00043    traffic->Events = get_all_events(listroot);
00044    traffic->NoEvents = get_no_events(listroot);
00045 
00046 }

Here is the call graph for this function:


Generated on Tue Mar 6 16:52:11 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6