Re: What does “No anode” mean in errno 55 when socket connection fails?

Rahul Bharadwaj rahulbharadwajpromos at gmail.com
Sun Dec 27 17:54:25 UTC 2020


I see. I had to look into the FreeBSD source than the internet for the
error number. Now the error makes sense.

Thank you!!

On Sun, Dec 27, 2020 at 11:20 PM Polytropon <freebsd at edvax.de> wrote:

> On Sun, 27 Dec 2020 23:03:17 +0530, Rahul Bharadwaj wrote:
> > I was doing a few performance tests on a local server and once in a
> while I
> > hit an error where opening a socket connection fails.
> >
> > i.e. considering the simplest code:
> >
> > #include <errno.h>
> > #include <sys/socket.h>
> >
> > int main() {
> >     /* code to create socket object */
> >
> >     int ret = connect(sock, (struct sockaddr *)&serv_addr,
> > sizeof(serv_addr));
> >     if (ret < 0) {
> >         fprintf(stderr, "connect() failed with: %d\n", errno); // <----
> *get
> > errno as 55*
> >         exit(1);
> >     }
> >     /* other code */
> > }
> >
> > There is no explanation for this error number "55".
>
> In /usr/include/sys/errno.h, you can find the following
> entry:
>
>         #define ENOBUFS         55              /* No buffer space
> available */
>
> Also in "man 2 intro", the introduction to system calls,
> there's a section about errno:
>
>      55 ENOBUFS No buffer space available.  An operation on a socket or
> pipe
>              was not performed because the system lacked sufficient buffer
>              space or because a queue was full.
>
> That doesn't help much, but regarding your example program
> snippet, it would match the context.
>
>
>
> > In every place, the
> > only mention is "No anode". There is no mention of what "anode" means and
> > what "No anode" specifically means.
>
> This is part of the binutils or gcc-libs (in contrib/ subtree
> of /usr/src, libiberty, or BSM security/ subtree). An anode is
> probably a kind of or a synonym for an inode (i-node, index node,
> a filesystem entry). But the error itself does not have to be in
> this context; it could be that an inode was requested but could
> not be allocated (filesystem problem), or the kernel ran out of
> buffer spaces for sockets, so maybe it means "allocation node"?
>
> Or maybe it's just one of those occassions where the programmer
> tought: I don't know what error to return here... ;-)
>
>
>
>
> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
>


More information about the freebsd-questions mailing list