Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!pmafire!uudell!bigtex!dell!baldur!dcm From: dcm@baldur.dell.com (Dave McCracken) Newsgroups: comp.unix.internals Subject: Re: How to distinguish between STREAMS and non-STREAMS Keywords: STREAMS tty character-special Message-ID: Date: 15 Jan 91 15:13:24 GMT References: Sender: @dell.dell.com Organization: Dell Computer Corporation, Austin, Texas 78759-7299 Lines: 16 josef@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@dell.dell.com (512) 343-3720 Dell Computer 9505 Arboretum Blvd Austin, TX 78759-7299