Commit 310c4cdb authored by Pramod R Sanaga's avatar Pramod R Sanaga

Changes to delay-agent to add the backfill parameter.

parent ca74eb2a
......@@ -426,6 +426,9 @@ void set_link_params(int l_index, int blackhole, int p_which)
pipe.bandwidth = p_params->bw;
pipe.delay = p_params->delay;
/* pramod-CHANGES */
pipe.backfill = p_params->backfill;
/* set the pipe number*/
pipe.pipe_nr = link_map[l_index].pipes[p_index];
......@@ -552,6 +555,7 @@ void set_link_params(int l_index, int blackhole, int p_which)
}
/* else DROPTAIL*/
/* now call setsockopt*/
if (setsockopt(s_dummy,IPPROTO_IP, IP_DUMMYNET_CONFIGURE, &pipe,sizeof pipe)
< 0)
......@@ -596,7 +600,18 @@ int get_new_link_params(int l_index, event_handle_t handle,
while((argvalue = strsep(&temp," \n"))){
if(strcmp(argtype,"BANDWIDTH")== 0){
/*pramod-CHANGES: */
/* Backfill parameters. */
if(strcmp(argtype,"BACKFILL")== 0){
link_map[l_index].params[p_num].backfill = atoi(argvalue) * 1000;
if (! gotpipe) {
link_map[l_index].params[1].backfill =
link_map[l_index].params[0].backfill;
}
}
else if(strcmp(argtype,"BANDWIDTH")== 0){
info("Bandwidth = %d\n", atoi(argvalue) * 1000);
link_map[l_index].params[p_num].bw = atoi(argvalue) * 1000;
if (! gotpipe) {
......
......@@ -111,6 +111,7 @@ typedef enum {
typedef struct {
int delay; /* pipe delay*/
int bw; /* pipe bw*/
int backfill; /*pramod-CHANGES, -add backfill to the pipe*/
double plr; /* queue loss rate*/
int q_size; /* queuq size in slots/bytes*/
structRed_params red_gred_params; /* red/gred params*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment