diff options
author | 2018-07-06 04:49:21 +0000 | |
---|---|---|
committer | 2018-07-06 04:49:21 +0000 | |
commit | dd17d5ca93a73d902f95390a334735148a13e44e (patch) | |
tree | b02f35cc472c0af59dc8294149d5af61fdcd527d /usr.sbin/tcpdump/interface.h | |
parent | Split trap() into kerntrap() and usertrap(), with all the signal generation (diff) | |
download | wireguard-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.h | 8 |
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); |