Analysis of why Nam file is not displayed in NS2

Source: Internet
Author: User
Tags set time
Today, I wrote a piece of code--defined a new transport protocol and a common contract application, the results run to the end, always show that Nam, is very distressed. However, after viewing the Nam file has been found, and Nam Out.nam, to be able to display, after careful observation, found that the Nam file runs much less than the set time.
--so the guess must be that the program was running and there was an error. Because there is no error, so this mistake must be secret to Han. So, I step-by-step printf, and found that after calling the function Process_data, the program exited.
-So I looked at the Process_data function and found out that this is a function in the parent process of application, which calls the Abort function------------------------this only knows that even if we don't deliver the real data, Process_ The data function also needs to be rewritten, or the first time a packet is received by the receiving end, the Process_data function is called, causing the program to terminate.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.