first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import { Reader } from '@jsonjoy.com/buffers/lib/Reader';
import { XdrDecoder } from '../../../xdr/XdrDecoder';
import { NlmProc } from './constants';
import * as msg from './messages';
export declare class NlmDecoder {
protected readonly xdr: XdrDecoder;
constructor(reader?: Reader);
decodeMessage(reader: Reader, proc: NlmProc, isRequest: boolean): msg.NlmMessage | undefined;
private decodeRequest;
private decodeResponse;
private readCookie;
private readNetobj;
private readNlm4Holder;
private readNlm4Lock;
private readNlm4Share;
private readTestArgs;
private readLockArgs;
private readCancelArgs;
private readUnlockArgs;
private readShareArgs;
private decodeTestRequest;
private decodeTestResponse;
private decodeLockRequest;
private decodeResponse4;
private decodeCancelRequest;
private decodeUnlockRequest;
private decodeGrantedRequest;
private decodeShareRequest;
private decodeShareResponse;
private decodeUnshareRequest;
private decodeNmLockRequest;
private decodeFreeAllRequest;
}
+209
View File
@@ -0,0 +1,209 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NlmDecoder = void 0;
const tslib_1 = require("tslib");
const Reader_1 = require("@jsonjoy.com/buffers/lib/Reader");
const XdrDecoder_1 = require("../../../xdr/XdrDecoder");
const errors_1 = require("../errors");
const msg = tslib_1.__importStar(require("./messages"));
const structs = tslib_1.__importStar(require("./structs"));
class NlmDecoder {
constructor(reader = new Reader_1.Reader()) {
this.xdr = new XdrDecoder_1.XdrDecoder(reader);
}
decodeMessage(reader, proc, isRequest) {
this.xdr.reader = reader;
const startPos = reader.x;
try {
if (isRequest) {
return this.decodeRequest(proc);
}
else {
return this.decodeResponse(proc);
}
}
catch (err) {
if (err instanceof RangeError) {
reader.x = startPos;
return undefined;
}
throw err;
}
}
decodeRequest(proc) {
switch (proc) {
case 0:
return undefined;
case 1:
return this.decodeTestRequest();
case 2:
return this.decodeLockRequest();
case 3:
return this.decodeCancelRequest();
case 4:
return this.decodeUnlockRequest();
case 5:
return this.decodeGrantedRequest();
case 20:
return this.decodeShareRequest();
case 21:
return this.decodeUnshareRequest();
case 22:
return this.decodeNmLockRequest();
case 23:
return this.decodeFreeAllRequest();
default:
throw new errors_1.Nfsv3DecodingError(`Unknown NLM procedure: ${proc}`);
}
}
decodeResponse(proc) {
switch (proc) {
case 0:
return undefined;
case 1:
return this.decodeTestResponse();
case 2:
case 3:
case 4:
case 5:
case 22:
return this.decodeResponse4();
case 20:
case 21:
return this.decodeShareResponse();
default:
throw new errors_1.Nfsv3DecodingError(`Unknown NLM procedure: ${proc}`);
}
}
readCookie() {
const data = this.xdr.readVarlenOpaque();
return new Reader_1.Reader(data);
}
readNetobj() {
const data = this.xdr.readVarlenOpaque();
return new Reader_1.Reader(data);
}
readNlm4Holder() {
const xdr = this.xdr;
const exclusive = xdr.readBoolean();
const svid = xdr.readInt();
const oh = this.readNetobj();
const offset = xdr.readUnsignedHyper();
const length = xdr.readUnsignedHyper();
return new structs.Nlm4Holder(exclusive, svid, oh, offset, length);
}
readNlm4Lock() {
const xdr = this.xdr;
const callerName = xdr.readString();
const fh = this.readNetobj();
const oh = this.readNetobj();
const svid = xdr.readInt();
const offset = xdr.readUnsignedHyper();
const length = xdr.readUnsignedHyper();
return new structs.Nlm4Lock(callerName, fh, oh, svid, offset, length);
}
readNlm4Share() {
const xdr = this.xdr;
const callerName = xdr.readString();
const fh = this.readNetobj();
const oh = this.readNetobj();
const mode = xdr.readUnsignedInt();
const access = xdr.readUnsignedInt();
return new structs.Nlm4Share(callerName, fh, oh, mode, access);
}
readTestArgs() {
const cookie = this.readCookie();
const exclusive = this.xdr.readBoolean();
const lock = this.readNlm4Lock();
return new msg.Nlm4TestArgs(cookie, exclusive, lock);
}
readLockArgs() {
const xdr = this.xdr;
const cookie = this.readCookie();
const block = xdr.readBoolean();
const exclusive = xdr.readBoolean();
const lock = this.readNlm4Lock();
const reclaim = xdr.readBoolean();
const state = xdr.readInt();
return new msg.Nlm4LockArgs(cookie, block, exclusive, lock, reclaim, state);
}
readCancelArgs() {
const xdr = this.xdr;
const cookie = this.readCookie();
const block = xdr.readBoolean();
const exclusive = xdr.readBoolean();
const lock = this.readNlm4Lock();
return new msg.Nlm4CancelArgs(cookie, block, exclusive, lock);
}
readUnlockArgs() {
const cookie = this.readCookie();
const lock = this.readNlm4Lock();
return new msg.Nlm4UnlockArgs(cookie, lock);
}
readShareArgs() {
const cookie = this.readCookie();
const share = this.readNlm4Share();
const reclaim = this.xdr.readBoolean();
return new msg.Nlm4ShareArgs(cookie, share, reclaim);
}
decodeTestRequest() {
const args = this.readTestArgs();
return new msg.Nlm4TestRequest(args);
}
decodeTestResponse() {
const xdr = this.xdr;
const cookie = this.readCookie();
const stat = xdr.readUnsignedInt();
const holder = stat === 1 ? this.readNlm4Holder() : undefined;
return new msg.Nlm4TestResponse(cookie, stat, holder);
}
decodeLockRequest() {
const args = this.readLockArgs();
return new msg.Nlm4LockRequest(args);
}
decodeResponse4() {
const cookie = this.readCookie();
const stat = this.xdr.readUnsignedInt();
return new msg.Nlm4Response(cookie, stat);
}
decodeCancelRequest() {
const args = this.readCancelArgs();
return new msg.Nlm4CancelRequest(args);
}
decodeUnlockRequest() {
const args = this.readUnlockArgs();
return new msg.Nlm4UnlockRequest(args);
}
decodeGrantedRequest() {
const args = this.readTestArgs();
return new msg.Nlm4GrantedRequest(args);
}
decodeShareRequest() {
const args = this.readShareArgs();
return new msg.Nlm4ShareRequest(args);
}
decodeShareResponse() {
const xdr = this.xdr;
const cookie = this.readCookie();
const stat = xdr.readUnsignedInt();
const sequence = xdr.readInt();
return new msg.Nlm4ShareResponse(cookie, stat, sequence);
}
decodeUnshareRequest() {
const args = this.readShareArgs();
return new msg.Nlm4UnshareRequest(args);
}
decodeNmLockRequest() {
const args = this.readLockArgs();
return new msg.Nlm4NmLockRequest(args);
}
decodeFreeAllRequest() {
const xdr = this.xdr;
const name = xdr.readString();
const state = xdr.readInt();
const notify = new structs.Nlm4Notify(name, state);
return new msg.Nlm4FreeAllRequest(notify);
}
}
exports.NlmDecoder = NlmDecoder;
//# sourceMappingURL=NlmDecoder.js.map
File diff suppressed because one or more lines are too long
+35
View File
@@ -0,0 +1,35 @@
import { XdrEncoder } from '../../../xdr/XdrEncoder';
import { NlmProc } from './constants';
import * as msg from './messages';
import type { IWriter, IWriterGrowable } from '@jsonjoy.com/util/lib/buffers';
export declare class NlmEncoder<W extends IWriter & IWriterGrowable = IWriter & IWriterGrowable> {
readonly writer: W;
protected readonly xdr: XdrEncoder;
constructor(writer?: W);
encodeMessage(message: msg.NlmMessage, proc: NlmProc, isRequest: boolean): Uint8Array;
writeMessage(message: msg.NlmMessage, proc: NlmProc, isRequest: boolean): void;
private writeRequest;
private writeResponse;
private writeCookie;
private writeNetobj;
private writeNlm4Holder;
private writeNlm4Lock;
private writeNlm4Share;
private writeTestArgs;
private writeLockArgs;
private writeCancelArgs;
private writeUnlockArgs;
private writeShareArgs;
private writeTestRequest;
private writeTestResponse;
private writeLockRequest;
private writeResponse4;
private writeCancelRequest;
private writeUnlockRequest;
private writeGrantedRequest;
private writeShareRequest;
private writeShareResponse;
private writeUnshareRequest;
private writeNmLockRequest;
private writeFreeAllRequest;
}
+182
View File
@@ -0,0 +1,182 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NlmEncoder = void 0;
const Writer_1 = require("@jsonjoy.com/util/lib/buffers/Writer");
const XdrEncoder_1 = require("../../../xdr/XdrEncoder");
const errors_1 = require("../errors");
class NlmEncoder {
constructor(writer = new Writer_1.Writer()) {
this.writer = writer;
this.xdr = new XdrEncoder_1.XdrEncoder(writer);
}
encodeMessage(message, proc, isRequest) {
if (isRequest)
this.writeRequest(message, proc);
else
this.writeResponse(message, proc);
return this.writer.flush();
}
writeMessage(message, proc, isRequest) {
if (isRequest)
this.writeRequest(message, proc);
else
this.writeResponse(message, proc);
}
writeRequest(request, proc) {
switch (proc) {
case 0:
return;
case 1:
return this.writeTestRequest(request);
case 2:
return this.writeLockRequest(request);
case 3:
return this.writeCancelRequest(request);
case 4:
return this.writeUnlockRequest(request);
case 5:
return this.writeGrantedRequest(request);
case 20:
return this.writeShareRequest(request);
case 21:
return this.writeUnshareRequest(request);
case 22:
return this.writeNmLockRequest(request);
case 23:
return this.writeFreeAllRequest(request);
default:
throw new errors_1.Nfsv3EncodingError(`Unknown NLM procedure: ${proc}`);
}
}
writeResponse(response, proc) {
switch (proc) {
case 0:
return;
case 1:
return this.writeTestResponse(response);
case 2:
case 3:
case 4:
case 5:
case 22:
return this.writeResponse4(response);
case 20:
case 21:
return this.writeShareResponse(response);
default:
throw new errors_1.Nfsv3EncodingError(`Unknown NLM procedure: ${proc}`);
}
}
writeCookie(cookie) {
const data = cookie.uint8;
this.xdr.writeVarlenOpaque(data);
}
writeNetobj(obj) {
const data = obj.uint8;
this.xdr.writeVarlenOpaque(data);
}
writeNlm4Holder(holder) {
const xdr = this.xdr;
xdr.writeBoolean(holder.exclusive);
xdr.writeInt(holder.svid);
this.writeNetobj(holder.oh);
xdr.writeUnsignedHyper(holder.offset);
xdr.writeUnsignedHyper(holder.length);
}
writeNlm4Lock(lock) {
const xdr = this.xdr;
xdr.writeStr(lock.callerName);
this.writeNetobj(lock.fh);
this.writeNetobj(lock.oh);
xdr.writeInt(lock.svid);
xdr.writeUnsignedHyper(lock.offset);
xdr.writeUnsignedHyper(lock.length);
}
writeNlm4Share(share) {
const xdr = this.xdr;
xdr.writeStr(share.callerName);
this.writeNetobj(share.fh);
this.writeNetobj(share.oh);
xdr.writeUnsignedInt(share.mode);
xdr.writeUnsignedInt(share.access);
}
writeTestArgs(args) {
this.writeCookie(args.cookie);
this.xdr.writeBoolean(args.exclusive);
this.writeNlm4Lock(args.lock);
}
writeLockArgs(args) {
const xdr = this.xdr;
this.writeCookie(args.cookie);
xdr.writeBoolean(args.block);
xdr.writeBoolean(args.exclusive);
this.writeNlm4Lock(args.lock);
xdr.writeBoolean(args.reclaim);
xdr.writeInt(args.state);
}
writeCancelArgs(args) {
const xdr = this.xdr;
this.writeCookie(args.cookie);
xdr.writeBoolean(args.block);
xdr.writeBoolean(args.exclusive);
this.writeNlm4Lock(args.lock);
}
writeUnlockArgs(args) {
this.writeCookie(args.cookie);
this.writeNlm4Lock(args.lock);
}
writeShareArgs(args) {
this.writeCookie(args.cookie);
this.writeNlm4Share(args.share);
this.xdr.writeBoolean(args.reclaim);
}
writeTestRequest(req) {
this.writeTestArgs(req.args);
}
writeTestResponse(res) {
const xdr = this.xdr;
this.writeCookie(res.cookie);
xdr.writeUnsignedInt(res.stat);
if (res.stat === 1 && res.holder) {
this.writeNlm4Holder(res.holder);
}
}
writeLockRequest(req) {
this.writeLockArgs(req.args);
}
writeResponse4(res) {
this.writeCookie(res.cookie);
this.xdr.writeUnsignedInt(res.stat);
}
writeCancelRequest(req) {
this.writeCancelArgs(req.args);
}
writeUnlockRequest(req) {
this.writeUnlockArgs(req.args);
}
writeGrantedRequest(req) {
this.writeTestArgs(req.args);
}
writeShareRequest(req) {
this.writeShareArgs(req.args);
}
writeShareResponse(res) {
const xdr = this.xdr;
this.writeCookie(res.cookie);
xdr.writeUnsignedInt(res.stat);
xdr.writeInt(res.sequence);
}
writeUnshareRequest(req) {
this.writeShareArgs(req.args);
}
writeNmLockRequest(req) {
this.writeLockArgs(req.args);
}
writeFreeAllRequest(req) {
const xdr = this.xdr;
xdr.writeStr(req.notify.name);
xdr.writeInt(req.notify.state);
}
}
exports.NlmEncoder = NlmEncoder;
//# sourceMappingURL=NlmEncoder.js.map
File diff suppressed because one or more lines are too long
+39
View File
@@ -0,0 +1,39 @@
export declare const enum NlmConst {
PROGRAM = 100021,
VERSION = 4,
LM_MAXSTRLEN = 1024
}
export declare const enum NlmProc {
NULL = 0,
TEST = 1,
LOCK = 2,
CANCEL = 3,
UNLOCK = 4,
GRANTED = 5,
TEST_MSG = 6,
LOCK_MSG = 7,
CANCEL_MSG = 8,
UNLOCK_MSG = 9,
GRANTED_MSG = 10,
TEST_RES = 11,
LOCK_RES = 12,
CANCEL_RES = 13,
UNLOCK_RES = 14,
GRANTED_RES = 15,
SHARE = 20,
UNSHARE = 21,
NM_LOCK = 22,
FREE_ALL = 23
}
export declare const enum Nlm4Stat {
NLM4_GRANTED = 0,
NLM4_DENIED = 1,
NLM4_DENIED_NOLOCKS = 2,
NLM4_BLOCKED = 3,
NLM4_DENIED_GRACE_PERIOD = 4,
NLM4_DEADLCK = 5,
NLM4_ROFS = 6,
NLM4_STALE_FH = 7,
NLM4_FBIG = 8,
NLM4_FAILED = 9
}
+3
View File
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/nfs/v3/locks/constants.ts"],"names":[],"mappings":""}
+96
View File
@@ -0,0 +1,96 @@
import { Nlm4Stat } from './constants';
import type { Reader } from '@jsonjoy.com/buffers/lib/Reader';
import type * as stucts from './structs';
export type NlmMessage = NlmRequest | NlmResponse;
export type NlmRequest = Nlm4TestRequest | Nlm4LockRequest | Nlm4CancelRequest | Nlm4UnlockRequest | Nlm4GrantedRequest | Nlm4ShareRequest | Nlm4UnshareRequest | Nlm4NmLockRequest | Nlm4FreeAllRequest;
export type NlmResponse = Nlm4TestResponse | Nlm4Response | Nlm4ShareResponse;
export declare class Nlm4TestArgs {
readonly cookie: Reader;
readonly exclusive: boolean;
readonly lock: stucts.Nlm4Lock;
constructor(cookie: Reader, exclusive: boolean, lock: stucts.Nlm4Lock);
}
export declare class Nlm4TestRequest {
readonly args: Nlm4TestArgs;
constructor(args: Nlm4TestArgs);
}
export declare class Nlm4TestDenied {
readonly holder: stucts.Nlm4Holder;
constructor(holder: stucts.Nlm4Holder);
}
export declare class Nlm4TestResponse {
readonly cookie: Reader;
readonly stat: Nlm4Stat;
readonly holder?: stucts.Nlm4Holder | undefined;
constructor(cookie: Reader, stat: Nlm4Stat, holder?: stucts.Nlm4Holder | undefined);
}
export declare class Nlm4LockArgs {
readonly cookie: Reader;
readonly block: boolean;
readonly exclusive: boolean;
readonly lock: stucts.Nlm4Lock;
readonly reclaim: boolean;
readonly state: number;
constructor(cookie: Reader, block: boolean, exclusive: boolean, lock: stucts.Nlm4Lock, reclaim: boolean, state: number);
}
export declare class Nlm4LockRequest {
readonly args: Nlm4LockArgs;
constructor(args: Nlm4LockArgs);
}
export declare class Nlm4Response {
readonly cookie: Reader;
readonly stat: Nlm4Stat;
constructor(cookie: Reader, stat: Nlm4Stat);
}
export declare class Nlm4CancelArgs {
readonly cookie: Reader;
readonly block: boolean;
readonly exclusive: boolean;
readonly lock: stucts.Nlm4Lock;
constructor(cookie: Reader, block: boolean, exclusive: boolean, lock: stucts.Nlm4Lock);
}
export declare class Nlm4CancelRequest {
readonly args: Nlm4CancelArgs;
constructor(args: Nlm4CancelArgs);
}
export declare class Nlm4UnlockArgs {
readonly cookie: Reader;
readonly lock: stucts.Nlm4Lock;
constructor(cookie: Reader, lock: stucts.Nlm4Lock);
}
export declare class Nlm4UnlockRequest {
readonly args: Nlm4UnlockArgs;
constructor(args: Nlm4UnlockArgs);
}
export declare class Nlm4GrantedRequest {
readonly args: Nlm4TestArgs;
constructor(args: Nlm4TestArgs);
}
export declare class Nlm4ShareArgs {
readonly cookie: Reader;
readonly share: stucts.Nlm4Share;
readonly reclaim: boolean;
constructor(cookie: Reader, share: stucts.Nlm4Share, reclaim: boolean);
}
export declare class Nlm4ShareRequest {
readonly args: Nlm4ShareArgs;
constructor(args: Nlm4ShareArgs);
}
export declare class Nlm4ShareResponse {
readonly cookie: Reader;
readonly stat: Nlm4Stat;
readonly sequence: number;
constructor(cookie: Reader, stat: Nlm4Stat, sequence: number);
}
export declare class Nlm4UnshareRequest {
readonly args: Nlm4ShareArgs;
constructor(args: Nlm4ShareArgs);
}
export declare class Nlm4NmLockRequest {
readonly args: Nlm4LockArgs;
constructor(args: Nlm4LockArgs);
}
export declare class Nlm4FreeAllRequest {
readonly notify: stucts.Nlm4Notify;
constructor(notify: stucts.Nlm4Notify);
}
+130
View File
@@ -0,0 +1,130 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Nlm4FreeAllRequest = exports.Nlm4NmLockRequest = exports.Nlm4UnshareRequest = exports.Nlm4ShareResponse = exports.Nlm4ShareRequest = exports.Nlm4ShareArgs = exports.Nlm4GrantedRequest = exports.Nlm4UnlockRequest = exports.Nlm4UnlockArgs = exports.Nlm4CancelRequest = exports.Nlm4CancelArgs = exports.Nlm4Response = exports.Nlm4LockRequest = exports.Nlm4LockArgs = exports.Nlm4TestResponse = exports.Nlm4TestDenied = exports.Nlm4TestRequest = exports.Nlm4TestArgs = void 0;
class Nlm4TestArgs {
constructor(cookie, exclusive, lock) {
this.cookie = cookie;
this.exclusive = exclusive;
this.lock = lock;
}
}
exports.Nlm4TestArgs = Nlm4TestArgs;
class Nlm4TestRequest {
constructor(args) {
this.args = args;
}
}
exports.Nlm4TestRequest = Nlm4TestRequest;
class Nlm4TestDenied {
constructor(holder) {
this.holder = holder;
}
}
exports.Nlm4TestDenied = Nlm4TestDenied;
class Nlm4TestResponse {
constructor(cookie, stat, holder) {
this.cookie = cookie;
this.stat = stat;
this.holder = holder;
}
}
exports.Nlm4TestResponse = Nlm4TestResponse;
class Nlm4LockArgs {
constructor(cookie, block, exclusive, lock, reclaim, state) {
this.cookie = cookie;
this.block = block;
this.exclusive = exclusive;
this.lock = lock;
this.reclaim = reclaim;
this.state = state;
}
}
exports.Nlm4LockArgs = Nlm4LockArgs;
class Nlm4LockRequest {
constructor(args) {
this.args = args;
}
}
exports.Nlm4LockRequest = Nlm4LockRequest;
class Nlm4Response {
constructor(cookie, stat) {
this.cookie = cookie;
this.stat = stat;
}
}
exports.Nlm4Response = Nlm4Response;
class Nlm4CancelArgs {
constructor(cookie, block, exclusive, lock) {
this.cookie = cookie;
this.block = block;
this.exclusive = exclusive;
this.lock = lock;
}
}
exports.Nlm4CancelArgs = Nlm4CancelArgs;
class Nlm4CancelRequest {
constructor(args) {
this.args = args;
}
}
exports.Nlm4CancelRequest = Nlm4CancelRequest;
class Nlm4UnlockArgs {
constructor(cookie, lock) {
this.cookie = cookie;
this.lock = lock;
}
}
exports.Nlm4UnlockArgs = Nlm4UnlockArgs;
class Nlm4UnlockRequest {
constructor(args) {
this.args = args;
}
}
exports.Nlm4UnlockRequest = Nlm4UnlockRequest;
class Nlm4GrantedRequest {
constructor(args) {
this.args = args;
}
}
exports.Nlm4GrantedRequest = Nlm4GrantedRequest;
class Nlm4ShareArgs {
constructor(cookie, share, reclaim) {
this.cookie = cookie;
this.share = share;
this.reclaim = reclaim;
}
}
exports.Nlm4ShareArgs = Nlm4ShareArgs;
class Nlm4ShareRequest {
constructor(args) {
this.args = args;
}
}
exports.Nlm4ShareRequest = Nlm4ShareRequest;
class Nlm4ShareResponse {
constructor(cookie, stat, sequence) {
this.cookie = cookie;
this.stat = stat;
this.sequence = sequence;
}
}
exports.Nlm4ShareResponse = Nlm4ShareResponse;
class Nlm4UnshareRequest {
constructor(args) {
this.args = args;
}
}
exports.Nlm4UnshareRequest = Nlm4UnshareRequest;
class Nlm4NmLockRequest {
constructor(args) {
this.args = args;
}
}
exports.Nlm4NmLockRequest = Nlm4NmLockRequest;
class Nlm4FreeAllRequest {
constructor(notify) {
this.notify = notify;
}
}
exports.Nlm4FreeAllRequest = Nlm4FreeAllRequest;
//# sourceMappingURL=messages.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../src/nfs/v3/locks/messages.ts"],"names":[],"mappings":";;;AA0BA,MAAa,YAAY;IACvB,YACkB,MAAc,EACd,SAAkB,EAClB,IAAqB;QAFrB,WAAM,GAAN,MAAM,CAAQ;QACd,cAAS,GAAT,SAAS,CAAS;QAClB,SAAI,GAAJ,IAAI,CAAiB;IACpC,CAAC;CACL;AAND,oCAMC;AAKD,MAAa,eAAe;IAC1B,YAA4B,IAAkB;QAAlB,SAAI,GAAJ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id: number;
readonly oh: Reader;
readonly offset: bigint;
readonly length: bigint;
constructor(exclusive: boolean, svid: number, oh: Reader, offset: bigint, length: bigint);
}
export declare class Nlm4Lock {
readonly callerName: string;
readonly fh: Reader;
readonly oh: Reader;
readonly svid: number;
readonly offset: bigint;
readonly length: bigint;
constructor(callerName: string, fh: Reader, oh: Reader, svid: number, offset: bigint, length: bigint);
}
export declare class Nlm4Share {
readonly callerName: string;
readonly fh: Reader;
readonly oh: Reader;
readonly mode: number;
readonly access: number;
constructor(callerName: string, fh: Reader, oh: Reader, mode: number, access: number);
}
export declare class Nlm4Notify {
readonly name: string;
readonly state: number;
constructor(name: string, state: number);
}
+42
View File
@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Nlm4Notify = exports.Nlm4Share = exports.Nlm4Lock = exports.Nlm4Holder = void 0;
class Nlm4Holder {
constructor(exclusive, svid, oh, offset, length) {
this.exclusive = exclusive;
this.svid = svid;
this.oh = oh;
this.offset = offset;
this.length = length;
}
}
exports.Nlm4Holder = Nlm4Holder;
class Nlm4Lock {
constructor(callerName, fh, oh, svid, offset, length) {
this.callerName = callerName;
this.fh = fh;
this.oh = oh;
this.svid = svid;
this.offset = offset;
this.length = length;
}
}
exports.Nlm4Lock = Nlm4Lock;
class Nlm4Share {
constructor(callerName, fh, oh, mode, access) {
this.callerName = callerName;
this.fh = fh;
this.oh = oh;
this.mode = mode;
this.access = access;
}
}
exports.Nlm4Share = Nlm4Share;
class Nlm4Notify {
constructor(name, state) {
this.name = name;
this.state = state;
}
}
exports.Nlm4Notify = Nlm4Notify;
//# sourceMappingURL=structs.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../src/nfs/v3/locks/structs.ts"],"names":[],"mappings":";;;AASA,MAAa,UAAU;IACrB,YACkB,SAAkB,EAClB,IAAY,EACZ,EAAU,EACV,MAAc,EACd,MAAc;QAJd,cAAS,GAAT,SAAS,CAAS;QAClB,SAAI,GAAJ,IAAI,CAAQ;QACZ,OAAE,GAAF,EAAE,CAAQ;QACV,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAQ;IAC7B,CAAC;CACL;AARD,gCAQC;AAKD,MAAa,QAAQ;IACnB,YACkB,UAAkB,EAClB,EAAU,EACV,EAAU,EACV,IAAY,EACZ,MAAc,EACd,MAAc;QALd,eAAU,GAAV,UAAU,CAAQ;QAClB,OAAE,GAAF,EAAE,CAAQ;QACV,OAAE,GAAF,EAAE,CAAQ;QACV,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAQ;IAC7B,CAAC;CACL;AATD,4BASC;AAKD,MAAa,SAAS;IACpB,YACkB,UAAkB,EAClB,EAAU,EACV,EAAU,EACV,IAAY,EACZ,MAAc;QAJd,eAAU,GAAV,UAAU,CAAQ;QAClB,OAAE,GAAF,EAAE,CAAQ;QACV,OAAE,GAAF,EAAE,CAAQ;QACV,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;IAC7B,CAAC;CACL;AARD,8BAQC;AAKD,MAAa,UAAU;IACrB,YACkB,IAAY,EACZ,KAAa;QADb,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;IAC5B,CAAC;CACL;AALD,gCAKC"}