e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainen/* timeout specifies how long it takes for penalty to be irrelevant. */
e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainen (AUTH_PENALTY_INIT_SECS + 4 + 8 + AUTH_PENALTY_MAX_SECS)
e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainen/* If lookup failed, penalty and last_update are both zero */
e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainentypedef void auth_penalty_callback_t(unsigned int penalty,
e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainenstruct auth_penalty *auth_penalty_init(const char *path);
e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainenvoid auth_penalty_deinit(struct auth_penalty **penalty);
e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainenunsigned int auth_penalty_to_secs(unsigned int penalty);
e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainenvoid auth_penalty_lookup(struct auth_penalty *penalty,
e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainenvoid auth_penalty_update(struct auth_penalty *penalty,
e76073ebaf90fa29abfdc364873acf78983949aaTimo Sirainen struct auth_request *auth_request, unsigned int value);