Tugger the SLUGger!SLUG Mailing List Archives

[chat] you are in a maze of twisty little header files, all alike...


So I got a useful error message from curl just now:

curl: (7) socket error: 113

Well, that looks helpful, but I bet the socket error listed there is the
return code from the libc socket function which just failed, so I'll just
look it up in the libc headers and figure out what's going on.

cd /usr/include
less sys/errno.h

Hmm.  sys/errno.h just includes errno.h.  Okay.

less errno.h

Fine, errno.h doens't actually do anything, it tells me to go look in
bits/errno.h

bits/errno.h again says "try linux/errno.h"

Finally some error codes!  They all start at 512!  But here we go, the error
codes that I'm interested in are actually in asm/errno.h, conveniently
included here after 4 levels of indirection.

113 means "host unreachable".  I think I might patch curl to add strerror
calls in the right places :-)

-- 
jaq@xxxxxxxxxxxxxx                           http://spacepants.org/jaq.gpg