Lines Matching defs:attrp
189 linkattr_add(dlmgmt_linkattr_t **headp, dlmgmt_linkattr_t *attrp)
192 *headp = attrp;
194 (*headp)->lp_prev = attrp;
195 attrp->lp_next = *headp;
196 *headp = attrp;
201 linkattr_rm(dlmgmt_linkattr_t **headp, dlmgmt_linkattr_t *attrp)
205 next = attrp->lp_next;
206 prev = attrp->lp_prev;
218 dlmgmt_linkattr_t *attrp;
220 for (attrp = headp; attrp != NULL; attrp = attrp->lp_next) {
221 if (strcmp(attrp->lp_name, attr) == 0)
224 return (attrp);
231 dlmgmt_linkattr_t *attrp;
235 attrp = linkattr_find(*headp, attr);
236 if (attrp != NULL) {
248 if ((attrp = calloc(1, sizeof (dlmgmt_linkattr_t))) == NULL)
251 (void) strlcpy(attrp->lp_name, attr, MAXLINKATTRLEN);
256 free(attrp);
261 free(attrp->lp_val);
262 attrp->lp_val = newval;
263 bcopy(attrval, attrp->lp_val, attrsz);
264 attrp->lp_sz = attrsz;
265 attrp->lp_type = type;
266 attrp->lp_linkprop = dladm_attr_is_linkprop(attr);
268 linkattr_add(headp, attrp);
275 dlmgmt_linkattr_t *attrp;
277 if ((attrp = linkattr_find(*headp, attr)) != NULL) {
278 linkattr_rm(headp, attrp);
279 free(attrp->lp_val);
280 free(attrp);
288 dlmgmt_linkattr_t *attrp;
290 if ((attrp = linkattr_find(*headp, attr)) == NULL)
293 *attrvalp = attrp->lp_val;
294 *attrszp = attrp->lp_sz;
296 *typep = attrp->lp_type;
317 dlmgmt_linkattr_t *next, *attrp;
319 for (attrp = linkp->ll_head; attrp != NULL; attrp = next) {
320 next = attrp->lp_next;
321 free(attrp->lp_val);
322 free(attrp);
502 dlmgmt_linkattr_t *next, *attrp;
504 for (attrp = linkp->ll_head; attrp != NULL; attrp = next) {
505 next = attrp->lp_next;
506 free(attrp->lp_val);
507 free(attrp);
597 dlmgmt_linkattr_t *next, *attrp;
599 for (attrp = dlconfp->ld_head; attrp != NULL; attrp = next) {
600 next = attrp->lp_next;
601 free(attrp->lp_val);
602 free(attrp);