📄 iscsid.h
字号:
/* * iSCSI driver for Linux * Copyright (C) 2002 Cisco Systems, Inc. * maintained by linux-iscsi-devel@lists.sourceforge.net * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * See the file COPYING included with this distribution for more details. * * $Id: iscsid.h,v 1.6 2004/08/30 12:22:29 krishmnc Exp $ * * iscsid.h * * Main include for iSCSI daemon * */#ifndef ISCSID_H_#define ISCSID_H_#include <sys/param.h>/* header plus alignment plus max login pdu size + pad */#define ISCSI_LOGIN_BUFFER_SIZE ((2 * sizeof(struct iscsi_hdr)) + 4096 + 4)#include "iscsi-config.h"/* structures representing processes that the main daemon has started */struct iscsi_session_process { struct iscsi_session_process *volatile next; struct iscsi_session_process *volatile prev; struct iscsi_session_config *volatile config; unsigned long config_number; pid_t pid; int remove; /* kill and remove this from the list * at the next opportunity */ int restart; /* restart if the pid is 0 */ int failed; /* process failed, don't restart unless * the user reloads the config */ int lun_inventory_changed; /* the session's LUNs may * have changed */};struct iscsi_discovery_process { struct iscsi_discovery_process *volatile prev; struct iscsi_discovery_process *volatile next; struct iscsi_config_entry *entry; pid_t pid; int order; int pipe_fd; int in_progress; int remove; /* kill and remove this from the * list at the next opportunity */ int restart; /* restart if the pid is 0 */ unsigned short flag; /* UNICAST or MULTICAST */};struct iscsi_discovery_process_list { struct iscsi_discovery_process *volatile head; struct iscsi_discovery_process *volatile tail; int changed; int count;};struct iscsi_session_process_list { struct iscsi_session_process *volatile head; struct iscsi_session_process *volatile tail; int changed; int lun_inventory_changed; int count;};struct iscsi_target_config;struct iscsi_target { struct iscsi_target *next; char *TargetName; struct iscsi_target_config *new_config; struct iscsi_target_config *current_config; struct iscsi_portal_descriptor *new_portals; /* one or more portals * referenced by the * new_config */ struct iscsi_portal_descriptor *current_portals; /* one or more portals referenced by * the current_config */ /* used for tracking which process gets to propagate auth * credentials to this target, to avoid flapping */ struct iscsi_discovery_process *discovery; int discovered;};struct iscsi_target_list { struct iscsi_target *volatile head; struct iscsi_target *volatile tail; int lun_inventory_changed; int check_configs;};/* daemon config */struct iscsi_daemon_config { char *config_file; char *pid_file; char *initiator_name_file; char *initiator_name; char *initiator_alias; int debug_level; /* for use by debugmsg */ int foreground; /* if non-zero, the main process will remain * in the foreground, instead of daemonizing * itself. */};/* let everything access the daemon config */extern struct iscsi_daemon_config daemon_config;/* handling session processes */extern void add_session_process(struct iscsi_session_process_list *list, struct iscsi_session_process *process);extern void remove_session_process(struct iscsi_session_process_list *list, struct iscsi_session_process *process);extern void free_session_process(struct iscsi_session_process *process);/* Offline warn message function */extern void offline_warn(char *offline, struct iscsi_session_config *config);/* exit code for session processes that failed, but shouldn't be retried */#define ISCSI_SESSION_FAILED_NO_RETRY 100#define CHAP_AUTHENTICATION 1#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -