/** Create a tracking table for one type of RADIUS packets.
*
* @param[in] ctx the talloc ctx
+ * @param[in] allowed_packets the array of packet codes which are tracked in this table.
* @return
* - NULL on error
* - fr_tracking_t * on success
(void) talloc_get_type_abort(ft, fr_tracking_t);
- if (!packet[0] || (packet[0] > FR_MAX_PACKET_CODE)) return -1;
+ if (!packet[0] || (packet[0] > FR_MAX_PACKET_CODE)) return FR_TRACKING_ERROR;
- if (!ft->codes[packet[0]]) return -1;
+ if (!ft->codes[packet[0]]) return FR_TRACKING_ERROR;
entry = &ft->codes[packet[0]][packet[1]];
* The status of an insert.
*/
typedef enum fr_tracking_status_t {
+ FR_TRACKING_ERROR = -1,
FR_TRACKING_UNUSED = 0,
FR_TRACKING_NEW,
FR_TRACKING_SAME,