@jsonjoy.com/json-pack 1.20.0 → 17.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/JsonPackExtension.d.ts +8 -0
- package/lib/JsonPackExtension.js +8 -0
- package/lib/JsonPackExtension.js.map +1 -1
- package/lib/JsonPackMpint.d.ts +25 -0
- package/lib/JsonPackMpint.js +31 -1
- package/lib/JsonPackMpint.js.map +1 -1
- package/lib/JsonPackValue.d.ts +10 -0
- package/lib/JsonPackValue.js +10 -0
- package/lib/JsonPackValue.js.map +1 -1
- package/lib/avro/AvroDecoder.d.ts +67 -0
- package/lib/avro/AvroDecoder.js +77 -5
- package/lib/avro/AvroDecoder.js.map +1 -1
- package/lib/avro/AvroEncoder.d.ts +71 -0
- package/lib/avro/AvroEncoder.js +90 -12
- package/lib/avro/AvroEncoder.js.map +1 -1
- package/lib/avro/AvroSchemaDecoder.d.ts +53 -0
- package/lib/avro/AvroSchemaDecoder.js +60 -3
- package/lib/avro/AvroSchemaDecoder.js.map +1 -1
- package/lib/avro/AvroSchemaEncoder.d.ts +65 -0
- package/lib/avro/AvroSchemaEncoder.js +84 -5
- package/lib/avro/AvroSchemaEncoder.js.map +1 -1
- package/lib/avro/AvroSchemaValidator.d.ts +10 -0
- package/lib/avro/AvroSchemaValidator.js +18 -1
- package/lib/avro/AvroSchemaValidator.js.map +1 -1
- package/lib/avro/types.d.ts +31 -0
- package/lib/avro/types.js +4 -0
- package/lib/avro/types.js.map +1 -1
- package/lib/bencode/BencodeDecoder.js +9 -9
- package/lib/bencode/BencodeDecoder.js.map +1 -1
- package/lib/bencode/BencodeEncoder.d.ts +5 -0
- package/lib/bencode/BencodeEncoder.js +25 -20
- package/lib/bencode/BencodeEncoder.js.map +1 -1
- package/lib/bson/BsonDecoder.js +48 -33
- package/lib/bson/BsonDecoder.js.map +1 -1
- package/lib/bson/BsonEncoder.js +11 -3
- package/lib/bson/BsonEncoder.js.map +1 -1
- package/lib/cbor/CborDecoder.d.ts +24 -0
- package/lib/cbor/CborDecoder.js +94 -56
- package/lib/cbor/CborDecoder.js.map +1 -1
- package/lib/cbor/CborDecoderBase.d.ts +1 -0
- package/lib/cbor/CborDecoderBase.js +63 -53
- package/lib/cbor/CborDecoderBase.js.map +1 -1
- package/lib/cbor/CborEncoder.d.ts +5 -0
- package/lib/cbor/CborEncoder.js +9 -3
- package/lib/cbor/CborEncoder.js.map +1 -1
- package/lib/cbor/CborEncoderFast.d.ts +7 -0
- package/lib/cbor/CborEncoderFast.js +22 -14
- package/lib/cbor/CborEncoderFast.js.map +1 -1
- package/lib/cbor/CborEncoderStable.d.ts +1 -0
- package/lib/cbor/CborEncoderStable.js +2 -1
- package/lib/cbor/CborEncoderStable.js.map +1 -1
- package/lib/cbor/shared.d.ts +1 -1
- package/lib/codecs/Codecs.d.ts +1 -1
- package/lib/codecs/cbor.js +1 -1
- package/lib/codecs/cbor.js.map +1 -1
- package/lib/codecs/json.js +1 -1
- package/lib/codecs/json.js.map +1 -1
- package/lib/codecs/msgpack.js +1 -1
- package/lib/codecs/msgpack.js.map +1 -1
- package/lib/ejson/EjsonDecoder.d.ts +5 -0
- package/lib/ejson/EjsonDecoder.js +72 -37
- package/lib/ejson/EjsonDecoder.js.map +1 -1
- package/lib/ejson/EjsonEncoder.d.ts +5 -0
- package/lib/ejson/EjsonEncoder.js +149 -114
- package/lib/ejson/EjsonEncoder.js.map +1 -1
- package/lib/ejson/index.js +1 -0
- package/lib/ejson/index.js.map +1 -1
- package/lib/ion/Import.d.ts +1 -1
- package/lib/ion/Import.js.map +1 -1
- package/lib/ion/IonDecoder.d.ts +0 -1
- package/lib/ion/IonDecoder.js +4 -3
- package/lib/ion/IonDecoder.js.map +1 -1
- package/lib/ion/IonDecoderBase.js +29 -18
- package/lib/ion/IonDecoderBase.js.map +1 -1
- package/lib/ion/IonEncoderFast.d.ts +1 -1
- package/lib/ion/IonEncoderFast.js +30 -30
- package/lib/ion/IonEncoderFast.js.map +1 -1
- package/lib/ion/ast.d.ts +4 -1
- package/lib/ion/symbols.d.ts +1 -1
- package/lib/json/JsonDecoder.js +72 -66
- package/lib/json/JsonDecoder.js.map +1 -1
- package/lib/json/JsonDecoderDag.js +14 -0
- package/lib/json/JsonDecoderDag.js.map +1 -1
- package/lib/json/JsonDecoderPartial.d.ts +22 -0
- package/lib/json/JsonDecoderPartial.js +30 -8
- package/lib/json/JsonDecoderPartial.js.map +1 -1
- package/lib/json/JsonEncoder.d.ts +5 -0
- package/lib/json/JsonEncoder.js +68 -54
- package/lib/json/JsonEncoder.js.map +1 -1
- package/lib/json/JsonEncoderDag.d.ts +17 -0
- package/lib/json/JsonEncoderDag.js +27 -10
- package/lib/json/JsonEncoderDag.js.map +1 -1
- package/lib/json/JsonEncoderStable.js +5 -5
- package/lib/json/JsonEncoderStable.js.map +1 -1
- package/lib/json-binary/codec.d.ts +8 -1
- package/lib/json-binary/codec.js +7 -0
- package/lib/json-binary/codec.js.map +1 -1
- package/lib/msgpack/MsgPackDecoder.d.ts +27 -0
- package/lib/msgpack/MsgPackDecoder.js +55 -23
- package/lib/msgpack/MsgPackDecoder.js.map +1 -1
- package/lib/msgpack/MsgPackDecoderFast.d.ts +8 -0
- package/lib/msgpack/MsgPackDecoderFast.js +14 -5
- package/lib/msgpack/MsgPackDecoderFast.js.map +1 -1
- package/lib/msgpack/MsgPackEncoder.d.ts +3 -0
- package/lib/msgpack/MsgPackEncoder.js +7 -4
- package/lib/msgpack/MsgPackEncoder.js.map +1 -1
- package/lib/msgpack/MsgPackEncoderFast.d.ts +26 -4
- package/lib/msgpack/MsgPackEncoderFast.js +31 -0
- package/lib/msgpack/MsgPackEncoderFast.js.map +1 -1
- package/lib/msgpack/MsgPackEncoderStable.d.ts +3 -0
- package/lib/msgpack/MsgPackEncoderStable.js +3 -0
- package/lib/msgpack/MsgPackEncoderStable.js.map +1 -1
- package/lib/msgpack/MsgPackToJsonConverter.d.ts +30 -4
- package/lib/msgpack/MsgPackToJsonConverter.js +32 -5
- package/lib/msgpack/MsgPackToJsonConverter.js.map +1 -1
- package/lib/msgpack/index.d.ts +29 -0
- package/lib/msgpack/index.js +30 -0
- package/lib/msgpack/index.js.map +1 -1
- package/lib/msgpack/shallow-read.js +7 -7
- package/lib/msgpack/shallow-read.js.map +1 -1
- package/lib/msgpack/types.d.ts +1 -0
- package/lib/msgpack/util.d.ts +1 -1
- package/lib/nfs/v3/FullNfsv3Encoder.d.ts +3 -3
- package/lib/nfs/v3/FullNfsv3Encoder.js +3 -3
- package/lib/nfs/v3/FullNfsv3Encoder.js.map +1 -1
- package/lib/nfs/v3/Nfsv3Decoder.js +51 -50
- package/lib/nfs/v3/Nfsv3Decoder.js.map +1 -1
- package/lib/nfs/v3/Nfsv3Encoder.d.ts +2 -2
- package/lib/nfs/v3/Nfsv3Encoder.js +52 -52
- package/lib/nfs/v3/Nfsv3Encoder.js.map +1 -1
- package/lib/nfs/v3/constants.d.ts +34 -0
- package/lib/nfs/v3/constants.js +4 -0
- package/lib/nfs/v3/constants.js.map +1 -1
- package/lib/nfs/v3/locks/NlmDecoder.js +20 -20
- package/lib/nfs/v3/locks/NlmDecoder.js.map +1 -1
- package/lib/nfs/v3/locks/NlmEncoder.d.ts +2 -2
- package/lib/nfs/v3/locks/NlmEncoder.js +20 -20
- package/lib/nfs/v3/locks/NlmEncoder.js.map +1 -1
- package/lib/nfs/v3/locks/constants.d.ts +9 -0
- package/lib/nfs/v3/locks/messages.d.ts +58 -1
- package/lib/nfs/v3/locks/messages.js +54 -0
- package/lib/nfs/v3/locks/messages.js.map +1 -1
- package/lib/nfs/v3/locks/structs.d.ts +15 -0
- package/lib/nfs/v3/locks/structs.js +15 -0
- package/lib/nfs/v3/locks/structs.js.map +1 -1
- package/lib/nfs/v3/messages.d.ts +249 -0
- package/lib/nfs/v3/messages.js +249 -0
- package/lib/nfs/v3/messages.js.map +1 -1
- package/lib/nfs/v3/mount/MountDecoder.js +12 -12
- package/lib/nfs/v3/mount/MountEncoder.d.ts +2 -2
- package/lib/nfs/v3/mount/MountEncoder.js +13 -13
- package/lib/nfs/v3/mount/MountEncoder.js.map +1 -1
- package/lib/nfs/v3/mount/constants.d.ts +9 -0
- package/lib/nfs/v3/mount/messages.d.ts +31 -1
- package/lib/nfs/v3/mount/messages.js +27 -0
- package/lib/nfs/v3/mount/messages.js.map +1 -1
- package/lib/nfs/v3/mount/structs.d.ts +15 -0
- package/lib/nfs/v3/mount/structs.js +15 -0
- package/lib/nfs/v3/mount/structs.js.map +1 -1
- package/lib/nfs/v3/structs.d.ts +78 -0
- package/lib/nfs/v3/structs.js +78 -0
- package/lib/nfs/v3/structs.js.map +1 -1
- package/lib/nfs/v4/Nfsv4Decoder.d.ts +14 -12
- package/lib/nfs/v4/Nfsv4Decoder.js +241 -165
- package/lib/nfs/v4/Nfsv4Decoder.js.map +1 -1
- package/lib/nfs/v4/Nfsv4Encoder.d.ts +6 -93
- package/lib/nfs/v4/Nfsv4Encoder.js +8 -824
- package/lib/nfs/v4/Nfsv4Encoder.js.map +1 -1
- package/lib/nfs/v4/Nfsv4FullEncoder.d.ts +32 -0
- package/lib/nfs/v4/Nfsv4FullEncoder.js +72 -0
- package/lib/nfs/v4/Nfsv4FullEncoder.js.map +1 -0
- package/lib/nfs/v4/attributes.d.ts +79 -0
- package/lib/nfs/v4/attributes.js +265 -0
- package/lib/nfs/v4/attributes.js.map +1 -0
- package/lib/nfs/v4/builder.d.ts +333 -0
- package/lib/nfs/v4/builder.js +460 -0
- package/lib/nfs/v4/builder.js.map +1 -0
- package/lib/nfs/v4/client/NfsFsDir.d.ts +23 -0
- package/lib/nfs/v4/client/NfsFsDir.js +132 -0
- package/lib/nfs/v4/client/NfsFsDir.js.map +1 -0
- package/lib/nfs/v4/client/NfsFsDirent.d.ts +17 -0
- package/lib/nfs/v4/client/NfsFsDirent.js +35 -0
- package/lib/nfs/v4/client/NfsFsDirent.js.map +1 -0
- package/lib/nfs/v4/client/NfsFsFileHandle.d.ts +35 -0
- package/lib/nfs/v4/client/NfsFsFileHandle.js +271 -0
- package/lib/nfs/v4/client/NfsFsFileHandle.js.map +1 -0
- package/lib/nfs/v4/client/NfsFsStats.d.ts +34 -0
- package/lib/nfs/v4/client/NfsFsStats.js +52 -0
- package/lib/nfs/v4/client/NfsFsStats.js.map +1 -0
- package/lib/nfs/v4/client/Nfsv4FsClient.d.ts +53 -0
- package/lib/nfs/v4/client/Nfsv4FsClient.js +812 -0
- package/lib/nfs/v4/client/Nfsv4FsClient.js.map +1 -0
- package/lib/nfs/v4/client/Nfsv4TcpClient.d.ts +41 -0
- package/lib/nfs/v4/client/Nfsv4TcpClient.js +216 -0
- package/lib/nfs/v4/client/Nfsv4TcpClient.js.map +1 -0
- package/lib/nfs/v4/client/types.d.ts +9 -0
- package/lib/nfs/v4/client/types.js +3 -0
- package/lib/nfs/v4/client/types.js.map +1 -0
- package/lib/nfs/v4/constants.d.ts +80 -0
- package/lib/nfs/v4/constants.js +4 -0
- package/lib/nfs/v4/constants.js.map +1 -1
- package/lib/nfs/v4/format.d.ts +23 -0
- package/lib/nfs/v4/format.js +870 -0
- package/lib/nfs/v4/format.js.map +1 -0
- package/lib/nfs/v4/index.d.ts +3 -1
- package/lib/nfs/v4/index.js +3 -1
- package/lib/nfs/v4/index.js.map +1 -1
- package/lib/nfs/v4/messages.d.ts +208 -90
- package/lib/nfs/v4/messages.js +585 -1
- package/lib/nfs/v4/messages.js.map +1 -1
- package/lib/nfs/v4/server/Nfsv4CompoundProcCtx.d.ts +30 -0
- package/lib/nfs/v4/server/Nfsv4CompoundProcCtx.js +176 -0
- package/lib/nfs/v4/server/Nfsv4CompoundProcCtx.js.map +1 -0
- package/lib/nfs/v4/server/Nfsv4Connection.d.ts +45 -0
- package/lib/nfs/v4/server/Nfsv4Connection.js +163 -0
- package/lib/nfs/v4/server/Nfsv4Connection.js.map +1 -0
- package/lib/nfs/v4/server/Nfsv4TcpServer.d.ts +25 -0
- package/lib/nfs/v4/server/Nfsv4TcpServer.js +92 -0
- package/lib/nfs/v4/server/Nfsv4TcpServer.js.map +1 -0
- package/lib/nfs/v4/server/operations/ByteRangeLock.d.ts +79 -0
- package/lib/nfs/v4/server/operations/ByteRangeLock.js +63 -0
- package/lib/nfs/v4/server/operations/ByteRangeLock.js.map +1 -0
- package/lib/nfs/v4/server/operations/ClientRecord.d.ts +110 -0
- package/lib/nfs/v4/server/operations/ClientRecord.js +70 -0
- package/lib/nfs/v4/server/operations/ClientRecord.js.map +1 -0
- package/lib/nfs/v4/server/operations/FilesystemStats.d.ts +30 -0
- package/lib/nfs/v4/server/operations/FilesystemStats.js +30 -0
- package/lib/nfs/v4/server/operations/FilesystemStats.js.map +1 -0
- package/lib/nfs/v4/server/operations/LockOwnerState.d.ts +82 -0
- package/lib/nfs/v4/server/operations/LockOwnerState.js +57 -0
- package/lib/nfs/v4/server/operations/LockOwnerState.js.map +1 -0
- package/lib/nfs/v4/server/operations/LockStateid.d.ts +64 -0
- package/lib/nfs/v4/server/operations/LockStateid.js +58 -0
- package/lib/nfs/v4/server/operations/LockStateid.js.map +1 -0
- package/lib/nfs/v4/server/operations/Nfsv4Operations.d.ts +45 -0
- package/lib/nfs/v4/server/operations/Nfsv4Operations.js +3 -0
- package/lib/nfs/v4/server/operations/Nfsv4Operations.js.map +1 -0
- package/lib/nfs/v4/server/operations/Nfsv4OperationsNotImpl.d.ts +42 -0
- package/lib/nfs/v4/server/operations/Nfsv4OperationsNotImpl.js +159 -0
- package/lib/nfs/v4/server/operations/Nfsv4OperationsNotImpl.js.map +1 -0
- package/lib/nfs/v4/server/operations/OpenFileState.d.ts +102 -0
- package/lib/nfs/v4/server/operations/OpenFileState.js +68 -0
- package/lib/nfs/v4/server/operations/OpenFileState.js.map +1 -0
- package/lib/nfs/v4/server/operations/OpenOwnerState.d.ts +83 -0
- package/lib/nfs/v4/server/operations/OpenOwnerState.js +58 -0
- package/lib/nfs/v4/server/operations/OpenOwnerState.js.map +1 -0
- package/lib/nfs/v4/server/operations/node/Nfsv4OperationsNode.d.ts +169 -0
- package/lib/nfs/v4/server/operations/node/Nfsv4OperationsNode.js +1474 -0
- package/lib/nfs/v4/server/operations/node/Nfsv4OperationsNode.js.map +1 -0
- package/lib/nfs/v4/server/operations/node/attrs.d.ts +17 -0
- package/lib/nfs/v4/server/operations/node/attrs.js +275 -0
- package/lib/nfs/v4/server/operations/node/attrs.js.map +1 -0
- package/lib/nfs/v4/server/operations/node/fh.d.ts +93 -0
- package/lib/nfs/v4/server/operations/node/fh.js +209 -0
- package/lib/nfs/v4/server/operations/node/fh.js.map +1 -0
- package/lib/nfs/v4/server/operations/node/util.d.ts +4 -0
- package/lib/nfs/v4/server/operations/node/util.js +17 -0
- package/lib/nfs/v4/server/operations/node/util.js.map +1 -0
- package/lib/nfs/v4/server/types.d.ts +4 -0
- package/lib/nfs/v4/server/types.js +3 -0
- package/lib/nfs/v4/server/types.js.map +1 -0
- package/lib/nfs/v4/server/util.d.ts +5 -0
- package/lib/nfs/v4/server/util.js +184 -0
- package/lib/nfs/v4/server/util.js.map +1 -0
- package/lib/nfs/v4/structs.d.ts +243 -56
- package/lib/nfs/v4/structs.js +367 -17
- package/lib/nfs/v4/structs.js.map +1 -1
- package/lib/resp/RespDecoder.d.ts +9 -0
- package/lib/resp/RespDecoder.js +93 -76
- package/lib/resp/RespDecoder.js.map +1 -1
- package/lib/resp/RespEncoder.d.ts +8 -0
- package/lib/resp/RespEncoder.js +107 -89
- package/lib/resp/RespEncoder.js.map +1 -1
- package/lib/resp/RespEncoderLegacy.d.ts +3 -0
- package/lib/resp/RespEncoderLegacy.js +7 -4
- package/lib/resp/RespEncoderLegacy.js.map +1 -1
- package/lib/resp/RespStreamingDecoder.d.ts +48 -0
- package/lib/resp/RespStreamingDecoder.js +48 -0
- package/lib/resp/RespStreamingDecoder.js.map +1 -1
- package/lib/resp/constants.d.ts +19 -19
- package/lib/rm/RmRecordDecoder.js.map +1 -1
- package/lib/rm/RmRecordEncoder.d.ts +17 -1
- package/lib/rm/RmRecordEncoder.js +40 -1
- package/lib/rm/RmRecordEncoder.js.map +1 -1
- package/lib/rpc/RpcMessageDecoder.d.ts +1 -1
- package/lib/rpc/RpcMessageDecoder.js +11 -8
- package/lib/rpc/RpcMessageDecoder.js.map +1 -1
- package/lib/rpc/RpcMessageEncoder.d.ts +2 -2
- package/lib/rpc/RpcMessageEncoder.js +6 -6
- package/lib/rpc/RpcMessageEncoder.js.map +1 -1
- package/lib/rpc/constants.d.ts +76 -28
- package/lib/rpc/constants.js +10 -0
- package/lib/rpc/constants.js.map +1 -1
- package/lib/ssh/SshDecoder.d.ts +47 -1
- package/lib/ssh/SshDecoder.js +52 -2
- package/lib/ssh/SshDecoder.js.map +1 -1
- package/lib/ssh/SshEncoder.d.ts +70 -1
- package/lib/ssh/SshEncoder.js +81 -8
- package/lib/ssh/SshEncoder.js.map +1 -1
- package/lib/ssh/index.d.ts +6 -0
- package/lib/ssh/index.js +6 -0
- package/lib/ssh/index.js.map +1 -1
- package/lib/ubjson/UbjsonDecoder.js +1 -1
- package/lib/ubjson/UbjsonDecoder.js.map +1 -1
- package/lib/ubjson/UbjsonEncoder.js +6 -5
- package/lib/ubjson/UbjsonEncoder.js.map +1 -1
- package/lib/util/CompressionTable.js +4 -4
- package/lib/util/CompressionTable.js.map +1 -1
- package/lib/util/DecompressionTable.js +3 -2
- package/lib/util/DecompressionTable.js.map +1 -1
- package/lib/ws/WsFrameDecoder.d.ts +18 -0
- package/lib/ws/WsFrameDecoder.js +18 -0
- package/lib/ws/WsFrameDecoder.js.map +1 -1
- package/lib/ws/WsFrameEncoder.d.ts +1 -1
- package/lib/ws/WsFrameEncoder.js +3 -3
- package/lib/ws/WsFrameEncoder.js.map +1 -1
- package/lib/ws/constants.js +5 -0
- package/lib/ws/constants.js.map +1 -1
- package/lib/xdr/XdrDecoder.d.ts +62 -0
- package/lib/xdr/XdrDecoder.js +73 -6
- package/lib/xdr/XdrDecoder.js.map +1 -1
- package/lib/xdr/XdrEncoder.d.ts +71 -0
- package/lib/xdr/XdrEncoder.js +88 -13
- package/lib/xdr/XdrEncoder.js.map +1 -1
- package/lib/xdr/XdrSchemaDecoder.d.ts +40 -0
- package/lib/xdr/XdrSchemaDecoder.js +52 -0
- package/lib/xdr/XdrSchemaDecoder.js.map +1 -1
- package/lib/xdr/XdrSchemaEncoder.d.ts +5 -0
- package/lib/xdr/XdrSchemaEncoder.js +9 -0
- package/lib/xdr/XdrSchemaEncoder.js.map +1 -1
- package/lib/xdr/XdrSchemaValidator.d.ts +9 -0
- package/lib/xdr/XdrSchemaValidator.js +42 -11
- package/lib/xdr/XdrSchemaValidator.js.map +1 -1
- package/lib/xdr/XdrUnion.d.ts +5 -0
- package/lib/xdr/XdrUnion.js +5 -0
- package/lib/xdr/XdrUnion.js.map +1 -1
- package/lib/xdr/index.d.ts +14 -0
- package/lib/xdr/index.js +14 -0
- package/lib/xdr/index.js.map +1 -1
- package/lib/xdr/types.d.ts +52 -0
- package/package.json +35 -56
- package/lib/nfs/v4/FullNfsv4Encoder.d.ts +0 -28
- package/lib/nfs/v4/FullNfsv4Encoder.js +0 -73
- package/lib/nfs/v4/FullNfsv4Encoder.js.map +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as struct from '../../structs';
|
|
2
|
+
/**
|
|
3
|
+
* Lock stateid record for NFSv4 lock operations.
|
|
4
|
+
* Per RFC 7530 §9.1.4.1, all locks held on a particular file by a particular
|
|
5
|
+
* owner share a single stateid, with the seqid incremented on each LOCK/LOCKU.
|
|
6
|
+
* The stateid remains valid even after all locks are freed, as long as the
|
|
7
|
+
* associated open file remains open.
|
|
8
|
+
*/
|
|
9
|
+
export declare class LockStateid {
|
|
10
|
+
/**
|
|
11
|
+
* The "other" field of the stateid (96 bits).
|
|
12
|
+
* Uniquely identifies this lock-owner+file combination.
|
|
13
|
+
* Remains constant across all LOCK/LOCKU operations.
|
|
14
|
+
*/
|
|
15
|
+
readonly other: Uint8Array;
|
|
16
|
+
/**
|
|
17
|
+
* Current seqid value for this lock stateid.
|
|
18
|
+
* Incremented on each LOCK or LOCKU operation that affects locks.
|
|
19
|
+
* Starts at 1 when first created.
|
|
20
|
+
*/
|
|
21
|
+
seqid: number;
|
|
22
|
+
/**
|
|
23
|
+
* Key identifying the lock-owner that owns this stateid.
|
|
24
|
+
* Format: `${clientid}:${hex(owner)}`.
|
|
25
|
+
*/
|
|
26
|
+
readonly lockOwnerKey: string;
|
|
27
|
+
/**
|
|
28
|
+
* Absolute file system path of the file this stateid applies to.
|
|
29
|
+
* A lock-owner can have different stateids for different files.
|
|
30
|
+
*/
|
|
31
|
+
readonly path: string;
|
|
32
|
+
constructor(
|
|
33
|
+
/**
|
|
34
|
+
* The "other" field of the stateid (96 bits).
|
|
35
|
+
* Uniquely identifies this lock-owner+file combination.
|
|
36
|
+
* Remains constant across all LOCK/LOCKU operations.
|
|
37
|
+
*/
|
|
38
|
+
other: Uint8Array,
|
|
39
|
+
/**
|
|
40
|
+
* Current seqid value for this lock stateid.
|
|
41
|
+
* Incremented on each LOCK or LOCKU operation that affects locks.
|
|
42
|
+
* Starts at 1 when first created.
|
|
43
|
+
*/
|
|
44
|
+
seqid: number,
|
|
45
|
+
/**
|
|
46
|
+
* Key identifying the lock-owner that owns this stateid.
|
|
47
|
+
* Format: `${clientid}:${hex(owner)}`.
|
|
48
|
+
*/
|
|
49
|
+
lockOwnerKey: string,
|
|
50
|
+
/**
|
|
51
|
+
* Absolute file system path of the file this stateid applies to.
|
|
52
|
+
* A lock-owner can have different stateids for different files.
|
|
53
|
+
*/
|
|
54
|
+
path: string);
|
|
55
|
+
/**
|
|
56
|
+
* Get the full stateid with current seqid.
|
|
57
|
+
*/
|
|
58
|
+
toStateid(): struct.Nfsv4Stateid;
|
|
59
|
+
/**
|
|
60
|
+
* Increment seqid and return new stateid.
|
|
61
|
+
* Per RFC 7530, seqid wraps from 0xFFFFFFFF to 1 (not 0).
|
|
62
|
+
*/
|
|
63
|
+
incrementAndGetStateid(): struct.Nfsv4Stateid;
|
|
64
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LockStateid = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const struct = tslib_1.__importStar(require("../../structs"));
|
|
6
|
+
/**
|
|
7
|
+
* Lock stateid record for NFSv4 lock operations.
|
|
8
|
+
* Per RFC 7530 §9.1.4.1, all locks held on a particular file by a particular
|
|
9
|
+
* owner share a single stateid, with the seqid incremented on each LOCK/LOCKU.
|
|
10
|
+
* The stateid remains valid even after all locks are freed, as long as the
|
|
11
|
+
* associated open file remains open.
|
|
12
|
+
*/
|
|
13
|
+
class LockStateid {
|
|
14
|
+
constructor(
|
|
15
|
+
/**
|
|
16
|
+
* The "other" field of the stateid (96 bits).
|
|
17
|
+
* Uniquely identifies this lock-owner+file combination.
|
|
18
|
+
* Remains constant across all LOCK/LOCKU operations.
|
|
19
|
+
*/
|
|
20
|
+
other,
|
|
21
|
+
/**
|
|
22
|
+
* Current seqid value for this lock stateid.
|
|
23
|
+
* Incremented on each LOCK or LOCKU operation that affects locks.
|
|
24
|
+
* Starts at 1 when first created.
|
|
25
|
+
*/
|
|
26
|
+
seqid,
|
|
27
|
+
/**
|
|
28
|
+
* Key identifying the lock-owner that owns this stateid.
|
|
29
|
+
* Format: `${clientid}:${hex(owner)}`.
|
|
30
|
+
*/
|
|
31
|
+
lockOwnerKey,
|
|
32
|
+
/**
|
|
33
|
+
* Absolute file system path of the file this stateid applies to.
|
|
34
|
+
* A lock-owner can have different stateids for different files.
|
|
35
|
+
*/
|
|
36
|
+
path) {
|
|
37
|
+
this.other = other;
|
|
38
|
+
this.seqid = seqid;
|
|
39
|
+
this.lockOwnerKey = lockOwnerKey;
|
|
40
|
+
this.path = path;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get the full stateid with current seqid.
|
|
44
|
+
*/
|
|
45
|
+
toStateid() {
|
|
46
|
+
return new struct.Nfsv4Stateid(this.seqid, this.other);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Increment seqid and return new stateid.
|
|
50
|
+
* Per RFC 7530, seqid wraps from 0xFFFFFFFF to 1 (not 0).
|
|
51
|
+
*/
|
|
52
|
+
incrementAndGetStateid() {
|
|
53
|
+
this.seqid = this.seqid === 0xffffffff ? 1 : this.seqid + 1;
|
|
54
|
+
return this.toStateid();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.LockStateid = LockStateid;
|
|
58
|
+
//# sourceMappingURL=LockStateid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LockStateid.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/LockStateid.ts"],"names":[],"mappings":";;;;AAAA,8DAAwC;AAExC;;;;;;GAMG;AACH,MAAa,WAAW;IACtB;IACE;;;;OAIG;IACa,KAAiB;IAEjC;;;;OAIG;IACI,KAAa;IAEpB;;;OAGG;IACa,YAAoB;IAEpC;;;OAGG;IACa,IAAY;QAnBZ,UAAK,GAAL,KAAK,CAAY;QAO1B,UAAK,GAAL,KAAK,CAAQ;QAMJ,iBAAY,GAAZ,YAAY,CAAQ;QAMpB,SAAI,GAAJ,IAAI,CAAQ;IAC3B,CAAC;IAEJ;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACH,sBAAsB;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC1B,CAAC;CACF;AA5CD,kCA4CC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type * as msg from '../../messages';
|
|
2
|
+
import type { Nfsv4CompoundProcCtx } from '../Nfsv4CompoundProcCtx';
|
|
3
|
+
export type Nfsv4OperationCtx = Pick<Nfsv4CompoundProcCtx, 'cfh' | 'sfh' | 'req' | 'getPrincipal' | 'connection'>;
|
|
4
|
+
export type Nfsv4OperationFn<Req extends msg.Nfsv4Request, Res extends msg.Nfsv4Response> = (request: Req, ctx: Nfsv4OperationCtx) => Promise<Res>;
|
|
5
|
+
export interface Nfsv4Operations {
|
|
6
|
+
ACCESS: Nfsv4OperationFn<msg.Nfsv4AccessRequest, msg.Nfsv4AccessResponse>;
|
|
7
|
+
CLOSE: Nfsv4OperationFn<msg.Nfsv4CloseRequest, msg.Nfsv4CloseResponse>;
|
|
8
|
+
COMMIT: Nfsv4OperationFn<msg.Nfsv4CommitRequest, msg.Nfsv4CommitResponse>;
|
|
9
|
+
CREATE: Nfsv4OperationFn<msg.Nfsv4CreateRequest, msg.Nfsv4CreateResponse>;
|
|
10
|
+
DELEGPURGE: Nfsv4OperationFn<msg.Nfsv4DelegpurgeRequest, msg.Nfsv4DelegpurgeResponse>;
|
|
11
|
+
DELEGRETURN: Nfsv4OperationFn<msg.Nfsv4DelegreturnRequest, msg.Nfsv4DelegreturnResponse>;
|
|
12
|
+
GETATTR: Nfsv4OperationFn<msg.Nfsv4GetattrRequest, msg.Nfsv4GetattrResponse>;
|
|
13
|
+
GETFH: Nfsv4OperationFn<msg.Nfsv4GetfhRequest, msg.Nfsv4GetfhResponse>;
|
|
14
|
+
LINK: Nfsv4OperationFn<msg.Nfsv4LinkRequest, msg.Nfsv4LinkResponse>;
|
|
15
|
+
LOCK: Nfsv4OperationFn<msg.Nfsv4LockRequest, msg.Nfsv4LockResponse>;
|
|
16
|
+
LOCKT: Nfsv4OperationFn<msg.Nfsv4LocktRequest, msg.Nfsv4LocktResponse>;
|
|
17
|
+
LOCKU: Nfsv4OperationFn<msg.Nfsv4LockuRequest, msg.Nfsv4LockuResponse>;
|
|
18
|
+
LOOKUP: Nfsv4OperationFn<msg.Nfsv4LookupRequest, msg.Nfsv4LookupResponse>;
|
|
19
|
+
LOOKUPP: Nfsv4OperationFn<msg.Nfsv4LookuppRequest, msg.Nfsv4LookuppResponse>;
|
|
20
|
+
NVERIFY: Nfsv4OperationFn<msg.Nfsv4NverifyRequest, msg.Nfsv4NverifyResponse>;
|
|
21
|
+
OPEN: Nfsv4OperationFn<msg.Nfsv4OpenRequest, msg.Nfsv4OpenResponse>;
|
|
22
|
+
OPENATTR: Nfsv4OperationFn<msg.Nfsv4OpenattrRequest, msg.Nfsv4OpenattrResponse>;
|
|
23
|
+
OPEN_CONFIRM: Nfsv4OperationFn<msg.Nfsv4OpenConfirmRequest, msg.Nfsv4OpenConfirmResponse>;
|
|
24
|
+
OPEN_DOWNGRADE: Nfsv4OperationFn<msg.Nfsv4OpenDowngradeRequest, msg.Nfsv4OpenDowngradeResponse>;
|
|
25
|
+
PUTFH: Nfsv4OperationFn<msg.Nfsv4PutfhRequest, msg.Nfsv4PutfhResponse>;
|
|
26
|
+
PUTPUBFH: Nfsv4OperationFn<msg.Nfsv4PutpubfhRequest, msg.Nfsv4PutpubfhResponse>;
|
|
27
|
+
PUTROOTFH: Nfsv4OperationFn<msg.Nfsv4PutrootfhRequest, msg.Nfsv4PutrootfhResponse>;
|
|
28
|
+
READ: Nfsv4OperationFn<msg.Nfsv4ReadRequest, msg.Nfsv4ReadResponse>;
|
|
29
|
+
READDIR: Nfsv4OperationFn<msg.Nfsv4ReaddirRequest, msg.Nfsv4ReaddirResponse>;
|
|
30
|
+
READLINK: Nfsv4OperationFn<msg.Nfsv4ReadlinkRequest, msg.Nfsv4ReadlinkResponse>;
|
|
31
|
+
REMOVE: Nfsv4OperationFn<msg.Nfsv4RemoveRequest, msg.Nfsv4RemoveResponse>;
|
|
32
|
+
RENAME: Nfsv4OperationFn<msg.Nfsv4RenameRequest, msg.Nfsv4RenameResponse>;
|
|
33
|
+
RENEW: Nfsv4OperationFn<msg.Nfsv4RenewRequest, msg.Nfsv4RenewResponse>;
|
|
34
|
+
RESTOREFH: Nfsv4OperationFn<msg.Nfsv4RestorefhRequest, msg.Nfsv4RestorefhResponse>;
|
|
35
|
+
SAVEFH: Nfsv4OperationFn<msg.Nfsv4SavefhRequest, msg.Nfsv4SavefhResponse>;
|
|
36
|
+
SECINFO: Nfsv4OperationFn<msg.Nfsv4SecinfoRequest, msg.Nfsv4SecinfoResponse>;
|
|
37
|
+
SETATTR: Nfsv4OperationFn<msg.Nfsv4SetattrRequest, msg.Nfsv4SetattrResponse>;
|
|
38
|
+
/** @see {@link https://datatracker.ietf.org/doc/html/rfc7530#section-16.33} */
|
|
39
|
+
SETCLIENTID: Nfsv4OperationFn<msg.Nfsv4SetclientidRequest, msg.Nfsv4SetclientidResponse>;
|
|
40
|
+
SETCLIENTID_CONFIRM: Nfsv4OperationFn<msg.Nfsv4SetclientidConfirmRequest, msg.Nfsv4SetclientidConfirmResponse>;
|
|
41
|
+
VERIFY: Nfsv4OperationFn<msg.Nfsv4VerifyRequest, msg.Nfsv4VerifyResponse>;
|
|
42
|
+
WRITE: Nfsv4OperationFn<msg.Nfsv4WriteRequest, msg.Nfsv4WriteResponse>;
|
|
43
|
+
RELEASE_LOCKOWNER: Nfsv4OperationFn<msg.Nfsv4ReleaseLockOwnerRequest, msg.Nfsv4ReleaseLockOwnerResponse>;
|
|
44
|
+
ILLEGAL: Nfsv4OperationFn<msg.Nfsv4IllegalRequest, msg.Nfsv4IllegalResponse>;
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Nfsv4Operations.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/Nfsv4Operations.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type * as msg from '../../messages';
|
|
2
|
+
import type { Nfsv4OperationCtx, Nfsv4Operations } from './Nfsv4Operations';
|
|
3
|
+
export declare class Nfsv4OperationsNotImpl implements Nfsv4Operations {
|
|
4
|
+
ACCESS(request: msg.Nfsv4AccessRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4AccessResponse>;
|
|
5
|
+
CLOSE(request: msg.Nfsv4CloseRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4CloseResponse>;
|
|
6
|
+
COMMIT(request: msg.Nfsv4CommitRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4CommitResponse>;
|
|
7
|
+
CREATE(request: msg.Nfsv4CreateRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4CreateResponse>;
|
|
8
|
+
DELEGPURGE(request: msg.Nfsv4DelegpurgeRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4DelegpurgeResponse>;
|
|
9
|
+
DELEGRETURN(request: msg.Nfsv4DelegreturnRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4DelegreturnResponse>;
|
|
10
|
+
GETATTR(request: msg.Nfsv4GetattrRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4GetattrResponse>;
|
|
11
|
+
GETFH(request: msg.Nfsv4GetfhRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4GetfhResponse>;
|
|
12
|
+
LINK(request: msg.Nfsv4LinkRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4LinkResponse>;
|
|
13
|
+
LOCK(request: msg.Nfsv4LockRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4LockResponse>;
|
|
14
|
+
LOCKT(request: msg.Nfsv4LocktRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4LocktResponse>;
|
|
15
|
+
LOCKU(request: msg.Nfsv4LockuRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4LockuResponse>;
|
|
16
|
+
LOOKUP(request: msg.Nfsv4LookupRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4LookupResponse>;
|
|
17
|
+
LOOKUPP(request: msg.Nfsv4LookuppRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4LookuppResponse>;
|
|
18
|
+
NVERIFY(request: msg.Nfsv4NverifyRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4NverifyResponse>;
|
|
19
|
+
OPEN(request: msg.Nfsv4OpenRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4OpenResponse>;
|
|
20
|
+
OPENATTR(request: msg.Nfsv4OpenattrRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4OpenattrResponse>;
|
|
21
|
+
OPEN_CONFIRM(request: msg.Nfsv4OpenConfirmRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4OpenConfirmResponse>;
|
|
22
|
+
OPEN_DOWNGRADE(request: msg.Nfsv4OpenDowngradeRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4OpenDowngradeResponse>;
|
|
23
|
+
PUTFH(request: msg.Nfsv4PutfhRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4PutfhResponse>;
|
|
24
|
+
PUTPUBFH(request: msg.Nfsv4PutpubfhRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4PutpubfhResponse>;
|
|
25
|
+
PUTROOTFH(request: msg.Nfsv4PutrootfhRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4PutrootfhResponse>;
|
|
26
|
+
READ(request: msg.Nfsv4ReadRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4ReadResponse>;
|
|
27
|
+
READDIR(request: msg.Nfsv4ReaddirRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4ReaddirResponse>;
|
|
28
|
+
READLINK(request: msg.Nfsv4ReadlinkRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4ReadlinkResponse>;
|
|
29
|
+
REMOVE(request: msg.Nfsv4RemoveRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4RemoveResponse>;
|
|
30
|
+
RENAME(request: msg.Nfsv4RenameRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4RenameResponse>;
|
|
31
|
+
RENEW(request: msg.Nfsv4RenewRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4RenewResponse>;
|
|
32
|
+
RESTOREFH(request: msg.Nfsv4RestorefhRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4RestorefhResponse>;
|
|
33
|
+
SAVEFH(request: msg.Nfsv4SavefhRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4SavefhResponse>;
|
|
34
|
+
SECINFO(request: msg.Nfsv4SecinfoRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4SecinfoResponse>;
|
|
35
|
+
SETATTR(request: msg.Nfsv4SetattrRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4SetattrResponse>;
|
|
36
|
+
SETCLIENTID(request: msg.Nfsv4SetclientidRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4SetclientidResponse>;
|
|
37
|
+
SETCLIENTID_CONFIRM(request: msg.Nfsv4SetclientidConfirmRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4SetclientidConfirmResponse>;
|
|
38
|
+
VERIFY(request: msg.Nfsv4VerifyRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4VerifyResponse>;
|
|
39
|
+
WRITE(request: msg.Nfsv4WriteRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4WriteResponse>;
|
|
40
|
+
RELEASE_LOCKOWNER(request: msg.Nfsv4ReleaseLockOwnerRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4ReleaseLockOwnerResponse>;
|
|
41
|
+
ILLEGAL(request: msg.Nfsv4IllegalRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4IllegalResponse>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Nfsv4OperationsNotImpl = void 0;
|
|
4
|
+
class Nfsv4OperationsNotImpl {
|
|
5
|
+
async ACCESS(request, ctx) {
|
|
6
|
+
ctx.connection.logger.log('ACCESS', request);
|
|
7
|
+
throw new Error('Not implemented');
|
|
8
|
+
}
|
|
9
|
+
async CLOSE(request, ctx) {
|
|
10
|
+
ctx.connection.logger.log('CLOSE', request);
|
|
11
|
+
throw new Error('Not implemented');
|
|
12
|
+
}
|
|
13
|
+
async COMMIT(request, ctx) {
|
|
14
|
+
ctx.connection.logger.log('COMMIT', request);
|
|
15
|
+
throw new Error('Not implemented');
|
|
16
|
+
}
|
|
17
|
+
async CREATE(request, ctx) {
|
|
18
|
+
ctx.connection.logger.log('CREATE', request);
|
|
19
|
+
throw new Error('Not implemented');
|
|
20
|
+
}
|
|
21
|
+
async DELEGPURGE(request, ctx) {
|
|
22
|
+
ctx.connection.logger.log('DELEGPURGE', request);
|
|
23
|
+
throw new Error('Not implemented');
|
|
24
|
+
}
|
|
25
|
+
async DELEGRETURN(request, ctx) {
|
|
26
|
+
ctx.connection.logger.log('DELEGRETURN', request);
|
|
27
|
+
throw new Error('Not implemented');
|
|
28
|
+
}
|
|
29
|
+
async GETATTR(request, ctx) {
|
|
30
|
+
ctx.connection.logger.log('GETATTR', request);
|
|
31
|
+
throw new Error('Not implemented');
|
|
32
|
+
}
|
|
33
|
+
async GETFH(request, ctx) {
|
|
34
|
+
ctx.connection.logger.log('GETFH', request);
|
|
35
|
+
throw new Error('Not implemented');
|
|
36
|
+
}
|
|
37
|
+
async LINK(request, ctx) {
|
|
38
|
+
ctx.connection.logger.log('LINK', request);
|
|
39
|
+
throw new Error('Not implemented');
|
|
40
|
+
}
|
|
41
|
+
async LOCK(request, ctx) {
|
|
42
|
+
ctx.connection.logger.log('LOCK', request);
|
|
43
|
+
throw new Error('Not implemented');
|
|
44
|
+
}
|
|
45
|
+
async LOCKT(request, ctx) {
|
|
46
|
+
ctx.connection.logger.log('LOCKT', request);
|
|
47
|
+
throw new Error('Not implemented');
|
|
48
|
+
}
|
|
49
|
+
async LOCKU(request, ctx) {
|
|
50
|
+
ctx.connection.logger.log('LOCKU', request);
|
|
51
|
+
throw new Error('Not implemented');
|
|
52
|
+
}
|
|
53
|
+
async LOOKUP(request, ctx) {
|
|
54
|
+
ctx.connection.logger.log('LOOKUP', request);
|
|
55
|
+
throw new Error('Not implemented');
|
|
56
|
+
}
|
|
57
|
+
async LOOKUPP(request, ctx) {
|
|
58
|
+
ctx.connection.logger.log('LOOKUPP', request);
|
|
59
|
+
throw new Error('Not implemented');
|
|
60
|
+
}
|
|
61
|
+
async NVERIFY(request, ctx) {
|
|
62
|
+
ctx.connection.logger.log('NVERIFY', request);
|
|
63
|
+
throw new Error('Not implemented');
|
|
64
|
+
}
|
|
65
|
+
async OPEN(request, ctx) {
|
|
66
|
+
ctx.connection.logger.log('OPEN', request);
|
|
67
|
+
throw new Error('Not implemented');
|
|
68
|
+
}
|
|
69
|
+
async OPENATTR(request, ctx) {
|
|
70
|
+
ctx.connection.logger.log('OPENATTR', request);
|
|
71
|
+
throw new Error('Not implemented');
|
|
72
|
+
}
|
|
73
|
+
async OPEN_CONFIRM(request, ctx) {
|
|
74
|
+
ctx.connection.logger.log('OPEN_CONFIRM', request);
|
|
75
|
+
throw new Error('Not implemented');
|
|
76
|
+
}
|
|
77
|
+
async OPEN_DOWNGRADE(request, ctx) {
|
|
78
|
+
ctx.connection.logger.log('OPEN_DOWNGRADE', request);
|
|
79
|
+
throw new Error('Not implemented');
|
|
80
|
+
}
|
|
81
|
+
async PUTFH(request, ctx) {
|
|
82
|
+
ctx.connection.logger.log('PUTFH', request);
|
|
83
|
+
throw new Error('Not implemented');
|
|
84
|
+
}
|
|
85
|
+
async PUTPUBFH(request, ctx) {
|
|
86
|
+
ctx.connection.logger.log('PUTPUBFH', request);
|
|
87
|
+
throw new Error('Not implemented');
|
|
88
|
+
}
|
|
89
|
+
async PUTROOTFH(request, ctx) {
|
|
90
|
+
ctx.connection.logger.log('PUTROOTFH', request);
|
|
91
|
+
throw new Error('Not implemented');
|
|
92
|
+
}
|
|
93
|
+
async READ(request, ctx) {
|
|
94
|
+
ctx.connection.logger.log('READ', request);
|
|
95
|
+
throw new Error('Not implemented');
|
|
96
|
+
}
|
|
97
|
+
async READDIR(request, ctx) {
|
|
98
|
+
ctx.connection.logger.log('READDIR', request);
|
|
99
|
+
throw new Error('Not implemented');
|
|
100
|
+
}
|
|
101
|
+
async READLINK(request, ctx) {
|
|
102
|
+
ctx.connection.logger.log('READLINK', request);
|
|
103
|
+
throw new Error('Not implemented');
|
|
104
|
+
}
|
|
105
|
+
async REMOVE(request, ctx) {
|
|
106
|
+
ctx.connection.logger.log('REMOVE', request);
|
|
107
|
+
throw new Error('Not implemented');
|
|
108
|
+
}
|
|
109
|
+
async RENAME(request, ctx) {
|
|
110
|
+
ctx.connection.logger.log('RENAME', request);
|
|
111
|
+
throw new Error('Not implemented');
|
|
112
|
+
}
|
|
113
|
+
async RENEW(request, ctx) {
|
|
114
|
+
ctx.connection.logger.log('RENEW', request);
|
|
115
|
+
throw new Error('Not implemented');
|
|
116
|
+
}
|
|
117
|
+
async RESTOREFH(request, ctx) {
|
|
118
|
+
ctx.connection.logger.log('RESTOREFH', request);
|
|
119
|
+
throw new Error('Not implemented');
|
|
120
|
+
}
|
|
121
|
+
async SAVEFH(request, ctx) {
|
|
122
|
+
ctx.connection.logger.log('SAVEFH', request);
|
|
123
|
+
throw new Error('Not implemented');
|
|
124
|
+
}
|
|
125
|
+
async SECINFO(request, ctx) {
|
|
126
|
+
ctx.connection.logger.log('SECINFO', request);
|
|
127
|
+
throw new Error('Not implemented');
|
|
128
|
+
}
|
|
129
|
+
async SETATTR(request, ctx) {
|
|
130
|
+
ctx.connection.logger.log('SETATTR', request);
|
|
131
|
+
throw new Error('Not implemented');
|
|
132
|
+
}
|
|
133
|
+
async SETCLIENTID(request, ctx) {
|
|
134
|
+
ctx.connection.logger.log('SETCLIENTID', request);
|
|
135
|
+
throw new Error('Not implemented');
|
|
136
|
+
}
|
|
137
|
+
async SETCLIENTID_CONFIRM(request, ctx) {
|
|
138
|
+
ctx.connection.logger.log('SETCLIENTID_CONFIRM', request);
|
|
139
|
+
throw new Error('Not implemented');
|
|
140
|
+
}
|
|
141
|
+
async VERIFY(request, ctx) {
|
|
142
|
+
ctx.connection.logger.log('VERIFY', request);
|
|
143
|
+
throw new Error('Not implemented');
|
|
144
|
+
}
|
|
145
|
+
async WRITE(request, ctx) {
|
|
146
|
+
ctx.connection.logger.log('WRITE', request);
|
|
147
|
+
throw new Error('Not implemented');
|
|
148
|
+
}
|
|
149
|
+
async RELEASE_LOCKOWNER(request, ctx) {
|
|
150
|
+
ctx.connection.logger.log('RELEASE_LOCKOWNER', request);
|
|
151
|
+
throw new Error('Not implemented');
|
|
152
|
+
}
|
|
153
|
+
async ILLEGAL(request, ctx) {
|
|
154
|
+
ctx.connection.logger.log('ILLEGAL', request);
|
|
155
|
+
throw new Error('Not implemented');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
exports.Nfsv4OperationsNotImpl = Nfsv4OperationsNotImpl;
|
|
159
|
+
//# sourceMappingURL=Nfsv4OperationsNotImpl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Nfsv4OperationsNotImpl.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/Nfsv4OperationsNotImpl.ts"],"names":[],"mappings":";;;AAGA,MAAa,sBAAsB;IAC1B,KAAK,CAAC,MAAM,CAAC,OAA+B,EAAE,GAAsB;QACzE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IACM,KAAK,CAAC,KAAK,CAAC,OAA8B,EAAE,GAAsB;QACvE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;Q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AAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IACM,KAAK,CAAC,mBAAmB,CAC9B,OAA2C,EAC3C,GAAsB;QAEtB,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IACM,KAAK,CAAC,MAAM,CAAC,OAA+B,EAAE,GAAsB;QACzE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IACM,KAAK,CAAC,KAAK,CAAC,OAA8B,EAAE,GAAsB;QACvE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IACM,KAAK,CAAC,iBAAiB,CAC5B,OAAyC,EACzC,GAAsB;QAEtB,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IACM,KAAK,CAAC,OAAO,CAAC,OAAgC,EAAE,GAAsB;QAC3E,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;CACF;AApLD,wDAoLC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type * as struct from '../../structs';
|
|
2
|
+
import type { FileHandle } from 'node:fs/promises';
|
|
3
|
+
/**
|
|
4
|
+
* Open file state record for NFSv4 OPEN operations.
|
|
5
|
+
* Tracks state for an individual file that has been opened by a client,
|
|
6
|
+
* including the stateid, file descriptor, share reservations, and confirmation status.
|
|
7
|
+
*/
|
|
8
|
+
export declare class OpenFileState {
|
|
9
|
+
/**
|
|
10
|
+
* Stateid assigned to this open file.
|
|
11
|
+
* Used by client to identify this particular open in subsequent operations
|
|
12
|
+
* (CLOSE, OPEN_DOWNGRADE, READ, WRITE, etc.).
|
|
13
|
+
*/
|
|
14
|
+
readonly stateid: struct.Nfsv4Stateid;
|
|
15
|
+
/**
|
|
16
|
+
* Absolute file system path of the opened file.
|
|
17
|
+
* Used to identify the file and check for share reservation conflicts.
|
|
18
|
+
*/
|
|
19
|
+
readonly path: string;
|
|
20
|
+
/**
|
|
21
|
+
* Node.js file descriptor/handle for the opened file.
|
|
22
|
+
* Used to perform I/O operations and must be closed when the file is closed.
|
|
23
|
+
*/
|
|
24
|
+
readonly fd: FileHandle;
|
|
25
|
+
/**
|
|
26
|
+
* Share access mode - which operations this open allows.
|
|
27
|
+
* Bitwise OR of OPEN4_SHARE_ACCESS_READ, OPEN4_SHARE_ACCESS_WRITE.
|
|
28
|
+
* Controls what the opener can do with the file.
|
|
29
|
+
*/
|
|
30
|
+
shareAccess: number;
|
|
31
|
+
/**
|
|
32
|
+
* Share deny mode - which operations this open denies to others.
|
|
33
|
+
* Bitwise OR of OPEN4_SHARE_DENY_READ, OPEN4_SHARE_DENY_WRITE, or OPEN4_SHARE_DENY_NONE.
|
|
34
|
+
* Controls what conflicting operations are blocked for other opens.
|
|
35
|
+
*/
|
|
36
|
+
shareDeny: number;
|
|
37
|
+
/**
|
|
38
|
+
* Key identifying the open-owner that opened this file.
|
|
39
|
+
* Format: `${clientid}:${base64(owner)}`.
|
|
40
|
+
* Links this open back to the owner for sequence number management.
|
|
41
|
+
*/
|
|
42
|
+
readonly openOwnerKey: string;
|
|
43
|
+
/**
|
|
44
|
+
* Sequence number for this open.
|
|
45
|
+
* Used to detect replayed or out-of-order operations.
|
|
46
|
+
* Incremented on OPEN_CONFIRM and OPEN_DOWNGRADE.
|
|
47
|
+
*/
|
|
48
|
+
seqid: number;
|
|
49
|
+
/**
|
|
50
|
+
* Whether this open has been confirmed via OPEN_CONFIRM.
|
|
51
|
+
* NFSv4.0 requires new opens from new open-owners to be confirmed.
|
|
52
|
+
* Once confirmed, the open can be used for READ/WRITE operations.
|
|
53
|
+
*/
|
|
54
|
+
confirmed: boolean;
|
|
55
|
+
constructor(
|
|
56
|
+
/**
|
|
57
|
+
* Stateid assigned to this open file.
|
|
58
|
+
* Used by client to identify this particular open in subsequent operations
|
|
59
|
+
* (CLOSE, OPEN_DOWNGRADE, READ, WRITE, etc.).
|
|
60
|
+
*/
|
|
61
|
+
stateid: struct.Nfsv4Stateid,
|
|
62
|
+
/**
|
|
63
|
+
* Absolute file system path of the opened file.
|
|
64
|
+
* Used to identify the file and check for share reservation conflicts.
|
|
65
|
+
*/
|
|
66
|
+
path: string,
|
|
67
|
+
/**
|
|
68
|
+
* Node.js file descriptor/handle for the opened file.
|
|
69
|
+
* Used to perform I/O operations and must be closed when the file is closed.
|
|
70
|
+
*/
|
|
71
|
+
fd: FileHandle,
|
|
72
|
+
/**
|
|
73
|
+
* Share access mode - which operations this open allows.
|
|
74
|
+
* Bitwise OR of OPEN4_SHARE_ACCESS_READ, OPEN4_SHARE_ACCESS_WRITE.
|
|
75
|
+
* Controls what the opener can do with the file.
|
|
76
|
+
*/
|
|
77
|
+
shareAccess: number,
|
|
78
|
+
/**
|
|
79
|
+
* Share deny mode - which operations this open denies to others.
|
|
80
|
+
* Bitwise OR of OPEN4_SHARE_DENY_READ, OPEN4_SHARE_DENY_WRITE, or OPEN4_SHARE_DENY_NONE.
|
|
81
|
+
* Controls what conflicting operations are blocked for other opens.
|
|
82
|
+
*/
|
|
83
|
+
shareDeny: number,
|
|
84
|
+
/**
|
|
85
|
+
* Key identifying the open-owner that opened this file.
|
|
86
|
+
* Format: `${clientid}:${base64(owner)}`.
|
|
87
|
+
* Links this open back to the owner for sequence number management.
|
|
88
|
+
*/
|
|
89
|
+
openOwnerKey: string,
|
|
90
|
+
/**
|
|
91
|
+
* Sequence number for this open.
|
|
92
|
+
* Used to detect replayed or out-of-order operations.
|
|
93
|
+
* Incremented on OPEN_CONFIRM and OPEN_DOWNGRADE.
|
|
94
|
+
*/
|
|
95
|
+
seqid: number,
|
|
96
|
+
/**
|
|
97
|
+
* Whether this open has been confirmed via OPEN_CONFIRM.
|
|
98
|
+
* NFSv4.0 requires new opens from new open-owners to be confirmed.
|
|
99
|
+
* Once confirmed, the open can be used for READ/WRITE operations.
|
|
100
|
+
*/
|
|
101
|
+
confirmed: boolean);
|
|
102
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenFileState = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Open file state record for NFSv4 OPEN operations.
|
|
6
|
+
* Tracks state for an individual file that has been opened by a client,
|
|
7
|
+
* including the stateid, file descriptor, share reservations, and confirmation status.
|
|
8
|
+
*/
|
|
9
|
+
class OpenFileState {
|
|
10
|
+
constructor(
|
|
11
|
+
/**
|
|
12
|
+
* Stateid assigned to this open file.
|
|
13
|
+
* Used by client to identify this particular open in subsequent operations
|
|
14
|
+
* (CLOSE, OPEN_DOWNGRADE, READ, WRITE, etc.).
|
|
15
|
+
*/
|
|
16
|
+
stateid,
|
|
17
|
+
/**
|
|
18
|
+
* Absolute file system path of the opened file.
|
|
19
|
+
* Used to identify the file and check for share reservation conflicts.
|
|
20
|
+
*/
|
|
21
|
+
path,
|
|
22
|
+
/**
|
|
23
|
+
* Node.js file descriptor/handle for the opened file.
|
|
24
|
+
* Used to perform I/O operations and must be closed when the file is closed.
|
|
25
|
+
*/
|
|
26
|
+
fd,
|
|
27
|
+
/**
|
|
28
|
+
* Share access mode - which operations this open allows.
|
|
29
|
+
* Bitwise OR of OPEN4_SHARE_ACCESS_READ, OPEN4_SHARE_ACCESS_WRITE.
|
|
30
|
+
* Controls what the opener can do with the file.
|
|
31
|
+
*/
|
|
32
|
+
shareAccess,
|
|
33
|
+
/**
|
|
34
|
+
* Share deny mode - which operations this open denies to others.
|
|
35
|
+
* Bitwise OR of OPEN4_SHARE_DENY_READ, OPEN4_SHARE_DENY_WRITE, or OPEN4_SHARE_DENY_NONE.
|
|
36
|
+
* Controls what conflicting operations are blocked for other opens.
|
|
37
|
+
*/
|
|
38
|
+
shareDeny,
|
|
39
|
+
/**
|
|
40
|
+
* Key identifying the open-owner that opened this file.
|
|
41
|
+
* Format: `${clientid}:${base64(owner)}`.
|
|
42
|
+
* Links this open back to the owner for sequence number management.
|
|
43
|
+
*/
|
|
44
|
+
openOwnerKey,
|
|
45
|
+
/**
|
|
46
|
+
* Sequence number for this open.
|
|
47
|
+
* Used to detect replayed or out-of-order operations.
|
|
48
|
+
* Incremented on OPEN_CONFIRM and OPEN_DOWNGRADE.
|
|
49
|
+
*/
|
|
50
|
+
seqid,
|
|
51
|
+
/**
|
|
52
|
+
* Whether this open has been confirmed via OPEN_CONFIRM.
|
|
53
|
+
* NFSv4.0 requires new opens from new open-owners to be confirmed.
|
|
54
|
+
* Once confirmed, the open can be used for READ/WRITE operations.
|
|
55
|
+
*/
|
|
56
|
+
confirmed) {
|
|
57
|
+
this.stateid = stateid;
|
|
58
|
+
this.path = path;
|
|
59
|
+
this.fd = fd;
|
|
60
|
+
this.shareAccess = shareAccess;
|
|
61
|
+
this.shareDeny = shareDeny;
|
|
62
|
+
this.openOwnerKey = openOwnerKey;
|
|
63
|
+
this.seqid = seqid;
|
|
64
|
+
this.confirmed = confirmed;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.OpenFileState = OpenFileState;
|
|
68
|
+
//# sourceMappingURL=OpenFileState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenFileState.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/OpenFileState.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH,MAAa,aAAa;IACxB;IACE;;;;OAIG;IACa,OAA4B;IAE5C;;;OAGG;IACa,IAAY;IAE5B;;;OAGG;IACa,EAAc;IAE9B;;;;OAIG;IACI,WAAmB;IAE1B;;;;OAIG;IACI,SAAiB;IAExB;;;;OAIG;IACa,YAAoB;IAEpC;;;;OAIG;IACI,KAAa;IAEpB;;;;OAIG;IACI,SAAkB;QA/CT,YAAO,GAAP,OAAO,CAAqB;QAM5B,SAAI,GAAJ,IAAI,CAAQ;QAMZ,OAAE,GAAF,EAAE,CAAY;QAOvB,gBAAW,GAAX,WAAW,CAAQ;QAOnB,cAAS,GAAT,SAAS,CAAQ;QAOR,iBAAY,GAAZ,YAAY,CAAQ;QAO7B,UAAK,GAAL,KAAK,CAAQ;QAOb,cAAS,GAAT,SAAS,CAAS;IACxB,CAAC;CACL;AAxDD,sCAwDC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open-owner state record for NFSv4 OPEN operations.
|
|
3
|
+
* An open-owner represents a single entity (process, thread) on a client
|
|
4
|
+
* that can open files. Tracks all opens made by this owner and manages
|
|
5
|
+
* sequence numbers for serialization.
|
|
6
|
+
*/
|
|
7
|
+
export declare class OpenOwnerState {
|
|
8
|
+
/**
|
|
9
|
+
* Client ID that owns this open-owner.
|
|
10
|
+
* Links the owner back to the specific NFS client that created it.
|
|
11
|
+
*/
|
|
12
|
+
readonly clientid: bigint;
|
|
13
|
+
/**
|
|
14
|
+
* Opaque owner identifier provided by the client.
|
|
15
|
+
* Typically represents a process or thread ID on the client.
|
|
16
|
+
* Combined with clientid, uniquely identifies this open-owner.
|
|
17
|
+
*/
|
|
18
|
+
readonly owner: Uint8Array;
|
|
19
|
+
/**
|
|
20
|
+
* Sequence number for operations from this open-owner.
|
|
21
|
+
* Used to serialize OPEN/CLOSE/OPEN_CONFIRM/OPEN_DOWNGRADE operations.
|
|
22
|
+
* Incremented after each successful stateful operation.
|
|
23
|
+
* Server rejects operations with incorrect sequence numbers to prevent replays.
|
|
24
|
+
*/
|
|
25
|
+
seqid: number;
|
|
26
|
+
/**
|
|
27
|
+
* Set of stateid keys for all files currently opened by this owner.
|
|
28
|
+
* Format: stateid keys are `${seqid}:${base64(other)}`.
|
|
29
|
+
* Used to track all active opens and clean them up if the owner goes away.
|
|
30
|
+
*/
|
|
31
|
+
readonly opens: Set<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Cached response from the last successful operation.
|
|
34
|
+
* Per RFC 7530 §9.1.7, when a client retries with the same seqid (replay),
|
|
35
|
+
* the server must return the cached response instead of re-executing the operation.
|
|
36
|
+
* This ensures idempotency for operations like OPEN, OPEN_CONFIRM, OPEN_DOWNGRADE, CLOSE.
|
|
37
|
+
*/
|
|
38
|
+
lastResponse?: any | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Signature of the last OPEN request. Used to distinguish true replays
|
|
41
|
+
* (identical requests) from clients that reuse seqids with different
|
|
42
|
+
* parameters, which must be rejected with BAD_SEQID.
|
|
43
|
+
*/
|
|
44
|
+
lastRequestKey?: string | undefined;
|
|
45
|
+
constructor(
|
|
46
|
+
/**
|
|
47
|
+
* Client ID that owns this open-owner.
|
|
48
|
+
* Links the owner back to the specific NFS client that created it.
|
|
49
|
+
*/
|
|
50
|
+
clientid: bigint,
|
|
51
|
+
/**
|
|
52
|
+
* Opaque owner identifier provided by the client.
|
|
53
|
+
* Typically represents a process or thread ID on the client.
|
|
54
|
+
* Combined with clientid, uniquely identifies this open-owner.
|
|
55
|
+
*/
|
|
56
|
+
owner: Uint8Array,
|
|
57
|
+
/**
|
|
58
|
+
* Sequence number for operations from this open-owner.
|
|
59
|
+
* Used to serialize OPEN/CLOSE/OPEN_CONFIRM/OPEN_DOWNGRADE operations.
|
|
60
|
+
* Incremented after each successful stateful operation.
|
|
61
|
+
* Server rejects operations with incorrect sequence numbers to prevent replays.
|
|
62
|
+
*/
|
|
63
|
+
seqid: number,
|
|
64
|
+
/**
|
|
65
|
+
* Set of stateid keys for all files currently opened by this owner.
|
|
66
|
+
* Format: stateid keys are `${seqid}:${base64(other)}`.
|
|
67
|
+
* Used to track all active opens and clean them up if the owner goes away.
|
|
68
|
+
*/
|
|
69
|
+
opens?: Set<string>,
|
|
70
|
+
/**
|
|
71
|
+
* Cached response from the last successful operation.
|
|
72
|
+
* Per RFC 7530 §9.1.7, when a client retries with the same seqid (replay),
|
|
73
|
+
* the server must return the cached response instead of re-executing the operation.
|
|
74
|
+
* This ensures idempotency for operations like OPEN, OPEN_CONFIRM, OPEN_DOWNGRADE, CLOSE.
|
|
75
|
+
*/
|
|
76
|
+
lastResponse?: any | undefined,
|
|
77
|
+
/**
|
|
78
|
+
* Signature of the last OPEN request. Used to distinguish true replays
|
|
79
|
+
* (identical requests) from clients that reuse seqids with different
|
|
80
|
+
* parameters, which must be rejected with BAD_SEQID.
|
|
81
|
+
*/
|
|
82
|
+
lastRequestKey?: string | undefined);
|
|
83
|
+
}
|