]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man9/hexdump.9
Remove $FreeBSD$: two-line nroff pattern
[FreeBSD/FreeBSD.git] / share / man / man9 / hexdump.9
1 .\" -*- nroff -*-
2 .\"
3 .\" Copyright (c) 2003 Scott Long
4 .\"
5 .\" All rights reserved.
6 .\"
7 .\" This program is free software.
8 .\"
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\"    notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\"    notice, this list of conditions and the following disclaimer in the
16 .\"    documentation and/or other materials provided with the distribution.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
19 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 .\"
29 .Dd December 7, 2003
30 .Dt HEXDUMP 9
31 .Os
32 .Sh NAME
33 .Nm hexdump
34 .Nd "dump a block of bytes to the console in hexadecimal form"
35 .Sh SYNOPSIS
36 .In sys/systm.h
37 .Ft void
38 .Fn hexdump "void *ptr" "int length" "const char *hdr" "int flags"
39 .Sh DESCRIPTION
40 The
41 .Fn hexdump
42 function prints an array of bytes to the console in hexadecimal form, along with
43 the
44 .Tn ASCII
45 representation of the bytes, if possible.
46 By default, each line of
47 output will start with an offset count, followed by 16 hexadecimal values,
48 followed by 16
49 .Tn ASCII
50 characters.
51 .Bl -tag -width indent
52 .It Fa ptr
53 Pointer to the array of bytes to print.
54 It does not need to be
55 .Dv NUL Ns
56 -terminated.
57 .It Fa length
58 Number of bytes to print.
59 .It Fa hdr
60 Pointer to a
61 .Dv NUL Ns
62 -terminated character string that will be prepended to each
63 line of output.
64 A value of
65 .Dv NULL
66 implies that no header will be printed.
67 .It Fa flags
68 Flags for controlling the formatting of the output.
69 .Bl -tag -width ".Dv HD_OMIT_COUNT"
70 .It Bits 0-7
71 Integer value of the number of bytes to display on each line.
72 A value of 0 implies that the default value of 16 will be used.
73 .It Bits 8-15
74 Character
75 .Tn ASCII
76 value to use as the separator for the hexadecimal output.
77 A value of 0 implies that the default value of 32
78 .Tn ( ASCII
79 space) will be used.
80 .It Dv HD_OMIT_COUNT
81 Do not print the offset column at the beginning of each line.
82 .It Dv HD_OMIT_HEX
83 Do not print the hexadecimal values on each line.
84 .It Dv HD_OMIT_CHARS
85 Do not print the character values on each line.
86 .El
87 .El
88 .Sh SEE ALSO
89 .Xr ascii 7
90 .Sh AUTHORS
91 This manual page was written by
92 .An Scott Long .