6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 1990 Mentat Inc.
25 * Copyright (c) 2012 Joyent, Inc. All rights reserved.
26 */
27
28 #include <sys/types.h>
29 #include <sys/stream.h>
30 #include <sys/dlpi.h>
31 #include <sys/stropts.h>
32 #include <sys/sysmacros.h>
33 #include <sys/strsubr.h>
34 #include <sys/strlog.h>
35 #include <sys/strsun.h>
36 #include <sys/zone.h>
37 #define _SUN_TPI_VERSION 2
38 #include <sys/tihdr.h>
39 #include <sys/xti_inet.h>
40 #include <sys/ddi.h>
41 #include <sys/suntpi.h>
42 #include <sys/cmn_err.h>
43 #include <sys/debug.h>
44 #include <sys/kobj.h>
45 #include <sys/modctl.h>
1010 IPI_GET_CMD, LIF_CMD, ip_sioctl_get_subnet, NULL },
1011 /* 139 */ { SIOCSLIFLNKINFO, sizeof (struct lifreq), IPI_PRIV | IPI_WR,
1012 LIF_CMD, ip_sioctl_lnkinfo, NULL },
1013
1014 /* 140 */ { SIOCGLIFLNKINFO, sizeof (struct lifreq),
1015 IPI_GET_CMD, LIF_CMD, ip_sioctl_get_lnkinfo, NULL },
1016 /* 141 */ { SIOCLIFDELND, sizeof (struct lifreq), IPI_PRIV,
1017 LIF_CMD, ip_siocdelndp_v6, NULL },
1018 /* 142 */ { SIOCLIFGETND, sizeof (struct lifreq), IPI_GET_CMD,
1019 LIF_CMD, ip_siocqueryndp_v6, NULL },
1020 /* 143 */ { SIOCLIFSETND, sizeof (struct lifreq), IPI_PRIV,
1021 LIF_CMD, ip_siocsetndp_v6, NULL },
1022 /* 144 */ { SIOCTMYADDR, sizeof (struct sioc_addrreq), IPI_GET_CMD,
1023 MISC_CMD, ip_sioctl_tmyaddr, NULL },
1024 /* 145 */ { SIOCTONLINK, sizeof (struct sioc_addrreq), IPI_GET_CMD,
1025 MISC_CMD, ip_sioctl_tonlink, NULL },
1026 /* 146 */ { SIOCTMYSITE, sizeof (struct sioc_addrreq), 0,
1027 MISC_CMD, ip_sioctl_tmysite, NULL },
1028 /* 147 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1029 /* 148 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1030 /* IPSECioctls handled in ip_sioctl_copyin_setup itself */
1031 /* 149 */ { SIOCFIPSECONFIG, 0, IPI_PRIV, MISC_CMD, NULL, NULL },
1032 /* 150 */ { SIOCSIPSECONFIG, 0, IPI_PRIV, MISC_CMD, NULL, NULL },
1033 /* 151 */ { SIOCDIPSECONFIG, 0, IPI_PRIV, MISC_CMD, NULL, NULL },
1034 /* 152 */ { SIOCLIPSECONFIG, 0, IPI_PRIV, MISC_CMD, NULL, NULL },
1035
1036 /* 153 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1037
1038 /* 154 */ { SIOCGLIFBINDING, sizeof (struct lifreq), IPI_GET_CMD,
1039 LIF_CMD, ip_sioctl_get_binding, NULL },
1040 /* 155 */ { SIOCSLIFGROUPNAME, sizeof (struct lifreq),
1041 IPI_PRIV | IPI_WR,
1042 LIF_CMD, ip_sioctl_groupname, ip_sioctl_groupname },
1043 /* 156 */ { SIOCGLIFGROUPNAME, sizeof (struct lifreq),
1044 IPI_GET_CMD, LIF_CMD, ip_sioctl_get_groupname, NULL },
1045 /* 157 */ { SIOCGLIFGROUPINFO, sizeof (lifgroupinfo_t),
1046 IPI_GET_CMD, MISC_CMD, ip_sioctl_groupinfo, NULL },
1047
1048 /* Leave 158-160 unused; used to be SIOC*IFARP ioctls */
1049 /* 158 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1050 /* 159 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1051 /* 160 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1052
1053 /* 161 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1054
1055 /* These are handled in ip_sioctl_copyin_setup itself */
|
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 1990 Mentat Inc.
25 * Copyright (c) 2012 Joyent, Inc. All rights reserved.
26 * Copyright (c) 2014, OmniTI Computer Consulting, Inc. All rights reserved.
27 */
28
29 #include <sys/types.h>
30 #include <sys/stream.h>
31 #include <sys/dlpi.h>
32 #include <sys/stropts.h>
33 #include <sys/sysmacros.h>
34 #include <sys/strsubr.h>
35 #include <sys/strlog.h>
36 #include <sys/strsun.h>
37 #include <sys/zone.h>
38 #define _SUN_TPI_VERSION 2
39 #include <sys/tihdr.h>
40 #include <sys/xti_inet.h>
41 #include <sys/ddi.h>
42 #include <sys/suntpi.h>
43 #include <sys/cmn_err.h>
44 #include <sys/debug.h>
45 #include <sys/kobj.h>
46 #include <sys/modctl.h>
1011 IPI_GET_CMD, LIF_CMD, ip_sioctl_get_subnet, NULL },
1012 /* 139 */ { SIOCSLIFLNKINFO, sizeof (struct lifreq), IPI_PRIV | IPI_WR,
1013 LIF_CMD, ip_sioctl_lnkinfo, NULL },
1014
1015 /* 140 */ { SIOCGLIFLNKINFO, sizeof (struct lifreq),
1016 IPI_GET_CMD, LIF_CMD, ip_sioctl_get_lnkinfo, NULL },
1017 /* 141 */ { SIOCLIFDELND, sizeof (struct lifreq), IPI_PRIV,
1018 LIF_CMD, ip_siocdelndp_v6, NULL },
1019 /* 142 */ { SIOCLIFGETND, sizeof (struct lifreq), IPI_GET_CMD,
1020 LIF_CMD, ip_siocqueryndp_v6, NULL },
1021 /* 143 */ { SIOCLIFSETND, sizeof (struct lifreq), IPI_PRIV,
1022 LIF_CMD, ip_siocsetndp_v6, NULL },
1023 /* 144 */ { SIOCTMYADDR, sizeof (struct sioc_addrreq), IPI_GET_CMD,
1024 MISC_CMD, ip_sioctl_tmyaddr, NULL },
1025 /* 145 */ { SIOCTONLINK, sizeof (struct sioc_addrreq), IPI_GET_CMD,
1026 MISC_CMD, ip_sioctl_tonlink, NULL },
1027 /* 146 */ { SIOCTMYSITE, sizeof (struct sioc_addrreq), 0,
1028 MISC_CMD, ip_sioctl_tmysite, NULL },
1029 /* 147 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1030 /* 148 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1031
1032 /* Old *IPSECONFIG ioctls are now deprecated, now see spdsock.c */
1033 /* 149 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1034 /* 150 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1035 /* 151 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1036 /* 152 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1037
1038 /* 153 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1039
1040 /* 154 */ { SIOCGLIFBINDING, sizeof (struct lifreq), IPI_GET_CMD,
1041 LIF_CMD, ip_sioctl_get_binding, NULL },
1042 /* 155 */ { SIOCSLIFGROUPNAME, sizeof (struct lifreq),
1043 IPI_PRIV | IPI_WR,
1044 LIF_CMD, ip_sioctl_groupname, ip_sioctl_groupname },
1045 /* 156 */ { SIOCGLIFGROUPNAME, sizeof (struct lifreq),
1046 IPI_GET_CMD, LIF_CMD, ip_sioctl_get_groupname, NULL },
1047 /* 157 */ { SIOCGLIFGROUPINFO, sizeof (lifgroupinfo_t),
1048 IPI_GET_CMD, MISC_CMD, ip_sioctl_groupinfo, NULL },
1049
1050 /* Leave 158-160 unused; used to be SIOC*IFARP ioctls */
1051 /* 158 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1052 /* 159 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1053 /* 160 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1054
1055 /* 161 */ { IPI_DONTCARE, 0, 0, 0, NULL, NULL },
1056
1057 /* These are handled in ip_sioctl_copyin_setup itself */
|