Discussion:
polling
(too old to reply)
guddu
2006-11-10 13:22:06 UTC
Permalink
To put it briefly,
can we use polling to find whether UDP packets are being dropped at the
UDP socket buffer? If so how ?
Arkady Frenkel
2006-11-12 08:02:46 UTC
Permalink
Ben Voigt answered already for such question in the thread one before yours,
you need to use raw sockets ( admin mode ) to check that.
Arkady
Post by guddu
To put it briefly,
can we use polling to find whether UDP packets are being dropped at the
UDP socket buffer? If so how ?
guddu
2006-11-13 05:53:49 UTC
Permalink
Post by Arkady Frenkel
Ben Voigt answered already for such question in the thread one before yours,
you need to use raw sockets ( admin mode ) to check that.
Arkady
Hi Arkady,
Ben suggested me to use sequence numbers in the packets. In my case all
packets are independant and are from different sources.
Anyways I want to know how can I use raw sockets for this purpose...

Regards,
Vishal
Arkady Frenkel
2006-11-13 08:16:15 UTC
Permalink
You need to main db of those numbers ( each remote port/ip -is key in this
case )
To use raw socket you create socket with second parameter SOCK_RAW
like
socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
Don't forget to set the socket options
setsockopt(s, IPPROTO_IP,IP_HDRINCL, (char*)&bufsz, sizeof(bufsz);
HTH
Arkady
Post by guddu
Post by Arkady Frenkel
Ben Voigt answered already for such question in the thread one before yours,
you need to use raw sockets ( admin mode ) to check that.
Arkady
Hi Arkady,
Ben suggested me to use sequence numbers in the packets. In my case all
packets are independant and are from different sources.
Anyways I want to know how can I use raw sockets for this purpose...
Regards,
Vishal
guddu
2006-11-13 10:14:07 UTC
Permalink
Post by Arkady Frenkel
You need to main db of those numbers ( each remote port/ip -is key in this
case )
To use raw socket you create socket with second parameter SOCK_RAW
like
socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
Don't forget to set the socket options
setsockopt(s, IPPROTO_IP,IP_HDRINCL, (char*)&bufsz, sizeof(bufsz);
HTH
Arkady
Arkady,
I know the socket call to create Raw socket but I am sorry to say I am
unable to understand how raw socket will help me.

I think you will have to explain me bit more.
Also you have hinted about "remote port/ip". How will it help me ?

More explanation requested ..please..

Regards,
Vishal
Arkady Frenkel
2006-11-13 12:31:23 UTC
Permalink
Hi!
You check the headers of IP and UDP ,check
shttp://www.faqs.org/rfcs/rfc791.html
http://www.faqs.org/rfcs/rfc768.html
Arkady
Post by guddu
Post by Arkady Frenkel
You need to main db of those numbers ( each remote port/ip -is key in this
case )
To use raw socket you create socket with second parameter SOCK_RAW
like
socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
Don't forget to set the socket options
setsockopt(s, IPPROTO_IP,IP_HDRINCL, (char*)&bufsz, sizeof(bufsz);
HTH
Arkady
Arkady,
I know the socket call to create Raw socket but I am sorry to say I am
unable to understand how raw socket will help me.
You can read IP and header and know
Post by guddu
I think you will have to explain me bit more.
Also you have hinted about "remote port/ip". How will it help me ?
More explanation requested ..please..
Regards,
Vishal
Arkady Frenkel
2006-11-13 08:17:45 UTC
Permalink
BTW you have ready raw socket library on
http://www.codeguru.com/network/tcpip_lib31.html
Arkady
Post by guddu
Post by Arkady Frenkel
Ben Voigt answered already for such question in the thread one before yours,
you need to use raw sockets ( admin mode ) to check that.
Arkady
Hi Arkady,
Ben suggested me to use sequence numbers in the packets. In my case all
packets are independant and are from different sources.
Anyways I want to know how can I use raw sockets for this purpose...
Regards,
Vishal
Loading...