[stgt] [PATCH 4/5] Call user defined callback progam from target_redirected()
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Tue Sep 7 02:49:45 CEST 2010
On Wed, 01 Sep 2010 17:46:09 -0700
Chandra Seetharaman <sekharan at us.ibm.com> wrote:
> Implement the calling of user defined callback.
>
> Basically, the callback is called from target_redirected() to get
> redirect address, redirect port and redirect reason in
> "string_addr:string_port:string_reason" syntax.
>
> Signed-Off-By: Chandra Seetharaman <sekharan at us.ibm.com>
> ---
> usr/iscsi/target.c | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> Index: tgt-1.0.8/usr/iscsi/target.c
> ===================================================================
> --- tgt-1.0.8.orig/usr/iscsi/target.c
> +++ tgt-1.0.8/usr/iscsi/target.c
> @@ -197,7 +197,38 @@ int target_redirected(struct iscsi_targe
> socklen_t len;
> int ret, rsn;
> char *p, *q, *str, *port, *addr;
> + char buffer[NI_MAXHOST + NI_MAXSERV + 4];
>
> + if (target->redirect_info.callback) {
> + bzero(buffer, NI_MAXHOST + NI_MAXSERV + 4);
> + ret = call_program(target->redirect_info.callback,
> + buffer, NI_MAXHOST + NI_MAXSERV + 4);
Are there more info thatp possibly might be useful to the external
program? The target name?
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list