Commit f35ce7e3 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Initial version of RED/GRED support. Chris is going to have to finish

this off, but here is what I did.

Parser: Allow for the following syntax

	set link0  [$ns duplex-link $nodeA $nodeB 100Mb 0ms RED]
	set queue0 [[$ns link $nodeA $nodeB] queue]
	$queue0 set gentle_ 1
	$queue0 set queue-in-bytes_ 0
	$queue0 set limit_ 50
	$queue0 set maxthresh_ 20
	$queue0 set thresh_ 7
	$queue0 set linterm_ 11
	$queue0 set q_weight_ 0.004

    NB: This differs from the NS syntax (and is the part that Chris
    needs to fix) in that there is just a single queue object per
    duplex link, thus the parameters cannot be set asymmetrically.
    Note, the delay node *does* use a RED/GRED queue in each
    direction, but its params are the same. These TCL hacks took a
    long time for me to get right!

    Also note that I have no idea how this stuff relates to LANS! I
    do not allow LANS to be created with RED queues (another item for
    Chris to work on perhaps?).

assign_wrapper: A horrible hack to pass the new fields added to
virt_lans onto the delays table setup. Also another minor hack ensure
that a delay node is added when a RED queue is used (for the case when
no other traffic shaping is done). At the moment, the virt_lans table
has a single set of fields, while the delays table has the double set;
one for each direction of the pipe. Here is a listing.

    alter table delays add q0_limit int default 0 after lossrate0;
    alter table delays add q0_maxthresh int default 0 after q0_limit;
    alter table delays add q0_minthresh int default 0 after q0_maxthresh;
    alter table delays add q0_weight float default 0.0 after q0_minthresh;
    alter table delays add q0_linterm int default 0 after q0_weight;
    alter table delays add q0_qinbytes tinyint default 0 after q0_linterm;
    alter table delays add q0_bytes tinyint default 0 after q0_qinbytes;
    alter table delays add q0_meanpsize int default 0 after q0_bytes;
    alter table delays add q0_wait int default 0 after q0_meanpsize;
    alter table delays add q0_setbit int default 0 after q0_wait;
    alter table delays add q0_droptail int default 0 after q0_setbit;
    alter table delays add q0_red tinyint default 0 after q0_droptail;
    alter table delays add q0_gentle tinyint default 0 after q0_red;

tmcd/tmcd.c: Change dodelays to pass back all of these fields (for
both pipes; there are equiv q1 fields in the delays table). Yikes! Its
done in a backwards compatable manner though, so existing delay nodes
will continue to work just fine.

tmcd/freebsd/liblocsetup.pm: Change the delays configuration script to
get all these fields and do something useful with. Of course, our
delay nodes cannot use a lot of these fields, but the information is
sent through for the eventuality that we have more sophisticated
delays nodes.

