Starent VSA's is trivial.
We still have to make rad_attr2vp() support Starent VSA's, and
the Juniper encrypted integers & IP's
$INCLUDE dictionary.shiva
$INCLUDE dictionary.sonicwall
$INCLUDE dictionary.springtide
+$INCLUDE dictionary.starent
$INCLUDE dictionary.telebit
$INCLUDE dictionary.trapeze
$INCLUDE dictionary.t_systems_nova
# define AUTH_HDR_LEN 20
# define VENDORPEC_USR 429
#define VENDORPEC_LUCENT 4846
+#define VENDORPEC_STARENT 8164
# define VENDOR(x) ((x >> 16) & 0xffff)
# define DEBUG if (librad_debug) printf
# define debug_pair(vp) do { if (librad_debug) { \
*/
if ((vendor != VENDORPEC_USR) &&
(vendor != VENDORPEC_LUCENT) &&
+ (vendor != VENDORPEC_STARENT) &&
(value > 256)) {
librad_log("dict_addattr: ATTRIBUTE has invalid number (larger than 255).");
return -1;
*vsa_length_ptr += 3;
*ptr++ = 3;
total_length += 3;
+
+ } else if (vendorcode == VENDORPEC_STARENT) {
+ /*
+ * 16-bit attribute, 16-bit length
+ * with the upper 8 bits of the length
+ * always zero!
+ */
+ *ptr++ = ((vp->attribute >> 8) & 0xFF);
+ *ptr++ = (vp->attribute & 0xFF);
+ *ptr++ = 0;
+ length_ptr = ptr;
+ *vsa_length_ptr += 4;
+ *ptr++ = 4;
+ total_length += 4;
} else {
/*
* All other VSA's are encoded the same