summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1996-05-20 00:20:37 +0000
committerTed Lemon <source@isc.org>1996-05-20 00:20:37 +0000
commitaf0ef3636bf16edd07925a14d00822b4b30420fc (patch)
tree24cb29be6fa47c23805a6b55543edaf9fd09328e /includes
parent4a97f5b8fbcd0a2befad89c34e98a6f7cc51baec (diff)
downloadisc-dhcp-af0ef3636bf16edd07925a14d00822b4b30420fc.tar.gz
Fix copyright; add porting comments; add SCO support; lose etherhdr compatibility since we're distributing headers now; add PACKET_ASSEMBLY and PACKET_DECODING macros
Diffstat (limited to 'includes')
-rw-r--r--includes/osdep.h66
1 files changed, 47 insertions, 19 deletions
diff --git a/includes/osdep.h b/includes/osdep.h
index 30eea1ed..437ed945 100644
--- a/includes/osdep.h
+++ b/includes/osdep.h
@@ -3,7 +3,7 @@
Operating system dependencies... */
/*
- * Copyright (c) 1995 RadioMail Corporation. All rights reserved.
+ * Copyright (c) 1996 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
@@ -14,15 +14,15 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of RadioMail Corporation nor the names of its
+ * 3. Neither the name of The Internet Software Consortium nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY RADIOMAIL CORPORATION AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
+ * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- * RADIOMAIL CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -31,13 +31,16 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software was written for RadioMail Corporation by Ted Lemon
- * under a contract with Vixie Enterprises, and is based on an earlier
- * design by Paul Vixie.
+ * This software was written for the Internet Software Consortium by Ted Lemon
+ * under a contract with Vixie Laboratories.
*/
#include "site.h"
+/* 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) && \
@@ -54,6 +57,10 @@
#endif
+/* Porting::
+
+ If you add a new system configuration file, include it here: */
+
#if defined (sun)
# if defined (__svr4__)
# include "cf/sunos5-5.h"
@@ -86,6 +93,16 @@
# include "cf/linux.h"
#endif
+#ifdef SCO
+# include "cf/sco.h"
+#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
@@ -106,6 +123,27 @@
# define USE_NIT_RECEIVE
#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)
+# 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_RECEIVE) \
+ || defined (USE_NIT_RECEIVE)
+# define PACKET_DECODING
+#endif
+
/* jmp_buf is assumed to be a struct unless otherwise defined in the
system header. */
#ifndef jbp_decl
@@ -121,16 +159,6 @@
# define jrefproto jmp_buf *
#endif
-/* On some systems, the struct ether_header source and destinations buffers
- are arrays; on others, they are structs. We assume they're arrays
- unless otherwise defined in the system header. */
-#ifndef ETHER_SRC
-# define ETHER_SRC(x) ((x) -> ether_shost)
-#endif
-#ifndef ETHER_DEST
-# define ETHER_DEST(x) ((x) -> ether_dhost)
-#endif
-
#ifndef BPF_FORMAT
# define BPF_FORMAT "/dev/bpf%d"
#endif