source: rtems-libbsd/freebsd/sbin/dhclient/privsep.h @ e599318

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since e599318 was e599318, checked in by Sebastian Huber <sebastian.huber@…>, on 10/09/13 at 20:52:54

Update files to match FreeBSD layout

Add compatibility with Newlib header files. Some FreeBSD header files
are mapped by the translation script:

o rtems/bsd/sys/_types.h
o rtems/bsd/sys/errno.h
o rtems/bsd/sys/lock.h
o rtems/bsd/sys/param.h
o rtems/bsd/sys/resource.h
o rtems/bsd/sys/time.h
o rtems/bsd/sys/timespec.h
o rtems/bsd/sys/types.h
o rtems/bsd/sys/unistd.h

It is now possible to include <sys/socket.h> directly for example.

Generate one Makefile which builds everything including tests.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*      $OpenBSD: privsep.h,v 1.2 2004/05/04 18:51:18 henning Exp $ */
2
3/*
4 * Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
15 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16 * OF OR IN CONNECTION WITH THE USE, ABUSE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#include <rtems/bsd/sys/types.h>
20
21#include <poll.h>
22#include <pwd.h>
23
24struct buf {
25        u_char                  *buf;
26        size_t                   size;
27        size_t                   wpos;
28        size_t                   rpos;
29};
30
31enum imsg_code {
32        IMSG_NONE,
33        IMSG_SCRIPT_INIT,
34        IMSG_SCRIPT_WRITE_PARAMS,
35        IMSG_SCRIPT_GO,
36        IMSG_SCRIPT_GO_RET
37};
38
39struct imsg_hdr {
40        enum imsg_code  code;
41        size_t          len;
42};
43
44struct buf      *buf_open(size_t);
45int              buf_add(struct buf *, void *, size_t);
46int              buf_close(int, struct buf *);
47ssize_t          buf_read(int sock, void *, size_t);
Note: See TracBrowser for help on using the repository browser.