Lines Matching defs:tabptr
1651 zonecfg_add_filesystem_core(zone_dochandle_t handle, struct zone_fstab *tabptr)
1659 tabptr->zone_fs_special)) != Z_OK)
1661 if (tabptr->zone_fs_raw[0] != '\0' &&
1662 (err = newprop(newnode, DTD_ATTR_RAW, tabptr->zone_fs_raw)) != Z_OK)
1664 if ((err = newprop(newnode, DTD_ATTR_DIR, tabptr->zone_fs_dir)) != Z_OK)
1667 tabptr->zone_fs_type)) != Z_OK)
1669 if (tabptr->zone_fs_options != NULL) {
1670 for (ptr = tabptr->zone_fs_options; ptr != NULL;
1683 zonecfg_add_filesystem(zone_dochandle_t handle, struct zone_fstab *tabptr)
1687 if (tabptr == NULL)
1693 if ((err = zonecfg_add_filesystem_core(handle, tabptr)) != Z_OK)
1700 zonecfg_add_fs_option(struct zone_fstab *tabptr, char *option)
1704 last = tabptr->zone_fs_options;
1714 tabptr->zone_fs_options = new;
1721 zonecfg_remove_fs_option(struct zone_fstab *tabptr, char *option)
1725 last = tabptr->zone_fs_options;
1729 if (this == tabptr->zone_fs_options)
1730 tabptr->zone_fs_options = next;
1777 struct zone_fstab *tabptr)
1785 dir_match = match_prop(cur, DTD_ATTR_DIR, tabptr->zone_fs_dir);
1787 tabptr->zone_fs_special);
1789 tabptr->zone_fs_raw);
1791 tabptr->zone_fs_type);
1802 zonecfg_delete_filesystem(zone_dochandle_t handle, struct zone_fstab *tabptr)
1806 if (tabptr == NULL)
1812 if ((err = zonecfg_delete_filesystem_core(handle, tabptr)) != Z_OK)
1844 struct zone_fstab *tabptr)
1852 if (tabptr == NULL)
1869 if (strlen(tabptr->zone_fs_dir) > 0) {
1872 (strcmp(tabptr->zone_fs_dir, dirname) == 0)) {
1879 if (strlen(tabptr->zone_fs_special) > 0) {
1882 if (strcmp(tabptr->zone_fs_special,
1898 if (strlen(tabptr->zone_fs_raw) > 0) {
1901 if (strcmp(tabptr->zone_fs_raw, raw) == 0) {
1916 if (strlen(tabptr->zone_fs_type) > 0) {
1919 if (strcmp(tabptr->zone_fs_type, type) == 0) {
1941 if ((err = fetchprop(cur, DTD_ATTR_DIR, tabptr->zone_fs_dir,
1942 sizeof (tabptr->zone_fs_dir))) != Z_OK)
1945 if ((err = fetchprop(cur, DTD_ATTR_SPECIAL, tabptr->zone_fs_special,
1946 sizeof (tabptr->zone_fs_special))) != Z_OK)
1949 if ((err = fetchprop(cur, DTD_ATTR_RAW, tabptr->zone_fs_raw,
1950 sizeof (tabptr->zone_fs_raw))) != Z_OK)
1953 if ((err = fetchprop(cur, DTD_ATTR_TYPE, tabptr->zone_fs_type,
1954 sizeof (tabptr->zone_fs_type))) != Z_OK)
1958 tabptr->zone_fs_options = NULL;
1964 if (zonecfg_add_fs_option(tabptr, options_str) != Z_OK)
2070 * address, and default router specified by 'tabptr' in the zone configuration
2071 * to which 'handle' refers. 'tabptr' must have an interface, an address, a
2074 * 'tabptr'. The function returns Z_INSUFFICIENT_SPEC if there are multiple
2075 * matches or 'tabptr' does not specify a physical interface, address, or
2082 * address, and default router information are stored in 'tabptr'.
2085 zonecfg_lookup_nwif(zone_dochandle_t handle, struct zone_nwiftab *tabptr)
2092 size_t addrspec; /* nonzero if tabptr has IP addr */
2093 size_t physspec; /* nonzero if tabptr has interface */
2094 size_t defrouterspec; /* nonzero if tabptr has def. router */
2098 if (tabptr == NULL)
2108 addrspec = strlen(tabptr->zone_nwif_address);
2109 physspec = strlen(tabptr->zone_nwif_physical);
2110 defrouterspec = strlen(tabptr->zone_nwif_defrouter);
2111 allowed_addrspec = strlen(tabptr->zone_nwif_allowed_address);
2140 strcmp(tabptr->zone_nwif_physical, physical) != 0))
2145 !zonecfg_same_net_address(tabptr->zone_nwif_address,
2151 !zonecfg_same_net_address(tabptr->zone_nwif_allowed_address,
2156 !zonecfg_same_net_address(tabptr->zone_nwif_defrouter,
2174 if ((err = fetchprop(cur, DTD_ATTR_PHYSICAL, tabptr->zone_nwif_physical,
2175 sizeof (tabptr->zone_nwif_physical))) != Z_OK)
2179 (err = fetchprop(cur, DTD_ATTR_ADDRESS, tabptr->zone_nwif_address,
2180 sizeof (tabptr->zone_nwif_address))) != Z_OK)
2185 tabptr->zone_nwif_allowed_address,
2186 sizeof (tabptr->zone_nwif_allowed_address))) != Z_OK)
2190 tabptr->zone_nwif_defrouter,
2191 sizeof (tabptr->zone_nwif_defrouter))) != Z_OK)
2198 zonecfg_add_nwif_core(zone_dochandle_t handle, struct zone_nwiftab *tabptr)
2204 if (strlen(tabptr->zone_nwif_address) > 0 &&
2206 tabptr->zone_nwif_address)) != Z_OK)
2208 if (strlen(tabptr->zone_nwif_allowed_address) > 0 &&
2210 tabptr->zone_nwif_allowed_address)) != Z_OK)
2213 tabptr->zone_nwif_physical)) != Z_OK)
2219 if ((strlen(tabptr->zone_nwif_defrouter) > 0) &&
2221 tabptr->zone_nwif_defrouter)) != Z_OK))
2227 zonecfg_add_nwif(zone_dochandle_t handle, struct zone_nwiftab *tabptr)
2231 if (tabptr == NULL)
2237 if ((err = zonecfg_add_nwif_core(handle, tabptr)) != Z_OK)
2244 zonecfg_delete_nwif_core(zone_dochandle_t handle, struct zone_nwiftab *tabptr)
2254 tabptr->zone_nwif_address);
2256 tabptr->zone_nwif_allowed_address);
2258 tabptr->zone_nwif_physical);
2270 zonecfg_delete_nwif(zone_dochandle_t handle, struct zone_nwiftab *tabptr)
2274 if (tabptr == NULL)
2280 if ((err = zonecfg_delete_nwif_core(handle, tabptr)) != Z_OK)
2456 zonecfg_lookup_dev(zone_dochandle_t handle, struct zone_devtab *tabptr)
2462 if (tabptr == NULL)
2473 if (strlen(tabptr->zone_dev_match) == 0)
2478 if (strcmp(tabptr->zone_dev_match,
2499 if ((err = fetchprop(cur, DTD_ATTR_MATCH, tabptr->zone_dev_match,
2500 sizeof (tabptr->zone_dev_match))) != Z_OK)
2507 zonecfg_add_dev_core(zone_dochandle_t handle, struct zone_devtab *tabptr)
2515 tabptr->zone_dev_match)) != Z_OK)
2522 zonecfg_add_dev(zone_dochandle_t handle, struct zone_devtab *tabptr)
2526 if (tabptr == NULL)
2532 if ((err = zonecfg_add_dev_core(handle, tabptr)) != Z_OK)
2539 zonecfg_delete_dev_core(zone_dochandle_t handle, struct zone_devtab *tabptr)
2549 tabptr->zone_dev_match);
2561 zonecfg_delete_dev(zone_dochandle_t handle, struct zone_devtab *tabptr)
2565 if (tabptr == NULL)
2571 if ((err = zonecfg_delete_dev_core(handle, tabptr)) != Z_OK)
2601 zonecfg_add_auth_core(zone_dochandle_t handle, struct zone_admintab *tabptr,
2608 err = newprop(newnode, DTD_ATTR_USER, tabptr->zone_admin_user);
2611 err = newprop(newnode, DTD_ATTR_AUTHS, tabptr->zone_admin_auths);
2615 handle, tabptr->zone_admin_user, zonename, B_FALSE)) != Z_OK)
2621 zonecfg_add_admin(zone_dochandle_t handle, struct zone_admintab *tabptr,
2626 if (tabptr == NULL)
2632 if ((err = zonecfg_add_auth_core(handle, tabptr,
2639 zonecfg_delete_auth_core(zone_dochandle_t handle, struct zone_admintab *tabptr,
2650 tabptr->zone_admin_user);
2653 handle, tabptr->zone_admin_user,
2665 zonecfg_delete_admin(zone_dochandle_t handle, struct zone_admintab *tabptr,
2670 if (tabptr == NULL)
2676 if ((err = zonecfg_delete_auth_core(handle, tabptr, zonename)) != Z_OK)
2706 zonecfg_lookup_admin(zone_dochandle_t handle, struct zone_admintab *tabptr)
2712 if (tabptr == NULL)
2723 if (strlen(tabptr->zone_admin_user) > 0) {
2726 (strcmp(tabptr->zone_admin_user, user) == 0)) {
2739 if ((err = fetchprop(cur, DTD_ATTR_USER, tabptr->zone_admin_user,
2740 sizeof (tabptr->zone_admin_user))) != Z_OK)
2743 if ((err = fetchprop(cur, DTD_ATTR_AUTHS, tabptr->zone_admin_auths,
2744 sizeof (tabptr->zone_admin_auths))) != Z_OK)
2980 zonecfg_lookup_attr(zone_dochandle_t handle, struct zone_attrtab *tabptr)
2986 if (tabptr == NULL)
2997 if (strlen(tabptr->zone_attr_name) > 0) {
3000 (strcmp(tabptr->zone_attr_name, name) == 0)) {
3007 if (strlen(tabptr->zone_attr_type) > 0) {
3010 if (strcmp(tabptr->zone_attr_type, type) == 0) {
3025 if (strlen(tabptr->zone_attr_value) > 0) {
3028 if (strcmp(tabptr->zone_attr_value, value) ==
3050 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_attr_name,
3051 sizeof (tabptr->zone_attr_name))) != Z_OK)
3054 if ((err = fetchprop(cur, DTD_ATTR_TYPE, tabptr->zone_attr_type,
3055 sizeof (tabptr->zone_attr_type))) != Z_OK)
3058 if ((err = fetchprop(cur, DTD_ATTR_VALUE, tabptr->zone_attr_value,
3059 sizeof (tabptr->zone_attr_value))) != Z_OK)
3066 zonecfg_add_attr_core(zone_dochandle_t handle, struct zone_attrtab *tabptr)
3072 err = newprop(newnode, DTD_ATTR_NAME, tabptr->zone_attr_name);
3075 err = newprop(newnode, DTD_ATTR_TYPE, tabptr->zone_attr_type);
3078 err = newprop(newnode, DTD_ATTR_VALUE, tabptr->zone_attr_value);
3085 zonecfg_add_attr(zone_dochandle_t handle, struct zone_attrtab *tabptr)
3089 if (tabptr == NULL)
3095 if ((err = zonecfg_add_attr_core(handle, tabptr)) != Z_OK)
3102 zonecfg_delete_attr_core(zone_dochandle_t handle, struct zone_attrtab *tabptr)
3112 tabptr->zone_attr_name);
3114 tabptr->zone_attr_type);
3116 tabptr->zone_attr_value);
3128 zonecfg_delete_attr(zone_dochandle_t handle, struct zone_attrtab *tabptr)
3132 if (tabptr == NULL)
3138 if ((err = zonecfg_delete_attr_core(handle, tabptr)) != Z_OK)
3253 zonecfg_lookup_rctl(zone_dochandle_t handle, struct zone_rctltab *tabptr)
3260 if (strlen(tabptr->zone_rctl_name) == 0)
3272 (strcmp(savedname, tabptr->zone_rctl_name) == 0)) {
3273 tabptr->zone_rctl_valptr = NULL;
3295 if (zonecfg_add_rctl_value(tabptr, valptr) !=
3306 zonecfg_add_rctl_core(zone_dochandle_t handle, struct zone_rctltab *tabptr)
3313 err = newprop(newnode, DTD_ATTR_NAME, tabptr->zone_rctl_name);
3316 for (valptr = tabptr->zone_rctl_valptr; valptr != NULL;
3337 zonecfg_add_rctl(zone_dochandle_t handle, struct zone_rctltab *tabptr)
3341 if (tabptr == NULL)
3347 if ((err = zonecfg_add_rctl_core(handle, tabptr)) != Z_OK)
3354 zonecfg_delete_rctl_core(zone_dochandle_t handle, struct zone_rctltab *tabptr)
3368 (const xmlChar *) tabptr->zone_rctl_name);
3381 zonecfg_delete_rctl(zone_dochandle_t handle, struct zone_rctltab *tabptr)
3385 if (tabptr == NULL)
3391 if ((err = zonecfg_delete_rctl_core(handle, tabptr)) != Z_OK)
3422 struct zone_rctltab *tabptr,
3428 last = tabptr->zone_rctl_valptr;
3438 tabptr->zone_rctl_valptr = new;
3446 struct zone_rctltab *tabptr,
3451 last = tabptr->zone_rctl_valptr;
3460 if (this == tabptr->zone_rctl_valptr)
3461 tabptr->zone_rctl_valptr = next;
4641 zonecfg_getfsent(zone_dochandle_t handle, struct zone_fstab *tabptr)
4661 if ((err = fetchprop(cur, DTD_ATTR_SPECIAL, tabptr->zone_fs_special,
4662 sizeof (tabptr->zone_fs_special))) != Z_OK) {
4667 if ((err = fetchprop(cur, DTD_ATTR_RAW, tabptr->zone_fs_raw,
4668 sizeof (tabptr->zone_fs_raw))) != Z_OK) {
4673 if ((err = fetchprop(cur, DTD_ATTR_DIR, tabptr->zone_fs_dir,
4674 sizeof (tabptr->zone_fs_dir))) != Z_OK) {
4679 if ((err = fetchprop(cur, DTD_ATTR_TYPE, tabptr->zone_fs_type,
4680 sizeof (tabptr->zone_fs_type))) != Z_OK) {
4686 tabptr->zone_fs_options = NULL;
4692 if (zonecfg_add_fs_option(tabptr, options_str) != Z_OK)
4713 zonecfg_getnwifent(zone_dochandle_t handle, struct zone_nwiftab *tabptr)
4732 if ((err = fetchprop(cur, DTD_ATTR_ADDRESS, tabptr->zone_nwif_address,
4733 sizeof (tabptr->zone_nwif_address))) != Z_OK) {
4739 tabptr->zone_nwif_allowed_address,
4740 sizeof (tabptr->zone_nwif_allowed_address))) != Z_OK) {
4745 if ((err = fetchprop(cur, DTD_ATTR_PHYSICAL, tabptr->zone_nwif_physical,
4746 sizeof (tabptr->zone_nwif_physical))) != Z_OK) {
4752 tabptr->zone_nwif_defrouter,
4753 sizeof (tabptr->zone_nwif_defrouter))) != Z_OK) {
4775 zonecfg_getdevent(zone_dochandle_t handle, struct zone_devtab *tabptr)
4794 if ((err = fetchprop(cur, DTD_ATTR_MATCH, tabptr->zone_dev_match,
4795 sizeof (tabptr->zone_dev_match))) != Z_OK) {
4817 zonecfg_getrctlent(zone_dochandle_t handle, struct zone_rctltab *tabptr)
4837 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_rctl_name,
4838 sizeof (tabptr->zone_rctl_name))) != Z_OK) {
4843 tabptr->zone_rctl_valptr = NULL;
4858 if (zonecfg_add_rctl_value(tabptr, valptr) != Z_OK)
4879 zonecfg_getattrent(zone_dochandle_t handle, struct zone_attrtab *tabptr)
4898 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_attr_name,
4899 sizeof (tabptr->zone_attr_name))) != Z_OK) {
4904 if ((err = fetchprop(cur, DTD_ATTR_TYPE, tabptr->zone_attr_type,
4905 sizeof (tabptr->zone_attr_type))) != Z_OK) {
4910 if ((err = fetchprop(cur, DTD_ATTR_VALUE, tabptr->zone_attr_value,
4911 sizeof (tabptr->zone_attr_value))) != Z_OK) {
4933 zonecfg_getadminent(zone_dochandle_t handle, struct zone_admintab *tabptr)
4952 if ((err = fetchprop(cur, DTD_ATTR_USER, tabptr->zone_admin_user,
4953 sizeof (tabptr->zone_admin_user))) != Z_OK) {
4959 if ((err = fetchprop(cur, DTD_ATTR_AUTHS, tabptr->zone_admin_auths,
4960 sizeof (tabptr->zone_admin_auths))) != Z_OK) {
6294 zonecfg_add_ds_core(zone_dochandle_t handle, struct zone_dstab *tabptr)
6301 tabptr->zone_dataset_name)) != Z_OK)
6307 zonecfg_add_ds(zone_dochandle_t handle, struct zone_dstab *tabptr)
6311 if (tabptr == NULL)
6317 if ((err = zonecfg_add_ds_core(handle, tabptr)) != Z_OK)
6324 zonecfg_delete_ds_core(zone_dochandle_t handle, struct zone_dstab *tabptr)
6333 tabptr->zone_dataset_name)) {
6343 zonecfg_delete_ds(zone_dochandle_t handle, struct zone_dstab *tabptr)
6347 if (tabptr == NULL)
6353 if ((err = zonecfg_delete_ds_core(handle, tabptr)) != Z_OK)
6383 zonecfg_lookup_ds(zone_dochandle_t handle, struct zone_dstab *tabptr)
6389 if (tabptr == NULL)
6400 if (strlen(tabptr->zone_dataset_name) > 0) {
6403 (strcmp(tabptr->zone_dataset_name,
6417 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_dataset_name,
6418 sizeof (tabptr->zone_dataset_name))) != Z_OK)
6431 zonecfg_getdsent(zone_dochandle_t handle, struct zone_dstab *tabptr)
6450 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_dataset_name,
6451 sizeof (tabptr->zone_dataset_name))) != Z_OK) {
6696 add_pset_core(zone_dochandle_t handle, struct zone_psettab *tabptr)
6703 tabptr->zone_ncpu_min)) != Z_OK)
6706 tabptr->zone_ncpu_max)) != Z_OK)
6709 if ((err = modify_tmp_pool(handle, tabptr->zone_importance)) != Z_OK)
6716 zonecfg_add_pset(zone_dochandle_t handle, struct zone_psettab *tabptr)
6720 if (tabptr == NULL)
6726 if ((err = add_pset_core(handle, tabptr)) != Z_OK)
6763 zonecfg_modify_pset(zone_dochandle_t handle, struct zone_psettab *tabptr)
6767 if (tabptr == NULL)
6773 if ((err = add_pset_core(handle, tabptr)) != Z_OK)
6780 zonecfg_lookup_pset(zone_dochandle_t handle, struct zone_psettab *tabptr)
6786 if (tabptr == NULL)
6793 tabptr->zone_importance[0] = '\0';
6799 tabptr->zone_ncpu_min,
6800 sizeof (tabptr->zone_ncpu_min))) != Z_OK) {
6806 tabptr->zone_ncpu_max,
6807 sizeof (tabptr->zone_ncpu_max))) != Z_OK) {
6816 tabptr->zone_importance,
6817 sizeof (tabptr->zone_importance))) != Z_OK) {
6828 zonecfg_getpsetent(zone_dochandle_t handle, struct zone_psettab *tabptr)
6835 err = zonecfg_lookup_pset(handle, tabptr);
6843 add_mcap(zone_dochandle_t handle, struct zone_mcaptab *tabptr)
6849 if ((err = newprop(newnode, DTD_ATTR_PHYSCAP, tabptr->zone_physmem_cap))
6877 zonecfg_modify_mcap(zone_dochandle_t handle, struct zone_mcaptab *tabptr)
6881 if (tabptr == NULL)
6889 if ((err = add_mcap(handle, tabptr)) != Z_OK)
6896 zonecfg_lookup_mcap(zone_dochandle_t handle, struct zone_mcaptab *tabptr)
6901 if (tabptr == NULL)
6912 tabptr->zone_physmem_cap,
6913 sizeof (tabptr->zone_physmem_cap))) != Z_OK) {
6925 getmcapent_core(zone_dochandle_t handle, struct zone_mcaptab *tabptr)
6944 if ((err = fetchprop(cur, DTD_ATTR_PHYSCAP, tabptr->zone_physmem_cap,
6945 sizeof (tabptr->zone_physmem_cap))) != Z_OK) {
6955 zonecfg_getmcapent(zone_dochandle_t handle, struct zone_mcaptab *tabptr)
6962 err = getmcapent_core(handle, tabptr);
7050 zonecfg_getdevperment(zone_dochandle_t handle, struct zone_devpermtab *tabptr)
7056 tabptr->zone_devperm_acl = NULL;
7072 if ((err = fetchprop(cur, DTD_ATTR_NAME, tabptr->zone_devperm_name,
7073 sizeof (tabptr->zone_devperm_name))) != Z_OK) {
7082 tabptr->zone_devperm_uid = (uid_t)atol(buf);
7088 tabptr->zone_devperm_gid = (gid_t)atol(buf);
7094 tabptr->zone_devperm_mode = (mode_t)strtol(buf, (char **)NULL, 8);
7097 &(tabptr->zone_devperm_acl))) != Z_OK) {