Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Strange Problem regarding PING ??

Strange Problem regarding PING ??

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AhmedOsamaMoh
    wrote on last edited by
    #1

    Dear ALL now i was makeing a small ping app. and i read alot about it and i take some codes from the internet and after some problems it worked at the end but i wished to be sure that packets which were sent are eaxctly what i set it so i used wireshark software to see each ICMP packets i was sending 150 bytes discoverd the real one which was sent is 12 bytes !!! i check it using windows Ping (MS Ping) it worked so fine so i thought the problem is in my code , i tried many of ping codes in the net & almost no one send the right packet size !!!!!!!! so what i should check?? anyone has idea about such problem?? thax all bye

    G C 2 Replies Last reply
    0
    • A AhmedOsamaMoh

      Dear ALL now i was makeing a small ping app. and i read alot about it and i take some codes from the internet and after some problems it worked at the end but i wished to be sure that packets which were sent are eaxctly what i set it so i used wireshark software to see each ICMP packets i was sending 150 bytes discoverd the real one which was sent is 12 bytes !!! i check it using windows Ping (MS Ping) it worked so fine so i thought the problem is in my code , i tried many of ping codes in the net & almost no one send the right packet size !!!!!!!! so what i should check?? anyone has idea about such problem?? thax all bye

      G Offline
      G Offline
      gori_sikten
      wrote on last edited by
      #2

      check your hardware setting,,, maybe some errors there,,,

      A 1 Reply Last reply
      0
      • G gori_sikten

        check your hardware setting,,, maybe some errors there,,,

        A Offline
        A Offline
        AhmedOsamaMoh
        wrote on last edited by
        #3

        Thx for your reply but what hardware setting ?? :^) :~ nothing in the socket programming related to hardware and i tried MS ping in the same PC and it worked so fine :omg: thx bye :sigh:

        1 Reply Last reply
        0
        • A AhmedOsamaMoh

          Dear ALL now i was makeing a small ping app. and i read alot about it and i take some codes from the internet and after some problems it worked at the end but i wished to be sure that packets which were sent are eaxctly what i set it so i used wireshark software to see each ICMP packets i was sending 150 bytes discoverd the real one which was sent is 12 bytes !!! i check it using windows Ping (MS Ping) it worked so fine so i thought the problem is in my code , i tried many of ping codes in the net & almost no one send the right packet size !!!!!!!! so what i should check?? anyone has idea about such problem?? thax all bye

          C Offline
          C Offline
          Cosmic Egg
          wrote on last edited by
          #4

          Please Explain what exactly are you trying to do. Did you analyse exactly what was shown by wireshark. Please post it so we know more info. My guess is you icmp message was 12 byte but the whole packet encapsulated by lower layers(udp and ethernet frame) made it to look of wrong size to you but is of correct size. the icmp reply also contain the orginal ping request which is again of different size. Did you send 12 bytes and wireshark showed 150 byte. or you sent 150 bytes and wireshark showed 12 bytes. Just check what data are you giving to the socket????

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups