xref: /freebsd/sbin/ping/utils.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1ff77ab83SAlan Somers /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3ff77ab83SAlan Somers  *
4ff77ab83SAlan Somers  * Copyright (C) 2019 Jan Sucan <jansucan@FreeBSD.org>
5ff77ab83SAlan Somers  * All rights reserved.
6ff77ab83SAlan Somers  *
7ff77ab83SAlan Somers  * Redistribution and use in source and binary forms, with or without
8ff77ab83SAlan Somers  * modification, are permitted provided that the following conditions
9ff77ab83SAlan Somers  * are met:
10ff77ab83SAlan Somers  * 1. Redistributions of source code must retain the above copyright
11ff77ab83SAlan Somers  *    notice, this list of conditions and the following disclaimer.
12ff77ab83SAlan Somers  * 2. Redistributions in binary form must reproduce the above copyright
13ff77ab83SAlan Somers  *    notice, this list of conditions and the following disclaimer in the
14ff77ab83SAlan Somers  *    documentation and/or other materials provided with the distribution.
15ff77ab83SAlan Somers  *
16ff77ab83SAlan Somers  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17ff77ab83SAlan Somers  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18ff77ab83SAlan Somers  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19ff77ab83SAlan Somers  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20ff77ab83SAlan Somers  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21ff77ab83SAlan Somers  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22ff77ab83SAlan Somers  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23ff77ab83SAlan Somers  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24ff77ab83SAlan Somers  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25ff77ab83SAlan Somers  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26ff77ab83SAlan Somers  * SUCH DAMAGE.
27ff77ab83SAlan Somers  */
28ff77ab83SAlan Somers 
29ec7ea489SAlan Somers #ifndef UTILS_H
30ec7ea489SAlan Somers #define UTILS_H 1
31ff77ab83SAlan Somers 
32ff77ab83SAlan Somers #include <sys/types.h>
33ff77ab83SAlan Somers 
34ff77ab83SAlan Somers u_short in_cksum(u_char *, int);
35ff77ab83SAlan Somers 
36ff77ab83SAlan Somers #endif
37