About
Docs
Files
Support
Index

Essentials
AutoDocs
Library functions
Cooperate
Process mastering
Debug
Own debugging kit
FGE
Smart modeid pick
Loader
Shared lib. loader
Macros
Helper macros
Structs
All the structures
Logs
Library changelogs
Tools
Progs baked inside

API
crt_createargv()A
crt_destroyargv()A
crt_initmethod()A
crt_exitmethod()A
crt_newinstance()A
crt_freeinstance()A
ctl_clipath()A
ctl_devmount()A
ctl_devunmount()A
ctl_diskreqoff()A
ctl_diskreqon()A
ctl_haltidcmp()A
ctl_newshell()A
ctl_rearrangecon()A
ctl_relabel()A
ctl_setclistack()A
ctl_swapbackpen()A
ctl_udirassign()A
ctl_addbartrigger()A
ctl_pokebartrigger()A
ctl_rembartrigger()A
ctl_addconlogo()A
ctl_swapconlogo()A
ctl_remconlogo()A
ctl_addconlogof()A
ctl_remconlogof()A
ctl_setconlogof()A
ctl_openconscreen()A
ctl_closeconscreen()A
ctl_doconswitch()A
ctl_undoconswitch()A
ctl_addidcmphandler()A
ctl_remidcmphandler()A
ctl_findscreensafe()A
ctl_lockscreensafe()A
ctl_unlockscreensafe()A
ctl_addviewctrl()A
ctl_remviewctrl()A
ctl_zoomifycon()A
ctl_setsmparams()A
dev_getdiskcmdset()A
dev_opendiskdev()A
dev_closediskdev()A
dev_getdiskgeo()A
dev_freediskgeo()A
dev_getdiskrdb()A
dev_freediskrdb()A
dmt_mountcb()A
dos_addfdrelay()A
dos_ctrlfdrelay()A
dos_dopacket()A
dos_getpacket()A
dos_qflink()A
dos_qfopen()A
dos_qfwait()A
dos_qfispending()A
dos_qfsetmode()A
dos_qfsetintsig()A
dos_qfsetfctwait()A
dos_qfread()A
dos_qfwrite()A
dos_qfseek()A
dos_qfabort()A
dos_qfclose()A
dos_remfdrelay()A
dos_addlinkpoint()A
dos_dclinkpoint()A
dos_remlinkpoint()A
dos_devbymsgport()A
dos_makedevice()A
dos_checkdevice()A
dos_killdevice()A
dos_getfmfdrelay()A
dos_freefmfdrelay()A
dos_replypacket()A
dos_swapmpfdrelay()A
dos_waitpacket()A
han_binaryifh()A
han_rollifh()A
han_rwifh()A
han_termifh()A
mem_allocbmapthere()A
mem_cooperate()A
mem_dosynctask()A
mem_dosynctasks()A
mem_freepentab()A
mem_getwbstartup()A
mem_grabqarea()A
mem_iloadseg()A
mem_uniloadseg()A
mem_iloadseg2()A
mem_uniloadseg2()A
mem_initemptybmap()A
mem_remapbitmap()A
mem_remapbitmap2()A
mem_signalsafe()A
mem_makebmapfromimg()A
mem_addexhandler()A
mem_remexhandler()A
mem_attachhotvec()A
mem_attachrelhotvec()A
mem_detachhotvec()A
mem_resolvehotvec()A
mem_obtainhotvec()A
mem_obtainrelhotvec()A
mem_openifh()A
mem_closeifh()A
mem_convimgtobmap()A
mem_copyitnimage()A
mem_freeitnimage()A
mem_setaddrjtslot()A
mem_setdatajtslot()A
mem_allocjumptable()A
mem_freejumptable()A
mem_swapjumptable()A
mem_filljumptable()A
mem_importjumptable()A
mem_growpenholder()A
mem_freepenholder()A
mem_loadpicture()A
mem_freepicture()A
mem_alloclfvec()A
mem_freelfvec()A
mem_checklfvec()A
mem_allocvecpooled()A
mem_freevecpooled()A
mem_setvecpooled()A
mem_allocmemregion()A
mem_freememregion()A
mem_attachsniffer()A
mem_detachsniffer()A
mem_allocterm()A
mem_fixterm()A
mem_freeterm()A
mem_maketokenlist()A
mem_freetokenlist()A
mod_codereloc()A
mod_codefree()A
mod_codefind()A
mod_findktpresby()A
mod_getmemlist()A
mod_kicktaglink()A
mod_kicktagunlink()A
mod_ktpresunlink()A
mod_ktprescount()A
mod_addmodule()A
mod_delmodule()A
mod_adddiskmodule()A
mod_deldiskmodule()A
nfo_devvercmp()A
nfo_findgfxentry()A
nfo_findgfxrange()A
nfo_findgfxreso()A
nfo_findgfxsm()A
nfo_fsquery()A
nfo_fssmvalid()A
nfo_getcmcolors()A
nfo_getconioreq()A
nfo_getconunit()A
nfo_getscparams()A
nfo_getdrimap()A
nfo_getviscount()A
nfo_getvisstate()A
nfo_getwinaddr()A
nfo_grepml()A
nfo_idcmptoindex()A
nfo_isblitable()A
nfo_ischildofproc()A
nfo_isdev64bit()A
nfo_isdirectory()A
nfo_isinstack()A
nfo_isonmemlist()A
nfo_isonlistofml()A
nfo_ispdev64bit()A
nfo_issegremote()A
nfo_istask()A
nfo_iswindow()A
nfo_ktm()A
nfo_libvercmp()A
nfo_m68kcputype()A
nfo_modeidcount()A
nfo_scanlist()A
nfo_scanturbo()A
nfo_screencount()A
nfo_stackreport()A
nfo_stackvalid()A
nfo_typeofgfxmem()A
nfo_waitback()A
nfo_whichchipset()A
nfo_getargsource()A
nfo_freeargsource()A
ctl_clirun()P
ctl_makedir()P
ctl_getsmparams()P
mem_addrfrombase()P
mem_findinfile()P
mem_findinfileq()P
mem_lzwcompress()P
mem_lzwdecompress()P
mem_lzwfree()P
mem_scanfile()P
mem_scanlbl()P
mem_allocarray()P
mem_accessarray()P
mem_freearray()P
mem_alloccluster()P
mem_freecluster()P
mem_getmemcluster()P
mem_freememcluster()P
mem_copysmlcb()P
mem_freesmlcb()P
mem_readsrcimage()P
mem_freesrcimage()P
nfo_getsystime()P
nfo_scanml()P
txt_debugprintf()P
txt_strboth()P
txt_strpat()P
cnv_ALtoULONG()I
cnv_AtoULONG()I
cnv_ULONGtoA()I
cnv_ULONGtoBITS()I
ctl_relocdrimap()I
dev_sizeingigs()I
dos_bcopydevice()I
mem_addrfromlvo()I
mem_csumchs32()I
mem_csumeor32()I
mem_csumint32()I
mem_fnv128hash()I
mem_fnv64hash()I
mem_pjw64hash()I
nfo_isconsole()I
nfo_ismode15khz()I
nfo_isprime()I
nfo_nearestprime()I
nfo_numdivisors()I
txt_bstrncat()I
txt_bstrnpcat()I
txt_strnvacat()I
txt_datdat()I
txt_fixquotes()I
txt_fnv128hash()I
txt_fnv64hash()I
txt_iniparse()I
txt_memcmp()I
txt_memfill()I
txt_needslash()I
txt_noansi()I
txt_nocomment()I
txt_parseline()I
txt_pjw64hash()I
txt_psnprintf()I
txt_quickhash()I
txt_skipcc()I
txt_strchr()I
txt_strcmp()I
txt_strcspn()I
txt_stripansi()I
txt_strlen()I
txt_strncat()I
txt_strnpcat()I
txt_strspn()I
txt_strstr()I
txt_strtok()I
txt_tokenify()I
txt_vcbpsnprintf()I
txt_vpsnprintf()I



