[ns] how can you have a string field in a packet header?
Lori Flynn
lori@cse.ucsc.edu
Fri, 7 Jul 2000 11:16:15 -0700 (PDT)
I have a new packet header type, and am having trouble setting a string
value in the header. Int values get set fine, but the simulation crashes
when I try to set a string.
I use a 'const char *' field for the string (like 'int' for the integer
fields) in the packet header. I set the string like this:
set thisString "string"
set stringHeaderField $thisString
And in the parsing of "command" (for the 'send' function), the header
field string can be printed. ie:
printf("The string field in the header is now %s", myHeader->stringValue);
prints out: "The string field in the header is now string"
However, the script crashes in the packet 'recv' function. The error
message I get, using the GDB debugger, is "no value given for parameter,
Program exited with code 01".