From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b6366bbce9f6f9b9 X-Google-Attributes: gidfee84,public X-Google-Thread: f9325,b6366bbce9f6f9b9 X-Google-Attributes: gidf9325,public X-Google-Thread: 10b612,b6366bbce9f6f9b9 X-Google-Attributes: gid10b612,public From: carlson@xylogics.com (James Carlson) Subject: Re: sendmsg returns ENOBUFS (UDP & broadcast) Date: 1996/03/25 Message-ID: <4j73bf$as6@newhub.xylogics.com>#1/1 X-Deja-AN: 144207188 references: <3156EF4D.177F623F@worldnet.fr> to: Laurent Deniel organization: Xylogics Incorporated reply-to: carlson@xylogics.com newsgroups: comp.unix.osf.osf1,comp.unix.ultrix,comp.protocols.tcp-ip In article <3156EF4D.177F623F@worldnet.fr>, Laurent Deniel writes: |> On Digital UNIX 3.2, sendmsg on a UDP sock_dgram socket return |> ENOBUFS (broadcast mode), the manual page specifies that : |> The system was unable to allocate an internal buffer. |> |> I wonder if this is related to the sending buffer associated with |> the socket (which can be tuned by the use of setsockopt(SO_SNDBUF) |> or if this is due to a kernel buffer overflow. In the last case, |> can I increase this buffer, and what is the associated kernel variable ? No, that's not causing it. There are two possible causes of ENOBUFS -- the kernel couldn't find or allocate an mbuf (unlikely with most Unix systems) or the interface output queue itself is full (quite likely with most UDP applications). Unfortunately, most BSD-derived systems return ENOBUFS when the output queue limit is reached. That limit defaults to 50 packets and usually is not configurable. (In our kernel, we hacked this to return a new and more meaningful error, ENOQUEUE, but this doesn't help you much ...) You need to start pacing your output with a timer, or just accept the inevitable packet loss as just part of the deal you make when using UDP. -- James Carlson Tel: +1 617 272 8140 Annex Interface Development / Xylogics, Inc. +1 800 225 3317 53 Third Avenue / Burlington MA 01803-4491 Fax: +1 617 272 2618