DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T s

⟦03b76720c⟧ TextFile

    Length: 1062 (0x426)
    Types: TextFile
    Names: »serv_check.c«

Derivation

└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦038380b96⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦038380b96⟧ 
            └─ ⟦this⟧ »serv_check.c« 
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦0732ea0cf⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦0732ea0cf⟧ 
            └─ ⟦this⟧ »../../dtia/release_apollo_2.1/serv_check.c« 
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦25fab149a⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦25fab149a⟧ 
            └─ ⟦this⟧ »../../dtia/release_sun_2.1/serv_check.c« 
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦be254d495⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦be254d495⟧ 
            └─ ⟦this⟧ »../../dtia/release_aix_2.1/serv_check.c« 
└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦c67979795⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦c67979795⟧ 
            └─ ⟦this⟧ »../../dtia/release_hp_2.1/serv_check.c« 

TextFile


#ifndef	lint
#ifndef	DEBUG
static char SCCS_id[] = "@(#)serv_check.c 2.1 90/08/02 19:03:22  Copyright(c) 1990 by Rational.";
#else
static char SCCS_id[] = "@(#)serv_check.c DEBUG 2.1 90/08/02 19:03:22  Copyright(c) 1990 by Rational.";
#endif
#endif

#include	<stdio.h>
#include	<sys/param.h>

#define	SERVICE		"dtia"
#define	PROTOCOL	"tcp"

what_to_do_prot() {
	fprintf(stderr,"\nDefine tcp in /etc/protocols\n\n");
	exit(1);
}

what_to_do_serv() {
	fprintf(stderr,"\nDefine dtia in /etc/services");
	fprintf(stderr," and propagate to the YP database\n\n");
	exit(1);
}

main() {
	char	host[MAXHOSTNAMELEN+1];
	struct	servent		*p_port,*getservbyname();
	struct	protoent	*p_protocol,*getprotobyname();

	if (gethostname(host,MAXHOSTNAMELEN)== -1)	{
		perror("gethostname");
		exit(1);
	}
	host[MAXHOSTNAMELEN]='\0';

	p_protocol=getprotobyname(PROTOCOL);
	if (p_protocol == NULL) {
		perror("getprotobyname");
		what_to_do_prot();
	}

	p_port=getservbyname(SERVICE,PROTOCOL);
	if (p_port == NULL) {
		perror("getservbyname");
		what_to_do_serv();
	}
	exit(0);
}