Change hammer_str_to_tid() and its callers to restrict the format of
[dragonfly.git] / sbin / dhclient / privsep.h
blob735847dbedea5242f0797d3284ab2089d0774662
1 /* $OpenBSD: privsep.h,v 1.5 2007/02/13 21:54:22 stevesk Exp $ */
2 /* $DragonFly: src/sbin/dhclient/privsep.h,v 1.1 2008/08/30 16:07:58 hasso Exp $ */
4 /*
5 * Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
16 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17 * OF OR IN CONNECTION WITH THE USE, ABUSE OR PERFORMANCE OF THIS SOFTWARE.
20 #include <sys/types.h>
22 struct buf {
23 u_char *buf;
24 size_t size;
25 size_t wpos;
26 size_t rpos;
29 enum imsg_code {
30 IMSG_NONE,
31 IMSG_SCRIPT_INIT,
32 IMSG_SCRIPT_WRITE_PARAMS,
33 IMSG_SCRIPT_GO,
34 IMSG_SCRIPT_GO_RET
37 struct imsg_hdr {
38 enum imsg_code code;
39 size_t len;
42 struct buf *buf_open(size_t);
43 void buf_add(struct buf *, void *, size_t);
44 void buf_close(int, struct buf *);
45 void buf_read(int, void *, size_t);
46 void dispatch_imsg(int);