D
O
S
_
A
D
D
F
D
R
E
L
A
Y
(
)

SOURCE: qdev_autodocs.txt 1.163 (12/09/2014) English

                                 AMIGA - DOS_#?
 ----------------------------------------------------------------------------

   NAME

      dos_addfdrelay() - Starts up file descriptor relay as
                         a DOS device.



   SYNOPSIS

      res = dos_addfdrelay(name, termsig);

      BOOL dos_addfdrelay(UBYTE *, ULONG);



   FUNCTION

      This function is a subsystem that allows to relay data
      to n other file descriptors using just one call to the
      write routine.



   INPUTS

      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 every fd you
      attach does not emit termination signal back to you! It
      is just unwise to quit in such case.

      Do 'ctl_doconswitch()' on a fd of a channel you want to
      be the default in order to use 'Output()' and 'CONSOLE:'
      (requires setting default flag on the channel too).

      Standard 'ReadArgs()' cmd line opts are as follows:
      "CN=CHANNAME,CP=CHANPASS/K,CD=CHANDEF/K,TF=TERMFILES/K,
      CE=CHANPIPE/K,CH=CHANPATH/K,NE=NOEOFGEN/K,DF=DESTFILE/K,
      RF=REMFILE/K,CF=CLOSEFILE/K,BF=BUFFILE/K,SA=STRIPANSI/K,
      TS=TERMSIG/K,LF=LINEFMT/K,RB=ROLLBUF/K,FR=FLUSHREQ/K" .


      CN=CHANNAME   - Channel name. Channel creation is easy,
                      if there is no such channel then it will
                      be created.

      CP=CHANPASS   - Channel password. To protect your chan.
                      with a password type it either: +<pwd>
                      or <pwd>, to deactivate use -<pwd>.

      CD=CHANDEF    - Should the channel requested right now
                      be the default? Argument is boolean.

      TF=TERMFILES  - Close down/terminate all files on this
                      channel if last client disconnects. In
                      case of files who are VCRs, delays will
                      be computed from scratch!

      CE=CHANPIPE   - Using this will allow channel to be
                      used as an ordinary pipe, which will
                      disallow any other options below! This
                      argument takes size. 0 = No pipe. Pipe
                      created with the help of this option is
                      synchronous, however it does some nice
                      tricks to avoid blocking!

      CH=CHANPATH   - With this 3 state switch you can turn
                      the channel into router(or path finder)
                      which will allow automatic channel
                      discovery per process when combined
                      with 'CD=CHANDEF' and "CONSOLE:". All
                      possible states are: 0 - dont act as
                      a router, 1 - seek in pipes, 2 - seek
                      in relays.

      NE=NOEOFGEN   - Dont generate EOF when in pipe mode.
                      This will be set per file descriptor!

      DF=DESTFILE   - Where to relay your data? Argument can
                      be ordinary file name, that must exist,
                      or the address of file descriptor. Note
                      that passing addresses that you dont
                      own is very bad idea. Also, there is a
                      protection that prevents random numbers
                      from being treated as functional f. d.

      RF=REMFILE    - Remove this file from channel. Argument
                      is boolean.

      CF=CLOSEFILE  - Should file attached to the channel be
                      automatically closed when it is removed
                      or whole relay goes down? This argument
                      is boolean.

      BF=BUFFILE    - Should buffering be used for this file
                      descriptor? Upto 1.48 argument was bool.
                      Now it is (0/1/2) where 2 activates the
                      data flush after each write. Note that
                      setting buffering is actually one time
                      operation and only before using FH. This
                      is because OS changes it internally
                      after first 'FWrite()'. Then this switch
                      has no effect and file stays buffered!

      SA=STRIPANSI  - Should ANSI escape codes be removed on
                      this file descriptor? Note that escape
                      code stripping works a bit different for
                      virtual files(ANSI is collected and can
                      be stripped when reading data!). This
                      argument is boolean(0 or 1). Aside that
                      options 2 and 3 will allow CSI query
                      and VCR mode respectively.

      TS=TERMSIG    - Should signal be sent to the owner if
                      this file  descriptor is being removed
                      or whole relay goes down? Argument is
                      number in one of four numeral systems.
                      0 means no signal. Also, signal will be
                      sent only when auto closing the file is
                      off!

      LF=LINEFMT    - Should every new line be prefixed with
                      some header? This argument accepts text
                      which can contain various format opts.
                      Format options begin with '%' character
                      and are:

                      'A' - Address of the owner of this file
                            descriptor.

                      'a' - Address of this file descriptor.

                      'C' - Total channel count in the proc.

                      'c' - Number of clients using this chan.

                      'd' - Device name of this process.

                      'f' - F. descriptor count on this chan.

                      'g' - Will this channel terminate all
                            the files after last client is
                            gone?

                      'h' - Will this f. descriptor pass the
                            ANSI through?

                      'i' - Will this file descriptor prebuf.
                            the data?

                      'j' - Will this f. descriptor be closed
                            automatically?

                      'k' - Is this channel the default one?

                      'L' - Is this channel password prot.?

                      'l' - Line format buffer for this chan.

                      'N' - This file descriptor name.

                      'n' - Current channel name.

                      'r' - Num. of failed relay attempts on
                            this file desc.

                      'S' - Address of the client that curr.
                            sends something.

                      's' - Signal to be sent to the owner of
                            this file desc.

                      'T' - Amount of time this chan. exists.

                      't' - Current system time.

                      'W' - Number of all file descriptors in
                            the process.

                      'w' - Number of all clients in the proc.

                      'x' - Number of direct requests needed 
                            to flush dead chans.

                      'y' - Number of reqs left to flush dead
                            channels.

                      'z' - Number of flushed channels.

      RB=ROLLBUF    - Should this channel have rollover buf?
                      Rollover buffer is virtual file that is
                      able to collect what was written to the
                      channel with the ability to wrap if end
                      of file is reached. Argument is size of
                      that virtual file. 0 means no file.

      FR=FLUSHREQ   - After how many direct requests unused
                      channels should be removed? 0 means no
                      channel removal.

      To obtain relay statistics, 'Open()' your relay and do
      the 'FGets()' until EOF with minimum 256 bytes buffer .
      The easiest way to see the stats is to use 'type' from
      shell.

      If you have virtual file attached to your chan. and you
      want to access it, then also 'Open()' your relay on the
      requested channel and do the 'Read()' or 'FGets()'. You
      dont have to worry about the cursor as writing uses
      different variable. Also you cant 'Seek()' in v. file
      because it is rollover!

      Note that if you use 'termsig' then consoles opened
      from under the relay may/will rebroadcast signals back
      to relay and if there is no clients it may eventually
      go down!

      Maximum number of rollover files(one per chan.) is 16!
      This is because virtual files use 'AllocSignal()', and
      there is only 16 signals available per process!

      Important! File handles as obtained with 'Open()' dont
      reference public message port, but a private one that
      is strictly associated with the given FH! The only way
      to clone the FH is to pass it to the 'ctl_doconswitch()'
      function.

      Warning! File buffering in kickstarts V39.xxx and less
      is a bit different than that in V40.xxx thus buffered
      relay files may receive the data at literally different
      times! This may be a problem if you map local virtual
      files, write to them through FDR and expect data to be
      in the buffer immediately. You will have to turn off
      the buffering in FDR for such files while putting them
      on the channel to be on the safe side! Additionally use
      argument BF 2 for buffered files (1.49 feature) .



   SEE ALSO

      dos_remfdrelay(), dos_ctrlfdrelay()



   EXAMPLE

      See 'fdrelay-test.c' for more details.



   BUGS

      None known.



 ----------------------------------------------------------------------------
    


No more fear cus pure HTML is here!
Copyright (C) 2013-2014 by Burnt Chip Dominators