From: wl...@aol.com (Wlmet)
Subject: Linux and Streams
Date: 1998/08/25
Message-ID: <1998082516305600.MAA15723@ladder03.news.aol.com>#1/1
X-Deja-AN: 384596525
Organization: AOL http://www.aol.com
Newsgroups: comp.os.linux.development.system
X-Admin: n...@aol.com
In W. Richard Stevens' book APUE he talks about streams. I cannot get the
programs to compile in this chapter. Does Linux implement streams? For
example, how to implement the following function?:
int isastream(int fd)
{
return(ioctl(fd, I_CANPUT, 0) != -1);
}
From: Frank Sweetser <rasmu...@WPI.EDU>
Subject: Re: Linux and Streams
Date: 1998/08/25
Message-ID: <877lzxhv4r.fsf@paramount.ind.wpi.edu>#1/1
X-Deja-AN: 384603487
References: <1998082516305600.MAA15723@ladder03.news.aol.com>
Organization: Worcester Polytechnic Institute
Newsgroups: comp.os.linux.development.system
wl...@aol.com (Wlmet) writes:
> programs to compile in this chapter. Does Linux implement streams? For
no.
--
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net | PGP key available
paramount.res.wpi.net RedHat 5.1 kernel 2.1.115ac2 i586 | at public servers
"I'll carry your books, I'll carry a tune, I'll carry on, carry over,
carry forward, Cary Grant, cash & carry, Carry Me Back To Old Virginia,
I'll even Hara Kari if you show me how, but I will *not* carry a gun."
-- Hawkeye, M*A*S*H
From: Gilles CHAUMARAT <chauma...@stna.dgac.fr>
Subject: Re: Linux and Streams
Date: 1998/08/26
Message-ID: <35E3FBB6.47E7@stna.dgac.fr>#1/1
X-Deja-AN: 384978606
Content-Transfer-Encoding: 7bit
References: <1998082516305600.MAA15723@ladder03.news.aol.com> <877lzxhv4r.fsf@paramount.ind.wpi.edu>
Content-Type: text/plain; charset=us-ascii
Organization: Service Technique de la Navigation Aerienne - Division 7S
Mime-Version: 1.0
Newsgroups: comp.os.linux.development.system
Frank Sweetser wrote:
>
> wl...@aol.com (Wlmet) writes:
>
> > programs to compile in this chapter. Does Linux implement streams? For
>
> no.
>
> --
The Linux kernel does not implement SVR4 STREAMS but there is a STREAMS
package nammed LiS written by Francisco J. Ballesteros
(n...@gsyc.inf.uc3m.es), Denis Froschauer (Denis.Froscha...@hol.fr),
David Grothe (d...@gcom.com), Graham Wheeler (g...@cdsec.com) and
probably more with works which kernels up to 2.0.34
(ftp://ftp.gcom.com/pub/linux/src/streams-1-30-98).
David Grothe is the only remaining active supporter and maintner of LiS,
so please direct questions to him rather than to the others
(d...@gcom.com). His firm does sell products over QNX and Linux STREAMS.
Francisco Ballesteros still maintains a LiS mailing list. You can mail
to the group by addressing email to linux-stre...@gsyc.inf.uc3m.es.
Don't ask about STREAMS integration in the kernel, the kernel gurus
(Linus first) don't want to heard about it anymore (Search STREAMS in
the Linux Kernel Mailing List FAQ
http://www.altern.org/andrebalsa/doc/lkml-faq.html). They believe that
it has an impact on the existing IP stack. Don't trust them, we are
working on the porting of our private OSI stack on it and it works fine.
Gilles
From: David Grothe <d...@gcom.com>
Subject: Re: Linux and Streams
Date: 1998/08/28
Message-ID: <35E7050C.2A9E467C@gcom.com>#1/1
X-Deja-AN: 385724919
Content-Transfer-Encoding: 7bit
References: <1998082516305600.MAA15723@ladder03.news.aol.com> <877lzxhv4r.fsf@paramount.ind.wpi.edu> <35E3FBB6.47E7@stna.dgac.fr>
Content-Type: text/plain; charset=us-ascii
Organization: Gcom, Inc
Mime-Version: 1.0
Reply-To: d...@gcom.com
Newsgroups: comp.os.linux.development.system
Gilles CHAUMARAT wrote:
> Don't ask about STREAMS integration in the kernel, the kernel gurus
> (Linus first) don't want to heard about it anymore
We have reached a compromise on this. The tiny kernel patch required for Linux
STREAMS, i.e., the hooks, will be a standard part of kernel source 2.0.26 and
2.1.115. We will re-release LiS for 2.0.36 making use of the fact that the
kernel no longer needs to be patched. LiS will be just another loadable
module. The 2.1.115 work will take a little longer as we seem to have a "round
tuit" problem here these days.-- Dave
From: wl...@aol.com (Wlmet)
Subject: Re: Linux and Streams
Date: 1998/08/30
Message-ID: <1998083003354000.XAA01553@ladder03.news.aol.com>#1/1
X-Deja-AN: 386059944
References: <35E42939.C45AA4B1@gcom.com>
Organization: AOL http://www.aol.com
Newsgroups: comp.os.linux.development.system
X-Admin: n...@aol.com
Should I install Streams as a module or should I compile it into kernel? I am
really only want to install it to try the examples in the Stevens book.
TIA
From: David Grothe <d...@gcom.com>
Subject: Re: Linux and Streams
Date: 1998/08/31
Message-ID: <35EAF466.18788DB7@gcom.com>#1/1
X-Deja-AN: 386549324
Content-Transfer-Encoding: 7bit
References: <35E42939.C45AA4B1@gcom.com> <1998083003354000.XAA01553@ladder03.news.aol.com>
Content-Type: text/plain; charset=us-ascii
Organization: Gcom, Inc
Mime-Version: 1.0
Reply-To: d...@gcom.com
Newsgroups: comp.os.linux.development.system
Wlmet wrote:
> Should I install Streams as a module or should I compile it into kernel? I am
> really only want to install it to try the examples in the Stevens book.
Either way is fine. I think that the installation shell script sets up for module
by default.-- Dave
From: wl...@aol.com (Wlmet)
Subject: Re: Linux and Streams
Date: 1998/09/01
Message-ID: <1998090104522400.AAA09637@ladder01.news.aol.com>#1/1
X-Deja-AN: 386679346
References: <35EAF466.18788DB7@gcom.com>
Organization: AOL http://www.aol.com
Newsgroups: comp.os.linux.development.system
X-Admin: n...@aol.com
Thanks Dave,
I got the stream module installed and I was able to run one of the programs.
This program was interesting because I understand the controversy better now.
SVR4 runs the tty using streams.
The second program would not compile because there was no conf.h file.
I include the script for the last program. Why is the compiler writing to the
/tmp directory? I've never seen this type of error before.
Script started on Mon Aug 31 23:44:38 1998jc:~/advio$ cat catgetmsg.c
#include <stropts.h>
#include "ourhdr.h"
#define BUFFSIZE 8192
int
main(void)
{
int n, flag;
char ctlbuf[BUFFSIZE], datbuf[BUFFSIZE];
struct strbuf ctl, dat;
ctl.buf = ctlbuf;
ctl.maxlen = BUFFSIZE;
dat.buf = datbuf;
dat.maxlen = BUFFSIZE;
for ( ; ; ) {
flag = 0; /* return any message */
if ( (n = getmsg(STDIN_FILENO, &ctl, &dat, &flag)) < 0)
err_sys("getmsg error");
fprintf(stderr, "flag = %d, ctl.len = %d, dat.len = %d\n",
flag, ctl.len, dat.len);
if (dat.len == 0)
exit(0);
else if (dat.len > 0)
if (write(STDOUT_FILENO, dat.buf, dat.len) != dat.len)
err_sys("write error");
}
}
jc:~/advio$ make catgetmsg.c
cc /home/apue/libmisc.a catgetmsg.c /home/apue/libmisc.a -o catgetmsg
/tmp/cca003701.o: In function `main':
/tmp/cca003701.o(.text+0x53): undefined reference to `getpmsg'
make: *** [catgetmsg] Error 1
jc:~/advio$ exit
exit
Script done on Mon Aug 31 23:45:08 1998
From: wl...@aol.com (Wlmet)
Subject: Re: Linux and Streams
Date: 1998/09/04
Message-ID: <1998090417442000.NAA28809@ladder03.news.aol.com>#1/1
X-Deja-AN: 387907486
References: <35E777ED.8B0699C8@his.com>
Organization: AOL http://www.aol.com
Newsgroups: comp.os.linux.development.system
X-Admin: n...@aol.com
In SVR4 apparently Streams run the tty, pipes and other devices. Does anyone
know any theory on why and why not to implement streams?
From: David Grothe <d...@gcom.com>
Subject: Re: Linux and Streams
Date: 1998/09/05
Message-ID: <35F16C21.FC758D13@gcom.com>#1/1
X-Deja-AN: 388188446
Content-Transfer-Encoding: 7bit
References: <35E777ED.8B0699C8@his.com> <1998090417442000.NAA28809@ladder03.news.aol.com>
Content-Type: text/plain; charset=us-ascii
Organization: Gcom, Inc
Mime-Version: 1.0
Reply-To: d...@gcom.com
Newsgroups: comp.os.linux.development.system
Wlmet wrote:
> In SVR4 apparently Streams run the tty, pipes and other devices. Does anyone
> know any theory on why and why not to implement streams?
Linux has its own implementation of tty, pipes and networking code. There is no
good reason to duplicate this effort just to produce a STREAMS implementation.
Even if someone were to take on the task of doing so it would not be generally
accepted in the Linux community and would be something of a waste of effort,
except, possibly, as a learning experience for the implementor.-- Dave (the Linux
STREAMS guy)
From: Erik Westlin <west...@msi.se>
Subject: Re: Linux and Streams
Date: 1998/09/08
Message-ID: <35F4D32C.1968@msi.se>#1/1
X-Deja-AN: 388945697
Distribution: world
Content-Transfer-Encoding: 7bit
References: <35E777ED.8B0699C8@his.com> <1998090417442000.NAA28809@ladder03.news.aol.com> <35F16C21.FC758D13@gcom.com>
Content-Type: text/plain; charset=us-ascii
Organization: MSL
Mime-Version: 1.0
Reply-To: west...@msi.se
Newsgroups: comp.os.linux.development.system
David Grothe wrote:
>
> Wlmet wrote:
>
> > In SVR4 apparently Streams run the tty, pipes and other devices. Does anyone
> > know any theory on why and why not to implement streams?
>
> Linux has its own implementation of tty, pipes and networking code. There is no
> good reason to duplicate this effort just to produce a STREAMS implementation.
> Even if someone were to take on the task of doing so it would not be generally
> accepted in the Linux community and would be something of a waste of effort,
> except, possibly, as a learning experience for the implementor.-- Dave (the Linux
> STREAMS guy)
Is it not so that this is the way of the future, a more advanced
programming
technique. It's like objectorientation versus traditional non oo
programming.
There is a performance price to pay for using it, but you gain
in modularity and structure.
Why not implement some new not previously implemented protocols using
Streams.
-------------------------------------------------------------------------
Erik Westlin Manne Siegbahn Laboratory
email: west...@msi.se
From: David Grothe <d...@gcom.com>
Subject: Re: Linux and Streams
Date: 1998/09/08
Message-ID: <35F5B112.331F0030@gcom.com>#1/1
X-Deja-AN: 389187997
Content-Transfer-Encoding: 7bit
References: <35E777ED.8B0699C8@his.com> <1998090417442000.NAA28809@ladder03.news.aol.com> <35F16C21.FC758D13@gcom.com> <35F4D32C.1968@msi.se>
Content-Type: text/plain; charset=us-ascii
Organization: Gcom, Inc
Mime-Version: 1.0
Reply-To: d...@gcom.com
Newsgroups: comp.os.linux.development.system
Erik Westlin wrote:
> There is a performance price to pay for using it, but you gain
> in modularity and structure.
I agree. And that is why all of Gcom's commercial protocol products are STREAMS
based. We need the modularity. http://www.gcom.com/why_streams.html contains a lot of
examples and some history on the subject.
>
>
> Why not implement some new not previously implemented protocols using
> Streams.
Begin Gcom commercial.That is what Gcom does commercially with SNA, X.25, Frame Relay,
HDLC, Bisync.
End Gcom commercial.
|