replaced get_rsa_private_key() by rsa_signature() in order restrict the distribution...
[strongswan.git] / src / libstrongswan / printf_hook.h
1 /**
2 * @file printf_hook.h
3 *
4 * @brief Printf hook definitions and arginfo functions.
5 *
6 */
7
8 /*
9 * Copyright (C) 2006 Martin Willi
10 * Hochschule fuer Technik Rapperswil
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
21 */
22
23 #ifndef PRINTF_HOOK_H_
24 #define PRINTF_HOOK_H_
25
26 #include <printf.h>
27
28 /**
29 * Printf() hook characters.
30 * We define all characters here to have them on a central place.
31 */
32
33 /** 2 arguments: u_char *buffer, int size */
34 #define PRINTF_BYTES 'b'
35 /** 1 argument: chunk_t *chunk; use #-modifier to print inline */
36 #define PRINTF_CHUNK 'B'
37 /** 1 argument: identification_t *id */
38 #define PRINTF_IDENTIFICATION 'D'
39 /** 1 argumnet: host_t *host; use #-modifier to include port number */
40 #define PRINTF_HOST 'H'
41 /** 1 argument: ike_sa_t *ike_sa */
42 #define PRINTF_ENUM 'N'
43 /** 1 argument: child_sa_t *child_sa */
44 #define PRINTF_TRAFFIC_SELECTOR 'R'
45 /** 1 argument: time_t *time; with #-modifier 2 arguments: time_t *time, bool utc */
46 #define PRINTF_TIME 'T'
47 /** 2 arguments: time_t *begin, time_t *end */
48 #define PRINTF_TIME_DELTA 'V'
49
50 /**
51 * Generic arginfo handlers for printf() hooks
52 */
53 int arginfo_ptr(const struct printf_info *info, size_t n, int *argtypes);
54 int arginfo_ptr_ptr(const struct printf_info *info, size_t n, int *argtypes);
55 int arginfo_ptr_int(const struct printf_info *info, size_t n, int *argtypes);
56 int arginfo_int_int(const struct printf_info *info, size_t n, int *argtypes);
57 int arginfo_ptr_alt_ptr_int(const struct printf_info *info, size_t n, int *argtypes);
58 int arginfo_int_alt_int_int(const struct printf_info *info, size_t n, int *argtypes);
59
60 #endif /* PRINTF_HOOK_H_ */