Commit 6b71417c authored by Sampo Saaristo's avatar Sampo Saaristo

Latest updates by Rui Prior (GUI ready)

parent ea78f2bf
......@@ -29,6 +29,12 @@ INTRODUCTION (very short):
for later processing. Read more from "README.crude".
* GRUDE [Graphical RUDE]
Grude is a graphical shell for RUDE (and CRUDE), written in
Perl/Tk. Read more from "README.grude".
COMPILATION AND INSTALLATION INSTRUCTIONS:
------------------------------------------
......
CRUDE - version 0.60
CRUDE - version 0.63
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
......@@ -63,12 +63,12 @@ Commandline syntax:
default vaulue is 0, which means until
interrupted with CTRL+C.
-s #[,#...] Instead of logging results to a file
calculate some statistics on-the-fly.
-s #[,#...] Instead of logging results to a file
calculate some statistics on-the-fly.
-P <priority> Set the process real-time priority.
Only root can do that. Be carefull -
this might lock up your computer !!!
-P <priority> Set the process real-time priority.
Only root can do that. Be careful -
this might lock up your computer !!!
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
RUDE - version 0.60
RUDE - version 0.63
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
......@@ -22,7 +22,7 @@ From Jargon File (4.0.0/24 July 1996) [jargon]:
Commandline syntax:
rude [ -h | -v | -s <script file> ] [ -p <priority level ]
rude [ -h | -v | -s <script file> ] [ -P <priority level ]
-h Print short help.
......@@ -139,6 +139,7 @@ Configuration file:
* This command is valid only for the following flow type(s):
- CONSTANT
- TRACE
o <mtime> = { integer } - relative time from START to this action
o <id> = { integer } - flow identifier
......@@ -163,7 +164,7 @@ Available flow types:
This flow simulates stream that looks like constant bitrate traffic.
You may change the flow parameters (packet size and packet rate) with
the MODIFY command. If the generated stream is not "stable" enough, you
should try to run the rude in priviledged priority (-p option).
should try to run the rude in priviledged priority (-P option).
* TRACE
......
This diff is collapsed.
......@@ -180,15 +180,32 @@ void trace_parse(char *buffer, struct trace_params *par)
unsigned int i;
int fraglen;
int p_size;
char action[11] = {0};
/* Add the "ultimate" end character :) */
time2_array[6] = '\0';
/* Get the file name and open it. Report errors */
if(1 != sscanf(buffer,"%*d %*d %*10s %*u %*127s %*31s %250s",target)){
RUDEBUG1("trace_parse() - couldn't obtain the trace file name\n");
/* Determine if ON or MODIFY */
if(1 != sscanf(buffer,"%*d %*d %10s %*s",action)){
RUDEBUG1("trace_parse() - couldn't obtain the action type\n");
return;
}
/* Get the file name and open it. Report errors */
if (strncasecmp(action,"ON",2) == 0) {
if(1 != sscanf(buffer,"%*d %*d %*10s %*u %*127s %*31s %250s",target)){
RUDEBUG1("trace_parse() - couldn't obtain the trace file name\n");
return;
}
} else if (strncasecmp(action,"MODIFY",6) == 0) {
if(1 != sscanf(buffer,"%*d %*d %*10s %*31s %250s",target)){
RUDEBUG1("trace_parse() - couldn't obtain the trace file name\n");
return;
}
} else {
RUDEBUG1("trace_parse() - action is not ON or MODIFY\n");
return;
}
if((fptr = fopen(target,"r")) == NULL){
RUDEBUG1("trace_parse() - fopen() failed: %s\n",strerror(errno));
return;
......@@ -466,6 +483,20 @@ int flow_modify(struct flow_cfg *target, char *buffer)
break;
case(TRACE):
mod->flow_id = temp->flow_id;
mod->dst = temp->dst;
mod->flow_sport = temp->flow_sport;
mod->send_func = send_trace;
mod->params.trace.ftype = typenum;
trace_parse(buffer, &mod->params.trace);
temp->mod_flow = mod;
if(mod->params.trace.list_size == 0){
free(mod);
return(-4);
}
RUDEBUG7("flow_modify() - flow id=%ld modified\n",mod->flow_id);
break;
default:
free(mod);
RUDEBUG1("flow_modify() - MODIFY not supported for %32s flows\n",type);
......
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