warnsify
This commit is contained in:
parent
2b0e1bd9bd
commit
9493bb7939
|
@ -1,7 +1,6 @@
|
||||||
# bootpd/Makefile
|
# bootpd/Makefile
|
||||||
# $NetBSD: Makefile,v 1.4 1997/10/25 06:57:55 lukem Exp $
|
# $NetBSD: Makefile,v 1.5 1998/03/14 04:39:53 lukem Exp $
|
||||||
|
|
||||||
WARNS?= 0
|
|
||||||
PROG= bootpd
|
PROG= bootpd
|
||||||
CPPFLAGS+= -DETC_ETHERS -DSYSLOG -DDEBUG -DVEND_CMU
|
CPPFLAGS+= -DETC_ETHERS -DSYSLOG -DDEBUG -DVEND_CMU
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: bootpd.c,v 1.7 1997/10/18 04:36:55 lukem Exp $";
|
__RCSID("$NetBSD: bootpd.c,v 1.8 1998/03/14 04:39:53 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -126,6 +127,7 @@ PRIVATE void handle_reply P((void));
|
||||||
PRIVATE void handle_request P((void));
|
PRIVATE void handle_request P((void));
|
||||||
PRIVATE void sendreply P((int forward, int32 dest_override));
|
PRIVATE void sendreply P((int forward, int32 dest_override));
|
||||||
PRIVATE void usage P((void));
|
PRIVATE void usage P((void));
|
||||||
|
int main P((int, char **));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
||||||
|
@ -911,7 +913,9 @@ HW addr type is IEEE 802. convert to %s and check again\n",
|
||||||
if (debug > 2)
|
if (debug > 2)
|
||||||
report(LOG_INFO, "bootfile=\"%s\"", clntpath);
|
report(LOG_INFO, "bootfile=\"%s\"", clntpath);
|
||||||
|
|
||||||
|
#ifdef CHECK_FILE_ACCESS
|
||||||
null_file_name:
|
null_file_name:
|
||||||
|
#endif /* CHECK_FILE_ACCESS */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1206,7 +1210,6 @@ dovend_rfc1048(bp, hp, bootsize)
|
||||||
{
|
{
|
||||||
int bytesleft, len;
|
int bytesleft, len;
|
||||||
byte *vp;
|
byte *vp;
|
||||||
char *tmpstr;
|
|
||||||
|
|
||||||
static char noroom[] = "%s: No room for \"%s\" option";
|
static char noroom[] = "%s: No room for \"%s\" option";
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: bootpef.c,v 1.3 1997/10/18 04:36:56 lukem Exp $";
|
__RCSID("$NetBSD: bootpef.c,v 1.4 1998/03/14 04:39:53 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,9 +98,9 @@ static char rcsid[] = "$NetBSD: bootpef.c,v 1.3 1997/10/18 04:36:56 lukem Exp $"
|
||||||
#define P(args) ()
|
#define P(args) ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void dovend_rfc1048 P((struct bootp *, struct host *, int32));
|
|
||||||
static void mktagfile P((struct host *));
|
static void mktagfile P((struct host *));
|
||||||
static void usage P((void));
|
static void usage P((void));
|
||||||
|
int main P((int, char **));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
||||||
|
@ -139,7 +140,7 @@ usage()
|
||||||
* Initialization such as command-line processing is done and then the
|
* Initialization such as command-line processing is done and then the
|
||||||
* main server loop is started.
|
* main server loop is started.
|
||||||
*/
|
*/
|
||||||
void
|
int
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
|
@ -275,6 +276,7 @@ main(argc, argv)
|
||||||
mktagfile(hp);
|
mktagfile(hp);
|
||||||
hp = (struct host *) hash_NextEntry(nmhashtable);
|
hp = (struct host *) hash_NextEntry(nmhashtable);
|
||||||
}
|
}
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -291,7 +293,6 @@ mktagfile(hp)
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int bytesleft, len;
|
int bytesleft, len;
|
||||||
byte *vp;
|
byte *vp;
|
||||||
char *tmpstr;
|
|
||||||
|
|
||||||
if (!hp->flags.exten_file)
|
if (!hp->flags.exten_file)
|
||||||
return;
|
return;
|
||||||
|
@ -332,7 +333,7 @@ mktagfile(hp)
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
} /* dovend_rfc1048 */
|
} /* mktagfile */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
|
|
|
@ -25,8 +25,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: bootpgw.c,v 1.6 1997/10/18 04:36:58 lukem Exp $";
|
__RCSID("$NetBSD: bootpgw.c,v 1.7 1998/03/14 04:39:53 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -98,6 +99,7 @@ static char rcsid[] = "$NetBSD: bootpgw.c,v 1.6 1997/10/18 04:36:58 lukem Exp $"
|
||||||
static void usage P((void));
|
static void usage P((void));
|
||||||
static void handle_reply P((void));
|
static void handle_reply P((void));
|
||||||
static void handle_request P((void));
|
static void handle_request P((void));
|
||||||
|
int main P((int, char **));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
||||||
|
@ -513,7 +515,9 @@ static void
|
||||||
handle_request()
|
handle_request()
|
||||||
{
|
{
|
||||||
struct bootp *bp = (struct bootp *) pktbuf;
|
struct bootp *bp = (struct bootp *) pktbuf;
|
||||||
|
#if 0
|
||||||
struct ifreq *ifr;
|
struct ifreq *ifr;
|
||||||
|
#endif
|
||||||
u_short secs, hops;
|
u_short secs, hops;
|
||||||
|
|
||||||
/* XXX - SLIP init: Set bp_ciaddr = clnt_addr here? */
|
/* XXX - SLIP init: Set bp_ciaddr = clnt_addr here? */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bootptest.c,v 1.4 1998/01/09 08:09:03 perry Exp $ */
|
/* $NetBSD: bootptest.c,v 1.5 1998/03/14 04:39:53 lukem Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bootptest.c - Test out a bootp server.
|
* bootptest.c - Test out a bootp server.
|
||||||
|
@ -34,6 +34,11 @@
|
||||||
* 09/93 Original developed by Gordon W. Ross <gwr@mc.com>
|
* 09/93 Original developed by Gordon W. Ross <gwr@mc.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: bootptest.c,v 1.5 1998/03/14 04:39:53 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
char *usage = "bootptest [-h] server-name [vendor-data-template-file]";
|
char *usage = "bootptest [-h] server-name [vendor-data-template-file]";
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -55,10 +60,12 @@ char *usage = "bootptest [-h] server-name [vendor-data-template-file]";
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "bootp.h"
|
#include "bootp.h"
|
||||||
#include "bootptest.h"
|
#include "bootptest.h"
|
||||||
#include "getif.h"
|
#include "getif.h"
|
||||||
|
#include "report.h"
|
||||||
#include "patchlevel.h"
|
#include "patchlevel.h"
|
||||||
|
|
||||||
#define LOG_ERR 1
|
#define LOG_ERR 1
|
||||||
|
@ -108,14 +115,25 @@ unsigned char vm_cmu[4] = VM_CMU;
|
||||||
unsigned char vm_rfc1048[4] = VM_RFC1048;
|
unsigned char vm_rfc1048[4] = VM_RFC1048;
|
||||||
short secs; /* How long client has waited */
|
short secs; /* How long client has waited */
|
||||||
|
|
||||||
char *get_errmsg();
|
|
||||||
extern void bootp_print();
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern int getether P((char *, char *));
|
||||||
|
int main P((int, char **));
|
||||||
|
void send_request P((int));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialization such as command-line processing is done, then
|
* Initialization such as command-line processing is done, then
|
||||||
* the receiver loop is started. Die when interrupted.
|
* the receiver loop is started. Die when interrupted.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
|
@ -128,7 +146,7 @@ main(argc, argv)
|
||||||
char *vendor_file = NULL;
|
char *vendor_file = NULL;
|
||||||
char *bp_file = NULL;
|
char *bp_file = NULL;
|
||||||
int s; /* Socket file descriptor */
|
int s; /* Socket file descriptor */
|
||||||
int n, tolen, fromlen, recvcnt;
|
int n, fromlen, recvcnt;
|
||||||
int use_hwa = 0;
|
int use_hwa = 0;
|
||||||
int32 vend_magic;
|
int32 vend_magic;
|
||||||
int32 xid;
|
int32 xid;
|
||||||
|
@ -408,7 +426,7 @@ main(argc, argv)
|
||||||
/* set globals needed by bootp_print() */
|
/* set globals needed by bootp_print() */
|
||||||
snaplen = n;
|
snaplen = n;
|
||||||
snapend = (unsigned char *) rcvbuf + snaplen;
|
snapend = (unsigned char *) rcvbuf + snaplen;
|
||||||
bootp_print(rcvbuf, n, sin_from.sin_port, 0);
|
bootp_print((struct bootp *)rcvbuf, n, sin_from.sin_port, 0);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
/*
|
/*
|
||||||
* This no longer exits immediately after receiving
|
* This no longer exits immediately after receiving
|
||||||
|
@ -421,12 +439,13 @@ main(argc, argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
send_request(s)
|
send_request(s)
|
||||||
int s;
|
int s;
|
||||||
{
|
{
|
||||||
/* Print the request packet. */
|
/* Print the request packet. */
|
||||||
printf("Sending to %s", inet_ntoa(sin_server.sin_addr));
|
printf("Sending to %s", inet_ntoa(sin_server.sin_addr));
|
||||||
bootp_print(sndbuf, snaplen, sin_from.sin_port, 0);
|
bootp_print((struct bootp *)sndbuf, snaplen, sin_from.sin_port, 0);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
|
|
||||||
/* Send the request packet. */
|
/* Send the request packet. */
|
||||||
|
@ -450,7 +469,7 @@ printfn(s, ep)
|
||||||
register u_char c;
|
register u_char c;
|
||||||
|
|
||||||
putchar('"');
|
putchar('"');
|
||||||
while (c = *s++) {
|
while ((c = *s++) != 0) {
|
||||||
if (s > ep) {
|
if (s > ep) {
|
||||||
putchar('"');
|
putchar('"');
|
||||||
return (1);
|
return (1);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bootptest.h,v 1.2 1998/01/09 08:09:04 perry Exp $ */
|
/* $NetBSD: bootptest.h,v 1.3 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
/* bootptest.h */
|
/* bootptest.h */
|
||||||
/*
|
/*
|
||||||
|
@ -27,6 +27,8 @@ extern unsigned char *snapend;
|
||||||
#define P(args) ()
|
#define P(args) ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern void bootp_print P((struct bootp *, int, u_short, u_short));
|
||||||
extern char *ipaddr_string P((struct in_addr *));
|
extern char *ipaddr_string P((struct in_addr *));
|
||||||
|
extern int printfn P((u_char *, u_char *));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: getether.c,v 1.2 1998/01/09 08:09:08 perry Exp $ */
|
/* $NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* getether.c : get the ethernet address of an interface
|
* getether.c : get the ethernet address of an interface
|
||||||
|
@ -14,11 +19,23 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "report.h"
|
#include "report.h"
|
||||||
#define EALEN 6
|
#define EALEN 6
|
||||||
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern int getether P((char *, char *));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
||||||
#if defined(ultrix) || (defined(__osf__) && defined(__alpha))
|
#if defined(ultrix) || (defined(__osf__) && defined(__alpha))
|
||||||
/*
|
/*
|
||||||
* This is really easy on Ultrix! Thanks to
|
* This is really easy on Ultrix! Thanks to
|
||||||
|
@ -32,6 +49,7 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <net/if.h> /* struct ifdevea */
|
#include <net/if.h> /* struct ifdevea */
|
||||||
|
|
||||||
|
int
|
||||||
getether(ifname, eap)
|
getether(ifname, eap)
|
||||||
char *ifname, *eap;
|
char *ifname, *eap;
|
||||||
{
|
{
|
||||||
|
@ -110,13 +128,14 @@ getether(ifname, eap)
|
||||||
#include <net/if_dl.h>
|
#include <net/if_dl.h>
|
||||||
#include <net/if_types.h>
|
#include <net/if_types.h>
|
||||||
|
|
||||||
|
int
|
||||||
getether(ifname, eap)
|
getether(ifname, eap)
|
||||||
char *ifname; /* interface name from ifconfig structure */
|
char *ifname; /* interface name from ifconfig structure */
|
||||||
char *eap; /* Ether address (output) */
|
char *eap; /* Ether address (output) */
|
||||||
{
|
{
|
||||||
int fd, rc = -1;
|
int fd, rc = -1;
|
||||||
register int n;
|
register int n;
|
||||||
struct ifreq ibuf[16], ifr;
|
struct ifreq ibuf[16];
|
||||||
struct ifconf ifc;
|
struct ifconf ifc;
|
||||||
register struct ifreq *ifrp, *ifend;
|
register struct ifreq *ifrp, *ifend;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,10 @@
|
||||||
* This file was copied from tcpdump-2.1.1 and modified.
|
* This file was copied from tcpdump-2.1.1 and modified.
|
||||||
* There is an e-mail list for tcpdump: <tcpdump@ee.lbl.gov>
|
* There is an e-mail list for tcpdump: <tcpdump@ee.lbl.gov>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: print-bootp.c,v 1.3 1997/10/18 04:37:03 lukem Exp $";
|
__RCSID("$NetBSD: print-bootp.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
/* 93/10/10 <gwr@mc.com> New data-driven option print routine. */
|
/* 93/10/10 <gwr@mc.com> New data-driven option print routine. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -41,11 +43,19 @@ static char rcsid[] = "$NetBSD: print-bootp.c,v 1.3 1997/10/18 04:37:03 lukem Ex
|
||||||
#include "bootp.h"
|
#include "bootp.h"
|
||||||
#include "bootptest.h"
|
#include "bootptest.h"
|
||||||
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
/* These decode the vendor data. */
|
/* These decode the vendor data. */
|
||||||
static void rfc1048_print();
|
static void cmu_print P((u_char *, int));
|
||||||
static void cmu_print();
|
static void dump_hex P((u_char *, int));
|
||||||
static void other_print();
|
static void other_print P((u_char *, int));
|
||||||
static void dump_hex();
|
static void rfc1048_print P((u_char *, int));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Print bootp requests
|
* Print bootp requests
|
||||||
|
@ -271,8 +281,6 @@ rfc1048_opts[] = {
|
||||||
};
|
};
|
||||||
#define KNOWN_OPTIONS (sizeof(rfc1048_opts) / sizeof(rfc1048_opts[0]))
|
#define KNOWN_OPTIONS (sizeof(rfc1048_opts) / sizeof(rfc1048_opts[0]))
|
||||||
|
|
||||||
static void print_string();
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rfc1048_print(bp, length)
|
rfc1048_print(bp, length)
|
||||||
register u_char *bp;
|
register u_char *bp;
|
||||||
|
@ -280,7 +288,7 @@ rfc1048_print(bp, length)
|
||||||
{
|
{
|
||||||
u_char tag;
|
u_char tag;
|
||||||
u_char *ep;
|
u_char *ep;
|
||||||
register int len, j;
|
register int len;
|
||||||
u_int32 ul;
|
u_int32 ul;
|
||||||
u_short us;
|
u_short us;
|
||||||
struct in_addr ia;
|
struct in_addr ia;
|
||||||
|
@ -433,7 +441,6 @@ other_print(bp, length)
|
||||||
{
|
{
|
||||||
u_char *ep; /* end pointer */
|
u_char *ep; /* end pointer */
|
||||||
u_char *zp; /* points one past last non-zero byte */
|
u_char *zp; /* points one past last non-zero byte */
|
||||||
register int i, j;
|
|
||||||
|
|
||||||
/* Setup end pointer */
|
/* Setup end pointer */
|
||||||
ep = bp + length;
|
ep = bp + length;
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: trygetea.c,v 1.2 1998/01/09 08:09:16 perry Exp $ */
|
/* $NetBSD: trygetea.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: trygetea.c,v 1.3 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* trygetea.c - test program for getether.c
|
* trygetea.c - test program for getether.c
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: dovend.c,v 1.2 1998/01/09 08:09:06 perry Exp $ */
|
/* $NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dovend.c : Inserts all but the first few vendor options.
|
* dovend.c : Inserts all but the first few vendor options.
|
||||||
|
@ -58,7 +63,9 @@ dovend_rfc1497(hp, buf, len)
|
||||||
{
|
{
|
||||||
int bytesleft = len;
|
int bytesleft = len;
|
||||||
byte *vp = buf;
|
byte *vp = buf;
|
||||||
|
#if 0
|
||||||
char *tmpstr;
|
char *tmpstr;
|
||||||
|
#endif
|
||||||
|
|
||||||
static char noroom[] = "%s: No room for \"%s\" option";
|
static char noroom[] = "%s: No room for \"%s\" option";
|
||||||
#define NEED(LEN, MSG) do \
|
#define NEED(LEN, MSG) do \
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: dumptab.c,v 1.4 1998/01/09 08:09:07 perry Exp $ */
|
/* $NetBSD: dumptab.c,v 1.5 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: dumptab.c,v 1.5 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dumptab.c - handles dumping the database
|
* dumptab.c - handles dumping the database
|
||||||
|
@ -37,6 +42,7 @@
|
||||||
static void dump_generic P((FILE *, struct shared_bindata *));
|
static void dump_generic P((FILE *, struct shared_bindata *));
|
||||||
static void dump_host P((FILE *, struct host *));
|
static void dump_host P((FILE *, struct host *));
|
||||||
static void list_ipaddresses P((FILE *, struct in_addr_list *));
|
static void list_ipaddresses P((FILE *, struct in_addr_list *));
|
||||||
|
void dumptab P((char *));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
||||||
|
@ -262,7 +268,7 @@ dump_host(fp, hp)
|
||||||
/* NetBSD: domainname (see above) */
|
/* NetBSD: domainname (see above) */
|
||||||
/* NetBSD: dumpfile (see above) */
|
/* NetBSD: dumpfile (see above) */
|
||||||
if (hp->flags.time_offset) {
|
if (hp->flags.time_offset) {
|
||||||
fprintf(fp, "\\\n\t:to=%ld:", hp->time_offset);
|
fprintf(fp, "\\\n\t:to=%ld:", (long)hp->time_offset);
|
||||||
}
|
}
|
||||||
if (hp->flags.time_server) {
|
if (hp->flags.time_server) {
|
||||||
fprintf(fp, "\\\n\t:ts=");
|
fprintf(fp, "\\\n\t:ts=");
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: getif.c,v 1.3 1998/01/09 08:09:08 perry Exp $ */
|
/* $NetBSD: getif.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: getif.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* getif.c : get an interface structure
|
* getif.c : get an interface structure
|
||||||
|
@ -36,7 +41,15 @@
|
||||||
static struct ifreq ifreq[10]; /* Holds interface configuration */
|
static struct ifreq ifreq[10]; /* Holds interface configuration */
|
||||||
static struct ifconf ifconf; /* points to ifreq */
|
static struct ifconf ifconf; /* points to ifreq */
|
||||||
|
|
||||||
static int nmatch();
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static int nmatch P((u_char *, u_char *));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
||||||
/* Return a pointer to the interface struct for the passed address. */
|
/* Return a pointer to the interface struct for the passed address. */
|
||||||
struct ifreq *
|
struct ifreq *
|
||||||
|
@ -86,7 +99,7 @@ getif(s, addrp)
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
ifrq = (struct ifreq *) p;
|
ifrq = (struct ifreq *) p;
|
||||||
sip = (struct sockaddr_in *) &ifrq->ifr_addr;
|
sip = (struct sockaddr_in *) &ifrq->ifr_addr;
|
||||||
m = nmatch(addrp, &(sip->sin_addr));
|
m = nmatch((u_char *)addrp, (u_char *)&(sip->sin_addr));
|
||||||
if (m > maxmatch) {
|
if (m > maxmatch) {
|
||||||
maxmatch = m;
|
maxmatch = m;
|
||||||
ifrmax = ifrq;
|
ifrmax = ifrq;
|
||||||
|
|
|
@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: hash.c,v 1.3 1997/10/18 04:37:01 lukem Exp $";
|
__RCSID("$NetBSD: hash.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: hwaddr.c,v 1.3 1998/01/09 08:09:10 perry Exp $ */
|
/* $NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* hwaddr.c - routines that deal with hardware addresses.
|
* hwaddr.c - routines that deal with hardware addresses.
|
||||||
|
@ -22,10 +27,12 @@
|
||||||
#include <net/if_arp.h>
|
#include <net/if_arp.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#ifndef NO_UNISTD
|
#ifndef NO_UNISTD
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#ifndef USE_BFUNCS
|
#ifndef USE_BFUNCS
|
||||||
/* Yes, memcpy is OK here (no overlapped copies). */
|
/* Yes, memcpy is OK here (no overlapped copies). */
|
||||||
|
@ -132,7 +139,6 @@ setarp(s, ia, ha, len)
|
||||||
int status;
|
int status;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
char *a;
|
char *a;
|
||||||
extern char *inet_ntoa();
|
|
||||||
|
|
||||||
a = inet_ntoa(*ia);
|
a = inet_ntoa(*ia);
|
||||||
sprintf(buf, "arp -d %s; arp -s %s %s temp",
|
sprintf(buf, "arp -d %s; arp -s %s %s temp",
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: lookup.c,v 1.3 1998/01/09 08:09:12 perry Exp $ */
|
/* $NetBSD: lookup.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: lookup.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* lookup.c - Lookup IP address, HW address, netmask
|
* lookup.c - Lookup IP address, HW address, netmask
|
||||||
|
@ -12,7 +17,6 @@
|
||||||
|
|
||||||
#ifdef ETC_ETHERS
|
#ifdef ETC_ETHERS
|
||||||
#include <net/if_ether.h>
|
#include <net/if_ether.h>
|
||||||
extern int ether_hostton();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
|
@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: readfile.c,v 1.4 1997/10/18 04:37:05 lukem Exp $";
|
__RCSID("$NetBSD: readfile.c,v 1.5 1998/03/14 04:39:55 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -235,7 +236,6 @@ PRIVATE struct htypename htnamemap[] = {
|
||||||
#define P(args) ()
|
#define P(args) ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern boolean iplookcmp();
|
|
||||||
boolean nmcmp P((hash_datum *, hash_datum *));
|
boolean nmcmp P((hash_datum *, hash_datum *));
|
||||||
|
|
||||||
PRIVATE void
|
PRIVATE void
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: report.c,v 1.2 1998/01/09 08:09:15 perry Exp $ */
|
/* $NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* report() - calls syslog
|
* report() - calls syslog
|
||||||
|
@ -11,6 +16,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#include "report.h"
|
#include "report.h"
|
||||||
|
@ -138,7 +144,6 @@ char *
|
||||||
get_errmsg()
|
get_errmsg()
|
||||||
{
|
{
|
||||||
extern int errno;
|
extern int errno;
|
||||||
extern char *strerror();
|
|
||||||
|
|
||||||
return strerror(errno);
|
return strerror(errno);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: trygetif.c,v 1.3 1998/01/09 08:09:17 perry Exp $ */
|
/* $NetBSD: trygetif.c,v 1.4 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: trygetif.c,v 1.4 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* trygetif.c - test program for getif.c
|
* trygetif.c - test program for getif.c
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: trylook.c,v 1.2 1998/01/09 08:09:17 perry Exp $ */
|
/* $NetBSD: trylook.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: trylook.c,v 1.3 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* trylook.c - test program for lookup.c
|
* trylook.c - test program for lookup.c
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: tzone.c,v 1.3 1998/01/09 08:09:18 perry Exp $ */
|
/* $NetBSD: tzone.c,v 1.4 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: tzone.c,v 1.4 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* tzone.c - get the timezone
|
* tzone.c - get the timezone
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
/* $NetBSD: tzone.h,v 1.2 1998/01/09 08:09:19 perry Exp $ */
|
/* $NetBSD: tzone.h,v 1.3 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
/* tzone.h */
|
/* tzone.h */
|
||||||
|
|
||||||
extern int32 secondswest;
|
extern int32 secondswest;
|
||||||
extern void tzone_init();
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern void tzone_init P((void));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# bootpd/Makefile
|
# bootpd/Makefile
|
||||||
# $NetBSD: Makefile,v 1.4 1997/10/25 06:57:55 lukem Exp $
|
# $NetBSD: Makefile,v 1.5 1998/03/14 04:39:53 lukem Exp $
|
||||||
|
|
||||||
WARNS?= 0
|
|
||||||
PROG= bootpd
|
PROG= bootpd
|
||||||
CPPFLAGS+= -DETC_ETHERS -DSYSLOG -DDEBUG -DVEND_CMU
|
CPPFLAGS+= -DETC_ETHERS -DSYSLOG -DDEBUG -DVEND_CMU
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: bootpd.c,v 1.7 1997/10/18 04:36:55 lukem Exp $";
|
__RCSID("$NetBSD: bootpd.c,v 1.8 1998/03/14 04:39:53 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -126,6 +127,7 @@ PRIVATE void handle_reply P((void));
|
||||||
PRIVATE void handle_request P((void));
|
PRIVATE void handle_request P((void));
|
||||||
PRIVATE void sendreply P((int forward, int32 dest_override));
|
PRIVATE void sendreply P((int forward, int32 dest_override));
|
||||||
PRIVATE void usage P((void));
|
PRIVATE void usage P((void));
|
||||||
|
int main P((int, char **));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
||||||
|
@ -911,7 +913,9 @@ HW addr type is IEEE 802. convert to %s and check again\n",
|
||||||
if (debug > 2)
|
if (debug > 2)
|
||||||
report(LOG_INFO, "bootfile=\"%s\"", clntpath);
|
report(LOG_INFO, "bootfile=\"%s\"", clntpath);
|
||||||
|
|
||||||
|
#ifdef CHECK_FILE_ACCESS
|
||||||
null_file_name:
|
null_file_name:
|
||||||
|
#endif /* CHECK_FILE_ACCESS */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1206,7 +1210,6 @@ dovend_rfc1048(bp, hp, bootsize)
|
||||||
{
|
{
|
||||||
int bytesleft, len;
|
int bytesleft, len;
|
||||||
byte *vp;
|
byte *vp;
|
||||||
char *tmpstr;
|
|
||||||
|
|
||||||
static char noroom[] = "%s: No room for \"%s\" option";
|
static char noroom[] = "%s: No room for \"%s\" option";
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: bootpef.c,v 1.3 1997/10/18 04:36:56 lukem Exp $";
|
__RCSID("$NetBSD: bootpef.c,v 1.4 1998/03/14 04:39:53 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,9 +98,9 @@ static char rcsid[] = "$NetBSD: bootpef.c,v 1.3 1997/10/18 04:36:56 lukem Exp $"
|
||||||
#define P(args) ()
|
#define P(args) ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void dovend_rfc1048 P((struct bootp *, struct host *, int32));
|
|
||||||
static void mktagfile P((struct host *));
|
static void mktagfile P((struct host *));
|
||||||
static void usage P((void));
|
static void usage P((void));
|
||||||
|
int main P((int, char **));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
||||||
|
@ -139,7 +140,7 @@ usage()
|
||||||
* Initialization such as command-line processing is done and then the
|
* Initialization such as command-line processing is done and then the
|
||||||
* main server loop is started.
|
* main server loop is started.
|
||||||
*/
|
*/
|
||||||
void
|
int
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
|
@ -275,6 +276,7 @@ main(argc, argv)
|
||||||
mktagfile(hp);
|
mktagfile(hp);
|
||||||
hp = (struct host *) hash_NextEntry(nmhashtable);
|
hp = (struct host *) hash_NextEntry(nmhashtable);
|
||||||
}
|
}
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -291,7 +293,6 @@ mktagfile(hp)
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int bytesleft, len;
|
int bytesleft, len;
|
||||||
byte *vp;
|
byte *vp;
|
||||||
char *tmpstr;
|
|
||||||
|
|
||||||
if (!hp->flags.exten_file)
|
if (!hp->flags.exten_file)
|
||||||
return;
|
return;
|
||||||
|
@ -332,7 +333,7 @@ mktagfile(hp)
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
} /* dovend_rfc1048 */
|
} /* mktagfile */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
|
|
|
@ -25,8 +25,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: bootpgw.c,v 1.6 1997/10/18 04:36:58 lukem Exp $";
|
__RCSID("$NetBSD: bootpgw.c,v 1.7 1998/03/14 04:39:53 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -98,6 +99,7 @@ static char rcsid[] = "$NetBSD: bootpgw.c,v 1.6 1997/10/18 04:36:58 lukem Exp $"
|
||||||
static void usage P((void));
|
static void usage P((void));
|
||||||
static void handle_reply P((void));
|
static void handle_reply P((void));
|
||||||
static void handle_request P((void));
|
static void handle_request P((void));
|
||||||
|
int main P((int, char **));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
||||||
|
@ -513,7 +515,9 @@ static void
|
||||||
handle_request()
|
handle_request()
|
||||||
{
|
{
|
||||||
struct bootp *bp = (struct bootp *) pktbuf;
|
struct bootp *bp = (struct bootp *) pktbuf;
|
||||||
|
#if 0
|
||||||
struct ifreq *ifr;
|
struct ifreq *ifr;
|
||||||
|
#endif
|
||||||
u_short secs, hops;
|
u_short secs, hops;
|
||||||
|
|
||||||
/* XXX - SLIP init: Set bp_ciaddr = clnt_addr here? */
|
/* XXX - SLIP init: Set bp_ciaddr = clnt_addr here? */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bootptest.c,v 1.4 1998/01/09 08:09:03 perry Exp $ */
|
/* $NetBSD: bootptest.c,v 1.5 1998/03/14 04:39:53 lukem Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bootptest.c - Test out a bootp server.
|
* bootptest.c - Test out a bootp server.
|
||||||
|
@ -34,6 +34,11 @@
|
||||||
* 09/93 Original developed by Gordon W. Ross <gwr@mc.com>
|
* 09/93 Original developed by Gordon W. Ross <gwr@mc.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: bootptest.c,v 1.5 1998/03/14 04:39:53 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
char *usage = "bootptest [-h] server-name [vendor-data-template-file]";
|
char *usage = "bootptest [-h] server-name [vendor-data-template-file]";
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -55,10 +60,12 @@ char *usage = "bootptest [-h] server-name [vendor-data-template-file]";
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "bootp.h"
|
#include "bootp.h"
|
||||||
#include "bootptest.h"
|
#include "bootptest.h"
|
||||||
#include "getif.h"
|
#include "getif.h"
|
||||||
|
#include "report.h"
|
||||||
#include "patchlevel.h"
|
#include "patchlevel.h"
|
||||||
|
|
||||||
#define LOG_ERR 1
|
#define LOG_ERR 1
|
||||||
|
@ -108,14 +115,25 @@ unsigned char vm_cmu[4] = VM_CMU;
|
||||||
unsigned char vm_rfc1048[4] = VM_RFC1048;
|
unsigned char vm_rfc1048[4] = VM_RFC1048;
|
||||||
short secs; /* How long client has waited */
|
short secs; /* How long client has waited */
|
||||||
|
|
||||||
char *get_errmsg();
|
|
||||||
extern void bootp_print();
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern int getether P((char *, char *));
|
||||||
|
int main P((int, char **));
|
||||||
|
void send_request P((int));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialization such as command-line processing is done, then
|
* Initialization such as command-line processing is done, then
|
||||||
* the receiver loop is started. Die when interrupted.
|
* the receiver loop is started. Die when interrupted.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
|
@ -128,7 +146,7 @@ main(argc, argv)
|
||||||
char *vendor_file = NULL;
|
char *vendor_file = NULL;
|
||||||
char *bp_file = NULL;
|
char *bp_file = NULL;
|
||||||
int s; /* Socket file descriptor */
|
int s; /* Socket file descriptor */
|
||||||
int n, tolen, fromlen, recvcnt;
|
int n, fromlen, recvcnt;
|
||||||
int use_hwa = 0;
|
int use_hwa = 0;
|
||||||
int32 vend_magic;
|
int32 vend_magic;
|
||||||
int32 xid;
|
int32 xid;
|
||||||
|
@ -408,7 +426,7 @@ main(argc, argv)
|
||||||
/* set globals needed by bootp_print() */
|
/* set globals needed by bootp_print() */
|
||||||
snaplen = n;
|
snaplen = n;
|
||||||
snapend = (unsigned char *) rcvbuf + snaplen;
|
snapend = (unsigned char *) rcvbuf + snaplen;
|
||||||
bootp_print(rcvbuf, n, sin_from.sin_port, 0);
|
bootp_print((struct bootp *)rcvbuf, n, sin_from.sin_port, 0);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
/*
|
/*
|
||||||
* This no longer exits immediately after receiving
|
* This no longer exits immediately after receiving
|
||||||
|
@ -421,12 +439,13 @@ main(argc, argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
send_request(s)
|
send_request(s)
|
||||||
int s;
|
int s;
|
||||||
{
|
{
|
||||||
/* Print the request packet. */
|
/* Print the request packet. */
|
||||||
printf("Sending to %s", inet_ntoa(sin_server.sin_addr));
|
printf("Sending to %s", inet_ntoa(sin_server.sin_addr));
|
||||||
bootp_print(sndbuf, snaplen, sin_from.sin_port, 0);
|
bootp_print((struct bootp *)sndbuf, snaplen, sin_from.sin_port, 0);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
|
|
||||||
/* Send the request packet. */
|
/* Send the request packet. */
|
||||||
|
@ -450,7 +469,7 @@ printfn(s, ep)
|
||||||
register u_char c;
|
register u_char c;
|
||||||
|
|
||||||
putchar('"');
|
putchar('"');
|
||||||
while (c = *s++) {
|
while ((c = *s++) != 0) {
|
||||||
if (s > ep) {
|
if (s > ep) {
|
||||||
putchar('"');
|
putchar('"');
|
||||||
return (1);
|
return (1);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bootptest.h,v 1.2 1998/01/09 08:09:04 perry Exp $ */
|
/* $NetBSD: bootptest.h,v 1.3 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
/* bootptest.h */
|
/* bootptest.h */
|
||||||
/*
|
/*
|
||||||
|
@ -27,6 +27,8 @@ extern unsigned char *snapend;
|
||||||
#define P(args) ()
|
#define P(args) ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern void bootp_print P((struct bootp *, int, u_short, u_short));
|
||||||
extern char *ipaddr_string P((struct in_addr *));
|
extern char *ipaddr_string P((struct in_addr *));
|
||||||
|
extern int printfn P((u_char *, u_char *));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: dovend.c,v 1.2 1998/01/09 08:09:06 perry Exp $ */
|
/* $NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: dovend.c,v 1.3 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dovend.c : Inserts all but the first few vendor options.
|
* dovend.c : Inserts all but the first few vendor options.
|
||||||
|
@ -58,7 +63,9 @@ dovend_rfc1497(hp, buf, len)
|
||||||
{
|
{
|
||||||
int bytesleft = len;
|
int bytesleft = len;
|
||||||
byte *vp = buf;
|
byte *vp = buf;
|
||||||
|
#if 0
|
||||||
char *tmpstr;
|
char *tmpstr;
|
||||||
|
#endif
|
||||||
|
|
||||||
static char noroom[] = "%s: No room for \"%s\" option";
|
static char noroom[] = "%s: No room for \"%s\" option";
|
||||||
#define NEED(LEN, MSG) do \
|
#define NEED(LEN, MSG) do \
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: dumptab.c,v 1.4 1998/01/09 08:09:07 perry Exp $ */
|
/* $NetBSD: dumptab.c,v 1.5 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: dumptab.c,v 1.5 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dumptab.c - handles dumping the database
|
* dumptab.c - handles dumping the database
|
||||||
|
@ -37,6 +42,7 @@
|
||||||
static void dump_generic P((FILE *, struct shared_bindata *));
|
static void dump_generic P((FILE *, struct shared_bindata *));
|
||||||
static void dump_host P((FILE *, struct host *));
|
static void dump_host P((FILE *, struct host *));
|
||||||
static void list_ipaddresses P((FILE *, struct in_addr_list *));
|
static void list_ipaddresses P((FILE *, struct in_addr_list *));
|
||||||
|
void dumptab P((char *));
|
||||||
|
|
||||||
#undef P
|
#undef P
|
||||||
|
|
||||||
|
@ -262,7 +268,7 @@ dump_host(fp, hp)
|
||||||
/* NetBSD: domainname (see above) */
|
/* NetBSD: domainname (see above) */
|
||||||
/* NetBSD: dumpfile (see above) */
|
/* NetBSD: dumpfile (see above) */
|
||||||
if (hp->flags.time_offset) {
|
if (hp->flags.time_offset) {
|
||||||
fprintf(fp, "\\\n\t:to=%ld:", hp->time_offset);
|
fprintf(fp, "\\\n\t:to=%ld:", (long)hp->time_offset);
|
||||||
}
|
}
|
||||||
if (hp->flags.time_server) {
|
if (hp->flags.time_server) {
|
||||||
fprintf(fp, "\\\n\t:ts=");
|
fprintf(fp, "\\\n\t:ts=");
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: getether.c,v 1.2 1998/01/09 08:09:08 perry Exp $ */
|
/* $NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: getether.c,v 1.3 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* getether.c : get the ethernet address of an interface
|
* getether.c : get the ethernet address of an interface
|
||||||
|
@ -14,11 +19,23 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "report.h"
|
#include "report.h"
|
||||||
#define EALEN 6
|
#define EALEN 6
|
||||||
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern int getether P((char *, char *));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
||||||
#if defined(ultrix) || (defined(__osf__) && defined(__alpha))
|
#if defined(ultrix) || (defined(__osf__) && defined(__alpha))
|
||||||
/*
|
/*
|
||||||
* This is really easy on Ultrix! Thanks to
|
* This is really easy on Ultrix! Thanks to
|
||||||
|
@ -32,6 +49,7 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <net/if.h> /* struct ifdevea */
|
#include <net/if.h> /* struct ifdevea */
|
||||||
|
|
||||||
|
int
|
||||||
getether(ifname, eap)
|
getether(ifname, eap)
|
||||||
char *ifname, *eap;
|
char *ifname, *eap;
|
||||||
{
|
{
|
||||||
|
@ -110,13 +128,14 @@ getether(ifname, eap)
|
||||||
#include <net/if_dl.h>
|
#include <net/if_dl.h>
|
||||||
#include <net/if_types.h>
|
#include <net/if_types.h>
|
||||||
|
|
||||||
|
int
|
||||||
getether(ifname, eap)
|
getether(ifname, eap)
|
||||||
char *ifname; /* interface name from ifconfig structure */
|
char *ifname; /* interface name from ifconfig structure */
|
||||||
char *eap; /* Ether address (output) */
|
char *eap; /* Ether address (output) */
|
||||||
{
|
{
|
||||||
int fd, rc = -1;
|
int fd, rc = -1;
|
||||||
register int n;
|
register int n;
|
||||||
struct ifreq ibuf[16], ifr;
|
struct ifreq ibuf[16];
|
||||||
struct ifconf ifc;
|
struct ifconf ifc;
|
||||||
register struct ifreq *ifrp, *ifend;
|
register struct ifreq *ifrp, *ifend;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: getif.c,v 1.3 1998/01/09 08:09:08 perry Exp $ */
|
/* $NetBSD: getif.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: getif.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* getif.c : get an interface structure
|
* getif.c : get an interface structure
|
||||||
|
@ -36,7 +41,15 @@
|
||||||
static struct ifreq ifreq[10]; /* Holds interface configuration */
|
static struct ifreq ifreq[10]; /* Holds interface configuration */
|
||||||
static struct ifconf ifconf; /* points to ifreq */
|
static struct ifconf ifconf; /* points to ifreq */
|
||||||
|
|
||||||
static int nmatch();
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static int nmatch P((u_char *, u_char *));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
||||||
/* Return a pointer to the interface struct for the passed address. */
|
/* Return a pointer to the interface struct for the passed address. */
|
||||||
struct ifreq *
|
struct ifreq *
|
||||||
|
@ -86,7 +99,7 @@ getif(s, addrp)
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
ifrq = (struct ifreq *) p;
|
ifrq = (struct ifreq *) p;
|
||||||
sip = (struct sockaddr_in *) &ifrq->ifr_addr;
|
sip = (struct sockaddr_in *) &ifrq->ifr_addr;
|
||||||
m = nmatch(addrp, &(sip->sin_addr));
|
m = nmatch((u_char *)addrp, (u_char *)&(sip->sin_addr));
|
||||||
if (m > maxmatch) {
|
if (m > maxmatch) {
|
||||||
maxmatch = m;
|
maxmatch = m;
|
||||||
ifrmax = ifrq;
|
ifrmax = ifrq;
|
||||||
|
|
|
@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: hash.c,v 1.3 1997/10/18 04:37:01 lukem Exp $";
|
__RCSID("$NetBSD: hash.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: hwaddr.c,v 1.3 1998/01/09 08:09:10 perry Exp $ */
|
/* $NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: hwaddr.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* hwaddr.c - routines that deal with hardware addresses.
|
* hwaddr.c - routines that deal with hardware addresses.
|
||||||
|
@ -22,10 +27,12 @@
|
||||||
#include <net/if_arp.h>
|
#include <net/if_arp.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#ifndef NO_UNISTD
|
#ifndef NO_UNISTD
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#ifndef USE_BFUNCS
|
#ifndef USE_BFUNCS
|
||||||
/* Yes, memcpy is OK here (no overlapped copies). */
|
/* Yes, memcpy is OK here (no overlapped copies). */
|
||||||
|
@ -132,7 +139,6 @@ setarp(s, ia, ha, len)
|
||||||
int status;
|
int status;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
char *a;
|
char *a;
|
||||||
extern char *inet_ntoa();
|
|
||||||
|
|
||||||
a = inet_ntoa(*ia);
|
a = inet_ntoa(*ia);
|
||||||
sprintf(buf, "arp -d %s; arp -s %s %s temp",
|
sprintf(buf, "arp -d %s; arp -s %s %s temp",
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: lookup.c,v 1.3 1998/01/09 08:09:12 perry Exp $ */
|
/* $NetBSD: lookup.c,v 1.4 1998/03/14 04:39:54 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: lookup.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* lookup.c - Lookup IP address, HW address, netmask
|
* lookup.c - Lookup IP address, HW address, netmask
|
||||||
|
@ -12,7 +17,6 @@
|
||||||
|
|
||||||
#ifdef ETC_ETHERS
|
#ifdef ETC_ETHERS
|
||||||
#include <net/if_ether.h>
|
#include <net/if_ether.h>
|
||||||
extern int ether_hostton();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
|
@ -23,8 +23,10 @@
|
||||||
* This file was copied from tcpdump-2.1.1 and modified.
|
* This file was copied from tcpdump-2.1.1 and modified.
|
||||||
* There is an e-mail list for tcpdump: <tcpdump@ee.lbl.gov>
|
* There is an e-mail list for tcpdump: <tcpdump@ee.lbl.gov>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: print-bootp.c,v 1.3 1997/10/18 04:37:03 lukem Exp $";
|
__RCSID("$NetBSD: print-bootp.c,v 1.4 1998/03/14 04:39:54 lukem Exp $");
|
||||||
/* 93/10/10 <gwr@mc.com> New data-driven option print routine. */
|
/* 93/10/10 <gwr@mc.com> New data-driven option print routine. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -41,11 +43,19 @@ static char rcsid[] = "$NetBSD: print-bootp.c,v 1.3 1997/10/18 04:37:03 lukem Ex
|
||||||
#include "bootp.h"
|
#include "bootp.h"
|
||||||
#include "bootptest.h"
|
#include "bootptest.h"
|
||||||
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
/* These decode the vendor data. */
|
/* These decode the vendor data. */
|
||||||
static void rfc1048_print();
|
static void cmu_print P((u_char *, int));
|
||||||
static void cmu_print();
|
static void dump_hex P((u_char *, int));
|
||||||
static void other_print();
|
static void other_print P((u_char *, int));
|
||||||
static void dump_hex();
|
static void rfc1048_print P((u_char *, int));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Print bootp requests
|
* Print bootp requests
|
||||||
|
@ -271,8 +281,6 @@ rfc1048_opts[] = {
|
||||||
};
|
};
|
||||||
#define KNOWN_OPTIONS (sizeof(rfc1048_opts) / sizeof(rfc1048_opts[0]))
|
#define KNOWN_OPTIONS (sizeof(rfc1048_opts) / sizeof(rfc1048_opts[0]))
|
||||||
|
|
||||||
static void print_string();
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rfc1048_print(bp, length)
|
rfc1048_print(bp, length)
|
||||||
register u_char *bp;
|
register u_char *bp;
|
||||||
|
@ -280,7 +288,7 @@ rfc1048_print(bp, length)
|
||||||
{
|
{
|
||||||
u_char tag;
|
u_char tag;
|
||||||
u_char *ep;
|
u_char *ep;
|
||||||
register int len, j;
|
register int len;
|
||||||
u_int32 ul;
|
u_int32 ul;
|
||||||
u_short us;
|
u_short us;
|
||||||
struct in_addr ia;
|
struct in_addr ia;
|
||||||
|
@ -433,7 +441,6 @@ other_print(bp, length)
|
||||||
{
|
{
|
||||||
u_char *ep; /* end pointer */
|
u_char *ep; /* end pointer */
|
||||||
u_char *zp; /* points one past last non-zero byte */
|
u_char *zp; /* points one past last non-zero byte */
|
||||||
register int i, j;
|
|
||||||
|
|
||||||
/* Setup end pointer */
|
/* Setup end pointer */
|
||||||
ep = bp + length;
|
ep = bp + length;
|
||||||
|
|
|
@ -20,8 +20,9 @@ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "$NetBSD: readfile.c,v 1.4 1997/10/18 04:37:05 lukem Exp $";
|
__RCSID("$NetBSD: readfile.c,v 1.5 1998/03/14 04:39:55 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -235,7 +236,6 @@ PRIVATE struct htypename htnamemap[] = {
|
||||||
#define P(args) ()
|
#define P(args) ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern boolean iplookcmp();
|
|
||||||
boolean nmcmp P((hash_datum *, hash_datum *));
|
boolean nmcmp P((hash_datum *, hash_datum *));
|
||||||
|
|
||||||
PRIVATE void
|
PRIVATE void
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: report.c,v 1.2 1998/01/09 08:09:15 perry Exp $ */
|
/* $NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* report() - calls syslog
|
* report() - calls syslog
|
||||||
|
@ -11,6 +16,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#include "report.h"
|
#include "report.h"
|
||||||
|
@ -138,7 +144,6 @@ char *
|
||||||
get_errmsg()
|
get_errmsg()
|
||||||
{
|
{
|
||||||
extern int errno;
|
extern int errno;
|
||||||
extern char *strerror();
|
|
||||||
|
|
||||||
return strerror(errno);
|
return strerror(errno);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: trygetea.c,v 1.2 1998/01/09 08:09:16 perry Exp $ */
|
/* $NetBSD: trygetea.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: trygetea.c,v 1.3 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* trygetea.c - test program for getether.c
|
* trygetea.c - test program for getether.c
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: trygetif.c,v 1.3 1998/01/09 08:09:17 perry Exp $ */
|
/* $NetBSD: trygetif.c,v 1.4 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: trygetif.c,v 1.4 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* trygetif.c - test program for getif.c
|
* trygetif.c - test program for getif.c
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: trylook.c,v 1.2 1998/01/09 08:09:17 perry Exp $ */
|
/* $NetBSD: trylook.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: trylook.c,v 1.3 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* trylook.c - test program for lookup.c
|
* trylook.c - test program for lookup.c
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
/* $NetBSD: tzone.c,v 1.3 1998/01/09 08:09:18 perry Exp $ */
|
/* $NetBSD: tzone.c,v 1.4 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#ifndef lint
|
||||||
|
__RCSID("$NetBSD: tzone.c,v 1.4 1998/03/14 04:39:55 lukem Exp $");
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* tzone.c - get the timezone
|
* tzone.c - get the timezone
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
/* $NetBSD: tzone.h,v 1.2 1998/01/09 08:09:19 perry Exp $ */
|
/* $NetBSD: tzone.h,v 1.3 1998/03/14 04:39:55 lukem Exp $ */
|
||||||
|
|
||||||
/* tzone.h */
|
/* tzone.h */
|
||||||
|
|
||||||
extern int32 secondswest;
|
extern int32 secondswest;
|
||||||
extern void tzone_init();
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
#define P(args) args
|
||||||
|
#else
|
||||||
|
#define P(args) ()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern void tzone_init P((void));
|
||||||
|
|
||||||
|
#undef P
|
||||||
|
|
Loading…
Reference in New Issue