Anuradha Sehgal wrote:
> Sir I did as you said about type casting
>
>
>  if (flags && (0 ==strcmp(flags, "NEW_BURST")))
>    rh->flags() |= RTP_M;
>   p->setdata(data);
>   printf("Data: %s :", ((PacketData*)p->userdata())->data());
>   target_->recv(p);
>
>
> But it gives me segmentation error when i run the tcl file,
> It gives the msg like
>
> "Segmentation fault (core dumped)"
>
> Can you tell me the reason for this.

Works perfectly fine for me using the official udpdata.tcl example -- your
segmentation fault must be caused by something else.

See here

http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#unexpected_behavior_or_crash_.28segfault.29_after_code_extension

to figure out how to solve segfault errors.


--Timo

Reply via email to