Print this page
7388 Support DHCP Client FQDN. Allow IAID/DUID for all v4.
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/cmd/cmd-inet/usr.sbin/nwamcfg/nwamcfg.h
+++ new/usr/src/cmd/cmd-inet/usr.sbin/nwamcfg/nwamcfg.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 + * Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
25 26 */
26 27
27 28 #ifndef _NWAMCFG_H
28 29 #define _NWAMCFG_H
29 30
30 31 /*
31 32 * header file for nwamcfg command
32 33 */
33 34
34 35 #ifdef __cplusplus
35 36 extern "C" {
36 37 #endif
37 38
38 39 #define NWAM_OK 0
39 40 #define NWAM_ERR 1
40 41 #define NWAM_REPEAT 2
41 42
42 43 /* max length of "ncu", "ncp", "loc", "enm", "wlan" */
43 44 #define NWAM_MAX_TYPE_LEN 5
44 45
45 46 #define CMD_CANCEL 0
46 47 #define CMD_CLEAR 1
47 48 #define CMD_COMMIT 2
48 49 #define CMD_CREATE 3
49 50 #define CMD_DESTROY 4
50 51 #define CMD_END 5
51 52 #define CMD_EXIT 6
52 53 #define CMD_EXPORT 7
53 54 #define CMD_GET 8
54 55 #define CMD_HELP 9
55 56 #define CMD_LIST 10
56 57 #define CMD_REVERT 11
57 58 #define CMD_SELECT 12
58 59 #define CMD_SET 13
59 60 #define CMD_VERIFY 14
60 61 #define CMD_WALKPROP 15
61 62
62 63 #define CMD_MIN CMD_CANCEL
63 64 #define CMD_MAX CMD_WALKPROP
64 65
65 66 /* one-level resource types */
66 67 #define RT1_UNKNOWN 0
67 68 #define RT1_LOC 1
68 69 #define RT1_NCP 2
69 70 #define RT1_ENM 3
70 71 #define RT1_WLAN 4
71 72
72 73 #define RT1_MIN RT1_UNKNOWN
73 74 #define RT1_MAX RT1_WLAN
74 75
75 76 /* two-level resource types */
76 77 #define RT2_UNKNOWN 0
77 78 #define RT2_NCU 1
78 79
79 80 #define RT2_MIN RT2_UNKNOWN
80 81 #define RT2_MAX RT2_NCU
81 82
82 83 /* class types for NCU's */
83 84 #define NCU_CLASS_PHYS 0
84 85 #define NCU_CLASS_IP 1
85 86 #define NCU_CLASS_ANY 2
86 87
87 88 #define NCU_CLASS_MIN NCU_CLASS_PHYS
88 89 #define NCU_CLASS_MAX NCU_CLASS_ANY
89 90
90 91 /* property types, matches NWAM_*_PROP_* from libnwam.h */
91 92 #define PT_UNKNOWN 0
92 93 #define PT_ACTIVATION_MODE 1
93 94 #define PT_ENABLED 2
94 95 #define PT_TYPE 3
95 96 #define PT_CLASS 4
96 97 #define PT_PARENT 5
97 98 #define PT_PRIORITY_GROUP 6
98 99 #define PT_PRIORITY_MODE 7
99 100 #define PT_LINK_MACADDR 8
100 101 #define PT_LINK_AUTOPUSH 9
101 102 #define PT_LINK_MTU 10
102 103 #define PT_IP_VERSION 11
103 104 #define PT_IPV4_ADDRSRC 12
104 105 #define PT_IPV4_ADDR 13
105 106 #define PT_IPV4_DEFAULT_ROUTE 14
106 107 #define PT_IPV6_ADDRSRC 15
107 108 #define PT_IPV6_ADDR 16
108 109 #define PT_IPV6_DEFAULT_ROUTE 17
109 110 #define PT_CONDITIONS 18
110 111 #define PT_ENM_FMRI 19
111 112 #define PT_ENM_START 20
112 113 #define PT_ENM_STOP 21
113 114 #define PT_LOC_NAMESERVICES 22
114 115 #define PT_LOC_NAMESERVICES_CONFIG 23
115 116 #define PT_LOC_DNS_CONFIGSRC 24
116 117 #define PT_LOC_DNS_DOMAIN 25
117 118 #define PT_LOC_DNS_SERVERS 26
118 119 #define PT_LOC_DNS_SEARCH 27
119 120 #define PT_LOC_NIS_CONFIGSRC 28
120 121 #define PT_LOC_NIS_SERVERS 29
121 122 #define PT_LOC_LDAP_CONFIGSRC 30
122 123 #define PT_LOC_LDAP_SERVERS 31
123 124 #define PT_LOC_DEFAULT_DOMAIN 32
124 125 #define PT_LOC_NFSV4_DOMAIN 33
125 126 #define PT_LOC_IPF_CONFIG 34
|
↓ open down ↓ |
91 lines elided |
↑ open up ↑ |
126 127 #define PT_LOC_IPF_V6_CONFIG 35
127 128 #define PT_LOC_IPNAT_CONFIG 36
128 129 #define PT_LOC_IPPOOL_CONFIG 37
129 130 #define PT_LOC_IKE_CONFIG 38
130 131 #define PT_LOC_IPSECPOL_CONFIG 39
131 132 #define PT_WLAN_BSSIDS 40
132 133 #define PT_WLAN_PRIORITY 41
133 134 #define PT_WLAN_KEYNAME 42
134 135 #define PT_WLAN_KEYSLOT 43
135 136 #define PT_WLAN_SECURITY_MODE 44
137 +#define PT_IP_PRIMARY 45
138 +#define PT_IP_REQHOST 46
136 139 /*
137 140 * If any new PT_ are defined here, make sure it is added in the same
138 141 * order into the pt_types array in nwamcfg.c
139 142 */
140 143 #define PT_MIN PT_UNKNOWN
141 -#define PT_MAX PT_WLAN_SECURITY_MODE
144 +#define PT_MAX PT_IP_REQHOST
142 145
143 146 #define MAX_SUBCMD_ARGS 3
144 147
145 148 typedef struct cmd {
146 149 int cmd_num;
147 150 void (*cmd_handler)(struct cmd *);
148 151 int cmd_res1_type;
149 152 int cmd_res2_type;
150 153 int cmd_prop_type;
151 154 int cmd_ncu_class_type;
152 155 int cmd_argc;
153 156 char *cmd_argv[MAX_SUBCMD_ARGS + 1];
154 157 } cmd_t;
155 158
156 159 /* Fuctions for each command */
157 160 typedef void (cmd_func_t)(cmd_t *);
158 161
159 162 extern cmd_func_t cancel_func, clear_func, commit_func, create_func;
160 163 extern cmd_func_t destroy_func, end_func, exit_func, export_func, get_func;
161 164 extern cmd_func_t help_func, list_func, revert_func, select_func, set_func;
162 165 extern cmd_func_t verify_func, walkprop_func;
163 166
164 167 extern cmd_t *alloc_cmd(void);
165 168 extern void free_cmd(cmd_t *cmd);
166 169
167 170 extern boolean_t check_scope(int);
168 171 extern const char *cmd_to_str(int);
169 172
170 173 extern void nerr(const char *, ...);
171 174 extern void properr(const char *);
172 175
173 176 extern boolean_t saw_error;
174 177
175 178 extern FILE *yyin;
176 179
177 180 #ifdef __cplusplus
178 181 }
179 182 #endif
180 183
181 184 #endif /* _NWAMCFG_H */
|
↓ open down ↓ |
30 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX