@@ -20,8 +20,8 @@ int main( int argc, char *argv[] ) {
20
20
WhiskerTree whiskers;
21
21
bool ratFound = false ;
22
22
23
- string serverip = " " , sourceip = " " ;
24
- int serverport=8888 , sourceport= 0 ;
23
+ string serverip = " " ;
24
+ int serverport=8888 ;
25
25
int offduration=5000 , onduration=5000 ;
26
26
string traffic_params = " " ;
27
27
string delta_conf = " " ; // for MarkovianCC
@@ -60,12 +60,8 @@ int main( int argc, char *argv[] ) {
60
60
}
61
61
else if ( arg.substr ( 0 , 9 ) == " serverip=" )
62
62
serverip = arg.substr ( 9 );
63
- else if ( arg.substr ( 0 , 9 ) == " sourceip=" )
64
- sourceip = arg.substr ( 9 );
65
63
else if ( arg.substr ( 0 , 11 ) == " serverport=" )
66
64
serverport = atoi ( arg.substr ( 11 ).c_str () );
67
- else if ( arg.substr ( 0 , 11 ) == " sourceport=" )
68
- sourceport = atoi ( arg.substr ( 11 ).c_str () );
69
65
else if ( arg.substr ( 0 , 12 ) == " offduration=" )
70
66
offduration = atoi ( arg.substr ( 12 ).c_str () );
71
67
else if ( arg.substr ( 0 , 11 ) == " onduration=" )
@@ -108,8 +104,8 @@ int main( int argc, char *argv[] ) {
108
104
}
109
105
}
110
106
111
- if ( serverip == " " || sourceip == " " ) {
112
- fprintf ( stderr, " Usage: sender serverip=(ipaddr) sourceip=(ipaddr) [if=(ratname)] [offduration=(time in ms)] [onduration=(time in ms)] [cctype=remy|kernel|tcp|markovian] [delta_conf=(for MarkovianCC)] [linkrate=(packets/sec)] [linklog=filename][serverport=(port)] [sourceport =(port)]\n " );
107
+ if ( serverip == " " ) {
108
+ fprintf ( stderr, " Usage: sender serverip=(ipaddr) [if=(ratname)] [offduration=(time in ms)] [onduration=(time in ms)] [cctype=remy|kernel|tcp|markovian] [delta_conf=(for MarkovianCC)] [linkrate=(packets/sec)] [linklog=filename] [serverport =(port)]\n " );
113
109
exit (1 );
114
110
}
115
111
@@ -121,14 +117,14 @@ int main( int argc, char *argv[] ) {
121
117
if ( cctype == CCType::REMYCC) {
122
118
fprintf ( stdout, " Using RemyCC.\n " );
123
119
RemyCC congctrl ( whiskers );
124
- CTCP< RemyCC > connection ( congctrl, serverip, serverport, sourceip, sourceport );
120
+ CTCP< RemyCC > connection ( congctrl, serverip, serverport );
125
121
TrafficGenerator<CTCP<RemyCC>> traffic_generator ( connection, onduration, offduration, traffic_params );
126
122
traffic_generator.spawn_senders ( 1 );
127
123
}
128
124
else if ( cctype == CCType::TCPCC ) {
129
125
fprintf ( stdout, " Using UDT's TCP CC.\n " );
130
126
DefaultCC congctrl;
131
- CTCP< DefaultCC > connection ( congctrl, serverip, serverport, sourceip, sourceport );
127
+ CTCP< DefaultCC > connection ( congctrl, serverip, serverport );
132
128
TrafficGenerator< CTCP< DefaultCC > > traffic_generator ( connection, onduration, offduration, traffic_params );
133
129
traffic_generator.spawn_senders ( 1 );
134
130
}
@@ -164,7 +160,7 @@ int main( int argc, char *argv[] ) {
164
160
fprintf ( stderr, " NashCC Deprecated. Use MarkovianCC.\n " );
165
161
assert ( cctype != CCType::NASHCC );
166
162
// NashCC congctrl( nashcc_utility_mode, param );
167
- // CTCP< NashCC > connection( congctrl, serverip, serverport, sourceip, sourceport );
163
+ // CTCP< NashCC > connection( congctrl, serverip, serverport );
168
164
// TrafficGenerator<CTCP<NashCC>> traffic_generator( connection, onduration, offduration, traffic_params );
169
165
// traffic_generator.spawn_senders( 1 );
170
166
}
@@ -173,7 +169,7 @@ int main( int argc, char *argv[] ) {
173
169
MarkovianCC congctrl (1.0 );
174
170
assert (delta_conf != " " );
175
171
congctrl.interpret_config_str (delta_conf);
176
- CTCP< MarkovianCC > connection ( congctrl, serverip, serverport, sourceip, sourceport );
172
+ CTCP< MarkovianCC > connection ( congctrl, serverip, serverport );
177
173
TrafficGenerator< CTCP< MarkovianCC > > traffic_generator ( connection, onduration, offduration, traffic_params );
178
174
traffic_generator.spawn_senders ( 1 );
179
175
}
0 commit comments