Thread: Ping and Traceroute not working in IPv6 environment on Windows XP / Win Server 2003

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    I have done my homework, now, I think. I had always though "pseudo-header" referred to the IPv6 header, with some fields zeroed. Now that I've got the correct RFC in hand, I see it is otherwise. (Why they put information pertaining to ICMPv6 in the IPv6 RFC is still beyond me, as is to why they decided to lay out the pseudo-header the way they did - no rational is provided as to why that format is better than the original IPv6 format...)

    After doing some tests on some ICMPv6 echo packets I captured, it would seem that you need to fill in source & destination addresses in the pseudo-header. Your entry of the next header value in the pseudo-header seems to be correct, however, I am not sure that your payload length is - offset 32 in the pseudo header is indeed the first byte of the length, but also the most significant - so, you're entering 0x40000000 as the packet's payload length.

    I also still doubt your length calculation, as I mentioned earlier. This line is what troubles me:
    Code:
    datapart = (char *)icHdrPing + sizeof(ICMPHeader);
    
    memset(datapart,'E', 32);
    That's 32 'E's, plus sizeof(ICMPHeader), which is 12, which equals 44 bytes total.

    Finally, your one's complement code:
    Code:
    	ulChkSum = (ulChkSum >> 16) + (ulChkSum & 0xffff);
    	ulChkSum += (ulChkSum >> 16);
    
    	return (unsigned short)(~ulChkSum);
    }
    The first line, OK - add in the carries. But that second line? Should we not also do a (ulChkSum & 0xffff) here? In my trying to duplicate the checksum of a captured wireshark ICMPv6 packet, I used:
    Code:
    while(sum > 0xFFFFUL)
    {
    	sum = (sum & 0xFFFF) + (sum >> 16);
    }
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  2. #2
    Registered User
    Join Date
    Apr 2009
    Location
    Bangalore
    Posts
    6
    Hi Cactus,

    I have identified the problem, fixed it and is working fine. Thanks a lot for your time spend on this issue. The problem is in payload size that I am putting in pseudo-header. The payload size variable size is 4 bytes (i.e) 32nd byte of pseudo-header. I was placing payload size at 32nd position, but it should be at 35th position (that is at 4th byte). That means the value should be stored in big endian order. Also another issue I was facing with source address. Initially i was not filling it. After filling the source address, it is able to ping and traceroute IPv6 on both Xp and Win2k3.

    Thanks again..

    - Vignesh P

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. IPv6 ping in windows...problem..lots of ode:(
    By Neill KElly in forum C Programming
    Replies: 3
    Last Post: 04-27-2009, 11:50 PM

Tags for this Thread