#define PW_TYPE_DATE 3
#define PW_TYPE_ABINARY 4
#define PW_TYPE_OCTETS 5
+#define PW_TYPE_T_STRING 6
+#define PW_TYPE_T_INTEGER 7
#define PW_AUTHENTICATION_REQUEST 1
#define PW_AUTHENTICATION_ACK 2
char buf[1024];
char *a;
time_t t;
+ int offset;
out[0] = 0;
if (!vp) return 0;
a = buf;
break;
+ case PW_TYPE_T_STRING:
+ if (delimitst) {
+ offset = snprintf(buf, sizeof(buf),
+ "\"%u:", vp->strvalue[0]);
+ librad_safeprint((char *)(vp->strvalue + 1),
+ vp->length - 1,
+ buf + offset,
+ sizeof(buf) - offset);
+ strcat(buf, "\"");
+ } else {
+ offset = snprintf(buf, sizeof(buf),
+ "%u:", vp->strvalue[0]);
+ librad_safeprint((char *)(vp->strvalue + 1),
+ vp->length - 1,
+ buf + offset,
+ sizeof(buf) - offset);
+ }
+
+ a = buf;
+
+ break;
+
+ case PW_TYPE_T_INTEGER:
+ offset = snprintf(buf, sizeof(buf), "%u:", (vp->lvalue >> 24));
+ if ((v = dict_valbyattr(vp->attribute, (vp->lvalue)))
+ != NULL)
+ snprintf(buf + offset, sizeof(buf) - offset,
+ "%s", v->name);
+ else {
+ snprintf(buf + offset, sizeof(buf) - offset,
+ "%u", vp->lvalue);
+
+ }
+
+ a = buf;
+
+ break;
default:
a = 0;
break;
case PW_TYPE_OCTETS:
case PW_TYPE_ABINARY:
case PW_TYPE_STRING:
+ case PW_TYPE_T_STRING:
/*
* Hmm... this is based on names right
* now. We really shouldn't do this.
case PW_TYPE_INTEGER:
case PW_TYPE_DATE:
case PW_TYPE_IPADDR:
+ case PW_TYPE_T_INTEGER:
/*
* Check for RFC compliance. If the
* attribute isn't compliant, turn it