/********************************************************************
 ** NETWORK FILESYSTEM - DOS HANDLER
 **
 ** (c) Spak, Darrell Tam, c9107253@ee.newcastle.edu.au (1994)
 ** phone (Australia) 049-829-710
 **                    49-829-710
 ** (c) SST 1994
 **
 ** ACTIONS
 **
 ** Actions are sent to the network device
 **
 ** BUGS: This filesystem does not directly support NewShell (& run) since
 ** they insist on opening a file called "*" for output, which, in some cases
 ** would be very difficult to track.
 **
 ** TABS to 4
 ********************************************************************/

/* res1 of the packet defaults to -1 (before these are called in venus.c)
   and res2 defaults to 0 */

#include "/snd/everything.h"
#include "deadheads.h"
#include "root_protos.h"
#include "globs_protos.h"
#include "xtra_protos.h"

/********************************************************************/
   long action_die(struct DosPacket *dosmsg)
/********************************************************************/
{
	notdone = 0;
	return(AR_FLAG_RETURNDOSMSG);
}





/********************************************************************/
long action_disk_info(struct DosPacket *dosmsg)
/********************************************************************/
{
struct InfoData *id = BTOC(dosmsg->dp_Arg1);
    dbzero(id, sizeof(struct InfoData));
    id->id_DiskState	 = ID_VALIDATED;
    id->id_NumBlocks	 = 1000;
    id->id_NumBlocksUsed = 10;
    id->id_BytesPerBlock = 512;
    id->id_DiskType = ID_DOS_DISK;
    id->id_VolumeNode = (long)CTOB(DevList);
    id->id_InUse = 55;
	return(AR_FLAG_RETURNDOSMSG);
}



/********************************************************************/
   long action_info(struct DosPacket *dosmsg)
/********************************************************************/
{ /* lock, infodata : bool */
struct InfoData *id = BTOC(dosmsg->dp_Arg2);
    dbzero(id, sizeof(struct InfoData));
    id->id_DiskState	 = ID_VALIDATED;
    id->id_NumBlocks	 = 1000;
    id->id_NumBlocksUsed = 10;
    id->id_BytesPerBlock = 512;
    id->id_DiskType = ID_DOS_DISK;
    id->id_VolumeNode = (long)CTOB(DevList);
    id->id_InUse = 55;
	return(AR_FLAG_RETURNDOSMSG);
}


/* in the "handle_end_net" routine, there should be a little counter kept which
   contains the number of tries to send a packet - if this exceeds a certain
   number then the local memory for the file arg should be freed anyhow and
   the remote machine ignored */



