Commit Graph

29 Commits

Author SHA1 Message Date
Ronnie Sahlberg
cb44ad4e26 Add multithreading helpers
Add an abstraction for mutexts and threads
that handles both pthread api and native win32 api

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2025-03-07 08:46:47 +10:00
Ronnie Sahlberg
b8d9fbf5e3 Add CHAP SHA3-256 support
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2025-01-04 14:20:28 +10:00
Ronnie Sahlberg
34e83f7dbd Add support for CHAP with SHA-256
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2025-01-04 09:09:02 +10:00
Ronnie Sahlberg
95a0d98cfd Add support for CHAP using SHA1
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2025-01-04 00:59:02 +10:00
Paolo Bonzini
35fec3ea0e login: add support for gnutls
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-04-09 16:06:35 +02:00
Ronnie Sahlberg
d960e6253c New version 1.20.0
Mostly various updates to the test tool

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2024-02-05 16:59:18 +10:00
zhenwei pi
a6a664e8cb Abstract value_string as common utility
Originally, we use this in scsi-lowlevel.c only, this works as static
function. It also could be used to dump ISCSI opcode, so move it into
common utils.h/utils.c.

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
2023-12-01 10:13:20 +08:00
Bart Van Assche
5e6f6ec5ed MinGW: Second step of porting to MinGW 2021-07-18 20:13:03 -07:00
Bart Van Assche
8b4670db3e ci: First phase of adding MingW support 2021-07-17 21:06:19 -07:00
Bart Van Assche
2a5a0b3291 Enable -Wno-unused-parameter
Instead of adding __attribute__((unused)) to unused arguments, add the
-Wno-unused-parameter compiler flag.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2021-05-23 13:23:41 -07:00
Bart Van Assche
ea6b2282d4 Use __attribute__((format(printf, ...))) directly
Instead of defining the macro _R_(), define __attribute__() as a macro for
compilers that do not support __attribute__(), namely Microsoft Visual
Studio.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2021-05-23 11:52:40 -07:00
orbea
c437afa825 build: Add -no-undefined where missing
Signed-off-by: orbea <orbea@riseup.net>
2021-05-22 19:32:12 -07:00
orbea
9649fe1ddc build: Correct usage of LIBADD and LDADD
Signed-off-by: orbea <orbea@riseup.net>
2021-05-22 19:31:52 -07:00
Bart Van Assche
30fc526c6e Link with -lpthread if iSER is enabled
This patch fixes the following linker error:

/usr/bin/ld: ../lib/.libs/libiscsipriv.a(libiscsipriv_la-iser.o): undefined reference to symbol 'sem_post@@GLIBC_2.2.5'
/usr/bin/ld: //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2019-10-31 14:16:38 -07:00
David Disseldorp
9c78c6d2af build: add convenience library which exports all symbols
Add a new libiscsipriv.la noinst convenience library, which can then be
used by test-tool for low-level PDU manipulation.

Link: https://github.com/sahlberg/libiscsi/issues/297
Signed-off-by: David Disseldorp <ddiss@suse.de>
2019-09-18 01:25:15 +02:00
Ronnie Sahlberg
eea5d3ba8e new version 1.19.0
Minor updates to the library

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2019-07-14 08:04:44 +10:00
Vicente Olivert Riera
f27bdf64f0 Do not use -I/usr/include. This is considered unsafe when cross-compiling
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
2016-10-16 10:53:13 +01:00
Ronnie Sahlberg
b8eb923009 New version 1.18.0
- Various updates to the test utility
- Add transport abstraction
- Add support for iSER
- Add iscsi_discovery_sync()

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-10-09 11:54:10 -07:00
Roy Shterman
a628264ef0 Libiscsi: iSER implementation
This commit includes all iSER implementation in libscsi
library and utilities.

Also, adding iser option in url.

Change-Id: I55ca8a9d4db802e72eb991061260dbb0bd0ef9ba
Signed-off-by: Roy Shterman <roysh@mellanox.com>
2016-06-03 18:59:01 -07:00
Ronnie Sahlberg
8da7b8df3e New version 1.17.0
This release contains a bugfix for a rare condition where
if a DATA-OUT PDU has a callback registered, it can cause a crash
on reconnect/timeout.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-05-08 12:37:59 -07:00
Paolo Bonzini
edc5a80857 bump ABI version again
Commit 80b81772e2 again broke
the libiscsi ABI.  Bump the soname of the library.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-03-30 18:07:29 +02:00
Ronnie Sahlberg
96c00b2178 New version 1.15.0
- Replace some u_int32_t with uint32_t
- Portability fixes to iscsi-perf
- Improved documentation for the tests in README
- Add/fix support for setting task/pdu timeouts and add unit tests for it.
- Add multipath helpers for the test suite and add a simple multipath test
- Skip sending TUR during reconnect, since it can cause the connection to
-   hang.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-06-21 08:50:50 -07:00
Ronnie Sahlberg
dfeefd6539 New version 1.14.0
- Add support to use /dev/* nodes instead of just iscsi devices.
 - Create a dedicated test for the FUA/DPO flags
 - Allow reusing the context after disconnect
 - Fix non-randomness in rand_key()
 - Add iscsi-perf tool
 - Fix length bug when sending unsolicited data in iscsi_command
 - Reqrite the reconnect logic to begome fully async
 - Fix wrong checks for username in CHAP
 - Support Bidirectional CHAP
 - Improve handling of IMMEDIATE bit
 - Cmdsn, statsn fixes+
 - iscsi_which_events can return 0, which means that there are no events right
   now but try again in a second or so.
 - Ignore any ASYNC EVENTS we receive since we can not yet pass them back to
   the application.
 - Add initial make test support
 - Various minor fixes to libiscsi and the test suite

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-05-10 09:14:11 -07:00
Chris Zankel
e186169064 build: fix 'out-of-tree' build
Prefix include paths with '${srcdir}' to allow 'out-of-tree' builds:

  cd $BUILD
  $LIBISCSI/configure
  make

Signed-off-by: Chris Zankel <chris@zankel.net>
2015-04-22 18:18:14 -07:00
Ronnie Sahlberg
646c8b963d New version 1.13.0
- Fix UNMAP tests
 - Build updates
 - Check residuals also when status != GOOD
 - Add WSNZ bit to the tests
 - Various test updates
 - Fix bug in scsi_create_task so it sets cdb_len correctly
 - Add a getter function for scsi task status and sense
 - Fixes and workarounds for Dell Equallogic issues
 - Be more flexible when allowing for unit attentions during connect time

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-12-21 14:58:46 -08:00
Paolo Bonzini
267343dca5 bump ABI version again
1.10 and 1.11 both introduced incompatible changes to the
libiscsi ABI.  Please do not do that, and feel free to Cc
me on any patch that touches include/.  In the meanwhile,
bump the soname of the library.  I suggest releasing 1.11.1
with this change for distros.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-06-10 13:38:46 +02:00
Ronnie Sahlberg
fe669580ee New version 1.11.0
This version contains changes for:
 - Fix memory leaks in persistent reserve out.
 - Fix various leaks in the testsuite.
 - Add additional READ16 tests
 - Better logging when reconnect fails.
 - Discovery and Login fixes.
 - Various fixes found by coverity.
 - WRITESAME test updates.
 - Add XML oputput support for the testsuite.
and various other things.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-04-19 12:06:45 -07:00
Ronnie Sahlberg
24601a36ee MAKEFILE.AM cleanups 2014-03-22 18:21:27 -07:00
Ronnie Sahlberg
65d3597c1b AUTOTOOLS: Create Makefile.am for lib 2014-03-22 13:10:15 -07:00