I need to modify a parameter named test
inside process_data
and switch cases outside that function depending on test
value.
I couldn't pass it by reference using upvar
because the process_data
represent a static function for processing received udp packet, and it won't accept more than two parameters 'size and data'.
Also, as far as I found, there is no returned value for the process_data
function.
Code:
set test "0"
Agent/UDP instproc process_data {size data} {
//some stuff
if (...)
set test "1"
}
// switch cases depending on test value.