📄 ndmprun.l
字号:
.\" Copyright (c) 1996,1997 PDC, Network Appliance. All Rights Reserved..\" $Id: ndmpRun.l,v 1.3 1997/02/01 09:50:34 tim Exp $'\"macro stdmacro.nr X.TH ndmpRun l "02 Jan 1997".SH NAMEndmpRun \- waits for and accepts NDMP connections.SH SYNOPSIS.LP.nf.ft 3#include <ndmp_common.h>.ft.fi.LP.BI "void ndmpRun(u_long port,".if n .ti +5n.BI "bool_t dofork,".if n .ti +5n.BI "NdmpMsgHandler* msgHandlerTbl,".if n .ti +5n.BI "NdmpConHandlerFunc* conHandlerFunc" );.SH DESCRIPTION.B ndmpRun(\|)does not return except upon detection of a fatal error.It listens for and accepts NDMP connections from NDMP clients.After accepting a connection, if.IR doforkis TRUE, .B ndmpRun(\|)forks a child process to handle the new connection.Otherwise, the connection is handled by the parent processand additional connections will not be accepted until the connection has been closed and the connection handler functionhas returned..IR portspecifies the port number to use for listening for NDMP connections.If.IR portis 0, the port number is looked up in the services database..IR msgHandlerTblspecifies an array of message handlers defined as follows:.RS.nf.ft 3typedef struct NdmpMsgHandler{ ndmp_message message; NdmpMsgHandlerFunc* func; bool_t auth_required; bool_t (*xdr_request)(); int sizeof_request; bool_t (*xdr_reply)(); int sizeof_reply;} NdmpMsgHandler;.fi.ft 1.RE.LP.IR messageidentifies the NDMP message number..IR funcspecifies a handler function to be called when the request messageis received. The function has the following prototype:.RS.nf.ft 3void func(NdmpConnection connection, void* request);.fi.ft 1.RE.LP.IR connectionis the NDMP connection handle for the connection..IR requestis a pointer to the body of the received request..IR auth_requiredindicates if the connection needs to be authorized prior to processingthe request. If .IR auth_requiredis TRUE and the request is received prior to the connection beingauthorized, an NDMP_NOT_AUTHORIZED_ERR is returned to the sender..IR xdr_requestspecifies the XDR function to be used for encoding/decoding therequest message..IR sizeof_requestis the size of the request message body..IR xdr_replyspecifies the XDR function to be used for encoding/decoding thereply message..IR sizeof_replyis the size of the reply message body..LPThe last element of the array must be a null entry..LP.IR conHandlerFuncspecifies a connection handler function that is called after a connection has been accepted and a process has been forked if.B doforkis TRUE..IR conHandlerFuncshould perform any required initialization and then repeatedly call .B ndmpPoll(\|)until the connection has been closed..IR conHandlerFunc should not return until after the connection has been closed.The prototype for .IR conHandlerFuncis:.RS.nf.ft 3void conHandlerFunc(NdmpConnection connection).fi.ft 1.RE.LP.IR connectionis the NDMP connection handle for the new NDMP connection..LP.B ndmpDestroyConnection(\|)should not be called to destroy.IR connection..B ndmpRun(\|)will destory the connection handle after.IR conHandlerFuncreturns..SH "RETURN VALUES"None..SH "SEE ALSO".BR ndmpPoll (l)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -