summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/dhcpd/osdep.h117
1 files changed, 5 insertions, 112 deletions
diff --git a/usr.sbin/dhcpd/osdep.h b/usr.sbin/dhcpd/osdep.h
index ee39a4a651c..a2bf54538ff 100644
--- a/usr.sbin/dhcpd/osdep.h
+++ b/usr.sbin/dhcpd/osdep.h
@@ -35,117 +35,10 @@
* This software was written for the Internet Software Consortium by Ted Lemon
* under a contract with Vixie Laboratories.
*/
-
-/* Porting::
-
- If you add a new network API, you must add a check for it below: */
-
-#if !defined (USE_SOCKETS) && \
- !defined (USE_SOCKET_SEND) && \
- !defined (USE_SOCKET_RECEIVE) && \
- !defined (USE_RAW_SOCKETS) && \
- !defined (USE_RAW_SEND) && \
- !defined (USE_SOCKET_RECEIVE) && \
- !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) && \
- !defined (USR_DLPI_SEND) && \
- !defined (USE_DLPI_RECEIVE)
-# define USE_DEFAULT_NETWORK
-#endif
-
-/* Porting::
-
- If you add a new network API, and have it set up so that it can be
- used for sending or receiving, but doesn't have to be used for both,
- then set up an ifdef like the ones below: */
-
-#ifdef USE_SOCKETS
-# define USE_SOCKET_SEND
-# define USE_SOCKET_RECEIVE
-#endif
-
-#ifdef USE_RAW_SOCKETS
-# define USE_RAW_SEND
-# define USE_SOCKET_RECEIVE
-#endif
-
-#ifdef USE_BPF
-# define USE_BPF_SEND
-# 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
-#endif
-
-#ifdef USE_DLPI
-# define USE_DLPI_SEND
-# define USE_DLPI_RECEIVE
-#endif
-
-#ifdef USE_UPF
-# define USE_UPF_SEND
-# define USE_UPF_RECEIVE
-#endif
-
-/* Porting::
-
- If you add support for sending packets directly out an interface,
- and your support does not do ARP or routing, you must use a fallback
- mechanism to deal with packets that need to be sent to routers.
- Currently, all low-level packet interfaces use BSD sockets as a
- fallback. */
-
-#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || \
- defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) || defined (USE_LPF_SEND)
-# define USE_SOCKET_FALLBACK
-# define USE_FALLBACK
-#endif
-
-/* Porting::
-
- If you add support for sending packets directly out an interface
- and need to be able to assemble packets, add the USE_XXX_SEND
- definition for your interface to the list tested below. */
-
-#if defined (USE_RAW_SEND) || defined (USE_BPF_SEND) || \
- defined (USE_NIT_SEND) || defined (USE_UPF_SEND) || \
- defined (USE_DLPI_SEND) || defined (USE_LPF_SEND)
-# define PACKET_ASSEMBLY
-#endif
-
-/* Porting::
-
- If you add support for receiving packets directly from an interface
- and need to be able to decode raw packets, add the USE_XXX_RECEIVE
- definition for your interface to the list tested below. */
-
-#if defined (USE_RAW_RECEIVE) || defined (USE_BPF_SEND) || \
- defined (USE_NIT_RECEIVE) || defined (USE_UPF_RECEIVE) || \
- defined (USE_DLPI_RECEIVE) || \
- defined (USE_LPF_SEND) || \
- (defined (USE_SOCKET_SEND) && defined (SO_BINDTODEVICE))
-# define PACKET_DECODING
-#endif
-
-/* If we don't have a DLPI packet filter, we have to filter in userland.
- Probably not worth doing, actually. */
-#if defined (USE_DLPI_RECEIVE) && !defined (USE_DLPI_PFMOD)
-# define USERLAND_FILTER
-#endif
+#define USE_BPF_SEND
+#define USE_BPF_RECEIVE
+#define PACKET_ASSEMBLY
+#define PACKET_DECODING
/* jmp_buf is assumed to be a struct unless otherwise defined in the
system header. */
@@ -163,7 +56,7 @@
#endif
#ifndef BPF_FORMAT
-# define BPF_FORMAT "/dev/bpf%d"
+#define BPF_FORMAT "/dev/bpf%d"
#endif
#if defined (IFF_POINTOPOINT) && !defined (HAVE_IFF_POINTOPOINT)