• Home
  • Raw
  • Download

Lines Matching refs:pair

163 	VALUE_PAIR     *pair;  in rc_avpair_gen()  local
207 if ((pair = in rc_avpair_gen()
215 strcpy (pair->name, attr->name); in rc_avpair_gen()
216 pair->attribute = attr->value; in rc_avpair_gen()
217 pair->vendorcode = VENDOR_NONE; in rc_avpair_gen()
218 pair->type = attr->type; in rc_avpair_gen()
219 pair->next = (VALUE_PAIR *) NULL; in rc_avpair_gen()
225 memcpy (pair->strvalue, (char *) ptr, (size_t) attrlen); in rc_avpair_gen()
226 pair->strvalue[attrlen] = '\0'; in rc_avpair_gen()
227 pair->lvalue = attrlen; in rc_avpair_gen()
228 rc_avpair_insert (&vp, (VALUE_PAIR *) NULL, pair); in rc_avpair_gen()
235 pair->lvalue = ntohl (lvalue); in rc_avpair_gen()
236 rc_avpair_insert (&vp, (VALUE_PAIR *) NULL, pair); in rc_avpair_gen()
241 free (pair); in rc_avpair_gen()
270 VALUE_PAIR *pair; in rc_extract_vendor_specific_attributes() local
308 pair = (VALUE_PAIR *) malloc(sizeof(VALUE_PAIR)); in rc_extract_vendor_specific_attributes()
309 if (!pair) { in rc_extract_vendor_specific_attributes()
313 strcpy(pair->name, attr->name); in rc_extract_vendor_specific_attributes()
314 pair->attribute = attr->value; in rc_extract_vendor_specific_attributes()
315 pair->vendorcode = vendor_id; in rc_extract_vendor_specific_attributes()
316 pair->type = attr->type; in rc_extract_vendor_specific_attributes()
317 pair->next = NULL; in rc_extract_vendor_specific_attributes()
320 memcpy (pair->strvalue, (char *) ptr, (size_t) vlen); in rc_extract_vendor_specific_attributes()
321 pair->strvalue[vlen] = '\0'; in rc_extract_vendor_specific_attributes()
322 pair->lvalue = vlen; in rc_extract_vendor_specific_attributes()
323 rc_avpair_insert (vp, (VALUE_PAIR *) NULL, pair); in rc_extract_vendor_specific_attributes()
330 pair->lvalue = ntohl (lvalue); in rc_extract_vendor_specific_attributes()
331 rc_avpair_insert (vp, (VALUE_PAIR *) NULL, pair); in rc_extract_vendor_specific_attributes()
336 free (pair); in rc_extract_vendor_specific_attributes()
455 void rc_avpair_free (VALUE_PAIR *pair) in rc_avpair_free() argument
459 while (pair != (VALUE_PAIR *) NULL) in rc_avpair_free()
461 next = pair->next; in rc_avpair_free()
462 free (pair); in rc_avpair_free()
463 pair = next; in rc_avpair_free()
529 VALUE_PAIR *pair; in rc_avpair_parse() local
580 if ((pair = in rc_avpair_parse()
591 strcpy (pair->name, attr->name); in rc_avpair_parse()
592 pair->attribute = attr->value; in rc_avpair_parse()
593 pair->type = attr->type; in rc_avpair_parse()
594 pair->vendorcode = attr->vendorcode; in rc_avpair_parse()
596 switch (pair->type) in rc_avpair_parse()
600 strcpy (pair->strvalue, valstr); in rc_avpair_parse()
601 pair->lvalue = strlen(valstr); in rc_avpair_parse()
607 pair->lvalue = atoi (valstr); in rc_avpair_parse()
619 free (pair); in rc_avpair_parse()
624 pair->lvalue = dval->value; in rc_avpair_parse()
630 pair->lvalue = rc_get_ipaddr(valstr); in rc_avpair_parse()
641 pair->lvalue = (UINT4) timelocal (tm); in rc_avpair_parse()
643 pair->lvalue = (UINT4) mktime (tm); in rc_avpair_parse()
648 error("rc_avpair_parse: unknown attribute type %d", pair->type); in rc_avpair_parse()
653 free (pair); in rc_avpair_parse()
656 pair->next = (VALUE_PAIR *) NULL; in rc_avpair_parse()
660 *first_pair = pair; in rc_avpair_parse()
669 link->next = pair; in rc_avpair_parse()
692 int rc_avpair_tostr (VALUE_PAIR *pair, char *name, int ln, char *value, int lv) in rc_avpair_tostr() argument
701 if (!pair || pair->name[0] == '\0') { in rc_avpair_tostr()
706 strncpy(name, pair->name, (size_t) ln); in rc_avpair_tostr()
708 switch (pair->type) in rc_avpair_tostr()
712 ptr = (unsigned char *) pair->strvalue; in rc_avpair_tostr()
733 dval = rc_dict_getval (pair->lvalue, pair->name); in rc_avpair_tostr()
740 sprintf (buffer, "%ld", pair->lvalue); in rc_avpair_tostr()
746 inad.s_addr = htonl(pair->lvalue); in rc_avpair_tostr()
752 gmtime ((time_t *) & pair->lvalue)); in rc_avpair_tostr()
757 error("rc_avpair_tostr: unknown attribute type %d", pair->type); in rc_avpair_tostr()