Creating a socket with ISC's libinet.a
Mark W. Snitily
mark at zok.UUCP
Sun Jan 14 10:52:57 AEST 1990
Has anyone tried to create a socket using the libinet.a that comes
with ISC's X11 development package?
The code in it's simplest form would be:
#include <sys/types.h>
#include <sys/socket.h>
main()
{
int s;
s = socket(AF_INET, SOCK_STREAM, 0);
}
And then linked via "cc -o sock sock.c -linet" (assuming the file
is named sock.c).
I've tried every combination of format (e.g. AF_INET) and type (e.g.
SOCK_STREAM) and the socket() call always returns -1 (meaning error).
ISC's X11 server appears to open a Unix domain socket (AF_UNIX with
/tmp/.X11-unix/X0).
I don't have ISC's TCP/IP package, only the libinet.a library that comes
with the X11 libraries.
Does anyone know how to create and use a socket with this library?
Thanks...
-- Mark
Mark W. Snitily Consulting Services:
894 Brookgrove Lane Graphics, Operating Systems, Compilers
Cupertino, CA 95014 (408) 252-0456
mark at zok.uucp
More information about the Comp.unix.i386
mailing list