|
Packit |
eace71 |
/*
|
|
Packit |
eace71 |
* Copyright (C) 2018 Red Hat, Inc.
|
|
Packit |
eace71 |
*
|
|
Packit |
eace71 |
* This program is free software: you can redistribute it and/or modify
|
|
Packit |
eace71 |
* it under the terms of the GNU General Public License as published by
|
|
Packit |
eace71 |
* the Free Software Foundation, either version 3 of the License, or
|
|
Packit |
eace71 |
* (at your option) any later version.
|
|
Packit |
eace71 |
*
|
|
Packit |
eace71 |
* This program is distributed in the hope that it will be useful,
|
|
Packit |
eace71 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
eace71 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
eace71 |
* GNU General Public License for more details.
|
|
Packit |
eace71 |
*
|
|
Packit |
eace71 |
* You should have received a copy of the GNU General Public License
|
|
Packit |
eace71 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
eace71 |
*
|
|
Packit |
eace71 |
* Author: Gris Ge <fge@redhat.com>
|
|
Packit |
eace71 |
*/
|
|
Packit |
eace71 |
|
|
Packit |
eace71 |
#ifndef _GNU_SOURCE
|
|
Packit |
eace71 |
#define _GNU_SOURCE /* For NI_MAXHOST */
|
|
Packit |
eace71 |
#endif
|
|
Packit |
eace71 |
|
|
Packit |
eace71 |
#ifndef __ISCSI_USR_NODE_H__
|
|
Packit |
eace71 |
#define __ISCSI_USR_NODE_H__
|
|
Packit |
eace71 |
|
|
Packit |
eace71 |
#include <netdb.h>
|
|
Packit |
eace71 |
#include <stdint.h>
|
|
Packit |
eace71 |
|
|
Packit |
eace71 |
#include "idbm.h"
|
|
Packit |
eace71 |
#include "iface.h"
|
|
Packit |
eace71 |
|
|
Packit |
eace71 |
struct iscsi_node {
|
|
Packit |
eace71 |
char target_name[TARGET_NAME_MAXLEN];
|
|
Packit |
eace71 |
int32_t tpgt;
|
|
Packit |
eace71 |
enum iscsi_startup_type startup;
|
|
Packit |
eace71 |
enum leading_login_type leading_login;
|
|
Packit |
eace71 |
struct iscsi_session_idbm session;
|
|
Packit |
eace71 |
struct iscsi_conn conn;
|
|
Packit |
eace71 |
struct iscsi_iface iface;
|
|
Packit |
eace71 |
enum discovery_type disc_type;
|
|
Packit |
eace71 |
char disc_address[NI_MAXHOST];
|
|
Packit |
eace71 |
int32_t disc_port;
|
|
Packit |
eace71 |
char portal[NI_MAXHOST * 2];
|
|
Packit |
eace71 |
};
|
|
Packit |
eace71 |
|
|
Packit Service |
a6df48 |
#define NODE_CONFIG_DIR ISCSI_VAR_LIB"nodes"
|
|
Packit |
eace71 |
|
|
Packit |
eace71 |
/* Might be public in the future */
|
|
Packit |
eace71 |
__DLL_LOCAL void iscsi_node_free(struct iscsi_node *node);
|
|
Packit |
eace71 |
|
|
Packit |
eace71 |
#endif /* End of __ISCSI_USR_NODE_H__ */
|