value_data_t *next; //!< Next in a series of value_data.
union {
- uint8_t data; //!< so we can refer to a FIELD and not to a UNION
+ uint8_t datum; //!< so we can refer to a FIELD and not to a UNION
char const *strvalue; //!< Pointer to UTF-8 string.
uint8_t const *octets; //!< Pointer to binary string.
case PW_TYPE_ABINARY:
case PW_TYPE_ETHERNET:
case PW_TYPE_COMBO_IP_ADDR:
- memcpy(out, &vp->data.data, outlen);
+ memcpy(out, &vp->data.datum, outlen);
break;
case PW_TYPE_BOOLEAN:
return; /* shouldn't happen */
default:
- memcpy(dst, src, src_len);
+ memcpy(&dst->datum, src, src_len);
+ break;
}
}
* Converts the src data to octets with no processing.
*/
if (dst_type == PW_TYPE_OCTETS) {
- value_data_hton(dst, src_type, &src->data, src->length);
- dst->octets = talloc_memdup(ctx, dst, src->length);
+ value_data_hton(dst, src_type, &src->datum, src->length);
+ dst->octets = talloc_memdup(ctx, &dst->datum, src->length);
dst->length = src->length;
talloc_set_type(dst->octets, uint8_t);
return 0;
dst->integer = htonl(src->ipaddr.s_addr);
} else { /* they're of the same byte order */
- memcpy(&dst, &src, src->length);
+ memcpy(&dst->datum, &src->datum, src->length);
}
dst->length = src->length;
map->rhs->quote = T_BARE_WORD;
}
} else {
- memcpy(&map->rhs->tmpl_data_value, &vp->data.data, sizeof(map->rhs->tmpl_data_value));
+ memcpy(&map->rhs->tmpl_data_value, &vp->data.datum, sizeof(map->rhs->tmpl_data_value));
map->rhs->quote = T_BARE_WORD;
}
map->rhs->name = fr_pair_value_asprint(map->rhs, vp, fr_token_quote[map->rhs->quote]);
{
value_data_t data;
- value_data_hton(&data, vp->da->type, &vp->data.data, vp->vp_length);
+ value_data_hton(&data, vp->da->type, &vp->data.datum, vp->vp_length);
memcpy(&p[2], &data, vp->vp_length);
}
* to limit to the types of the IANA registered attributes.
*/
default:
- memcpy(&p[2], &vp->data.data, vp->vp_length);
+ memcpy(&p[2], &vp->data.datum, vp->vp_length);
break;
}
tmpl_find_vp(&vp, request, inst->key);
if (!vp) return RLM_MODULE_NOOP;
- hash = fr_hash(&vp->data.data, vp->vp_length);
+ hash = fr_hash(&vp->data.datum, vp->vp_length);
hash &= 0xff; /* ensure it's 0..255 */
value = hash;