| D O S _ A D D L I N K P O I N T ( )
| | | | | SOURCE: qdev_autodocs.txt 1.163 (12/09/2014) English
AMIGA - DOS_#?
----------------------------------------------------------------------------
NAME
dos_addlinkpoint() - Starts up a link point as a DOS
device.
SYNOPSIS
res = dos_addlinkpoint(dir, name, termsig);
BOOL dos_addlinkpoint(UBYTE *, UBYTE *, ULONG);
FUNCTION
This function is a subsystem that allows to unify
files and streams, so they all look like files.
INPUTS
dir - Directory name which will be used as a link
space. It could also be a filename or string
containing particular entries.
name - NULL terminated DOS device name. Name can be
suffixized with colon(':'), but that is not
necessary.
termsig - Device termination signal. NULL if you dont
wish for it to be terminable.
RETURNS
Returns TRUE if device was up and running, or FALSE if
it didnt init properly.
BASES
SysBase, DOSBase
NOTES
If you decide to spawn this device in sepearate process
from under your code space then make sure you wont go
away while it is up!
Each entry/mapped file can be defined using these 'LPX'
arguments('ReadArgs()'):
"LPF=LINKPOINTFILE/A/K,LPS=LINKPOINTSIZE/K,
LPT=LINKPOINTTASKS/K,LPC=LINKPOINTCLI/K,
LPW=LINKPOINTWAIT/K"
LPF=LINKPOINTFILE - Target file/stream. Standard DOS
notation, like: 'lpf dev:[file]'.
Note that this is mandatory or
else file you did create will be
the target itself.
LPS=LINKPOINTSIZE - Allows to set dummy file/stream
size. By default size of target
will be used for files and -1
(0xFFFFFFFF) for streams to fix
broken programs. You can specify
2 gigs max (0x7FFFFFFF) for the
object to be fully readable.
LPT=LINKPOINTTASKS - Task(s) who should be allowed or
denied to access this mapping.
Syntax is same as in 'nfo_ktm()'
which means that the patterns or
exact matches can be delimited
with comma(s). Case insensitive!
LPC=LINKPOINTCLI - Run this CLI command whenever
new client requests some mapping.
Command should react to C signal
cus after ACTION_END it will be
delivered. A '@' char. in front
of a command will cause only one
command to be spawned(if it is
not running) on multiple calls.
A '&' character in front of file
or pipe will indicate that this
object has to be accessed to die.
This is especially useful when
dealing with pipes. If the cmd is
still running after the client is
gone then its process will wait
until command is complete.
LPW=LINKPOINTWAIT - If set above 0 then mapping's own
packet interface will be timeout
assisted. Values exp. in seconds.
A-must-use feature when dealing
with clients who do not inform
that they are about to end. This
is typically the case with progs
who offer files over some network
and are unable to determine what
happened to their clients. The
timeout is renewed every received
packet.
All above arguments must be put in the very first line!
Also target file/stream name must fit 80 bytes since it
will be packed into comment field!
This thing does multitask, so it can successfully be
used to map single tasking handlers.
If you have 'TCP:' mounted and want 'HTTP:' or 'RHTTP:'
device then just create '.httpdevice' object and assign
your linkpoint to 'HTTP:' and/or 'RHTTP:'(raw output).
Please note! You cannot manipulate filesystem structure
directly(make, delete, rename,...). It is only possible
to define objects externally and perform refresh thru
'dos_dclinkpoint()' or 'DiskChange' from CLI.
If you want to create a file/buffer with manual entries
then each line must look like this(without quotes):
'<mapping> = <lpx arguments><lf>'. For instance, this:
'google = lpf http://google.com<lf>' will allow you to
read 'Google' index file with just 'type lp0:google' if
your device is 'LP0:'.
Yes, "Link Point" also implements internal '[R]HTTP:',
so that you can map WWW streams very easily. What that
means to users? Think of old progs + multimedia here.
Error status can be detected with 'Info' command. It
will show you how many objects were discarded for some
reason(usually invalid name).
Linkpoint can be write protected just like any other FS
with 'lock' command.
SEE ALSO
dos_remlinkpoint(), dos_dclinkpoint()
EXAMPLE
None.
BUGS
See 'a-dos_addlinkpoint.c' for more details.
----------------------------------------------------------------------------
| |
| |