summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-26 09:14:51 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-26 09:14:51 +0000
commitf0b182f9d9696e667725d437a0b5229ff27bbcda (patch)
tree9906833c64f6ccb692e2ee62b410b81ddbd5641f /usr.sbin
parenta12e9c046bba20015516fbd9444e1a63f4e25ca9 (diff)
convert DLT_LOOP header to network-order u_int32_t
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/tun.h8
-rw-r--r--usr.sbin/tcpdump/print-null.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/ppp/tun.h b/usr.sbin/ppp/tun.h
index 5458f1f178e..6a9bcab1ceb 100644
--- a/usr.sbin/ppp/tun.h
+++ b/usr.sbin/ppp/tun.h
@@ -23,19 +23,19 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: tun.h,v 1.2 1997/12/21 14:27:20 brian Exp $
+ * $Id: tun.h,v 1.3 1998/06/26 09:14:46 deraadt Exp $
*/
struct tun_data {
#ifdef __OpenBSD__
- struct tunnel_header head;
+ u_int32_t head;
#endif
u_char data[MAX_MRU];
};
#ifdef __OpenBSD__
-#define tun_fill_header(f,proto) do { (f).head.tun_af = (proto); } while (0)
-#define tun_check_header(f,proto) ((f).head.tun_af == (proto))
+#define tun_fill_header(f,proto) do { (f).head = htonl(proto); } while (0)
+#define tun_check_header(f,proto) ((f).head == htonl(proto))
#else
#define tun_fill_header(f,proto) do { } while (0)
#define tun_check_header(f,proto) (1)
diff --git a/usr.sbin/tcpdump/print-null.c b/usr.sbin/tcpdump/print-null.c
index 3be3383b1d3..62340b73926 100644
--- a/usr.sbin/tcpdump/print-null.c
+++ b/usr.sbin/tcpdump/print-null.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-null.c,v 1.7 1997/07/25 20:12:26 mickey Exp $ (LBL)";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-null.c,v 1.8 1998/06/26 09:14:50 deraadt Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -109,7 +109,7 @@ null_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
if (eflag)
null_print(p, length, family);
- switch (family) {
+ switch (ntohl(family)) {
case AF_INET:
ip_print(pkt, length);
break;