/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#if !defined(LINT) && !defined(CODECENTER)
#endif
/* Imports */
#include "port_before.h"
#if !defined(__BIND_NOSTATIC)
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <resolv.h>
#include <stdlib.h>
#include <string.h>
#include <irs.h>
#include "port_after.h"
#include "irs_p.h"
#include "irs_data.h"
/* Definitions */
struct pvt {
};
/* Forward */
/* Portability */
#ifndef INADDR_NONE
#endif
/* Public */
struct netent *
getnetent() {
return (getnetent_p(net_data));
}
struct netent *
}
struct netent *
}
void
}
void
endnetent() {
}
/* Shared private. */
struct netent *
return (NULL);
}
struct netent *
char **nap;
return (NULL);
}
return (np);
if (!net_data->nw_stayopen)
endnetent();
}
struct netent *
int bits;
return (NULL);
/* cannonize net(host order) */
if (net < 256UL) {
net <<= 24;
bits = 8;
} else if (net < 65536UL) {
net <<= 16;
bits = 16;
} else if (net < 16777216UL) {
net <<= 8;
bits = 24;
} else
bits = 32;
/* convert to net order */
/* reduce bits to as close to natural number as possible */
bits = 8;
else
bits = 16;
} else {
bits = 24;
}
}
if (!net_data->nw_stayopen)
endnetent();
}
void
return;
if (stayopen == 0)
}
void
}
/* Private */
static struct net_data *
init() {
goto error;
return (NULL);
}
}
return (net_data);
}
static void
}
}
static struct netent *
const char *cp;
/* XXX should support IPv6 some day */
return (NULL);
}
return (NULL);
return (NULL);
if (*--cp == '.')
return (NULL);
/* All-numeric, no dot at the end. */
if (tmp == INADDR_NONE) {
return (NULL);
}
/* Valid network number specified.
* Fake up a netent as if we'd actually
* done a lookup.
*/
return (NULL);
}
}
static struct netent *
int i;
int msbyte;
return (NULL);
return (NULL);
}
/*%
* What this code does: Converts net addresses from network to host form.
*
* msbyte: the index of the most significant byte in the n_addr array.
*
* Shift bytes in significant order into addr. When all signicant
* bytes are in, zero out bits in the LSB that are not part of the network.
*/
for (i = 0; i <= msbyte; i++)
if (i != 0)
}
#endif /*__BIND_NOSTATIC*/
/*! \file */