#include <afs/param.h>
#endif
-RCSID
- ("$Header$");
#include <stdlib.h>
#include <stdio.h>
-#ifdef HAVE_STRING_H
#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
#include <ctype.h>
#ifdef KERNEL
#include "afs/sysincludes.h"
#include "afsincludes.h"
#else
+#ifdef AFS_NT40_ENV
+#include <winsock2.h>
+#else
#ifdef __FreeBSD__
#include <sys/types.h>
#endif
#include <netinet/in.h>
-#include <errno.h>
#include <sys/errno.h>
#endif
+#include <errno.h>
+#endif
+
+#include <rx/rx.h>
#include "assert.h"
#include "afsutil.h"
-#include "dirpath.h"
+#include <afs/dirpath.h>
#define AFS_IPINVALID 0xffffffff /* invalid IP address */
#define AFS_IPINVALIDIGNORE 0xfffffffe /* no input given to extractAddr */
#define MAX_NETFILE_LINE 2048 /* length of a line in the netrestrict file */
#define MAXIPADDRS 1024 /* from afsd.c */
-#ifndef INADDR_LOOPBACK
-#define INADDR_LOOPBACK (afs_uint32)0x7f000001
-#endif
-
+int ParseNetInfoFile_int(afs_uint32 *, afs_uint32 *, afs_uint32 *,
+ int, char reason[], const char *,
+ int);
/*
* The line parameter is a pointer to a buffer containing a string of
* bytes of the form
* caller can choose to ignore the entire file but should write
* something to a log file).
*
- * All addresses should be in NBO (as returned by rx_getAllAddr() and
+ * All addresses should be in NBO (as returned by rx_getAllAddrMaskMtu() and
* parsed by extract_Addr().
*/
/*
strcpy(reason, "");
/* get all network interfaces from the kernel */
- neaddrs = rxi_getAllAddrMaskMtu(eAddrs, eMask, eMtu, MAXIPADDRS);
+ neaddrs = rx_getAllAddrMaskMtu(eAddrs, eMask, eMtu, MAXIPADDRS);
if (neaddrs <= 0) {
sprintf(reason, "No existing IP interfaces found");
return -1;
/* get all network interfaces from the kernel */
existNu =
- rxi_getAllAddrMaskMtu(existingAddr, existingMask, existingMtu,
+ rx_getAllAddrMaskMtu(existingAddr, existingMask, existingMtu,
MAXIPADDRS);
if (existNu < 0)
return existNu;
}
/* Always mask loopback address */
- if (found && addr1[i] == INADDR_LOOPBACK)
+ if (found && rx_IsLoopbackAddr(addr1[i]))
found = 0;
if (found) {