How to find the RTT and Retransmission count
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: How to find the RTT and Retransmission count

  1. #1
    Join Date
    Oct 2010
    Posts
    2

    How to find the RTT and Retransmission count

    I need a way to find out the Round trip time and the retransmission count (both packets and bytes) per socket. I can either obtain at the user level or in the filter driver. In linux, one can obtain this information by reading the sock info from tcp_ehash, and then obtain the tcp_sock using tcp_sk on struct sock*; but i couldnt find an equavalent in windows. I am not using the Winsock Kernel, all the connections are opened by a user process and in the filter driver I intercept the egress packets. There is a possibility getting this information by keeping per flow information and determining if the packet send down by the protocol driver was send earlier but I wish to avoid keeping this state.
    Is there anyway to get this information from kernel in the driver, or is there anyway that the user mode process can query the socket to obtain these information.

    Please help.

  2. #2
    Join Date
    Oct 2010
    Posts
    2

    Re: How to find the RTT and Retransmission count

    I found this http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
    (GetPerTcpConnectionEStats)which has the information as tcp-ipv4 extended information, I dont know if there is any easier way to obtain this extented information from within the driver.
    Unfortunately, this function is only supported starting from Vista. I wonder if there is equivalent available for windowxp (something which I need as well, and I cant seem to find it so far).

    typedef struct _TCP_ESTATS_PATH_ROD_v0 {
    ULONG FastRetran;
    ULONG Timeouts;
    ULONG SubsequentTimeouts;
    ULONG CurTimeoutCount;
    ULONG AbruptTimeouts;
    ULONG PktsRetrans;
    ULONG BytesRetrans;
    ULONG DupAcksIn;
    ULONG SacksRcvd;
    ULONG SackBlocksRcvd;
    ULONG CongSignals;
    ULONG PreCongSumCwnd;
    ULONG PreCongSumRtt;
    ULONG PostCongSumRtt;
    ULONG PostCongCountRtt;
    ULONG EcnSignals;
    ULONG EceRcvd;
    ULONG SendStall;
    ULONG QuenchRcvd;
    ULONG RetranThresh;
    ULONG SndDupAckEpisodes;
    ULONG SumBytesReordered;
    ULONG NonRecovDa;
    ULONG NonRecovDaEpisodes;
    ULONG AckAfterFr;
    ULONG DsackDups;
    ULONG SampleRtt;
    ULONG SmoothedRtt;
    ULONG RttVar;
    ULONG MaxRtt;
    ULONG MinRtt;
    ULONG SumRtt;
    ULONG CountRtt;
    ULONG CurRto;
    ULONG MaxRto;
    ULONG MinRto;
    ULONG CurMss;
    ULONG MaxMss;
    ULONG MinMss;
    ULONG SpuriousRtoDetections;
    } TCP_ESTATS_PATH_ROD_v0, *PTCP_ESTATS_PATH_ROD_v0;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center