📄 spec.v1.txt
字号:
NDMP_NO_BUS_ERR Specified SCSI controller does not exist.Stager,Hitz Page 20Internet Draft Network Data Management Protocol October 1996NDMP_XDR_DECODE_ERR Error decoding message.NDMP_ILLEGAL_STATE_ERR Message cannot be processed in the current state.NDMP_UNDEFINED_ERR Undefined error.NDMP_XDR_ENCODE_ERR Error encoding reply message.NDMP_NO_MEM_ERR Memory allocation error.2.8 Message DefinitionsEach NDMP message body is described using a block of XDR specificationin the following format:Message XDR definitionStager,Hitz Page 21Internet Draft Network Data Management Protocol October 1996 struct message_name_request { type dummy_request_argument1; _ }; struct message_name_reply { enum ndmp_error error; type dummy_reply_argument1; _ };Not all messages contain arguments. For messages that do containarguments, an XDR specification block defining the arguments is provided.If the request has no arguments, then an XDR specification for the requestmessage body is omitted. If the message does not have a reply, then anXDR specification for the reply message is omitted.The XDR specification section is followed by a detailed description ofeach request and reply message argument.All reply messages contain an error argument. If the value of the returnederror status is non-zero, then some of the reply arguments may bemeaningless. A description of errors that may result from executing therequest is provided. This list is not necessarily a complete list and doesnot list the generic errors (e.g. memory allocation error). The completelist of error codes and general descriptions is provided by the nextsectionThe following is a list of valid message numbers grouped by interfaceStager,Hitz Page 22Internet Draft Network Data Management Protocol October 1996 enum ndmp_message { /* Config Interface NDMP_CONFIG_GET_HOST_INFO = 0x100, NDMP_CONFIG_GET_BUTYPE_ATTR, /* SCSI Interface */ NDMP_SCSI_OPEN = 0x200, NDMP_SCSI_CLOSE, NDMP_SCSI_GET_STATE, NDMP_SCSI_SET_TARGET, NDMP_SCSI_RESET_DEVICE, NDMP_SCSI_RESET_BUS, NDMP_SCSI_EXECUTE_CDB, /* Tape Interface */ NDMP_TAPE_OPEN = 0x300, NDMP_TAPE_CLOSE, NDMP_TAPE_GET_STATE, NDMP_TAPE_MTIO, NDMP_TAPE_WRITE, NDMP_TAPE_READ, NDMP_TAPE_SET_RECORD_SIZE, NDMP_TAPE_EXECUTE_CDB, /* Data Interface */ NDMP_DATA_GET_STATE = 0x400, NDMP_DATA_START_BACKUP, NDMP_DATA_START_RECOVER, NDMP_DATA_ABORT, NDMP_DATA_GET_ENV, NDMP_DATA_RESVD1, NDMP_DATA_RESVD2, NDMP_DATA_STOP, NDMP_DATA_CONTINUE, /* Notify Interface */ NDMP_NOTIFY_PAUSED = 0x500, NDMP_NOTIFY_HALTED, NDMP_NOTIFY_CONNECTED, /* Log Interface */ NDMP_LOG_LOG = 0x600, NDMP_LOG_DEBUG, NDMP_LOG_FILE, /* File History Interface */ NDMP_FH_ADD_UNIX = 0x700,Stager,Hitz Page 23Internet Draft Network Data Management Protocol October 1996 NDMP_FH_ADD_UNIX_DIR, NDMP_FH_ADD_UNIX_NODE, /* Connect Interface */ NDMP_CONNECT_OPEN = 0x900, NDMP_CONNECT_AUTH, NDMP_CONNECT_CLOSE };3. NDMP Server InterfacesThis section will define the interfaces. The defined interfaces andprocedures are:3.1 CONNECT InterfaceThis interface allows NDMP server to authenticate the client and negotiatethe version of protocol which will be used.The NDMP client first connects to a well known port (currently 10,000).The NDMP server accepts the connection and sends a NOTIFY_CONNECT message.The NDMP client then sends a CONNECT_OPEN message, usually followed by aCONNECT_AUTH message.3.1.1 Open ConnectionThe connect interface allows an NDMP server to authenticate the clientand negotiate the version of protocol that will be used.Message XDR definitionStager,Hitz Page 24Internet Draft Network Data Management Protocol October 1996 struct ndmp_connect_open_request { u_short protocol_version; }; struct ndmp_connect_open_reply { ndmp_error error; };Request Arguments protocol_version Protocol version suggested by the NDMP client.Reply Errors NDMP_NO_ERR Protocol version suggested by the client is supported by the server. NDMP_ILLEGAL_ARGS_ERR Protocol version suggested by the client is not supported by the server. The client should retry the request with a lower protocol version number.3.1.2 AuthorizationUsed to authenticate the NDMP connection. Only request messages withinthe config interface may be processed on a connection that has not yetbeen authenticated. A reply message containing a NDMP_NOT_AUTHORIZED_ERRerror will be returned in response to any other request message receivedwhen the connection has not yet been authenticated.NDMP servers must support at least one of the following authenticationmethods. 1.
NONE: no authentication required. 2.
TEXT: connection is authenticated using a user name and non- encrypted password.Stager,Hitz Page 25Internet Draft Network Data Management Protocol October 1996Message XDR definition enum ndmp_auth_type { NDMP_AUTH_NONE, /* No authentication */ NDMP_AUTH_TEXT, /* Clear text password authentication */ NDMP_AUTH_RESVD }; struct ndmp_auth_text { string user<>; string password<>; }; union ndmp_auth_data switch (enum ndmp_auth_type auth_type) { case NDMP_AUTH_NONE: void; case NDMP_AUTH_TEXT: struct ndmp_auth_text auth_text; }; struct ndmp_connect_auth_request { ndmp_auth_data auth_data; /* Authorization data */ }; struct ndmp_connect_auth_reply { ndmp_error error; };Request Arguments auth_data Authentication data. NDMP servers must support at least one of the following authentication methods. NONE: no authentication required. TEXT: connection is authenticated using a user name and non-encrypted password.Reply ErrorsStager,Hitz Page 26Internet Draft Network Data Management Protocol October 1996 NDMP_NO_ERR Connection successfully authenticated. NDMP_NOT_AUTHORIZED_ERR Incorrect authentication data. NDMP_ILLEGAL_ARGS_ERR Specified authentication method not supported.3.1.3 Close ConnectionThis message is used when client wants to close the NDMP connection. Thismessage should be sent by the NDMP client before shutting down the TCP/IPconnection.Message XDR definition /* no request arguments */ /* no reply arguments */3.2 CONFIG InterfaceThis interface allows NDMP client to query the configuration of the NDMPserver.3.2.1 Get Host InfoThis request is used to get information about the NDMP server.Message XDR definitionStager,Hitz Page 27Internet Draft Network Data Management Protocol October 1996 /* No request message body */ struct ndmp_config_get_host_info_reply { ndmp_error error; string hostname<>; string os_type<>; string os_vers<>; string hostid<>; ndmp_auth_type auth_types<>; };Request Arguments This request does not have a message body.Reply Arguments error Error code. hostname Host name of the NDMP server os_type Name of NDMP server operating system (i.e. Solaris). os_vers Version of NDMP server operating system (i.e. 2.5). hostid NDMP server host identifier. auth_types Connection authentication types supported by the NDMP server.Reply Errors NDMP_NO_ERR Request successfully processed.Stager,Hitz Page 28Internet Draft Network Data Management Protocol October 19963.2.2 Get backup Type AttributeThis message is used to query the capability of the supported backup type.Message XDR definition const NDMP_NO_BACKUP_FILELIST = 0x0001; const NDMP_NO_BACKUP_FHINFO = 0x0002; const NDMP_NO_RECOVER_FILELIST = 0x0004; const NDMP_NO_RECOVER_FHINFO = 0x0008; const NDMP_NO_RECOVER_RESVD = 0x0010; const NDMP_NO_RECOVER_INC_ONLY = 0x0020; struct ndmp_config_get_butype_attr_request { string name<>; }; struct ndmp_config_get_butype_attr_reply { ndmp_error error; u_long attrs; };Request Arguments name Name of backup type for which attributes are being requested (e.g. dump, tar, cpio). Backup types are NDMP server implementation dependent.Reply Arguments error Error code. attrs Backup attributes bit mask. The following attributes bits are defined: The following attributes are defined:Stager,Hitz Page 29Internet Draft Network Data Management Protocol October 1996 NDMP_NO_BACKUP_FILELIST NDMP server doesn't support archiving of selective files as specified by a file list. (i.e. only supports dumping the entire file system.) NDMP_NO_BACKUP_FILEINFO NDMP server doesn't support the file history. NDMP_NO_RECOVER_FILELIST NDMP server doesn't support restoration of individual files. NDMP_NO_RECOVER_FHINFO NDMP server doesn't support the direct access restore (i.e. positioning to the offset of a backup image and restore the specified file). NDMP_NO_RECOVER_RESVD this value is reserved. NDMP_NO_RECOVER_INC_ONLY NDMP server doesn't support incremental only restoration (i.e. a full restore must be performed prior to an incremental restore).Reply Errors NDMP_NO_ERR Attributes for specified backup type successfully returned.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -