ratelimiter_test.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 1999-2001, 2004, 2007, 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id: ratelimiter_test.c,v 1.18 2007/06/19 23:46:59 tbox Exp $ */
#include <config.h>
#include <isc/ratelimiter.h>
typedef struct {
int milliseconds;
} schedule_t;
schedule_t schedule[] = {
{ 100, utick },
{ 200, utick },
{ 300, utick },
{ 3000, utick },
{ 3100, utick },
{ 3200, utick },
{ 3300, shutdown_rl },
{ 5000, utick },
{ 6000, shutdown_all }
};
static void
printf("** ltick%s **\n",
" (canceled)" : "");
}
static void
printf("enqueue: %s\n",
}
static void
printf("shutdown ratelimiter\n");
}
static void
int i;
printf("shutdown all\n");
for (i = 0; i < NEVENTS; i++) {
isc_timer_detach(&timers[i]);
}
}
int
int i;
&rlim) == ISC_R_SUCCESS);
for (i = 0; i < NEVENTS; i++) {
&timers[i]) == ISC_R_SUCCESS);
}
isc_app_run();
return (0);
}