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

*** 19,28 **** --- 19,29 ---- * CDDL HEADER END */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, Chris Fraire <cfraire@me.com>. */ /* * nwamcfg is a lex/yacc based command interpreter used to manage network * configurations. The lexer (see nwamcfg_lex.l) builds up tokens, which
*** 196,206 **** NWAM_LOC_PROP_IPSECPOLICY_CONFIG_FILE, NWAM_KNOWN_WLAN_PROP_BSSIDS, NWAM_KNOWN_WLAN_PROP_PRIORITY, NWAM_KNOWN_WLAN_PROP_KEYNAME, NWAM_KNOWN_WLAN_PROP_KEYSLOT, ! NWAM_KNOWN_WLAN_PROP_SECURITY_MODE }; /* properties table: maps PT_* constants to property names */ typedef struct prop_table_entry { int pte_type; --- 197,209 ---- NWAM_LOC_PROP_IPSECPOLICY_CONFIG_FILE, NWAM_KNOWN_WLAN_PROP_BSSIDS, NWAM_KNOWN_WLAN_PROP_PRIORITY, NWAM_KNOWN_WLAN_PROP_KEYNAME, NWAM_KNOWN_WLAN_PROP_KEYSLOT, ! NWAM_KNOWN_WLAN_PROP_SECURITY_MODE, ! NWAM_NCU_PROP_IP_PRIMARY, ! NWAM_NCU_PROP_IP_REQHOST }; /* properties table: maps PT_* constants to property names */ typedef struct prop_table_entry { int pte_type;
*** 224,233 **** --- 227,238 ---- { PT_IPV4_ADDR, NWAM_NCU_PROP_IPV4_ADDR }, { PT_IPV4_DEFAULT_ROUTE, NWAM_NCU_PROP_IPV4_DEFAULT_ROUTE }, { PT_IPV6_ADDRSRC, NWAM_NCU_PROP_IPV6_ADDRSRC }, { PT_IPV6_ADDR, NWAM_NCU_PROP_IPV6_ADDR }, { PT_IPV6_DEFAULT_ROUTE, NWAM_NCU_PROP_IPV6_DEFAULT_ROUTE }, + { PT_IP_PRIMARY, NWAM_NCU_PROP_IP_PRIMARY }, + { PT_IP_REQHOST, NWAM_NCU_PROP_IP_REQHOST }, { 0, NULL } }; /* ENM properties table */ static prop_table_entry_t enm_prop_table[] = {
*** 662,676 **** { assert(prop_type >= PT_MIN && prop_type <= PT_MAX); return (pt_types[prop_type]); } ! /* Return B_TRUE if string starts with "t" or is 1, B_FALSE otherwise */ static boolean_t str_to_boolean(const char *str) { ! if (strncasecmp(str, "t", 1) == 0 || atoi(str) == 1) return (B_TRUE); else return (B_FALSE); } --- 667,685 ---- { assert(prop_type >= PT_MIN && prop_type <= PT_MAX); return (pt_types[prop_type]); } ! /* ! * Return B_TRUE if string starts with "t" or "on" or is 1; ! * B_FALSE otherwise ! */ static boolean_t str_to_boolean(const char *str) { ! if (strncasecmp(str, "t", 1) == 0 || strncasecmp(str, "on", 2) == 0 || ! atoi(str) == 1) return (B_TRUE); else return (B_FALSE); }
*** 2195,2204 **** --- 2204,2225 ---- { NWAM_NCU_PROP_IPV6_ADDR, NWAM_NCU_PROP_IPV6_ADDRSRC, { NWAM_ADDRSRC_STATIC, -1 } }, /* show ipv6-default-route if ip-version == ipv6 */ { NWAM_NCU_PROP_IPV6_DEFAULT_ROUTE, NWAM_NCU_PROP_IP_VERSION, { IPV6_VERSION, -1 } }, + /* show ip-primary if ipv4-addrsrc == dhcp */ + { NWAM_NCU_PROP_IP_PRIMARY, NWAM_NCU_PROP_IPV4_ADDRSRC, + { NWAM_ADDRSRC_DHCP, -1 } }, + /* show ip-primary if ipv6-addrsrc == dhcp */ + { NWAM_NCU_PROP_IP_PRIMARY, NWAM_NCU_PROP_IPV6_ADDRSRC, + { NWAM_ADDRSRC_DHCP, -1 } }, + /* show ip-reqhost if ipv4-addrsrc == dhcp */ + { NWAM_NCU_PROP_IP_REQHOST, NWAM_NCU_PROP_IPV4_ADDRSRC, + { NWAM_ADDRSRC_DHCP, -1 } }, + /* show ip-reqhost if ipv6-addrsrc == dhcp */ + { NWAM_NCU_PROP_IP_REQHOST, NWAM_NCU_PROP_IPV6_ADDRSRC, + { NWAM_ADDRSRC_DHCP, -1 } }, { NULL, NULL, { -1 } } }; /* Rules for ENMs */ static prop_display_entry_t enm_prop_display_entry_table[] = {