home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Xplorer 1
/
Scene_Xplorer_1.iso
/
Tools
/
ProNet
/
source
/
filesystem
/
packet_descr
next >
Wrap
Text File
|
1978-01-11
|
11KB
|
538 lines
this protocol is not exact.. some parts differ from the actual implementation
it would be best if YOU closed this file immediately :))
Description to how packet data is transferred between handler and
server (handler's point of view..)
--------------------------------------------------------------------------
FH = FileHandle
FL = FileLock
BSTR = BCPL-String
FIB = FileInfoBlock
These abbreviations with small 's' before mean the same thing on the
Server.
=======================================
ACTION_LOCATE_OBJECT:
=======================================
Preprocessing:
Transfer to Server:
FL->fl_Key or NULL if zero-lock.
LONG (access mode)
BSTR
Serveraction:
Backtransfer (besides dp_Action/Res1/Res2):
Res1: BPTR to sFL or NULL if Error
Postprocessing:
Create FL if FL was Zero
&sFL -> FL->fl_Key
=======================================
ACTION_FREE_LOCK:
=======================================
Preprocessing:
If FL=0 then return immediately..
Transfer to Server:
FL->fl_Key
Serveraction:
Call Free_Lock.
Backtransfer (besides dp_Action/Res1/Res2):
++ no transfer back - one way packet.. ++
Postprocessing:
Zero fl_Task and free memory.. Return DOSTRUE.
=======================================
ACTION_DISK_INFO:
=======================================
Preprocessing:
Transfer to Server:
Serveraction:
Allocate memory for InfoData, call DISK_INFO.
Backtransfer (besides dp_Action/Res1/Res2):
block of InfoData - no Res1/Res2 is transferred..
Postprocessing:
Change VolumeNode entry for Handler machine.
=======================================
ACTION_INFO:
=======================================
Preprocessing:
Transfer to Server:
FL->fl_Key
Serveraction:
Allocate InfoData buffer, call INFO.
Backtransfer (besides dp_Action/Res1/Res2):
block of InfoData.
Postprocessing:
=======================================
ACTION_EXAMINE_OBJECT:
=======================================
Preprocessing:
Transfer to Server:
FL->fl_Key
Serveraction:
Allocate own sFIB, call EXAMINE_OBJECT with sFL and sFIB.
If ERROR, then dealloc sFIB.
Backtransfer (besides dp_Action/Res1/Res2):
&sFIB(APTR!), sFIB
Postprocessing:
&sFIB -> FIB->fib_DiskKey
=======================================
ACTION_EXAMINE_NEXT:
=======================================
Preprocessing:
Transfer to Server:
FL->fl_Key
FIB->fib_DiskKey
Serveraction:
Call EXAMINE_NEXT. If ERROR, then dealloc sFIB.
Backtransfer (besides dp_Action/Res1/Res2):
sFIB
Postprocessing:
=======================================
ACTION_SET_COMMENT:
=======================================
Preprocessing:
Transfer to Server:
FL->fl_Key
[2bytes Space -> lW-alignment]
Comment-String [filled up to 80 chars]
Object-Name-String
Serveraction:
Call SET_COMMENT.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_FLUSH:
=======================================
Preprocessing:
Transfer to Server:
Serveraction:
Call ACTION_FLUSH.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_WRITE_PROTECT:
=======================================
Preprocessing:
Transfer to Server:
dp_Arg1, dp_Arg2
Serveraction:
Call WRITE_PROTECT.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_MORE_CACHE:
=======================================
Preprocessing:
Transfer to Server:
dp_Arg1
Serveraction:
Call MORE_CACHE.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_SERIALIZE_DISK:
=======================================
Preprocessing:
Transfer to Server:
Serveraction:
Call SERIALIZE_DISK.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_FORMAT:
=======================================
Preprocessing:
Transfer to Server:
dp_Arg2, [2bytes space], BString
Serveraction:
Call FORMAT.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_RENAME_DISK:
=======================================
Preprocessing:
Transfer to Server:
[2bytes free], BSTR (name)
Serveraction:
Call RENAME_DISK
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
Change dol_Name of Current Volume if no ERROR.
=======================================
ACTION_FIND#?:
=======================================
Preprocessing:
Transfer to Server:
FL->fl_Key or NULL if ZERO-lock.
BSTR
Serveraction:
Create sFH zeroed except fh_Pos and fh_End = -1
Call FINDxxx.
Backtransfer (besides dp_Action/Res1/Res2):
BPTR to sFH
Postprocessing:
&sFH -> FH->fh_Arg1
DOSTRUE -> fh_Port
=======================================
ACTION_END:
=======================================
Preprocessing:
Transfer to Server:
FH->fh_Arg1
Serveraction:
Call END and free sFH.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_SEEK:
=======================================
Preprocessing:
Transfer to Server:
FH->fh_Arg1, LONG, LONG
Serveraction:
Call SEEK.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_READ:
=======================================
Preprocessing:
Transfer to Server:
FH->fh_Arg1, LONG (length)
Serveraction:
Allocate buffer large enough, call ACTION_READ with it, then transmit
data if no Error occured.
Backtransfer (besides dp_Action/Res1/Res2):
First answer will contain only the results. If no error occured,
more packets of a fixed size will follow. Size is defined in
'network.i' as MAXPACKETSIZE. The received data will be put in
the buffer passed in dp_Arg2
Postprocessing:
=======================================
ACTION_WRITE:
=======================================
Preprocessing:
Transfer to Server:
FH->fh_Arg1, LONG (length)
Serveraction:
Allocate buffer large enough and return error if no mem.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
Send write data in chunks of MAXPACKETSIZE bytes. The data will be
put into the buffer allocated by the Server. If all bytes have been
sent, the Server calls ACTION_WRITE with it and returns the results.
=======================================
ACTION_SAME_LOCK:
=======================================
Preprocessing:
Test if fl_Volume of both Locks are equal - if not, return DOSFALSE/0.
Transfer to Server:
2xFL->fl_Key
Serveraction:
Try SAME_LOCK. If not implemented, try comparing fl_Volume, then try
comparing fl_Key - if this is okay, return OK.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_SET_PROTECT:
=======================================
Preprocessing:
Transfer to Server:
FL->fl_Key
[2bytes Space -> lW-alignment]
Object-Name-String
Serveraction:
Call SET_PROTECT.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_COPY_DIR:
=======================================
Preprocessing:
Transfer to Server:
FL->fl_Key
Serveraction:
Call COPY_DIR
Backtransfer (besides dp_Action/Res1/Res2):
BPTR->sFL(in Res1), fl_Access
Postprocessing:
Create new lock if no error occured and put fl_Access there.
=======================================
ACTION_PARENT:
=======================================
similar to COPY_DIR.
=======================================
ACTION_PARENT_FH:
=======================================
Preprocessing:
Transfer to Server:
dp_Arg1
Serveraction:
Call PARENT_FH.
Backtransfer (besides dp_Action/Res1/Res2):
BPTR->sFL(in Res1), fl_Access
Postprocessing:
Create new lock if no error occured and put fl_Access there.
=======================================
ACTION_COPY_DIR_FH:
=======================================
similar to PARENT_FH.
=======================================
ACTION_DELETE_OBJECT:
=======================================
Preprocessing:
Transfer to Server:
FL->fl_Key, BSTR
Serveraction:
Call DELETE_OBJECT.
Backtransfer (besides dp_Action/Res1/Res2):
Postprocessing:
=======================================
ACTION_RENAME_OBJECT:
=======================================
Preprocessing:
Transfer to Server:
2xFL->fl