Sagewire Logo

UDP packets dropping

2 Message(s) by 2 Author(s) originally posted in java security


From: Vishal Date:   Friday, November 10, 2006
Hi,
I am facing a problem which anyone who has worked on any UDP
application might've faced.
UDP by itself is unreliable. If packet s are lost, no acknowledgements
are sent.

I've a UDP application which is receiving packets on a standard port.
It receives packets asynchronously. At any time any packet can arrive.
The problem is that sometimes a number of packets arrive and our UDP
socket buffer ( being of finite size ) isn't able
to handle them and simply drops the packet.
The UDP socket buffer cannot be increased beyond a finite size(
dynamically it cannot be increased, it is fixed for an OS) .

So a number of packets simply drop with out any intimation to the
receiver/sender.

I need to have checkpoint ( some kind of intimation ) that the packets
are being dropped.

I've implemented poll ing with poll parameter as POLLIN or
POLLRDNORM.( I've tried both parameters)
Both implementation works that is gives me a poll status implying
socket buffer is full.

In my test set up I can control the rate at which packets are
generated.
When the packets are sent at a very high rate and my socket buffer is
not able to handle them, polling status tells me that
buffer is full.

when the rate of sending packets is slow, I get an intimation that
buffer space is available.

But in some cases ( when the rate of sending packets is slow ), I get a
poll status that buffer is full ( which is wrong ). Even though
these are corner cases but it made me think.( and caused worry) .

I've following queries..

a) Do we've any mechanism/ way in which we can find that udp socket
buffer is full and packets are being dropped.
b) Can polling be actually be used. My corner cases made me think that.
Is my approach totally wrong.
c) If not Polling then what ?
d) If polling can be used, which other parameters I can use to avoid
these corner case.

e) Is my implementation of polling wrong, Is it possible that I am
misunderstanding the polling status to tell whether
buffer is full.

if you've some idea about this issue please let me know.
If you need some more input from my end let me know.
You can mail me at vishal21@xxxxxxxxxxx


From: Guddu Date:   Monday, November 13, 2006
Nothing you do at the receiving end only will reliably tell you
whether a UDP packet has been lost, since intermediate Internet routers
may silently discard packets. You need some cooperation from the
senders. If you need reliable transport, you need to perform the same
functions that TCP does, e.g. ACK, timeout & resend, or something that
gets you the same result.
--Mike AmlingHi Mike,


Thanks for this suggestion.
I am have started thinking in this direction.

Regards,
Guddu



Next Message: AES key with raw key bytes


Blogs related to UDP packets dropping

Gireesha.KS
TCP/IP, UDP, NetBEUI, FTP, DHCP, SMTP, ESMTP, POP3, POP3S, IMAP, IMAPS, NFS ... This is achieved by sending ICMP packets to all the systems in the network. ... (Developed using HTML, Java Script and MS-Office 2000 in the year 2003 ...

QUINTUM MEXICO / [ID: 32327]
Implementation challenges Because UDP does not provide a mechanism to ensure ... VoIP challenges: Delay/Network Latency Packet loss Jitter Echo Security ... in the network between VoIP users, there will be a momentary drop-out of voice. ...

Problème procéssus 'WindowServer' + 'kerneltask', Utilise 40 à 60 ...
Server UDP socket (TCP+3) at 0.0.0.0:4565 ... Client UDP socket (extended eMule) at 0.0.0.0:4572 ... Java is generating its shared archive, version 1.5 ... Incoming keep-alive message flood detected, dropping spamming peer connection. ...

NW 5.0 server hang, possible flood?
19, 2001 NetWare Winsock Service 1.0 NLM for TCP and UDP WSPIPX. ... BIND IPX NET_1_IPX NET=20 BIND IPX NET_2_IPX NET=50 SEARCH ADD SYS:\JAVA\BIN LOAD ... RIP SAP Updates = OFF NLSP Log = ON NLSP Packet Drop Rate = 0 NLSP Update Bindery ...

java World | revision 7
96) What is the difference between TCP/IP and UDP? Ans: TCP/IP is a two-way communication between the client and the server and it is a reliable and there is a confirmation regarding reaching the message to the destination. ...

java faqs
UDP is a one-way communication only between the client and the server and it is not a reliable and there is no confirmation regarding reaching the message to the destination. It is like a postal mail. 97) What is Inet address? ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional