Remove files automagically added by GitHub

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add the top-level CMake build script

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add the "daemonize" and "list" modules from CCAN

CCAN allows to program in C with "batteries included".
I made the following change to the modules:

 * remove "test" directories and "_info" files
 * copy the license files in the modules' directory
 * remove HAVE_TYPEOF checks and always use typeof()

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add a stripped-down version of the str module from CCAN

Compared to the original str module, it only contains:

 * streq()
 * strstarts()
 * strends()
 * stringify()

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add a logging facility to syslog or to standard error

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add functions and data structures to watch the config file system

The configfs module watches the config file system with inotify
and builds an in-memory representation of the iSCSI configuration.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Import isns.c and isns_proto.h from the iscsitarget project

These files were downloaded from:

  http://svn.code.sf.net/p/iscsitarget/code/trunk at revision r496

These files are licensed under the terms of the GNU General Public
License version 2 or later.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Disable the code that really depends on iscsitarget in isns.c to build

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Replace log_debug() and log_error() in isns.c with our own logging function

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Replace GCC specific __FUNCTION__ with C99 __func__

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Remove use_isns and use_isns_ac variables

The use_isns variable is useless because we are an iSNS client :-)

Moreover, I also remove use_isns_ac because I don't know how to
handle it correctly.

Setting it to true allows to delegate access control to the iSNS
server. My (limited) understanding is that iSNS access control
requires LIO to ask the iSNS server before granting access to a
target. It probably cannot be done easily with the LIO iSCSI target
running in kernel space and an iSNS client running in userspace.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Convert some integers to boolean values

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add the isns.h header file

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Enable isns_target_register() and isns_target_deregister()

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Enable more iSNS functions

 * isns_scn_register()
 * isns_attr_query()
 * isns_deregister()
 * qry_rsp_handle()

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add utility functions to manage the pidfile and read the configuration

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add the target-isns program

This program is an iSNS client that runs as a service. At startup, it
registers the iSCSI targets to an iSNS server. It then monitors the
configfs file system for iSCSI targets being added, removed or
modified and send the changes to the iSNS server.

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add the default configuration file

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Add the COPYING file

The target-isns program is licensed under the GNU GPL version 2.

  http://www.gnu.org/licenses/gpl-2.0.txt

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Use SPDX license identifiers

This patch is inspired by a similar change in U-Boot. Replacing
license headers with SPDX license identifier eases the generation
of license clearing reports.

See the Software Package Data Exchange for details:

  http://spdx.org

Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>