unsigned int evs : 1; //!< Extended VSA.
unsigned int wimax: 1; //!< WiMAX format=1,1,c.
- int8_t tag; //!< Tag for tunneled.
- //!< Attributes.
uint8_t encrypt; //!< Ecryption method.
uint8_t length;
} ATTR_FLAGS;
//!< moving or inserting
//!< valuepair into a list.
+ int8_t tag; //!< Tag for tunneled.
+ //!< Attributes.
+
ATTR_FLAGS flags;
size_t length; /* of data field */
if(vp->da->flags.has_tag) {
snprintf(out, outlen, "%s:%d %s ",
- vp->da->name, vp->flags.tag, token);
+ vp->da->name, vp->tag, token);
len = strlen(out);
vp_prints_value(out + len, outlen - len, vp, 1);
return -1;
}
- if (lvalue) ptr[0] = vp->flags.tag;
+ if (lvalue) ptr[0] = vp->tag;
make_tunnel_passwd(ptr + lvalue, &len, data, len,
room - lvalue,
secret, original->vector);
case PW_ACCOUNTING_REQUEST:
case PW_DISCONNECT_REQUEST:
case PW_COA_REQUEST:
- ptr[0] = vp->flags.tag;
+ ptr[0] = vp->tag;
make_tunnel_passwd(ptr + 1, &len, data, len - 1, room,
secret, packet->vector);
break;
default:
- if (vp->da->flags.has_tag && TAG_VALID(vp->flags.tag)) {
+ if (vp->da->flags.has_tag && TAG_VALID(vp->tag)) {
if (vp->da->type == PW_TYPE_STRING) {
if (len > ((ssize_t) (room - 1))) len = room - 1;
- ptr[0] = vp->flags.tag;
+ ptr[0] = vp->tag;
ptr++;
} else if (vp->da->type == PW_TYPE_INTEGER) {
- array[0] = vp->flags.tag;
+ array[0] = vp->tag;
} /* else it can't be any other type */
}
memcpy(ptr, data, len);
* Tunnel passwords REQUIRE a tag, even
* if don't have a valid tag.
*/
- vp->flags.tag = data[0];
+ vp->tag = data[0];
if ((vp->type == PW_TYPE_STRING) ||
(vp->type == PW_TYPE_OCTETS)) {
while (first) {
if ((first->attribute == attr) && (first->vendor == vendor)
&& ((tag == TAG_ANY) ||
- (first->flags.has_tag && (first->flags.tag == tag)))) {
+ (first->flags.has_tag && (first->tag == tag)))) {
return first;
}
first = first->next;
next = i->next;
if ((i->da->attr == attr) && (i->da->vendor == vendor) &&
((tag == TAG_ANY) ||
- (i->da->flags.has_tag && (i->flags.tag == tag)))) {
+ (i->da->flags.has_tag && (i->tag == tag)))) {
*last = next;
pairbasicfree(i);
} else {
* and return.
*/
if ((i->da == replace->da) &&
- (!i->da->flags.has_tag || (i->flags.tag == replace->flags.tag))
+ (!i->da->flags.has_tag || (i->tag == replace->tag))
) {
*prev = replace;
goto skip;
if ((tag != TAG_ANY) && vp->da->flags.has_tag &&
- (vp->flags.tag != tag)) {
+ (vp->tag != tag)) {
goto skip;
}
next = i->next;
if ((tag != TAG_ANY) && i->da->flags.has_tag &&
- (i->flags.tag != tag)) {
+ (i->tag != tag)) {
continue;
}
}
if (found_tag) {
- vp->flags.tag = tag;
+ vp->tag = tag;
}
switch (vp->op) {
* tag AND value match.
*/
if (check->da->flags.has_tag) {
- ret = ((int) vp->flags.tag) - ((int) check->flags.tag);
+ ret = ((int) vp->tag) - ((int) check->tag);
if (ret != 0) return ret;
}
(char *)i->vp_strvalue) == 0)) {
pairdelete(to, found->da->attr,
found->da->vendor,
- found->flags.tag);
+ found->tag);
/*
* 'tailto' may have been
* <attribute>:<tag>, others just use the normal attribute
* name as the key.
*/
- if (nvp->da->flags.has_tag && (nvp->flags.tag != 0)) {
+ if (nvp->da->flags.has_tag && (nvp->tag != 0)) {
snprintf(namebuf, sizeof(namebuf), "%s:%d",
- nvp->da->name, nvp->flags.tag);
+ nvp->da->name, nvp->tag);
name = namebuf;
} else {
name = nvp->da->name;
* Create a new list with all the attributes like this one
* which are in the same tag group.
*/
- vpa = paircopy2(nvp, nvp->da->attr, nvp->da->vendor, nvp->flags.tag);
+ vpa = paircopy2(nvp, nvp->da->attr, nvp->da->vendor, nvp->tag);
/*
* Attribute has multiple values
* Finally remove all the VPs we processed from our copy
* of the list.
*/
- pairdelete(&nvp, nvp->da->attr, nvp->da->vendor, nvp->flags.tag);
+ pairdelete(&nvp, nvp->da->attr, nvp->da->vendor, nvp->tag);
}
pairfree(&nvp); /* shouldn't be necessary, but hey... */
/* Look at the vp_print_name? */
if (vp->da->flags.has_tag)
- pStr = PyString_FromFormat("%s:%d", vp->da->name, vp->flags.tag);
+ pStr = PyString_FromFormat("%s:%d", vp->da->name, vp->tag);
else
pStr = PyString_FromString(vp->da->name);
/* The name. logic from vp_prints, lib/print.c */
if (vp->da->flags.has_tag) {
- snprintf(buf, BUF_SIZE, "%s:%d", vp->da->name, vp->flags.tag);
+ snprintf(buf, BUF_SIZE, "%s:%d", vp->da->name, vp->tag);
} else {
strcpy(buf, vp->da->name);
}