From: Arran Cudbard-Bell Date: Thu, 17 Nov 2016 13:04:50 +0000 (-0500) Subject: re-order fields in value_box to match PW_TYPE X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1eaf42ff4e96a0e816d2d356d83eae8b07a0779a;p=thirdparty%2Ffreeradius-server.git re-order fields in value_box to match PW_TYPE --- diff --git a/src/include/pair.h b/src/include/pair.h index 8b41b065e46..d7598441e25 100644 --- a/src/include/pair.h +++ b/src/include/pair.h @@ -62,35 +62,34 @@ struct value_box { union { char const *strvalue; //!< Pointer to UTF-8 string. uint8_t const *octets; //!< Pointer to binary string. + void *ptr; //!< generic pointer. struct in_addr ipaddr; //!< IPv4 Address. - uint32_t date; //!< Date (32bit Unix timestamp). - uint8_t filter[32]; //!< Ascend binary format a packed data structure. - - uint8_t ifid[8]; //!< IPv6 interface ID (should be struct?). + uint8_t ipv4prefix[6]; //!< IPv4 prefix (should be struct?). struct in6_addr ipv6addr; //!< IPv6 Address. uint8_t ipv6prefix[18]; //!< IPv6 prefix (should be struct?). + uint8_t ifid[8]; //!< IPv6 interface ID (should be struct?). + uint8_t ether[6]; //!< Ethernet (MAC) address. + bool boolean; //!< A truth value. uint8_t byte; //!< 8bit unsigned integer. uint16_t ushort; //!< 16bit unsigned integer. uint32_t integer; //!< 32bit unsigned integer. uint64_t integer64; //!< 64bit unsigned integer. size_t size; //!< System specific file/memory size. - int32_t sinteger; //!< 32bit signed integer. - uint8_t ether[6]; //!< Ethernet (MAC) address. + int32_t sinteger; //!< 32bit signed integer. struct timeval timeval; //!< A time value with usec precision. double decimal; //!< Double precision float. + uint32_t date; //!< Date (32bit Unix timestamp). - uint8_t ipv4prefix[6]; //!< IPv4 prefix (should be struct?). - - bool boolean; //!< A truth value. + uint8_t filter[32]; //!< Ascend binary format a packed data structure. - void *ptr; //!< generic pointer. } datum; - PW_TYPE type; //!< type of this value-data + PW_TYPE type; //!< Type of this value-box. + size_t length; //!< Length of value data. bool tainted; //!< i.e. did it come from an untrusted source