DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T i

⟦a75cc50f3⟧ TextFile

    Length: 3230 (0xc9e)
    Types: TextFile
    Names: »internet.h«

Derivation

└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
    └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« 
        └─⟦d3ac74d73⟧ 
            └─⟦this⟧ »isode-5.0/h/internet.h« 

TextFile

/* internet.h - TCP/IP abstractions */

/* 
 * $Header: /f/osi/h/RCS/internet.h,v 6.0 89/03/18 23:32:05 mrose Rel $
 *
 *
 * $Log:	internet.h,v $
 * Revision 6.0  89/03/18  23:32:05  mrose
 * Release 5.0
 * 
 */

/*
 *				  NOTICE
 *
 *    Acquisition, use, and distribution of this module and related
 *    materials are subject to the restrictions of a license agreement.
 *    Consult the Preface in the User's Manual for the full terms of
 *    this agreement.
 *
 */


#ifndef	_INTERNET_
#define	_INTERNET_

#ifndef	_MANIFEST_
#include "manifest.h"
#endif

/* \f

   SOCKETS */

#include "sys/socket.h"

#ifndef	SOMAXCONN
#define	SOMAXCONN	5
#endif

#if	defined(WIN) || defined(WINTLI)
#include "sys/in.h"
#else
#include "netinet/in.h"
#endif


int	start_tcp_client ();
int	start_tcp_server ();

#ifdef	SOCKETS
int	join_tcp_client ();
int	join_tcp_server ();

#define	read_tcp_socket		read
#define	write_tcp_socket	write
#define	close_tcp_socket	close
#define	select_tcp_socket	selsocket
#endif

#ifdef	WINTLI
int	join_tcp_client ();
int	join_tcp_server ();

#define	select_tcp_socket	selsocket
#endif

#ifdef	EXOS

#ifdef	SYS5
#define	join_tcp_client(s,f) \
	(accept ((s), (struct sockaddr *) (f)) != NOTOK ? (s) : NOTOK)
#define	join_tcp_server(s,t)	connect ((s), (struct sockaddr *) (t))

#define	read_tcp_socket		read
#define	write_tcp_socket	write
#define	close_tcp_socket	close
#define	select_tcp_socket	selsocket
#endif
#endif

int	read_tcp_socket ();
int	write_tcp_socket ();
int	close_tcp_socket ();

int	select_tcp_socket ();

/* \f

   UDP */

#define	MAXUDP	8192

int	start_udp_server ();
#define	start_udp_client	start_udp_server

#define	join_udp_server(fd,sock)	join_udp_aux ((fd), (sock), 0)
#define	join_udp_client(fd,sock)	join_udp_aux ((fd), (sock), 1)
int	join_udp_aux ();

int	read_udp_socket ();
int	write_udp_socket ();
int	close_udp_socket ();
int	select_udp_socket ();


/* \f

   NETDB */

#if	defined(SOCKETS) || defined (WINTLI) || defined (WIN)
#include <netdb.h>
#endif


#if	defined (BIND) && !defined(h_addr)
#define	h_addr	h_addr_list[0]
#endif
    
#ifdef	BIND
#define	inaddr_copy(hp,sin) \
    bcopy (&((hp) -> h_addr), (char *) &((sin) -> sin_addr), (hp) -> h_length)
#else
#define	inaddr_copy(hp,sin) \
    bcopy ((hp) -> h_addr, (char *) &((sin) -> sin_addr), (hp) -> h_length)
#endif


#ifdef	EXOS
struct hostent {
    char   *h_name;		/* official name */
    char  **h_aliases;		/* alias list */
    int     h_addrtype;		/* address type: AF_INET */
    int     h_length;		/* address length: sizeof (u_long) == 4 */
    char   *h_addr;		/* address value: (struct in_addr *) */
};

struct servent {
    char   *s_name;		/* official name */
    char  **s_aliases;		/* alias list */
    int     s_port;		/* port number */
    char   *s_proto;		/* protocol beneath service */
};


struct hostent *gethostbyaddr (), *gethostbyname ();
struct servent *getservbyname ();
#endif


struct hostent *gethostbystring ();

/* \f

   INET */

/* under BSD42, we could simply include <arpa/inet.h> instead.  However,
   the definition of inet_addr contained therein causes problems with some
   compilers. */

char   *inet_ntoa ();
#ifndef	DG
u_long	inet_addr ();
#else
struct in_addr inet_addr ();
#endif
#endif