6429 SMB domain join doesn't work with libreSSL
[unleashed.git] / usr / src / lib / libtnfctl / kernel.c
blob1e70b87c11462f2d0a601b1ccde0c831ea228053
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 1994, by Sun Microsytems, Inc.
26 #pragma ident "%Z%%M% %I% %E% SMI"
29 * Published kernel specific interfaces for libtnfctl.
30 * After doing some error checking, these just turn around and call
31 * internal interfaces that do the real work.
34 #include <stdio.h>
35 #include <errno.h>
37 #include "tnfctl_int.h"
38 #include "kernel_int.h"
40 tnfctl_errcode_t
41 tnfctl_trace_state_set(tnfctl_handle_t *hdl, boolean_t mode)
43 if (hdl->mode != KERNEL_MODE)
44 return (TNFCTL_ERR_BADARG);
46 /* KERNEL_MODE */
47 return (_tnfctl_prbk_set_tracing(hdl, mode));
50 tnfctl_errcode_t
51 tnfctl_filter_state_set(tnfctl_handle_t *hdl, boolean_t mode)
53 if (hdl->mode != KERNEL_MODE)
54 return (TNFCTL_ERR_BADARG);
56 /* KERNEL_MODE */
57 return (_tnfctl_prbk_set_pfilter_mode(hdl, mode));
60 tnfctl_errcode_t
61 tnfctl_filter_list_get(tnfctl_handle_t *hdl, pid_t **pid_list, int *pid_count)
63 if (hdl->mode != KERNEL_MODE)
64 return (TNFCTL_ERR_BADARG);
66 /* KERNEL_MODE */
67 return (_tnfctl_prbk_get_pfilter_list(hdl, pid_list, pid_count));
70 tnfctl_errcode_t
71 tnfctl_filter_list_add(tnfctl_handle_t *hdl, pid_t pid)
73 if (hdl->mode != KERNEL_MODE)
74 return (TNFCTL_ERR_BADARG);
76 /* KERNEL_MODE */
77 return (_tnfctl_prbk_pfilter_add(hdl, pid));
80 tnfctl_errcode_t
81 tnfctl_filter_list_delete(tnfctl_handle_t *hdl, pid_t pid)
83 if (hdl->mode != KERNEL_MODE)
84 return (TNFCTL_ERR_BADARG);
86 /* KERNEL_MODE */
87 return (_tnfctl_prbk_pfilter_delete(hdl, pid));