C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 05-24-2005, 10:19 AM   #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.
Devil Panther is offline   Reply With Quote
Old 05-24-2005, 10:28 AM   #2
and the hat of marbles
 
Sang-drax's Avatar
 
Join Date: May 2002
Location: Göteborg, Sweden
Posts: 2,038
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
Sang-drax is offline   Reply With Quote
Old 05-24-2005, 12:29 PM   #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.
Devil Panther is offline   Reply With Quote
Old 05-24-2005, 04:29 PM   #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
eth0 is offline   Reply With Quote
Old 05-24-2005, 05:29 PM   #5
and the hat of marbles
 
Sang-drax's Avatar
 
Join Date: May 2002
Location: Göteborg, Sweden
Posts: 2,038
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
Sang-drax is offline   Reply With Quote
Old 05-25-2005, 10:58 AM   #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.
Devil Panther is offline   Reply With Quote
Old 05-26-2005, 02:10 PM   #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.
Devil Panther is offline   Reply With Quote
Old 05-26-2005, 03:53 PM   #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
eth0 is offline   Reply With Quote
Old 07-22-2005, 02:39 PM   #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.
Devil Panther is offline   Reply With Quote
Old 07-22-2005, 02:48 PM   #10
Registered User
 
Codeplug's Avatar
 
Join Date: Mar 2003
Posts: 3,844
Download the latest platform sdk:
http://www.microsoft.com/msdownload/...sdk/sdkupdate/

gg
Codeplug is online now   Reply With Quote
Old 07-22-2005, 03:58 PM   #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.
Devil Panther is offline   Reply With Quote
Old 08-12-2005, 04:52 AM   #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

Quote:
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.
Devil Panther is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Raw socket like_no_other Networking/Device Communication 4 03-28-2009 02:05 PM
Question on ICMP echo request kzfid Networking/Device Communication 7 11-02-2005 06:16 PM


All times are GMT -6. The time now is 09:37 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22