2
* Copyright 2011 Red Hat, Inc.
4
* This copyrighted material is made available to anyone wishing to use,
5
* modify, copy, or redistribute it subject to the terms and conditions
6
* of the GNU General Public License v2 or (at your option) any later version.
22
int main(int argc, char *argv[])
24
char name[WDMD_NAME_SIZE];
25
uint64_t t, last_keepalive;
26
int test_interval, fire_timeout;
34
memset(name, 0, sizeof(name));
35
sprintf(name, "%s", "wdmd_client");
38
printf("wdmd_connect %d\n", con);
42
rv = wdmd_register(con, name);
43
printf("wdmd_register %d\n", rv);
47
rv = wdmd_status(con, &test_interval, &fire_timeout, &last_keepalive);
48
printf("wdmd_status %d test_interval %d fire_timeout %d last_keepalive %llu\n",
49
rv, test_interval, fire_timeout,
50
(unsigned long long)last_keepalive);
59
rv = wdmd_test_live(con, t, t + 40);
60
printf("wdmd_test_live %d %llu %llu\n", rv,
61
(unsigned long long)t,
62
(unsigned long long)(t + 40));
68
rv = wdmd_test_live(con, t, 0);
69
printf("wdmd_test_live 0 %d\n", rv);