aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/isc-dhcp/includes
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1999-02-11 12:40:22 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1999-02-11 12:40:22 +0000
commitb02401bdd6455578fb36dc5eed002b83d88e4954 (patch)
tree1ab69d6be8758743eebe6650b959ea559178112b /contrib/isc-dhcp/includes
parentcd2d014aab8332077aba9b0f6e0d06678fbe1aff (diff)
downloadsrc-b02401bdd6455578fb36dc5eed002b83d88e4954.tar.gz
src-b02401bdd6455578fb36dc5eed002b83d88e4954.zip
Virgin import of ISC-DHCP v2.0b1pl11vendor/isc-dhcp/2.0b1-pl.11
Notes
Notes: svn path=/vendor/isc-dhcp/dist/; revision=43892 svn path=/vendor/isc-dhcp/2.0b1-pl.11/; revision=43894; tag=vendor/isc-dhcp/2.0b1-pl.11
Diffstat (limited to 'contrib/isc-dhcp/includes')
-rw-r--r--contrib/isc-dhcp/includes/cf/freebsd.h8
-rw-r--r--contrib/isc-dhcp/includes/dhcp.h1
-rw-r--r--contrib/isc-dhcp/includes/dhcpd.h87
-rw-r--r--contrib/isc-dhcp/includes/dhctoken.h8
-rw-r--r--contrib/isc-dhcp/includes/osdep.h14
5 files changed, 94 insertions, 24 deletions
diff --git a/contrib/isc-dhcp/includes/cf/freebsd.h b/contrib/isc-dhcp/includes/cf/freebsd.h
index 965d33236f23..032d52c2b002 100644
--- a/contrib/isc-dhcp/includes/cf/freebsd.h
+++ b/contrib/isc-dhcp/includes/cf/freebsd.h
@@ -3,7 +3,8 @@
System dependencies for FreeBSD... */
/*
- * Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
+ * Copyright (c) 1996, 1998 The Internet Software Consortium.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -53,7 +54,10 @@ extern int h_errno;
#include <net/if.h>
#include <net/if_dl.h>
-#define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
+#include <net/if_arp.h>
+#if !defined (INADDR_LOOPBACK)
+# define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
+#endif
/* Varargs stuff... */
#include <stdarg.h>
diff --git a/contrib/isc-dhcp/includes/dhcp.h b/contrib/isc-dhcp/includes/dhcp.h
index 181277579527..b96ec3d096df 100644
--- a/contrib/isc-dhcp/includes/dhcp.h
+++ b/contrib/isc-dhcp/includes/dhcp.h
@@ -84,6 +84,7 @@ struct dhcp_packet {
/* Possible values for hardware type (htype) field... */
#define HTYPE_ETHER 1 /* Ethernet 10Mbps */
#define HTYPE_IEEE802 6 /* IEEE 802.2 Token Ring... */
+#define HTYPE_FDDI 8 /* FDDI... */
/* Magic cookie validating dhcp options field (and bootp vendor
extensions field). */
diff --git a/contrib/isc-dhcp/includes/dhcpd.h b/contrib/isc-dhcp/includes/dhcpd.h
index cf82132bc74b..a1059e94eb59 100644
--- a/contrib/isc-dhcp/includes/dhcpd.h
+++ b/contrib/isc-dhcp/includes/dhcpd.h
@@ -3,8 +3,8 @@
Definitions for dhcpd... */
/*
- * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 1995, 1996, 1997, 1998, 1999
+ * The Internet Software Consortium. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -155,7 +155,10 @@ struct lease_state {
struct tree_cache *options [256];
u_int32_t expiry, renewal, rebind;
- char *filename, *server_name;
+ char filename [DHCP_FILE_LEN];
+ char *server_name;
+
+ struct iaddr from;
u_int32_t xid;
u_int16_t secs;
@@ -204,6 +207,8 @@ struct group {
int one_lease_per_client;
int get_lease_hostnames;
int use_host_decl_names;
+ int use_lease_addr_for_default_route;
+ int authoritative;
struct tree_cache *options [256];
};
@@ -479,10 +484,6 @@ extern u_int16_t remote_port;
extern int log_priority;
extern int log_perror;
-#ifdef USE_FALLBACK
-extern struct interface_info fallback_interface;
-#endif
-
extern char *path_dhcpd_conf;
extern char *path_dhcpd_db;
extern char *path_dhcpd_pid;
@@ -577,6 +578,7 @@ extern struct subnet *find_grouped_subnet PROTO ((struct shared_network *,
struct iaddr));
extern struct subnet *find_subnet PROTO ((struct iaddr));
void enter_shared_network PROTO ((struct shared_network *));
+int subnet_inner_than PROTO ((struct subnet *, struct subnet *, int));
void enter_subnet PROTO ((struct subnet *));
void enter_lease PROTO ((struct lease *));
int supersede_lease PROTO ((struct lease *, struct lease *, int));
@@ -650,7 +652,6 @@ ssize_t send_fallback PROTO ((struct interface_info *,
struct packet *, struct dhcp_packet *, size_t,
struct in_addr,
struct sockaddr_in *, struct hardware *));
-void fallback_discard PROTO ((struct protocol *));
#endif
#ifdef USE_SOCKET_SEND
@@ -661,6 +662,9 @@ ssize_t send_packet PROTO ((struct interface_info *,
struct in_addr,
struct sockaddr_in *, struct hardware *));
#endif
+#if defined (USE_SOCKET_FALLBACK)
+void fallback_discard PROTO ((struct protocol *));
+#endif
#ifdef USE_SOCKET_RECEIVE
void if_reinitialize_receive PROTO ((struct interface_info *));
void if_register_receive PROTO ((struct interface_info *));
@@ -669,7 +673,8 @@ ssize_t receive_packet PROTO ((struct interface_info *,
struct sockaddr_in *, struct hardware *));
#endif
#if defined (USE_SOCKET_SEND) && !defined (USE_SOCKET_FALLBACK)
-void if_enable PROTO ((struct interface_info *));
+int can_unicast_without_arp PROTO ((void));
+void maybe_setup_fallback PROTO ((void));
#endif
/* bpf.c */
@@ -692,7 +697,32 @@ ssize_t receive_packet PROTO ((struct interface_info *,
struct sockaddr_in *, struct hardware *));
#endif
#if defined (USE_BPF_SEND)
-void if_enable PROTO ((struct interface_info *));
+int can_unicast_without_arp PROTO ((void));
+void maybe_setup_fallback PROTO ((void));
+#endif
+
+/* lpf.c */
+#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE)
+int if_register_lpf PROTO ( (struct interface_info *));
+#endif
+#ifdef USE_LPF_SEND
+void if_reinitialize_send PROTO ((struct interface_info *));
+void if_register_send PROTO ((struct interface_info *));
+ssize_t send_packet PROTO ((struct interface_info *,
+ struct packet *, struct dhcp_packet *, size_t,
+ struct in_addr,
+ struct sockaddr_in *, struct hardware *));
+#endif
+#ifdef USE_LPF_RECEIVE
+void if_reinitialize_receive PROTO ((struct interface_info *));
+void if_register_receive PROTO ((struct interface_info *));
+ssize_t receive_packet PROTO ((struct interface_info *,
+ unsigned char *, size_t,
+ struct sockaddr_in *, struct hardware *));
+#endif
+#if defined (USE_LPF_SEND)
+int can_unicast_without_arp PROTO ((void));
+void maybe_setup_fallback PROTO ((void));
#endif
/* nit.c */
@@ -715,8 +745,29 @@ ssize_t receive_packet PROTO ((struct interface_info *,
unsigned char *, size_t,
struct sockaddr_in *, struct hardware *));
#endif
-#if defined (USE_BPF_SEND)
-void if_enable PROTO ((struct interface_info *));
+#if defined (USE_NIT_SEND)
+int can_unicast_without_arp PROTO ((void));
+void maybe_setup_fallback PROTO ((void));
+#endif
+
+#ifdef USE_DLPI_SEND
+void if_reinitialize_send PROTO ((struct interface_info *));
+void if_register_send PROTO ((struct interface_info *));
+ssize_t send_packet PROTO ((struct interface_info *,
+ struct packet *, struct dhcp_packet *, size_t,
+ struct in_addr,
+ struct sockaddr_in *, struct hardware *));
+#endif
+#ifdef USE_DLPI_RECEIVE
+void if_reinitialize_receive PROTO ((struct interface_info *));
+void if_register_receive PROTO ((struct interface_info *));
+ssize_t receive_packet PROTO ((struct interface_info *,
+ unsigned char *, size_t,
+ struct sockaddr_in *, struct hardware *));
+#endif
+#if defined (USE_DLPI_SEND)
+int can_unicast_without_arp PROTO ((void));
+void maybe_setup_fallback PROTO ((void));
#endif
/* raw.c */
@@ -727,10 +778,13 @@ ssize_t send_packet PROTO ((struct interface_info *,
struct packet *, struct dhcp_packet *, size_t,
struct in_addr,
struct sockaddr_in *, struct hardware *));
+int can_unicast_without_arp PROTO ((void));
+void maybe_setup_fallback PROTO ((void));
#endif
/* dispatch.c */
-extern struct interface_info *interfaces, *dummy_interfaces;
+extern struct interface_info *interfaces,
+ *dummy_interfaces, *fallback_interface;
extern struct protocol *protocols;
extern int quiet_interface_discovery;
extern void (*bootp_packet_handler) PROTO ((struct interface_info *,
@@ -739,13 +793,12 @@ extern void (*bootp_packet_handler) PROTO ((struct interface_info *,
struct iaddr, struct hardware *));
extern struct timeout *timeouts;
void discover_interfaces PROTO ((int));
+struct interface_info *setup_fallback PROTO ((void));
void reinitialize_interfaces PROTO ((void));
void dispatch PROTO ((void));
int locate_network PROTO ((struct packet *));
+void got_one PROTO ((struct protocol *));
void add_timeout PROTO ((TIME, void (*) PROTO ((void *)), void *));
-#if 0
-void add_fast_timeout PROTO ((UTIME, void (*) PROTO ((void *)), void *));
-#endif
void cancel_timeout PROTO ((void (*) PROTO ((void *)), void *));
void add_protocol PROTO ((char *, int,
void (*) PROTO ((struct protocol *)), void *));
@@ -820,7 +873,7 @@ void make_release PROTO ((struct interface_info *, struct client_lease *));
void free_client_lease PROTO ((struct client_lease *));
void rewrite_client_leases PROTO ((void));
void write_client_lease PROTO ((struct interface_info *,
- struct client_lease *));
+ struct client_lease *, int));
char *dhcp_option_ev_name PROTO ((struct option *));
void script_init PROTO ((struct interface_info *, char *,
diff --git a/contrib/isc-dhcp/includes/dhctoken.h b/contrib/isc-dhcp/includes/dhctoken.h
index 88acd1622983..73f6879e3ddf 100644
--- a/contrib/isc-dhcp/includes/dhctoken.h
+++ b/contrib/isc-dhcp/includes/dhctoken.h
@@ -3,8 +3,8 @@
Tokens for config file lexer and parser. */
/*
- * Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 1995, 1996, 1997, 1998, 1999
+ * The Internet Software Consortium. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -124,6 +124,10 @@
#define HOSTNAME 328
#define CLIENT_HOSTNAME 329
#define REJECT 330
+#define FDDI 331
+#define USE_LEASE_ADDR_FOR_DEFAULT_ROUTE 332
+#define AUTHORITATIVE 333
+#define TOKEN_NOT 334
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
(x) != STRING && \
diff --git a/contrib/isc-dhcp/includes/osdep.h b/contrib/isc-dhcp/includes/osdep.h
index 4ea4cd863d75..ca40e8a75bba 100644
--- a/contrib/isc-dhcp/includes/osdep.h
+++ b/contrib/isc-dhcp/includes/osdep.h
@@ -51,6 +51,9 @@
!defined (USE_BPF) && \
!defined (USE_BPF_SEND) && \
!defined (USE_BPF_RECEIVE) && \
+ !defined (USE_LPF) && \
+ !defined (USE_LPF_SEND) && \
+ !defined (USE_LPF_RECEIVE) && \
!defined (USE_NIT) && \
!defined (USE_NIT_SEND) && \
!defined (USE_NIT_RECEIVE) && \
@@ -141,6 +144,11 @@
# define USE_BPF_RECEIVE
#endif
+#ifdef USE_LPF
+# define USE_LPF_SEND
+# define USE_LPF_RECEIVE
+#endif
+
#ifdef USE_NIT
# define USE_NIT_SEND
# define USE_NIT_RECEIVE
@@ -165,7 +173,7 @@
fallback. */
#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || \
- defined (USE_DLPI_SEND) || defined (USE_UPF_SEND)
+ defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) || defined (USE_LPF_SEND)
# define USE_SOCKET_FALLBACK
# define USE_FALLBACK
#endif
@@ -178,7 +186,7 @@
#if defined (USE_RAW_SEND) || defined (USE_BPF_SEND) || \
defined (USE_NIT_SEND) || defined (USE_UPF_SEND) || \
- defined (USE_DLPI_SEND)
+ defined (USE_DLPI_SEND) || defined (USE_LPF_SEND)
# define PACKET_ASSEMBLY
#endif
@@ -190,7 +198,7 @@
#if defined (USE_RAW_RECEIVE) || defined (USE_BPF_SEND) || \
defined (USE_NIT_RECEIVE) || defined (USE_UPF_RECEIVE) || \
- defined (USE_DLPI_RECEIVE)
+ defined (USE_DLPI_RECEIVE) || defined (USE_LPF_RECEIVE)
# define PACKET_DECODING
#endif