]> git.saurik.com Git - apple/ipsec.git/blame - ipsec-tools/racoon/ipsecSessionTracer.h
ipsec-93.8.tar.gz
[apple/ipsec.git] / ipsec-tools / racoon / ipsecSessionTracer.h
CommitLineData
d1e348cf
A
1/*
2 * Copyright (c) 2008 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23#ifndef _IPSECSESSIONTRACER_H
24#define _IPSECSESSIONTRACER_H
25
26typedef enum ipsecSessionEventCode {
27 IPSECSESSIONEVENTCODE_NONE = 0,
28 IPSECSESSIONEVENTCODE_IKE_PACKET_TX_SUCC,
29 IPSECSESSIONEVENTCODE_IKE_PACKET_TX_FAIL,
30 IPSECSESSIONEVENTCODE_IKE_PACKET_RX_SUCC,
31 IPSECSESSIONEVENTCODE_IKE_PACKET_RX_FAIL,
32 IPSECSESSIONEVENTCODE_IKEV1_PH1_INIT_SUCC,
33 IPSECSESSIONEVENTCODE_IKEV1_PH1_INIT_FAIL,
34 IPSECSESSIONEVENTCODE_IKEV1_PH1_INIT_DROP,
35 IPSECSESSIONEVENTCODE_IKEV1_PH1_RESP_SUCC,
36 IPSECSESSIONEVENTCODE_IKEV1_PH1_RESP_FAIL,
37 IPSECSESSIONEVENTCODE_IKEV1_PH1_RESP_DROP,
38 IPSECSESSIONEVENTCODE_IKEV1_PH1_MAX_RETRANSMIT,
39 IPSECSESSIONEVENTCODE_IKEV1_PH1_AUTH_SUCC,
40 IPSECSESSIONEVENTCODE_IKEV1_PH1_AUTH_FAIL,
41 IPSECSESSIONEVENTCODE_IKEV1_DPD_INIT_REQ,
42 IPSECSESSIONEVENTCODE_IKEV1_DPD_INIT_RESP,
43 IPSECSESSIONEVENTCODE_IKEV1_DPD_INIT_RETRANSMIT,
44 IPSECSESSIONEVENTCODE_IKEV1_DPD_RESP_REQ,
45 IPSECSESSIONEVENTCODE_IKEV1_DPD_RESP_RESP,
46 IPSECSESSIONEVENTCODE_IKEV1_DPD_RESP_RETRANSMIT,
47 IPSECSESSIONEVENTCODE_IKEV1_DPD_MAX_RETRANSMIT,
48 IPSECSESSIONEVENTCODE_IKEV1_CFG_RETRANSMIT,
49 IPSECSESSIONEVENTCODE_IKEV1_MODECFG_SUCC,
50 IPSECSESSIONEVENTCODE_IKEV1_MODECFG_FAIL,
51 IPSECSESSIONEVENTCODE_IKEV1_MODECFG_DROP,
52 IPSECSESSIONEVENTCODE_IKEV1_XAUTH_SUCC,
53 IPSECSESSIONEVENTCODE_IKEV1_XAUTH_FAIL,
54 IPSECSESSIONEVENTCODE_IKEV1_XAUTH_DROP,
55 IPSECSESSIONEVENTCODE_IKEV1_PH2_INIT_SUCC,
56 IPSECSESSIONEVENTCODE_IKEV1_PH2_INIT_FAIL,
57 IPSECSESSIONEVENTCODE_IKEV1_PH2_INIT_DROP,
58 IPSECSESSIONEVENTCODE_IKEV1_PH2_RESP_SUCC,
59 IPSECSESSIONEVENTCODE_IKEV1_PH2_RESP_FAIL,
60 IPSECSESSIONEVENTCODE_IKEV1_PH2_RESP_DROP,
61 IPSECSESSIONEVENTCODE_IKEV1_PH2_MAX_RETRANSMIT,
62 IPSECSESSIONEVENTCODE_IKEV1_PH2_AUTH_SUCC,
63 IPSECSESSIONEVENTCODE_IKEV1_PH2_AUTH_FAIL,
64 IPSECSESSIONEVENTCODE_IKEV1_INFO_NOTICE_TX_SUCC,
65 IPSECSESSIONEVENTCODE_IKEV1_INFO_NOTICE_TX_FAIL,
66 IPSECSESSIONEVENTCODE_IKEV1_INFO_NOTICE_RX_SUCC,
67 IPSECSESSIONEVENTCODE_IKEV1_INFO_NOTICE_RX_FAIL,
68 IPSECSESSIONEVENTCODE_MAX,
69} ipsecSessionEventCode_t;
70
71const char * ipsecSessionEventCodeToString (ipsecSessionEventCode_t);
72void ipsecSessionTracerStart (ike_session_t *);
73void ipsecSessionTracerEvent (ike_session_t *, ipsecSessionEventCode_t, const char *, const char *);
74void ipsecSessionTracerStop (ike_session_t *, int, const char *);
75void ipsecSessionTracerLogEstablished (ike_session_t *session);
76
77#endif /* _IPSECSESSIONTRACER_H */