summaryrefslogtreecommitdiff
path: root/os/access.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/access.c')
-rw-r--r--os/access.c167
1 files changed, 3 insertions, 164 deletions
diff --git a/os/access.c b/os/access.c
index de9e35e0b..93e33b52f 100644
--- a/os/access.c
+++ b/os/access.c
@@ -95,20 +95,6 @@ SOFTWARE.
# endif
#endif
-#if defined(DGUX)
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <ctype.h>
-#include <sys/utsname.h>
-#include <sys/stream.h>
-#include <sys/stropts.h>
-#include <sys/param.h>
-#include <sys/sockio.h>
-#endif
-
-
#if defined(hpux) || defined(QNX4)
# include <sys/utsname.h>
# ifdef HAS_IFREQ
@@ -304,7 +290,7 @@ AccessUsingXdmcp (void)
}
-#if ((defined(SVR4) && !defined(DGUX) && !defined(SCO325) && !defined(sun) && !defined(NCR)) || defined(ISC)) && !defined(__sgi) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
+#if ((defined(SVR4) && !defined(SCO325) && !defined(sun)) || defined(ISC)) && !defined(__sgi) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
/* Deal with different SIOCGIFCONF ioctl semantics on these OSs */
@@ -353,9 +339,9 @@ ifioctl (int fd, int cmd, char *arg)
#endif
return(ret);
}
-#else /* Case DGUX, sun, SCO325 NCR and others */
+#else /* Case sun, SCO325 and others */
#define ifioctl ioctl
-#endif /* ((SVR4 && !DGUX !sun !SCO325 !NCR) || ISC) && SIOCGIFCONF */
+#endif /* ((SVR4 && !sun !SCO325) || ISC) && SIOCGIFCONF */
/*
* DefineSelf (fd):
@@ -364,152 +350,6 @@ ifioctl (int fd, int cmd, char *arg)
* for this fd and add them to the selfhosts list.
*/
-#ifdef WINTCP /* NCR Wollongong based TCP */
-
-#include <sys/un.h>
-#include <stropts.h>
-#include <tiuser.h>
-
-#include <sys/stream.h>
-#include <net/if.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-
-void
-DefineSelf (int fd)
-{
- /*
- * The Wolongong drivers used by NCR SVR4/MP-RAS don't understand the
- * socket IO calls that most other drivers seem to like. Because of
- * this, this routine must be special cased for NCR. Eventually,
- * this will be cleared up.
- */
-
- struct ipb ifnet;
- struct in_ifaddr ifaddr;
- struct strioctl str;
- unsigned char *addr;
- register HOST *host;
- int family, len;
-
- if ((fd = open ("/dev/ip", O_RDWR, 0 )) < 0)
- Error ("Getting interface configuration (1)");
-
- /* Indicate that we want to start at the begining */
- ifnet.ib_next = (struct ipb *) 1;
-
- while (ifnet.ib_next)
- {
- str.ic_cmd = IPIOC_GETIPB;
- str.ic_timout = 0;
- str.ic_len = sizeof (struct ipb);
- str.ic_dp = (char *) &ifnet;
-
- if (ioctl (fd, (int) I_STR, (char *) &str) < 0)
- {
- close (fd);
- Error ("Getting interface configuration (2)");
- }
-
- ifaddr.ia_next = (struct in_ifaddr *) ifnet.if_addrlist;
- str.ic_cmd = IPIOC_GETINADDR;
- str.ic_timout = 0;
- str.ic_len = sizeof (struct in_ifaddr);
- str.ic_dp = (char *) &ifaddr;
-
- if (ioctl (fd, (int) I_STR, (char *) &str) < 0)
- {
- close (fd);
- Error ("Getting interface configuration (3)");
- }
-
- len = sizeof(struct sockaddr_in);
- family = ConvertAddr (IA_SIN(&ifaddr), &len, (pointer *)&addr);
- if (family == -1 || family == FamilyLocal)
- continue;
- for (host = selfhosts;
- host && !addrEqual (family, addr, len, host);
- host = host->next)
- ;
- if (host)
- continue;
- MakeHost(host,len)
- if (host)
- {
- host->family = family;
- host->len = len;
- acopy(addr, host->addr, len);
- host->next = selfhosts;
- selfhosts = host;
- }
-#ifdef XDMCP
- {
- struct sockaddr broad_addr;
-
- /*
- * If this isn't an Internet Address, don't register it.
- */
- if (family != FamilyInternet)
- continue;
-
- /*
- * Ignore 'localhost' entries as they're not useful
- * on the other end of the wire.
- */
- if (len == 4 &&
- addr[0] == 127 && addr[1] == 0 &&
- addr[2] == 0 && addr[3] == 1)
- continue;
-
- /*
- * Ignore '0.0.0.0' entries as they are
- * returned by some OSes for unconfigured NICs but they are
- * not useful on the other end of the wire.
- */
- if (len == 4 &&
- addr[0] == 0 && addr[1] == 0 &&
- addr[2] == 0 && addr[3] == 0)
- continue;
-
- XdmcpRegisterConnection (family, (char *)addr, len);
-
-
-#define IA_BROADADDR(ia) ((struct sockaddr_in *)(&((struct in_ifaddr *)ia)->ia_broadaddr))
-
- XdmcpRegisterBroadcastAddress (
- (struct sockaddr_in *) IA_BROADADDR(&ifaddr));
-
-#undef IA_BROADADDR
- }
-#endif /* XDMCP */
- }
-
- close(fd);
-
- /*
- * add something of FamilyLocalHost
- */
- for (host = selfhosts;
- host && !addrEqual(FamilyLocalHost, "", 0, host);
- host = host->next);
- if (!host)
- {
- MakeHost(host, 0);
- if (host)
- {
- host->family = FamilyLocalHost;
- host->len = 0;
- acopy("", host->addr, 0);
- host->next = selfhosts;
- selfhosts = host;
- }
- }
-}
-
-#else /* WINTCP */
-
#if !defined(SIOCGIFCONF) || (defined (hpux) && ! defined (HAS_IFREQ)) || defined(QNX4)
void
DefineSelf (int fd)
@@ -1089,7 +929,6 @@ DefineSelf (int fd)
}
}
#endif /* hpux && !HAS_IFREQ */
-#endif /* WINTCP */
#ifdef XDMCP
void