1*59d65d31SAndy Fiddaman /*- 2*59d65d31SAndy Fiddaman * SPDX-License-Identifier: BSD-3-Clause 3*59d65d31SAndy Fiddaman * 4*59d65d31SAndy Fiddaman * Copyright (c) 1996 Peter Wemm <peter@FreeBSD.org>. 5*59d65d31SAndy Fiddaman * All rights reserved. 6*59d65d31SAndy Fiddaman * Copyright (c) 2002 Networks Associates Technology, Inc. 7*59d65d31SAndy Fiddaman * All rights reserved. 8*59d65d31SAndy Fiddaman * 9*59d65d31SAndy Fiddaman * Portions of this software were developed for the FreeBSD Project by 10*59d65d31SAndy Fiddaman * ThinkSec AS and NAI Labs, the Security Research Division of Network 11*59d65d31SAndy Fiddaman * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 12*59d65d31SAndy Fiddaman * ("CBOSS"), as part of the DARPA CHATS research program. 13*59d65d31SAndy Fiddaman * 14*59d65d31SAndy Fiddaman * Redistribution and use in source and binary forms, with or without 15*59d65d31SAndy Fiddaman * modification, is permitted provided that the following conditions 16*59d65d31SAndy Fiddaman * are met: 17*59d65d31SAndy Fiddaman * 1. Redistributions of source code must retain the above copyright 18*59d65d31SAndy Fiddaman * notice, this list of conditions and the following disclaimer. 19*59d65d31SAndy Fiddaman * 2. Redistributions in binary form must reproduce the above copyright 20*59d65d31SAndy Fiddaman * notice, this list of conditions and the following disclaimer in the 21*59d65d31SAndy Fiddaman * documentation and/or other materials provided with the distribution. 22*59d65d31SAndy Fiddaman * 3. The name of the author may not be used to endorse or promote 23*59d65d31SAndy Fiddaman * products derived from this software without specific prior written 24*59d65d31SAndy Fiddaman * permission. 25*59d65d31SAndy Fiddaman * 26*59d65d31SAndy Fiddaman * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 27*59d65d31SAndy Fiddaman * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28*59d65d31SAndy Fiddaman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29*59d65d31SAndy Fiddaman * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 30*59d65d31SAndy Fiddaman * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31*59d65d31SAndy Fiddaman * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32*59d65d31SAndy Fiddaman * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33*59d65d31SAndy Fiddaman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34*59d65d31SAndy Fiddaman * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35*59d65d31SAndy Fiddaman * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36*59d65d31SAndy Fiddaman * SUCH DAMAGE. 37*59d65d31SAndy Fiddaman */ 38*59d65d31SAndy Fiddaman 39*59d65d31SAndy Fiddaman #ifndef _HEXDUMP_H_ 40*59d65d31SAndy Fiddaman #define _HEXDUMP_H_ 41*59d65d31SAndy Fiddaman 42*59d65d31SAndy Fiddaman #define HD_COLUMN_MASK 0xff 43*59d65d31SAndy Fiddaman #define HD_DELIM_MASK 0xff00 44*59d65d31SAndy Fiddaman #define HD_OMIT_COUNT (1 << 16) 45*59d65d31SAndy Fiddaman #define HD_OMIT_HEX (1 << 17) 46*59d65d31SAndy Fiddaman #define HD_OMIT_CHARS (1 << 18) 47*59d65d31SAndy Fiddaman 48*59d65d31SAndy Fiddaman void hexdump(const void *, int, const char *, int); 49*59d65d31SAndy Fiddaman 50*59d65d31SAndy Fiddaman #endif /* !_HEXDUMP_H_ */ 51