[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] how can you have a string field in a packet header?



Maybe you would want to take a look at the manual and see if classes like 
AppData and Process would suit your needs. Or take a look at http stuff in 
webcache. What kind of transport agent do you use?

 


>X-Authentication-Warning: kavanagh.cse.ucsc.edu: lori owned process doing -bs
>Date: Fri, 7 Jul 2000 11:16:15 -0700 (PDT)
>From: Lori Flynn  <[email protected]>
>To: [email protected]
>Subject: [ns] how can you have a string field in a packet header?
>MIME-Version: 1.0
>
>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".
>
>
>

Tarik