Lines Matching refs:vaf

92 	varpd_files_t *vaf;  in varpd_files_create()  local
97 vaf = umem_alloc(sizeof (varpd_files_t), UMEM_DEFAULT); in varpd_files_create()
98 if (vaf == NULL) in varpd_files_create()
101 bzero(vaf, sizeof (varpd_files_t)); in varpd_files_create()
102 vaf->vaf_dest = dest; in varpd_files_create()
103 vaf->vaf_path = NULL; in varpd_files_create()
104 vaf->vaf_nvl = NULL; in varpd_files_create()
105 vaf->vaf_hdl = hdl; in varpd_files_create()
106 *outp = vaf; in varpd_files_create()
111 varpd_files_normalize_nvlist(varpd_files_t *vaf, nvlist_t *nvl) in varpd_files_normalize_nvlist() argument
154 vaf->vaf_nvl = out; in varpd_files_normalize_nvlist()
165 varpd_files_t *vaf = arg; in varpd_files_start() local
167 if (vaf->vaf_path == NULL) in varpd_files_start()
170 if ((fd = open(vaf->vaf_path, O_RDONLY)) < 0) in varpd_files_start()
192 ret = varpd_files_normalize_nvlist(vaf, nvl); in varpd_files_start()
206 varpd_files_t *vaf = arg; in varpd_files_stop() local
208 nvlist_free(vaf->vaf_nvl); in varpd_files_stop()
209 vaf->vaf_nvl = NULL; in varpd_files_stop()
215 varpd_files_t *vaf = arg; in varpd_files_destroy() local
217 assert(vaf->vaf_nvl == NULL); in varpd_files_destroy()
218 if (vaf->vaf_path != NULL) { in varpd_files_destroy()
219 umem_free(vaf->vaf_path, strlen(vaf->vaf_path) + 1); in varpd_files_destroy()
220 vaf->vaf_path = NULL; in varpd_files_destroy()
222 umem_free(vaf, sizeof (varpd_files_t)); in varpd_files_destroy()
231 varpd_files_t *vaf = arg; in varpd_files_lookup() local
242 libvarpd_plugin_proxy_arp(vaf->vaf_hdl, qh, otl); in varpd_files_lookup()
249 libvarpd_plugin_proxy_ndp(vaf->vaf_hdl, qh, otl); in varpd_files_lookup()
265 if (nvlist_lookup_nvlist(vaf->vaf_nvl, macstr, &nvl) != 0) { in varpd_files_lookup()
280 libvarpd_plugin_proxy_dhcp(vaf->vaf_hdl, qh, otl); in varpd_files_lookup()
290 if (nvlist_lookup_nvlist(vaf->vaf_nvl, macstr, &nvl) != 0) { in varpd_files_lookup()
353 varpd_files_t *vaf = arg; in varpd_files_getprop() local
358 if (vaf->vaf_path != NULL) { in varpd_files_getprop()
359 size_t len = strlen(vaf->vaf_path) + 1; in varpd_files_getprop()
363 (void) strlcpy(buf, vaf->vaf_path, *sizep); in varpd_files_getprop()
376 varpd_files_t *vaf = arg; in varpd_files_setprop() local
381 if (vaf->vaf_path != NULL) in varpd_files_setprop()
382 umem_free(vaf->vaf_path, strlen(vaf->vaf_path) + 1); in varpd_files_setprop()
384 vaf->vaf_path = umem_alloc(size, UMEM_DEFAULT); in varpd_files_setprop()
385 if (vaf->vaf_path == NULL) in varpd_files_setprop()
387 (void) strlcpy(vaf->vaf_path, buf, size); in varpd_files_setprop()
395 varpd_files_t *vaf = arg; in varpd_files_save() local
397 if (vaf->vaf_path == NULL) in varpd_files_save()
401 vaf->vaf_path)) != 0) in varpd_files_save()
405 vaf->vaf_nmisses)) != 0) in varpd_files_save()
409 vaf->vaf_narp)) != 0) in varpd_files_save()
418 varpd_files_t *vaf; in varpd_files_restore() local
437 vaf = umem_alloc(sizeof (varpd_files_t), UMEM_DEFAULT); in varpd_files_restore()
438 if (vaf == NULL) in varpd_files_restore()
441 bzero(vaf, sizeof (varpd_files_t)); in varpd_files_restore()
442 vaf->vaf_dest = dest; in varpd_files_restore()
445 vaf->vaf_path = umem_alloc(len, UMEM_DEFAULT); in varpd_files_restore()
446 if (vaf->vaf_path == NULL) { in varpd_files_restore()
447 umem_free(vaf, sizeof (varpd_files_t)); in varpd_files_restore()
450 (void) strlcpy(vaf->vaf_path, str, len); in varpd_files_restore()
453 vaf->vaf_hdl = hdl; in varpd_files_restore()
454 *outp = vaf; in varpd_files_restore()
462 varpd_files_t *vaf = arg; in varpd_files_proxy_arp() local
479 for (pair = nvlist_next_nvpair(vaf->vaf_nvl, NULL); pair != NULL; in varpd_files_proxy_arp()
480 pair = nvlist_next_nvpair(vaf->vaf_nvl, pair)) { in varpd_files_proxy_arp()
535 varpd_files_t *vaf = arg; in varpd_files_proxy_dhcp() local
552 if (nvlist_lookup_nvlist(vaf->vaf_nvl, macstr, &nvl) != 0) { in varpd_files_proxy_dhcp()