summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/interface.h
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2018-07-06 04:49:21 +0000
committerdlg <dlg@openbsd.org>2018-07-06 04:49:21 +0000
commitdd17d5ca93a73d902f95390a334735148a13e44e (patch)
treeb02f35cc472c0af59dc8294149d5af61fdcd527d /usr.sbin/tcpdump/interface.h
parentSplit trap() into kerntrap() and usertrap(), with all the signal generation (diff)
downloadwireguard-openbsd-dd17d5ca93a73d902f95390a334735148a13e44e.tar.xz
wireguard-openbsd-dd17d5ca93a73d902f95390a334735148a13e44e.zip
move the ip checksumming code into in_cksum.c
this is part of a bigger change that refactors udp handling, but works on hosts of both endians. discussed at length with proctor@ ok sthen@
Diffstat (limited to 'usr.sbin/tcpdump/interface.h')
-rw-r--r--usr.sbin/tcpdump/interface.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/interface.h b/usr.sbin/tcpdump/interface.h
index ae1801b6f16..cce81a08f2a 100644
--- a/usr.sbin/tcpdump/interface.h
+++ b/usr.sbin/tcpdump/interface.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.h,v 1.72 2018/02/10 10:00:32 dlg Exp $ */
+/* $OpenBSD: interface.h,v 1.73 2018/07/06 04:49:21 dlg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -20,7 +20,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Id: interface.h,v 1.72 2018/02/10 10:00:32 dlg Exp $ (LBL)
+ * @(#) $Id: interface.h,v 1.73 2018/07/06 04:49:21 dlg Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
@@ -295,5 +295,7 @@ extern void ospf6_print(const u_char *, u_int);
extern void dhcp6_print(const u_char *, u_int, u_short, u_short);
#endif /*INET6*/
-extern u_short in_cksum(const u_short *addr, int len, int csum);
+extern uint32_t in_cksum_add(const void *, size_t, uint32_t);
+extern uint16_t in_cksum_fini(uint32_t);
+extern uint16_t in_cksum(const void *, size_t, uint32_t);
extern u_int16_t in_cksum_shouldbe(u_int16_t, u_int16_t);