Print this page
7388 Support DHCP Client FQDN. Allow IAID/DUID for all v4.


   5  * Common Development and Distribution License (the "License").
   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 2010 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.

  25  */
  26 
  27 #ifndef _NWAMCFG_H
  28 #define _NWAMCFG_H
  29 
  30 /*
  31  * header file for nwamcfg command
  32  */
  33 
  34 #ifdef __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 #define NWAM_OK                 0
  39 #define NWAM_ERR                1
  40 #define NWAM_REPEAT             2
  41 
  42 /* max length of "ncu", "ncp", "loc", "enm", "wlan" */
  43 #define NWAM_MAX_TYPE_LEN       5
  44 


 116 #define PT_LOC_DNS_DOMAIN       25
 117 #define PT_LOC_DNS_SERVERS      26
 118 #define PT_LOC_DNS_SEARCH       27
 119 #define PT_LOC_NIS_CONFIGSRC    28
 120 #define PT_LOC_NIS_SERVERS      29
 121 #define PT_LOC_LDAP_CONFIGSRC   30
 122 #define PT_LOC_LDAP_SERVERS     31
 123 #define PT_LOC_DEFAULT_DOMAIN   32
 124 #define PT_LOC_NFSV4_DOMAIN     33
 125 #define PT_LOC_IPF_CONFIG       34
 126 #define PT_LOC_IPF_V6_CONFIG    35
 127 #define PT_LOC_IPNAT_CONFIG     36
 128 #define PT_LOC_IPPOOL_CONFIG    37
 129 #define PT_LOC_IKE_CONFIG       38
 130 #define PT_LOC_IPSECPOL_CONFIG  39
 131 #define PT_WLAN_BSSIDS          40
 132 #define PT_WLAN_PRIORITY        41
 133 #define PT_WLAN_KEYNAME         42
 134 #define PT_WLAN_KEYSLOT         43
 135 #define PT_WLAN_SECURITY_MODE   44


 136 /*
 137  * If any new PT_ are defined here, make sure it is added in the same
 138  * order into the pt_types array in nwamcfg.c
 139  */
 140 #define PT_MIN                  PT_UNKNOWN
 141 #define PT_MAX                  PT_WLAN_SECURITY_MODE
 142 
 143 #define MAX_SUBCMD_ARGS 3
 144 
 145 typedef struct cmd {
 146         int     cmd_num;
 147         void    (*cmd_handler)(struct cmd *);
 148         int     cmd_res1_type;
 149         int     cmd_res2_type;
 150         int     cmd_prop_type;
 151         int     cmd_ncu_class_type;
 152         int     cmd_argc;
 153         char    *cmd_argv[MAX_SUBCMD_ARGS + 1];
 154 } cmd_t;
 155 
 156 /* Fuctions for each command */
 157 typedef void (cmd_func_t)(cmd_t *);
 158 
 159 extern cmd_func_t cancel_func, clear_func, commit_func, create_func;
 160 extern cmd_func_t destroy_func, end_func, exit_func, export_func, get_func;
 161 extern cmd_func_t help_func, list_func, revert_func, select_func, set_func;


   5  * Common Development and Distribution License (the "License").
   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 2010 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  * Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
  26  */
  27 
  28 #ifndef _NWAMCFG_H
  29 #define _NWAMCFG_H
  30 
  31 /*
  32  * header file for nwamcfg command
  33  */
  34 
  35 #ifdef __cplusplus
  36 extern "C" {
  37 #endif
  38 
  39 #define NWAM_OK                 0
  40 #define NWAM_ERR                1
  41 #define NWAM_REPEAT             2
  42 
  43 /* max length of "ncu", "ncp", "loc", "enm", "wlan" */
  44 #define NWAM_MAX_TYPE_LEN       5
  45 


 117 #define PT_LOC_DNS_DOMAIN       25
 118 #define PT_LOC_DNS_SERVERS      26
 119 #define PT_LOC_DNS_SEARCH       27
 120 #define PT_LOC_NIS_CONFIGSRC    28
 121 #define PT_LOC_NIS_SERVERS      29
 122 #define PT_LOC_LDAP_CONFIGSRC   30
 123 #define PT_LOC_LDAP_SERVERS     31
 124 #define PT_LOC_DEFAULT_DOMAIN   32
 125 #define PT_LOC_NFSV4_DOMAIN     33
 126 #define PT_LOC_IPF_CONFIG       34
 127 #define PT_LOC_IPF_V6_CONFIG    35
 128 #define PT_LOC_IPNAT_CONFIG     36
 129 #define PT_LOC_IPPOOL_CONFIG    37
 130 #define PT_LOC_IKE_CONFIG       38
 131 #define PT_LOC_IPSECPOL_CONFIG  39
 132 #define PT_WLAN_BSSIDS          40
 133 #define PT_WLAN_PRIORITY        41
 134 #define PT_WLAN_KEYNAME         42
 135 #define PT_WLAN_KEYSLOT         43
 136 #define PT_WLAN_SECURITY_MODE   44
 137 #define PT_IP_PRIMARY           45
 138 #define PT_IP_REQHOST           46
 139 /*
 140  * If any new PT_ are defined here, make sure it is added in the same
 141  * order into the pt_types array in nwamcfg.c
 142  */
 143 #define PT_MIN                  PT_UNKNOWN
 144 #define PT_MAX                  PT_IP_REQHOST
 145 
 146 #define MAX_SUBCMD_ARGS 3
 147 
 148 typedef struct cmd {
 149         int     cmd_num;
 150         void    (*cmd_handler)(struct cmd *);
 151         int     cmd_res1_type;
 152         int     cmd_res2_type;
 153         int     cmd_prop_type;
 154         int     cmd_ncu_class_type;
 155         int     cmd_argc;
 156         char    *cmd_argv[MAX_SUBCMD_ARGS + 1];
 157 } cmd_t;
 158 
 159 /* Fuctions for each command */
 160 typedef void (cmd_func_t)(cmd_t *);
 161 
 162 extern cmd_func_t cancel_func, clear_func, commit_func, create_func;
 163 extern cmd_func_t destroy_func, end_func, exit_func, export_func, get_func;
 164 extern cmd_func_t help_func, list_func, revert_func, select_func, set_func;