Hi Coders,

Welcome to asymmetric API land once again.
Today's subject is socket(2).

                int fd = socket(family, type, protocol);

After the fact, you can retrieve 'type' from an open file descriptor
using getsockopt(2) SO_TYPE.

After the fact, extracting 'family' from an open file descriptor is a
bit better hidden, you have to use getsockname(2) and grope the
sa_family field.

Any ideas how to get 'protocol' from an open file descriptor?


Regards
Peter Miller <[EMAIL PROTECTED]>
/\/\*        http://miller.emu.id.au/pmiller/

PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53  2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.

"If you'd filmed it right the first time, you wouldn't have to cut
it." -- Final Cut Pro easter egg

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
coders mailing list
coders@slug.org.au
http://lists.slug.org.au/listinfo/coders

Reply via email to