How to distinguish between STREAMS and non-STREAMS
Dave McCracken
dcm at baldur.dell.com
Wed Jan 16 02:13:24 AEST 1991
josef at nixpbe.nixdorf.de (josef Moellers) writes:
>Does anybody now of a bulletproof and FAST method to distinguish between
>a STREAMS fd and a non-STREAMS fd?
>I cannot use calls to getmsg/putmsg, as I am not allowed to change the
>state of the STREAM.
I would say right offhand you should do a streams-specific query ioctl.
A few that might be useful are I_LOOK, I_GRDOPT, I_GRWOPT, and I_LIST.
I_LIST might be particularly fast since if you pass it a NULL pointer
for the list, it just returns the number of modules on the stream,
and this information comes directly out of the stream head.
--
Dave McCracken dcm at dell.dell.com (512) 343-3720
Dell Computer 9505 Arboretum Blvd Austin, TX 78759-7299
More information about the Comp.unix.internals
mailing list