summaryrefslogtreecommitdiffstats
path: root/lib/libutil/libutil.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-07-01 22:30:57 +0000
committerjhb <jhb@FreeBSD.org>2008-07-01 22:30:57 +0000
commitb3f9efd84f8df8197d4f03f332661619566d3c1c (patch)
treef24771b13b316a88d1eb8552fd86fc7cfd0f39a9 /lib/libutil/libutil.h
parent0739111e2a4030f5345e082e7d433fe861ac07e0 (diff)
downloadFreeBSD-src-b3f9efd84f8df8197d4f03f332661619566d3c1c.zip
FreeBSD-src-b3f9efd84f8df8197d4f03f332661619566d3c1c.tar.gz
Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing
this by hand in userland utilities. MFC after: 1 month
Diffstat (limited to 'lib/libutil/libutil.h')
-rw-r--r--lib/libutil/libutil.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h
index 8fafe9b..186ee2e 100644
--- a/lib/libutil/libutil.h
+++ b/lib/libutil/libutil.h
@@ -71,6 +71,7 @@ void clean_environment(const char * const *_white,
int extattr_namespace_to_string(int _attrnamespace, char **_string);
int extattr_string_to_namespace(const char *_string, int *_attrnamespace);
int flopen(const char *_path, int _flags, ...);
+void hexdump(const void *ptr, int length, const char *hdr, int flags);
void login(struct utmp *_ut);
int login_tty(int _fd);
int logout(const char *_line);
@@ -171,4 +172,11 @@ __END_DECLS
#define HN_GETSCALE 0x10
#define HN_AUTOSCALE 0x20
+/* hexdump(3) */
+#define HD_COLUMN_MASK 0xff
+#define HD_DELIM_MASK 0xff00
+#define HD_OMIT_COUNT (1 << 16)
+#define HD_OMIT_HEX (1 << 17)
+#define HD_OMIT_CHARS (1 << 18)
+
#endif /* !_LIBUTIL_H_ */
OpenPOWER on IntegriCloud