 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Mon Dec 06, 2004 12:58 am Post subject: Is SIO_RCVALL reliable |
|
|
Hi,
I didn't want to use winpcap, so I have implemented a simple packet sniffer for a
statistics tool using raw sockets on an XP box. I am experiencing prblems on win 98, also
I have read some problems about SIO_RCVALL option on XP. Is it reliable, and can I use it
on win98 ?
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon Dec 06, 2004 9:53 am Post subject: Re: Is SIO_RCVALL reliable |
|
|
<Fedaykin> wrote
| Quote: | I didn't want to use winpcap
|
Why not?
| Quote: | so I have implemented a simple packet sniffer for a
statistics tool using raw sockets on an XP box.
|
That won't work. For one thing, XP raw socket support is dangerous and
highly exploitable by hackers wanting to bypass XP's security. Second,
other versions of Windows do not fully implement raw sockets to begin with,
only a subset of support, so you most liley won't receive any network
traffic at all since the support does not reach deep enough into the socket
stack to communicate with the network layer directly like it does under XP.
| Quote: | I am experiencing prblems on win 98
|
Just saying something does not work says nothing at all about the actual
problem you are having. Please always provide specific details.
| Quote: | can I use it on win98 ?
|
SIO_RCVALL is not available on Win98. It was not introduced until Win2000.
Gambit
|
|
| Back to top |
|
 |
Guest
|
Posted: Mon Dec 06, 2004 12:13 pm Post subject: Re: Is SIO_RCVALL reliable |
|
|
| Quote: | I didn't want to use winpcap
Why not?
Actually I don't need advanced capabilties of winpcap, so I wanted to write a stat tool |
without insalling it.
| Quote: |
That won't work. For one thing, XP raw socket support is dangerous and
highly exploitable by hackers wanting to bypass XP's security. Second,
other versions of Windows do not fully implement raw sockets to begin with,
only a subset of support, so you most liley won't receive any network
traffic at all since the support does not reach deep enough into the socket
stack to communicate with the network layer directly like it does under XP.
it is simple to implement and works perfect on my xp with sp2 but these problems make |
using it a really headache.
| Quote: | I am experiencing prblems on win 98
Just saying something does not work says nothing at all about the actual
problem you are having. Please always provide specific details.
Simply WSAIoctl returns -1... |
| Quote: |
can I use it on win98 ?
SIO_RCVALL is not available on Win98. It was not introduced until Win2000.
I have missed this, Using winpcap seems like an obligation to me... Also layered service |
seems another aproach, but it is too complex for a simple stats tool, also It can slow
connection a bit. I don't know if there is a better aproach...
Thank you.
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon Dec 06, 2004 6:36 pm Post subject: Re: Is SIO_RCVALL reliable |
|
|
<Fedaykin> wrote
| Quote: | Actually I don't need advanced capabilties of winpcap, so I wanted
to write a stat tool without insalling it.
|
Just because WinPCap has many features does not mean that you have to use
them all.
| Quote: | it is simple to implement and works perfect on my xp with sp2
|
It will not work perfectly on other systems.
| Quote: | Simply WSAIoctl returns -1...
|
Did you try calling WSAGetLastError() to find out why WSAIoctl() is failing?
| Quote: | I have missed this, Using winpcap seems like an obligation to me... Also
layered service seems another aproach, but it is too complex for a simple
stats tool, also It can slow connection a bit. I don't know if there is a
better
aproach...
|
If you are trying to write a system-wide hook into the socket stack, then
you need an NDIS driver. That is the only way your code will work across
multiple versions of Windows. Whether you write your own driver, or use the
one from WinPCap, that is your own choice.
Gambit
|
|
| Back to top |
|
 |
Guest
|
Posted: Mon Dec 06, 2004 9:26 pm Post subject: Re: Is SIO_RCVALL reliable |
|
|
| Quote: | Just because WinPCap has many features does not mean that you have to use
them all.
Yes of course, but raw socket solution would bu my first chioce if there were no |
compability and security problems. I would bu much hapier without installing 3th party
driver to host system.
| Quote: |
it is simple to implement and works perfect on my xp with sp2
It will not work perfectly on other systems.
Simply WSAIoctl returns -1...
Did you try calling WSAGetLastError() to find out why WSAIoctl() is failing?
As you told raw sockets are not supported on 98, so we already know the problem  |
| Quote: |
I have missed this, Using winpcap seems like an obligation to me... Also
layered service seems another aproach, but it is too complex for a simple
stats tool, also It can slow connection a bit. I don't know if there is a
better
aproach...
If you are trying to write a system-wide hook into the socket stack, then
you need an NDIS driver. That is the only way your code will work across
multiple versions of Windows. Whether you write your own driver, or use the
one from WinPCap, that is your own choice.
|
I am writing a tool to watch traffic amount on local system. I can not write an NDIS
driver, its too complex to implement, requires months to just get started. Winpcap seems
shinier now :)
Thanks for comments.
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon Dec 06, 2004 10:11 pm Post subject: Re: Is SIO_RCVALL reliable |
|
|
<Fedaykin> wrote
| Quote: | I would bu much hapier without installing 3th party driver to host system.
|
Sorry, but you are going to have to.
| Quote: | As you told raw sockets are not supported on 98, so we already
know the problem
|
I did not say that raw sockets were not supported. I said that SIO_RCVALL
was not supported. Raw sockets are supported, but not to the extent that
they are on XP.
Gambit
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|