1 #ifndef ISCSI_TARGET_STAT_H
2 #define ISCSI_TARGET_STAT_H
5 * For struct iscsi_tiqn->tiqn_wwn default groups
7 extern struct config_item_type iscsi_stat_instance_cit
;
8 extern struct config_item_type iscsi_stat_sess_err_cit
;
9 extern struct config_item_type iscsi_stat_tgt_attr_cit
;
10 extern struct config_item_type iscsi_stat_login_cit
;
11 extern struct config_item_type iscsi_stat_logout_cit
;
14 * For struct iscsi_session->se_sess default groups
16 extern struct config_item_type iscsi_stat_sess_cit
;
18 /* iSCSI session error types */
19 #define ISCSI_SESS_ERR_UNKNOWN 0
20 #define ISCSI_SESS_ERR_DIGEST 1
21 #define ISCSI_SESS_ERR_CXN_TIMEOUT 2
22 #define ISCSI_SESS_ERR_PDU_FORMAT 3
24 /* iSCSI session error stats */
25 struct iscsi_sess_err_stats
{
28 u32 cxn_timeout_errors
;
29 u32 pdu_format_errors
;
30 u32 last_sess_failure_type
;
31 char last_sess_fail_rem_name
[224];
32 } ____cacheline_aligned
;
34 /* iSCSI login failure types (sub oids) */
35 #define ISCSI_LOGIN_FAIL_OTHER 2
36 #define ISCSI_LOGIN_FAIL_REDIRECT 3
37 #define ISCSI_LOGIN_FAIL_AUTHORIZE 4
38 #define ISCSI_LOGIN_FAIL_AUTHENTICATE 5
39 #define ISCSI_LOGIN_FAIL_NEGOTIATE 6
41 /* iSCSI login stats */
42 struct iscsi_login_stats
{
48 u32 authenticate_fails
;
49 u32 negotiate_fails
; /* used for notifications */
50 u64 last_fail_time
; /* time stamp (jiffies) */
52 int last_intr_fail_ip_family
;
53 struct sockaddr_storage last_intr_fail_sockaddr
;
54 char last_intr_fail_name
[224];
55 } ____cacheline_aligned
;
57 /* iSCSI logout stats */
58 struct iscsi_logout_stats
{
62 } ____cacheline_aligned
;
64 #endif /*** ISCSI_TARGET_STAT_H ***/