libiscsi
libiscsi.h
Go to the documentation of this file.
1 /*
2  * iSCSI Administration library
3  *
4  * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved.
5  * Copyright (C) 2008-2009 Hans de Goede <hdegoede@redhat.com>
6  * maintained by open-iscsi@googlegroups.com
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published
10  * by the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * See the file COPYING included with this distribution for more details.
19  */
20 
21 #ifndef __LIBISCSI_H
22 #define __LIBISCSI_H
23 
24 #include <netdb.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29 
30 #if __GNUC__ >= 4
31 #define PUBLIC __attribute__ ((visibility("default")))
32 #else
33 #define PUBLIC
34 #endif
35 
40 #define LIBISCSI_VALUE_MAXLEN 256
41 
49 };
50 
57 struct libiscsi_context;
58 
63 struct libiscsi_node {
65  int tpgt ;
66  /* Note open-iscsi has some code in place for multiple connections in one
67  node record and thus multiple address / port combi's, but this does not
68  get used anywhere, so we keep things simple and assume one connection */
69  char address[NI_MAXHOST] ;
70  int port ;
72 };
73 
85 };
86 
93  union {
95  } ;
96 };
97 
106 
114 PUBLIC void libiscsi_cleanup(struct libiscsi_context *context);
115 
142  const char *address, int port, const struct libiscsi_auth_info *auth_info,
143  int *nr_found, struct libiscsi_node **found_nodes);
144 
168  int *nr_found, struct libiscsi_node **found_nodes);
169 
182  const struct libiscsi_auth_info *auth_info);
183 
208  const struct libiscsi_node *node,
209  const struct libiscsi_auth_info *auth_info);
210 
224  const struct libiscsi_node *node,
225  struct libiscsi_auth_info *auth_info);
226 
236 PUBLIC int libiscsi_node_login(struct libiscsi_context *context,
237  const struct libiscsi_node *node);
238 
248 PUBLIC int libiscsi_node_logout(struct libiscsi_context *context,
249  const struct libiscsi_node *node);
250 
263  const struct libiscsi_node *node,
264  const char *parameter, const char *value);
265 
279  const struct libiscsi_node *node, const char *parameter, char *value);
280 
292 PUBLIC const char *libiscsi_get_error_string(struct libiscsi_context *context);
293 
294 
295 /************************** Utility functions *******************************/
296 
302  int dhcp ;
310 };
311 
326  struct libiscsi_network_config *config);
327 
336 PUBLIC int libiscsi_get_firmware_initiator_name(char *initiatorname);
337 
338 #undef PUBLIC
339 
340 #ifdef __cplusplus
341 }
342 #endif /* __cplusplus */
343 
344 #endif

Generated for libiscsi by doxygen 1.8.4