|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T a
Length: 1365 (0x555) Types: TextFile Names: »access_dnet.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit └─⟦cfd40dc56⟧ »EurOpenD3/news/nntp/nntp.1.5.8.tar.Z« └─⟦2ec98eca6⟧ └─⟦this⟧ »server/access_dnet.c« └─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit └─⟦5cced586a⟧ »EurOpenD3/news/nntp/nntp.1.5.7.tar.Z« └─⟦7340f105e⟧ └─⟦this⟧ »./server/access_dnet.c«
#include "common.h" #include <sys/socket.h> #ifdef DECNET #ifndef lint static char *sccsid = "@(#)access_dnet.c 1.6 (Berkeley) 1/9/88"; #endif /* * dnet_netnames -- return the network, subnet, and host names of * our peer process for the DECnet domain. Since DECnet doesn't * have subnets, we always return "subnet_name"'s first char as '\0'; * * Parameters: "sock" is the socket connect to our peer. * "sap" is a pointer to the result of * a getpeername() call. * "net_name", "subnet_name", and "host_name" * are filled in by this routine with the * corresponding ASCII names of our peer. * Returns: Nothing. * Side effects: None. */ dnet_netnames(sock, sap, net_name, subnet_name, host_name) int sock; struct sockaddr *sap; char *net_name; char *subnet_name; char *host_name; { char *cp; struct linger l; char *getenv(); cp = getenv("NETWORK"); (void) strcpy(net_name, cp ? cp : "DECnet"); cp = getenv("REMNODE"); (void) strcpy(host_name, cp ? cp : "unknown"); *subnet_name = '\0'; /* * Give decnet a chance to flush its buffers before the * link is killed. */ l.l_onoff = 1; /* on */ l.l_linger = 15; /* seconds */ if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (char *) &l, sizeof (l)) < 0) { #ifdef LOG syslog(LOG_ERR, "access_dnet: setsockopt SOL_SOCKET SO_LINGER: %m"); #endif } } #endif