Thread: Raw Sockets and SP2...

  1. #1
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768

    Raw Sockets and SP2...

    Well, as we all know microsoft killed raw sockets on windows machines with their sp2 for XP, and their "illegal" patch for people who didn't want sp2 on their machines!

    But the question remains, if i don't have raw sockets... can i still write applications that use icmp? like PING that uses icmp request.
    Because as far as i know, raw sockets is the only way to generate an icmp packet, but there aren't any raw sockets on "patched" windows machines, then how could it be that the PING program still works?



    thank you.
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  2. #2
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    The only two restrictions to raw sockets in SP2 are:
    • TCP data cannot be sent over raw sockets.
    • UDP datagrams with invalid source addresses cannot be sent over raw sockets. The IP source address for any outgoing UDP datagram must exist on a network interface or the datagram is dropped.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  3. #3
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    i see.... so those are the only restrictions?
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  4. #4
    Registered User eth0's Avatar
    Join Date
    Dec 2003
    Posts
    164
    You don't have to use raw sockets. There is also the ICMP.dll, although MS have been threatening to remove it for a few years now.

    Check the winsock FAQ for details on how to use it. (although raw is a better method)
    Open source isn't a matter of life or death......
    .......its much more important than that!!


    SuSE Linux - GCC 3.4.2
    XP Pro - Visual Studio 2005 TS, MinGW 3.4.2

  5. #5
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Quote Originally Posted by Devil Panther
    so those are the only restrictions?
    ....
    Quote Originally Posted by Me
    The only two restrictions to raw sockets in SP2 are:
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  6. #6
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    got it
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  7. #7
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    Quote Originally Posted by eth0
    MS have been threatening to remove it for a few years now.
    Is the icmp.dll supported by windows 2003?
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  8. #8
    Registered User eth0's Avatar
    Join Date
    Dec 2003
    Posts
    164
    yes, they haven't removed it (and I doubt they will be doing any time soon)
    Open source isn't a matter of life or death......
    .......its much more important than that!!


    SuSE Linux - GCC 3.4.2
    XP Pro - Visual Studio 2005 TS, MinGW 3.4.2

  9. #9
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    [ur]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/icmpsendecho.asp[/url]

    The document says I need to use icmpapi.h but neither my VC++ Studio nor the Borland C++ has it... Why?
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  10. #10
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Download the latest platform sdk:
    http://www.microsoft.com/msdownload/...sdk/sdkupdate/

    gg

  11. #11
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    But why do i need an update if it's an old header? It's practically obsolete.

    Also, how can I update my Borland C++ 5.5 compiler?
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  12. #12
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    I'm sorry to bring the topic back up, but I really need an answer on this question

    But why do i need an update if it's an old header? It's practically obsolete.

    Also, how can I update my Borland C++ 5.5 compiler?
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Raw socket
    By like_no_other in forum Networking/Device Communication
    Replies: 4
    Last Post: 03-28-2009, 02:05 PM
  2. Question on ICMP echo request
    By kzfid in forum Networking/Device Communication
    Replies: 7
    Last Post: 11-02-2005, 06:16 PM