#5, First Floor, 4th Street , Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to get a packet sequence number using C++ in NS2?

Description

In network protocol, packet sequence number plays the role of ensuring the tracking of end to end packet delivery. Especially TCP utilizes the packet sequence number as the main parameter in end to end flow control for sending acknowledgment and retransmission. The code given below gives the command to access the sequence number attached in the header of the packet.

Code Segment

struct hdr_cmn *ch = HDR_CMN(p);
int sequence_number =ch->uid();