[Contents] [Index] [Help] [Retrace] [browse <] [Browse >]


NAME
    DoPkt -- Send a dos packet and wait for reply (V36)

SYNOPSIS
    result1 = DoPkt(port,action,arg1,arg2,arg3,arg4,arg5)
    D0               D1    D2    D3   D4   D5   D6   D7

    LONG DoPkt(struct msgport *,long,long,long,long,long,long)

FUNCTION
    Sends a packet to a handler and waits for it to return.  Any secondary
    return will be available in D1 AND from ioerr().  dopkt() will work
    even if the caller is an exec task and not a process; however it will
    be slower, and may fail for some additional reasons, such as being
    unable to allocate a signal.  DoPkt() uses your pr_MsgPort for the
    reply, and will call pr_PktWait.  (See BUGS regarding tasks, though).

    Only allows 5 arguments to be specified.  For more arguments (packets
    support a maximum of 7) create a packet and use sendpkt()/waitpkt().

INPUTS
    port    - pr_MsgPort of the handler process to send to.
    action  - the action requested of the filesystem/handler
    arg1, arg2, arg3, arg4,arg5 - arguments, depend on the action, may not
               be required.

RESULT
    result1 - the value returned in dp_Res1, or FALSE if there was some
              problem in sending the packet or recieving it.
    result2 - Available from ioerr() and in register d1.

BUGS
    Using DoPkt() from tasks doesn't work in V36. Use allocdosobject(),
    putmsg(), and waitport()/getmsg() for a workaround, or you can call
    createnewproc() to start a process to do dos i/o for you.  in v37,
    DoPkt() will allocate, use, and free the msgport required.

NOTES
    Callable from a task (under V37 and above).

SEE ALSO
    allocdosobject(), freedosobject(), sendpkt(), waitpkt(),
    createnewproc(), abortpkt()