This patch introduce the maxconn property to an iscsi target.
When set, the value is passed to ctl during the port_add ioctl and is saved in the cfiscsi structure along with nb_conn which is increased when we create a new session for a target and decreased when we destroy the session.
The (nbconn < maxconn) check itself is done by ctld when a new connection is accepted.
During the nego phase, ctld get the value of maxconn and nbconn from the target through the CTL_ISCSI IOCTL with the CTL_ISCSI_MAXONN req type.
The check is done in ctld during the nego phase because it is where it seemed the cleaner place to stop the incoming connection.
At first I did it in ctl_frontend_iscsi.c in the handoff ioctl but it is too late since we already have passed Full Feature Phase and the initiator is already logged in. So dropping the connection at this phase is more difficult and less pleasant from the initiator point of view.
I still need to modify some manpages I guess, but the code seemed good enough for a first review.