2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright (c) 2012 Joyent, Inc. All rights reserved.
14 * Use is subject to license terms.
20 #include <sys/types.h>
27 * Bitmask values for ic_mask.
29 #define IPDM_CORRUPT 0x1000
30 #define IPDM_DELAY 0x2000
31 #define IPDM_DROP 0x4000
33 typedef enum ipd_errno
{
44 typedef struct ipd_config
{
52 typedef struct ipd_stat
*ipd_stathdl_t
;
54 typedef void (*ipd_status_cb_f
)(zoneid_t
, const ipd_config_t
*, void *);
56 extern __thread ipd_errno_t ipd_errno
;
57 extern __thread
char ipd_errmsg
[];
59 extern const char *ipd_strerror(ipd_errno_t
);
60 extern int ipd_open(const char *);
61 extern int ipd_close(int);
62 extern int ipd_status_read(int, ipd_stathdl_t
*);
63 extern void ipd_status_foreach_zone(const ipd_stathdl_t
,
64 ipd_status_cb_f
, void *);
65 extern int ipd_status_get_config(const ipd_stathdl_t
,
66 zoneid_t
, ipd_config_t
**);
67 extern void ipd_status_free(ipd_stathdl_t
);
68 extern int ipd_ctl(int, zoneid_t
, const ipd_config_t
*);
74 #endif /* _LIBIPD_H */