Test Suite: Add red test dir that has the above syntax as its test.
parent 0e6d5c06
......@@ -203,7 +203,7 @@ $result->finish;
printdb "Loading virt_lans.\n";
$result = DBQueryFatal("SELECT vname,member,delay,bandwidth,lossrate," .
"rdelay,rbandwidth,rlossrate" .
"rdelay,rbandwidth,rlossrate " .
" from virt_lans where pid=\"$pid\" and eid=\"$eid\"");
while (($vname,$member,$delay,$bandwidth,$lossrate,
$rdelay,$rbandwidth,$rlossrate) = $result->fetchrow_array) {
......@@ -213,6 +213,36 @@ while (($vname,$member,$delay,$bandwidth,$lossrate,
push(@{$lans{$vname}},$member);
$delayinfo{"$vname:$member"} = [$delay,$bandwidth,$lossrate,
$rdelay,$rbandwidth,$rlossrate];
#
# Grab the Q stuff from virt_lans. I'm keeping this separate for
# now until I understand whats going on. There are no "r" params
# either. I have no idea how do to this stuff for lans, and for
# duplex links the "r" params are not necessary. Each virt_lans
# entry gives the params towards the switch, which equal the
# reverse params for the other member.
#
my $query_result =
DBQueryFatal("select q_limit,q_maxthresh,q_minthresh,q_weight, ".
" q_linterm,q_qinbytes,q_bytes,q_meanpsize, ".
" q_wait,q_setbit,q_droptail,q_red,q_gentle ".
"from virt_lans ".
"where pid='$pid' and eid='$eid' and ".
" vname='$vname' and member='$member'");
my ($q_limit,$q_maxthresh,$q_minthresh,$q_weight,$q_linterm,
$q_qinbytes,$q_bytes,$q_meanpsize,$q_wait,$q_setbit,
$q_droptail,$q_red,$q_gentle) = $query_result->fetchrow_array;
$queueinfo{"$vname:$member"} =
[$q_limit,$q_maxthresh,$q_minthresh,$q_weight,$q_linterm,
$q_qinbytes,$q_bytes,$q_meanpsize,$q_wait,$q_setbit,
$q_droptail,$q_red,$q_gentle];
if ($q_red) {
$mustdelay{$vname} = 1;
}
($node,$port) = split(":",$member);
#
# XXX - Whenever a delay node is inserted, port speeds are set to
......@@ -271,7 +301,8 @@ foreach $lan (keys(%lans)) {
join(" ",@$sharks) . ")\n";
$sharkshelfid++;
$sharkshelves{$shelfid} = $sharks;
$delayinfo{"$lan:$shelfid:uplink"} = [0,$S100Kbs,0.0,0,$S100Kbs,0.0];
$delayinfo{"$lan:$shelfid:uplink"} = [0,$S100Kbs,0.0,0,
0,$S100Kbs,0.0];
push(@$realmembers,"$shelfid:uplink");
$nodes{$shelfid} = "shark-shelf";
}
......@@ -404,8 +435,8 @@ foreach $lan (keys(%lans)) {
($nonsharks > 1)))) ||
($rloss != 0))) {
$delayname = "tbdelay$delayid";
$delaynodes{"linkdelaysrc/$lan/$member"} = [$delay,$bw,$loss,
$rdelay,$rbw,$rloss];
$delaynodes{"linkdelaysrc/$lan/$member"} =
[$delay,$bw,$loss,$rdelay,$rbw,$rloss];
printdb "Delay node linkdelaysrc/$lan/$member ($delayname) " .
" = " . join(" ",@{$delaynodes{"linkdelaysrc/$lan/$member"}}) . "\n";
$delayid++;
......@@ -805,13 +836,55 @@ foreach $delay (keys(%delays)) {
my $pipe0 = $pipeid;
my $pipe1 = $pipeid + 10;
$pipeid += 100;
DBQueryFatal("insert into delays" .
" (pid,eid,node_id,vname,iface0,iface1" .
",pipe0,delay0,bandwidth0,lossrate0" .
",pipe1,delay1,bandwidth1,lossrate1)" .
" values ('$pid','$eid','$pnode','$vname','$int0','$int1'".
",$pipe0,$delay,$bandwidth,$lossrate".
",$pipe1,$rdelay,$rbandwidth,$rlossrate)");
#
# Okay, this is terible. If this is link (not a lan) then find the
# the queue info. We do not support queues in lans yet.
#
my @members = @{$lans{$vname}};
if (@members == 2) {
my ($nodeport0,$nodeport1) = @members;
my ($q0_limit,$q0_maxthresh,$q0_minthresh,$q0_weight,$q0_linterm,
$q0_qinbytes,$q0_bytes,$q0_meanpsize,$q0_wait,$q0_setbit,
$q0_droptail,$q0_red,$q0_gentle) =
@{$queueinfo{"$vname:$nodeport0"}};
my ($q1_limit,$q1_maxthresh,$q1_minthresh,$q1_weight,$q1_linterm,
$q1_qinbytes,$q1_bytes,$q1_meanpsize,$q1_wait,$q1_setbit,
$q1_droptail,$q1_red,$q1_gentle) =
@{$queueinfo{"$vname:$nodeport1"}};
DBQueryFatal("insert into delays " .
" (pid,eid,node_id,vname,iface0,iface1" .
",pipe0,delay0,bandwidth0,lossrate0" .
",pipe1,delay1,bandwidth1,lossrate1" .
",q0_limit,q0_maxthresh,q0_minthresh,q0_weight,q0_linterm" .
",q0_qinbytes,q0_bytes,q0_meanpsize,q0_wait,q0_setbit" .
",q0_droptail,q0_red,q0_gentle" .
",q1_limit,q1_maxthresh,q1_minthresh,q1_weight,q1_linterm" .
",q1_qinbytes,q1_bytes,q1_meanpsize,q1_wait,q1_setbit" .
",q1_droptail,q1_red,q1_gentle)" .
" values ('$pid','$eid','$pnode','$vname','$int0','$int1'".
",$pipe0,$delay,$bandwidth,$lossrate".
",$pipe1,$rdelay,$rbandwidth,$rlossrate".
",$q0_limit,$q0_maxthresh,$q0_minthresh,$q0_weight,$q0_linterm".
",$q0_qinbytes,$q0_bytes,$q0_meanpsize,$q0_wait,$q0_setbit".
",$q0_droptail,$q0_red,$q0_gentle".
",$q1_limit,$q1_maxthresh,$q1_minthresh,$q1_weight,$q1_linterm".
",$q1_qinbytes,$q1_bytes,$q1_meanpsize,$q1_wait,$q1_setbit".
",$q1_droptail,$q1_red,$q1_gentle)");
}
else {
DBQueryFatal("insert into delays" .
" (pid,eid,node_id,vname,iface0,iface1" .
",pipe0,delay0,bandwidth0,lossrate0" .
",pipe1,delay1,bandwidth1,lossrate1)" .
" values ('$pid','$eid','$pnode','$vname','$int0','$int1'".
",$pipe0,$delay,$bandwidth,$lossrate".
",$pipe1,$rdelay,$rbandwidth,$rlossrate)");
}
#
# XXX - Whenever a delay node is inserted, port speeds are set to
# 100Mbs on the delay node ports. This is to ensure that
......
......@@ -11,8 +11,51 @@
Class LanLink -superclass NSObject
Class Link -superclass LanLink
Class Lan -superclass LanLink
Class Queue -superclass NSObject
LanLink instproc init {s nodes bw d} {
Queue instproc init {type} {
# These control whether the link was created RED or GRED. It
# filters through the DB.
$self set gentle_ 0
$self set red_ 0
#
# These are NS variables for queues (with NS defaults).
#
$self set limit_ 50
$self set maxthresh_ 15
$self set thresh_ 5
$self set q_weight_ 0.002
$self set linterm_ 10
$self set queue-in-bytes_ 0
$self set bytes_ 0
$self set mean_pktsize_ 500
$self set wait_ 1
$self set setbit_ 0
$self set drop-tail_ 1
if {$type != {}} {
$self instvar red_
$self instvar gentle_
if {$type == "RED"} {
set red_ 1
} elseif {$type == "GRED"} {
set red_ 1
set gentle_ 1
} elseif {$type != "DropTail"} {
puts stderr "Unsupported: Link type $type, using DropTail."
}
}
}
LanLink instproc queue {} {
$self instvar linkqueue
return $linkqueue
}
LanLink instproc init {s nodes bw d type} {
# This is a list of {node port} pairs.
$self set nodelist {}
......@@ -22,6 +65,14 @@ LanLink instproc init {s nodes bw d} {
# Now we need to fill out the nodelist
$self instvar nodelist
var_import GLOBALS::new_counter
set q1 q[incr new_counter]
Queue $q1 $type
# For now, a single queue for the link. Makes no sense for lans.
$self set linkqueue $q1
# r* indicates the switch->node chars, others are node->switch
$self instvar bandwidth
$self instvar rbandwidth
......@@ -29,6 +80,7 @@ LanLink instproc init {s nodes bw d} {
$self instvar rdelay
$self instvar loss
$self instvar rloss
foreach node $nodes {
set nodepair [list $node [$node add_lanlink $self]]
set bandwidth($nodepair) $bw
......@@ -150,12 +202,27 @@ LanLink instproc updatedb {DB} {
$self instvar rdelay
$self instvar loss
$self instvar rloss
$self instvar linkqueue
var_import ::GLOBALS::pid
var_import ::GLOBALS::eid
# For now, the return params are the same.
set limit_ [$linkqueue set limit_]
set maxthresh_ [$linkqueue set maxthresh_]
set thresh_ [$linkqueue set thresh_]
set q_weight_ [$linkqueue set q_weight_]
set linterm_ [$linkqueue set linterm_]
set queue-in-bytes_ [$linkqueue set queue-in-bytes_]
set bytes_ [$linkqueue set bytes_]
set mean_pktsize_ [$linkqueue set mean_pktsize_]
set red_ [$linkqueue set red_]
set gentle_ [$linkqueue set gentle_]
set wait_ [$linkqueue set wait_]
set setbit_ [$linkqueue set setbit_]
set droptail_ [$linkqueue set drop-tail_]
foreach nodeport $nodelist {
set nodeportraw [join $nodeport ":"]
sql exec $DB "insert into virt_lans (pid,eid,vname,member,delay,rdelay,bandwidth,rbandwidth,lossrate,rlossrate) values (\"$pid\",\"$eid\",\"$self\",\"$nodeportraw\",$delay($nodeport),$rdelay($nodeport),$bandwidth($nodeport),$rbandwidth($nodeport),$loss($nodeport),$rloss($nodeport))"
sql exec $DB "insert into virt_lans (pid,eid,vname,member,delay,rdelay,bandwidth,rbandwidth,lossrate,rlossrate,q_limit,q_maxthresh,q_minthresh,q_weight,q_linterm,q_qinbytes,q_bytes,q_meanpsize,q_wait,q_setbit,q_droptail,q_red,q_gentle) values (\"$pid\",\"$eid\",\"$self\",\"$nodeportraw\",$delay($nodeport),$rdelay($nodeport),$bandwidth($nodeport),$rbandwidth($nodeport),$loss($nodeport),$rloss($nodeport),$limit_,$maxthresh_,$thresh_,$q_weight_,$linterm_,${queue-in-bytes_},$bytes_,$mean_pktsize_,$wait_,$setbit_,$droptail_,$red_,$gentle_)"
}
}
......@@ -82,9 +82,9 @@ Simulator instproc duplex-link {n1 n2 bw delay type args} {
if {$verbose && ($args != {})} {
puts stderr "Unsupported: Arguments for duplex-link: $args"
}
if {$verbose && ($type != "DropTail")} {
puts stderr "Unsupported: Link type $type, using DropTail"
}
# if {$verbose && ($type != "DropTail") && ($type != "RED")} {
# puts stderr "Unsupported: Link type $type, using DropTail."
# }
set error 0
if {! [$n1 info class Node]} {
perror "\[duplex-link] $n1 is not a node."
......@@ -102,7 +102,7 @@ Simulator instproc duplex-link {n1 n2 bw delay type args} {
set rbw [parse_bw $bw]
set rdelay [parse_delay $delay]
Link $curlink $self "$n1 $n2" $rbw $rdelay
Link $curlink $self "$n1 $n2" $rbw $rdelay $type
set lanlink_list($curlink) {}
set link_map($n1:$n2) $curlink
set link_map($n2:$n1) $curlink
......@@ -122,7 +122,7 @@ Simulator instproc make-lan {nodelist bw delay args} {
$self instvar lanlink_list
if {$verbose && ($args != {})} {
puts stderr "Unsupported: Arguments for make-lan: $args"
puts stderr "Unsupported: Arguments for make-lan: $args"
}
set curlan lan[incr id_counter]
......@@ -131,7 +131,7 @@ Simulator instproc make-lan {nodelist bw delay args} {
set rbw [parse_bw $bw]
set rdelay [parse_delay $delay]
Lan $curlan $self $nodelist $rbw $rdelay
Lan $curlan $self $nodelist $rbw $rdelay {}
set lanlink_list($curlan) {}
set last_class $curlan
......@@ -489,6 +489,12 @@ Simulator instproc find_link {src dst} {
}
}
Simulator instproc link {src dst} {
set reallink [$self find_link $src $dst]
return $reallink
}
# get_subnet
# This is called by lanlinks. When called get_subnet will find an available
# IP subnet, mark it as used, and return it to the caller.
......
......@@ -23,3 +23,4 @@ spinglass2
fixed
vtypes
simplex
red
source tb_compat.tcl
set ns [new Simulator]
set nodeA [$ns node]
set nodeB [$ns node]
#
# Only one Queue associated with a Duplex Link; Changing its params
# change both pipes. Hope to support asymmetric queues soon!
#
set link0 [$ns duplex-link $nodeA $nodeB 100Mb 0ms RED]
set queue0 [[$ns link $nodeA $nodeB] queue]
$queue0 set gentle_ 1
$queue0 set queue-in-bytes_ 0
$queue0 set limit_ 50
$queue0 set maxthresh_ 20
$queue0 set thresh_ 7
$queue0 set linterm_ 11
$queue0 set q_weight_ 0.004
$ns run
tb_prerun("tbprerun",0);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbswapin",0);
tb_run("tbswapout",0);
tb_run("tbend",0);
......@@ -292,7 +292,18 @@ sub dodelays ()
$pat = q(DELAY INT0=([\d\w]+) INT1=([\d\w]+) );
$pat .= q(PIPE0=(\d+) DELAY0=([\d\.]+) BW0=(\d+) PLR0=([\d\.]+) );
$pat .= q(PIPE1=(\d+) DELAY1=([\d\.]+) BW1=(\d+) PLR1=([\d\.]+) );
$pat .= q(LINKNAME=([\d\w]+));
$pat .= q(LINKNAME=([\d\w]+) );
$pat .= q(RED0=(\d) RED1=(\d) );
$pat .= q(LIMIT0=(\d+) );
$pat .= q(MAXTHRESH0=(\d+) MINTHRESH0=(\d+) WEIGHT0=([\d\.]+) );
$pat .= q(LINTERM0=(\d+) QINBYTES0=(\d+) BYTES0=(\d+) );
$pat .= q(MEANPSIZE0=(\d+) WAIT0=(\d+) SETBIT0=(\d+) );
$pat .= q(DROPTAIL0=(\d+) GENTLE0=(\d+) );
$pat .= q(LIMIT1=(\d+) );
$pat .= q(MAXTHRESH1=(\d+) MINTHRESH1=(\d+) WEIGHT1=([\d\.]+) );
$pat .= q(LINTERM1=(\d+) QINBYTES1=(\d+) BYTES1=(\d+) );
$pat .= q(MEANPSIZE1=(\d+) WAIT1=(\d+) SETBIT1=(\d+) );
$pat .= q(DROPTAIL1=(\d+) GENTLE1=(\d+));
$delay =~ /$pat/;
......@@ -310,6 +321,37 @@ sub dodelays ()
$bandw2 = $9;
$plr2 = $10;
$linkname = $11;
$red1 = $12;
$red2 = $13;
#
# Only a few of these NS RED params make sense for dummynet,
# but they all come through; someday they might be used.
#
$limit1 = $14;
$maxthresh1 = $15;
$minthresh1 = $16;
$weight1 = $17;
$linterm1 = $18;
$qinbytes1 = $19;
$bytes1 = $20;
$meanpsize1 = $21;
$wait1 = $22;
$setbit1 = $23;
$droptail1 = $24;
$gentle1 = $25;
$limit2 = $26;
$maxthresh2 = $27;
$minthresh2 = $28;
$weight2 = $29;
$linterm2 = $30;
$qinbytes2 = $31;
$bytes2 = $32;
$meanpsize2 = $33;
$wait2 = $34;
$setbit2 = $35;
$droptail2 = $36;
$gentle2 = $37;
#
# Delays are floating point numbers (unit is ms). ipfw does not
......@@ -320,6 +362,71 @@ sub dodelays ()
$delay1 = int($delay1 + 0.5);
$delay2 = int($delay2 + 0.5);
#
# Qsizes are in slots or packets. My perusal of the 4.3 code
# shows the limits are 50 < slots <= 100 or 0 <= bytes <= 1MB.
#
my $queue1 = "";
my $queue2 = "";
if ($qinbytes1) {
if ($limit1 <= 0 || $limit1 > (1024 * 1024)) {
print "Q limit $limit1 for pipe $p1 is bogus.\n";
}
else {
$queue1 = "queue ${limit1}bytes";
}
}
elsif ($limit1 != 0) {
if ($limit1 < 0 || $limit1 > 100) {
print "Q limit $limit1 for pipe $p1 is bogus.\n";
}
else {
$queue1 = "queue $limit1";
}
}
if ($qinbytes2) {
if ($limit2 <= 0 || $limit2 > (1024 * 1024)) {
print "Q limit $limit2 for pipe $p2 is bogus.\n";
}
else {
$queue2 = "queue ${limit2}bytes";
}
}
elsif ($limit2 != 0) {
if ($limit2 < 0 || $limit2 > 100) {
print "Q limit $limit2 for pipe $p2 is bogus.\n";
}
else {
$queue2 = "queue $limit2";
}
}
#
# RED/GRED stuff
#
my $redparams1 = "";
my $redparams2 = "";
if ($red1) {
if ($gentle1) {
$redparams1 = "gred ";
}
else {
$redparams1 = "red ";
}
my $max_p = 1 / $linterm1;
$redparams1 .= "$weight1/$minthresh1/$maxthresh1/$max_p";
}
if ($red2) {
if ($gentle2) {
$redparams2 = "gred ";
}
else {
$redparams2 = "red ";
}
my $max_p = 1 / $linterm2;
$redparams2 .= "$weight2/$minthresh2/$maxthresh2/$max_p";
}
print DEL "ifconfig $iface1 media 100baseTX mediaopt full-duplex";
print DEL "\n";
print DEL "ifconfig $iface2 media 100baseTX mediaopt full-duplex";
......@@ -327,14 +434,16 @@ sub dodelays ()
print DEL "ipfw add pipe $p1 ip from any to any in recv $iface1\n";
print DEL "ipfw add pipe $p2 ip from any to any in recv $iface2\n";
print DEL "ipfw pipe $p1 config delay ${delay1}ms ";
print DEL "bw ${bandw1}Kbit/s plr $plr1\n";
print DEL "bw ${bandw1}Kbit/s plr $plr1 $queue1 $redparams1\n";
print DEL "ipfw pipe $p2 config delay ${delay2}ms ";
print DEL "bw ${bandw2}Kbit/s plr $plr2\n";
print DEL "bw ${bandw2}Kbit/s plr $plr2 $queue2 $redparams2\n";
print STDOUT " $iface1/$iface2 pipe $p1 config delay ";
print STDOUT "${delay1}ms bw ${bandw1}Kbit/s plr $plr1\n";
print STDOUT "${delay1}ms bw ${bandw1}Kbit/s plr $plr1 ";
print STDOUT "$queue1 $redparams1\n";
print STDOUT " $iface1/$iface2 pipe $p2 config delay ";
print STDOUT "${delay2}ms bw ${bandw2}Kbit/s plr $plr2\n";
print STDOUT "${delay2}ms bw ${bandw2}Kbit/s plr $plr2 ";
print STDOUT "$queue2 $redparams2\n";
print MAP "$linkname duplex $iface1 $iface2 $p1 $p2\n";
......
......@@ -913,7 +913,7 @@ dodelay(int sock, struct in_addr ipaddr, char *rdata, int tcp)
char pid[64];
char eid[64];
char gid[64];
char buf[MYBUFSIZE];
char buf[2*MYBUFSIZE];
int nrows;
if (iptonodeid(ipaddr, nodeid)) {
......@@ -934,16 +934,22 @@ dodelay(int sock, struct in_addr ipaddr, char *rdata, int tcp)
* course, this assumes that the type is the BSD name, not linux.
*/
res = mydb_query("select i.MAC,j.MAC, "
"pipe0,delay0,bandwidth0,lossrate0, "
"pipe1,delay1,bandwidth1,lossrate1, "
"vname "
" from delays as d "
"left join interfaces as i on "
" i.node_id=d.node_id and i.iface=iface0 "
"left join interfaces as j on "
" j.node_id=d.node_id and j.iface=iface1 "
" where d.node_id='%s'",
11, nodeid);
"pipe0,delay0,bandwidth0,lossrate0,q0_red, "
"pipe1,delay1,bandwidth1,lossrate1,q1_red, "
"vname, "
"q0_limit,q0_maxthresh,q0_minthresh,q0_weight,q0_linterm, "
"q0_qinbytes,q0_bytes,q0_meanpsize,q0_wait,q0_setbit, "
"q0_droptail,q0_gentle, "
"q1_limit,q1_maxthresh,q1_minthresh,q1_weight,q1_linterm, "
"q1_qinbytes,q1_bytes,q1_meanpsize,q1_wait,q1_setbit, "
"q1_droptail,q1_gentle "
" from delays as d "
"left join interfaces as i on "
" i.node_id=d.node_id and i.iface=iface0 "
"left join interfaces as j on "
" j.node_id=d.node_id and j.iface=iface1 "
" where d.node_id='%s'",
37, nodeid);
if (!res) {
syslog(LOG_ERR, "DELAY: %s: DB Error getting delays!",
nodeid);
......@@ -971,11 +977,29 @@ dodelay(int sock, struct in_addr ipaddr, char *rdata, int tcp)
sprintf(buf, "DELAY INT0=%s INT1=%s "
"PIPE0=%s DELAY0=%s BW0=%s PLR0=%s "
"PIPE1=%s DELAY1=%s BW1=%s PLR1=%s "
"LINKNAME=%s\n",
"LINKNAME=%s "
"RED0=%s RED1=%s "
"LIMIT0=%s MAXTHRESH0=%s MINTHRESH0=%s WEIGHT0=%s "
"LINTERM0=%s QINBYTES0=%s BYTES0=%s "
"MEANPSIZE0=%s WAIT0=%s SETBIT0=%s "
"DROPTAIL0=%s GENTLE0=%s "
"LIMIT1=%s MAXTHRESH1=%s MINTHRESH1=%s WEIGHT1=%s "
"LINTERM1=%s QINBYTES1=%s BYTES1=%s "
"MEANPSIZE1=%s WAIT1=%s SETBIT1=%s "
"DROPTAIL1=%s GENTLE1=%s \n",
row[0], row[1],
row[2], row[3], row[4], row[5],
row[6], row[7], row[8], row[9],
row[10]);
row[7], row[8], row[9], row[10],
row[12],
row[6], row[11],
row[13], row[14], row[15], row[16],
row[17], row[18], row[19],
row[20], row[21], row[22],
row[23], row[24],
row[25], row[26], row[27], row[28],
row[29], row[30], row[31],
row[32], row[33], row[34],
row[35], row[36]);
client_writeback(sock, buf, strlen(buf), tcp);
nrows--;
......
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