[comp.unix.sysv386] ESIX sockets

jennings@cs.Colorado.EDU (Jeff Jennings) (03/28/91)

Has anyone been able to get any sockets programs working with ESIX sockets?  I
have typed in the code from "UNIX Network Programming", with the client/server
inet examples.  This core dumps in listen().  I bought the Networking and
Streams Programmers guide from ESIX, they list some different parameters for
the socket calls, in particular the bind(), listen(), and accept() calls.  No
examples are given.  The changed parameters are of type **struct t_call, 
which is something from the TLI stuff.  Appears that ESIX built sockets on top
of TLI.  So I allocated these struct t_call's and passed them to bind and 
accept, but I don't know which if any fields need to filled in in the struct.
Currently I get an error about "Routine would place interface in incorrect
state", or something like that, in accept().

So anyway, does anyone have any example code that works?

- jeff

-- 
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Jeff Jennings
University of Colorado, Boulder
jennings@boulder.colorado.edu

darrylo@hpnmdla.hp.com (Darryl Okahata) (04/02/91)

In comp.unix.sysv386, jennings@cs.Colorado.EDU (Jeff Jennings) writes:

> Has anyone been able to get any sockets programs working with ESIX
> sockets?

     ESIX rev D does not have BSD sockets.  The routines that you are
trying to use look like BSD sockets, but they are in no form or way BSD
sockets.

     You are SOL.

     -- Darryl Okahata
	UUCP: {hplabs!, hpcea!, hpfcla!} hpnmd!darrylo
	Internet: darrylo%hpnmd@relay.hp.com

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion or policy of Hewlett-Packard or of the
little green men that have been following him all day.

bir7@ypig.stanford.edu (Ross Biro) (04/04/91)

>> Has anyone been able to get any sockets programs working with ESIX
>> sockets?
>
>     ESIX rev D does not have BSD sockets.  The routines that you are
>trying to use look like BSD sockets, but they are in no form or way BSD
>sockets.

	I'm sick of ESIX sockets being bashed.

	ESIX sockets are close enough to BSD sockets to port almost
anything without trouble.  I've had more problems from signal handlers
than from sockets.  The only thing you need to watch out for is that
you cannot use read or write with the sockets.  The rest is easy, just
remember that they were built on top of the transport library. A small
list of some of the things I've gotten to work using sockets under
ESIX: X, finger, fingerd, inetd, telnet, ftp, libresolv.a, tinymud...

Quit whining and try a little.  I did all this without the manuals,
just some bsd man pages and a little effort.

	Ross biro bir7@leland.stanford.edu
-- 
	Ross Biro bir7@leland.stanford.edu

chip@tct.com (Chip Salzenberg) (04/08/91)

According to bir7@ypig.stanford.edu (Ross Biro):
>The only thing you need to watch out for is that you cannot use read
>or write with the sockets.  The rest is easy ....

Sockets without read() and write().

Heh.  Heheh.
-- 
Brand X Industries Custodial, Refurbishing and Containment Service:
         When You Never, Ever Want To See It Again [tm]
     Chip Salzenberg   <chip@tct.com>, <uunet!pdn!tct!chip>

uri@watson.ibm.com (Uri Blumenthal) (04/09/91)

In article <1991Apr4.025734.8373@leland.Stanford.EDU>, bir7@ypig.stanford.edu (Ross Biro) writes:

|> >     ESIX rev D does not have BSD sockets.  The routines that you are
|> >trying to use look like BSD sockets, but they are in no form or way BSD
|> >sockets.
|> 
|> 	I'm sick of ESIX sockets being bashed.
|> 
|> 	ESIX sockets are close enough to BSD sockets to port almost
|> anything without trouble.  I've had more problems from signal handlers
|> than from sockets.  

Well, the signal handlers aren't cake either, but it doesn't make sockets
any more compatible, methinks...

|> The only thing you need to watch out for is that
|> you cannot use read or write with the sockets.  

Does it mean that if I want to port a package, which unfortunately uses
bith file IO (read/write vs. fread/fwrite :-) and sockets -  I'll have
to browse manually all the source, checking every occurance of write,
and if it looks like socket - changing it to send/recv?   Possible,
of course, but not nice at all, especially for real big packages.

|> The rest is easy, just
|> remember that they were built on top of the transport library. A small
|> list of some of the things I've gotten to work using sockets under
|> ESIX: X, finger, fingerd, inetd, telnet, ftp, libresolv.a, tinymud...

If by X you mean some X-clients - then it's not a big deal (isn't
worth of reporting to the Net anyway :-).  But if, otherwise, you
mastered Roell's X11R4 with ESIX sockets - I'm absolutely SURE  a 
lot of people would like to hear more about it (and me among them).

|> Quit whining and try a little.  I did all this without the manuals,
|> just some bsd man pages and a little effort.

Just can't but ask: how did you guess the additional parameter 
("struct t_call *tcall"), and _where to put it to_? I don't
think BSD manual tells you anything about it, nor SysV
books, when it comes to listen(), or accept()...

Also,  I always thought that compatibility was "invented" to let you
to keep "a little effort" as little as possible - preferably to zero.
Otherwise - it doesn't sound too hard to convert sockets-using thing
to TLI too...
-- 

Regards,
Uri Blumenthal	uri@watson.ibm.com,  uunet!angmar!uri
=====================================================
<Disclaimer>

bir7@ypig.stanford.edu (Ross Biro) (04/09/91)

In article <28009A5B.1927@tct.com> chip@tct.com (Chip Salzenberg) writes:
>According to bir7@ypig.stanford.edu (Ross Biro):
>>The only thing you need to watch out for is that you cannot use read
>>or write with the sockets.  The rest is easy ....
>
>Sockets without read() and write().
>
>Heh.  Heheh.
	Ever consider send or recv?


-- 
	Ross Biro bir7@leland.stanford.edu

darrylo@hpnmdla.hp.com (Darryl Okahata) (04/11/91)

In comp.unix.sysv386, bir7@ypig.stanford.edu (Ross Biro) writes:

> 	ESIX sockets are close enough to BSD sockets to port almost
> anything without trouble.  I've had more problems from signal handlers
> than from sockets.  The only thing you need to watch out for is that
> you cannot use read or write with the sockets.  The rest is easy, just
> remember that they were built on top of the transport library. A small
> list of some of the things I've gotten to work using sockets under
> ESIX: X, finger, fingerd, inetd, telnet, ftp, libresolv.a, tinymud...
>
> Quit whining and try a little.  I did all this without the manuals,
> just some bsd man pages and a little effort.

     Yes, ESIX "sockets" are "close".  However, they are sufficiently
different that ESIX should have *RENAMED* the functions.  For example,
here is the ESIX version of "listen":

        listen(s, call)
        int		s;
        struct t_call	**call;

Here is the "REAL BSD" version:

        listen(s, backlog)
        int	s;
	int	backlog;

Are these functions the same?  No!  While they may be "easy" to port
(this is highly program-dependent), they are very confusing at first.

     -- Darryl Okahata
	UUCP: {hplabs!, hpcea!, hpfcla!} hpnmd!darrylo
	Internet: darrylo%hpnmd@relay.hp.com

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion or policy of Hewlett-Packard or of the
little green men that have been following him all day.