It is currently Sat, 25 Oct 2014 12:38:26 GMT



 
Author Message
 sendto: ENOBUFS
Dear all,

I'm writting a small application which is doing nothing else than sending
packets to a multicast address. I compiled it on Solaris 8, Debian Linux,
FreeBSD and IRIX 6.5.

The problem I have is that on FreeBSD and IRIX 6.5 I get a ENOBUFS error
from the sendto call. I guess it is because I'm trying to send to much data
to fast and the IP stacks cannot send them fast enough.

Is there a way to have the sendto call "run" in a blocking mode ?
Why is this only happening on IRIX and FreeBSD ?

I had a look at the sendto manpages, but this didn't help much.

Anybody have an idea ?

Thanks in advance for your help

Laurent Bourqui



 Sun, 09 Nov 2003 20:07:30 GMT   
 sendto: ENOBUFS

Irrelevent of whether the socket is in blocking or non-blocking mode, sendto( )
blocks till the packet is sent for UDP.

I am not sure about it.  But stevens(UNPv1 . p50) says that
"Unfortunately  some implementations do not return this error, giving the
application no indication that the datagram was discarded without even being
transmitted" .  Maybe that is the reason.

Hth,
Nithyanand.



 Sun, 09 Nov 2003 20:50:55 GMT   
 sendto: ENOBUFS

Thanks for your answer. But there are still some points which are not clear
to me...

In this case, why do I get back the ENOBUFS ? Doesn't this mean that
sendto() returns before the packet has been sent ?

Well, about that, on Solaris 8 sento() never returns ENOBUFS, this coulbe
the explanation, but on Linux in does (see man pages). So why does it works
on Linux ?

Regards
Laurent



 Sun, 09 Nov 2003 22:43:24 GMT   
 sendto: ENOBUFS

I meant that sendto( ) can't be set in the non-blocking mode as you do it for
other calls......It is implicit that whenever the error returns or the data is
sent sendto( ) returns to the caller.

--Nithyanand.



 Sun, 09 Nov 2003 23:05:54 GMT   
 sendto: ENOBUFS
[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

Well, that would be highly implementation dependent.  Typically, the kernel
would try to allocate memory, forward to IP and then return; it returns
typically before the packet is send out of any interface.

ENOBUFS means that the kernel can no longer accept messages (UDP queues
are backed up)

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.



 Sun, 09 Nov 2003 23:20:28 GMT   
 
   [ 5 post ] 

Similar Threads

1. RAW socket when sendto() always return -1(ENOBUFS) ???????

2. getting ENOBUFS from accept()

3. ENOBUFS err

4. ENOBUFS on write()

5. Q: TCP/IP accept returns -1, errno == ENOBUFS

6. ENOBUFS from a TCP socket

7. server ENOBUFS problem?

8. ppp_write: 700 ENOBUFS errors ?

9. IPC w/ ENOBUFS on HPUX Anyone?

10. ping (sendto invalid arg) + SQUID issue


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software