XINU
Data Structures | Macros | Variables
rfilesys.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rf_msg_dreq
 
struct  rf_msg_dres
 
struct  rf_msg_hdr
 
struct  rf_msg_mreq
 
struct  rf_msg_mres
 
struct  rf_msg_oreq
 
struct  rf_msg_ores
 
struct  rf_msg_rreq
 
struct  rf_msg_rres
 
struct  rf_msg_sreq
 
struct  rf_msg_sres
 
struct  rf_msg_treq
 
struct  rf_msg_tres
 
struct  rf_msg_wreq
 
struct  rf_msg_wres
 
struct  rf_msg_xreq
 
struct  rf_msg_xres
 
struct  rfdata
 
struct  rflcblk
 

Macros

#define Nrfl   10
 
#define RF_DATALEN   1024 /* Maximum data in read or write*/
 
#define RF_FREE   0 /* Entry is currently unused */
 
#define RF_LOC_PORT   33123
 
#define RF_MAX_REQ   RF_MSG_XREQ /* Maximum request type */
 
#define RF_MIN_REQ   RF_MSG_RREQ /* Minimum request type */
 
#define RF_MODE_N   F_MODE_N /* Bit for "new" mode */
 
#define RF_MODE_NO   F_MODE_NO /* Mask for "n" and "o" bits */
 
#define RF_MODE_O   F_MODE_O /* Bit for "old" mode */
 
#define RF_MODE_R   F_MODE_R /* Bit to grant read access */
 
#define RF_MODE_RW   F_MODE_RW /* Mask for read and write bits */
 
#define RF_MODE_W   F_MODE_W /* Bit to grant write access */
 
#define RF_MSG_DREQ   0x0004 /* Delete request and response */
 
#define RF_MSG_DRES   (RF_MSG_DREQ | RF_MSG_RESPONSE)
 
#define RF_MSG_HDR
 
#define RF_MSG_MREQ   0x0007 /* Mkdir request and response */
 
#define RF_MSG_MRES   (RF_MSG_MREQ | RF_MSG_RESPONSE)
 
#define RF_MSG_OREQ   0x0003 /* Open request and response */
 
#define RF_MSG_ORES   (RF_MSG_OREQ | RF_MSG_RESPONSE)
 
#define RF_MSG_RESPONSE   0x0100 /* Bit that indicates response */
 
#define RF_MSG_RREQ   0x0001 /* Read Request and response */
 
#define RF_MSG_RRES   (RF_MSG_RREQ | RF_MSG_RESPONSE)
 
#define RF_MSG_SREQ   0x0006 /* Size request and response */
 
#define RF_MSG_SRES   (RF_MSG_SREQ | RF_MSG_RESPONSE)
 
#define RF_MSG_TREQ   0x0005 /* Truncate request & response */
 
#define RF_MSG_TRES   (RF_MSG_TREQ | RF_MSG_RESPONSE)
 
#define RF_MSG_WREQ   0x0002 /* Write Request and response */
 
#define RF_MSG_WRES   (RF_MSG_WREQ | RF_MSG_RESPONSE)
 
#define RF_MSG_XREQ   0x0008 /* Rmdir request and response */
 
#define RF_MSG_XRES   (RF_MSG_XREQ | RF_MSG_RESPONSE)
 
#define RF_NAMLEN   128 /* Maximum length of file name */
 
#define RF_RETRIES   3 /* Time to retry sending a msg */
 
#define RF_SERVER_IP   "128.10.3.51"
 
#define RF_SERVER_PORT   33123
 
#define RF_TIMEOUT   3000 /* Wait one second for a reply */
 
#define RF_USED   1 /* Entry is currently in use */
 
#define RFS_CTL_DEL   F_CTL_DEL /* Delete a file */
 
#define RFS_CTL_MKDIR   F_CTL_MKDIR /* Make a directory */
 
#define RFS_CTL_RMDIR   F_CTL_RMDIR /* Remove a directory */
 
#define RFS_CTL_SIZE   F_CTL_SIZE /* Obtain the size of a file */
 
#define RFS_CTL_TRUNC   F_CTL_TRUNC /* Truncate a file */
 

Variables

struct rfdata Rf_data
 
struct rflcblk rfltab []
 

Macro Definition Documentation

◆ Nrfl

#define Nrfl   10

Definition at line 4 of file rfilesys.h.

◆ RF_DATALEN

#define RF_DATALEN   1024 /* Maximum data in read or write*/

Definition at line 10 of file rfilesys.h.

Referenced by rflread(), and rflwrite().

◆ RF_FREE

#define RF_FREE   0 /* Entry is currently unused */

Definition at line 46 of file rfilesys.h.

Referenced by rflclose(), rflinit(), rflread(), rflseek(), rflwrite(), and rfsopen().

◆ RF_LOC_PORT

#define RF_LOC_PORT   33123

Definition at line 29 of file rfilesys.h.

Referenced by rfsinit().

◆ RF_MAX_REQ

#define RF_MAX_REQ   RF_MSG_XREQ /* Maximum request type */

Definition at line 108 of file rfilesys.h.

◆ RF_MIN_REQ

#define RF_MIN_REQ   RF_MSG_RREQ /* Minimum request type */

Definition at line 107 of file rfilesys.h.

◆ RF_MODE_N

#define RF_MODE_N   F_MODE_N /* Bit for "new" mode */

Definition at line 14 of file rfilesys.h.

Referenced by rfsgetmode().

◆ RF_MODE_NO

#define RF_MODE_NO   F_MODE_NO /* Mask for "n" and "o" bits */

Definition at line 16 of file rfilesys.h.

◆ RF_MODE_O

#define RF_MODE_O   F_MODE_O /* Bit for "old" mode */

Definition at line 15 of file rfilesys.h.

Referenced by rfsgetmode().

◆ RF_MODE_R

#define RF_MODE_R   F_MODE_R /* Bit to grant read access */

Definition at line 11 of file rfilesys.h.

Referenced by rflread(), and rfsgetmode().

◆ RF_MODE_RW

#define RF_MODE_RW   F_MODE_RW /* Mask for read and write bits */

Definition at line 13 of file rfilesys.h.

Referenced by rfsgetmode().

◆ RF_MODE_W

#define RF_MODE_W   F_MODE_W /* Bit to grant write access */

Definition at line 12 of file rfilesys.h.

Referenced by rflwrite(), and rfsgetmode().

◆ RF_MSG_DREQ

#define RF_MSG_DREQ   0x0004 /* Delete request and response */

Definition at line 92 of file rfilesys.h.

Referenced by rfscontrol().

◆ RF_MSG_DRES

#define RF_MSG_DRES   (RF_MSG_DREQ | RF_MSG_RESPONSE)

Definition at line 93 of file rfilesys.h.

◆ RF_MSG_HDR

#define RF_MSG_HDR
Value:
/* Common message fields */\
uint16 rf_type; /* Message type */\
uint16 rf_status; /* 0 in req, status in response */\
uint32 rf_seq; /* Message sequence number */\
char rf_name[RF_NAMLEN]; /* Null-terminated file name */
#define RF_NAMLEN
Definition: rfilesys.h:9

Definition at line 112 of file rfilesys.h.

◆ RF_MSG_MREQ

#define RF_MSG_MREQ   0x0007 /* Mkdir request and response */

Definition at line 101 of file rfilesys.h.

Referenced by rfscontrol().

◆ RF_MSG_MRES

#define RF_MSG_MRES   (RF_MSG_MREQ | RF_MSG_RESPONSE)

Definition at line 102 of file rfilesys.h.

◆ RF_MSG_OREQ

#define RF_MSG_OREQ   0x0003 /* Open request and response */

Definition at line 89 of file rfilesys.h.

Referenced by rfsopen().

◆ RF_MSG_ORES

#define RF_MSG_ORES   (RF_MSG_OREQ | RF_MSG_RESPONSE)

Definition at line 90 of file rfilesys.h.

◆ RF_MSG_RESPONSE

#define RF_MSG_RESPONSE   0x0100 /* Bit that indicates response */

Definition at line 81 of file rfilesys.h.

Referenced by rfscomm().

◆ RF_MSG_RREQ

#define RF_MSG_RREQ   0x0001 /* Read Request and response */

Definition at line 83 of file rfilesys.h.

Referenced by rflread().

◆ RF_MSG_RRES

#define RF_MSG_RRES   (RF_MSG_RREQ | RF_MSG_RESPONSE)

Definition at line 84 of file rfilesys.h.

◆ RF_MSG_SREQ

#define RF_MSG_SREQ   0x0006 /* Size request and response */

Definition at line 98 of file rfilesys.h.

Referenced by rfscontrol().

◆ RF_MSG_SRES

#define RF_MSG_SRES   (RF_MSG_SREQ | RF_MSG_RESPONSE)

Definition at line 99 of file rfilesys.h.

◆ RF_MSG_TREQ

#define RF_MSG_TREQ   0x0005 /* Truncate request & response */

Definition at line 95 of file rfilesys.h.

Referenced by rfscontrol().

◆ RF_MSG_TRES

#define RF_MSG_TRES   (RF_MSG_TREQ | RF_MSG_RESPONSE)

Definition at line 96 of file rfilesys.h.

◆ RF_MSG_WREQ

#define RF_MSG_WREQ   0x0002 /* Write Request and response */

Definition at line 86 of file rfilesys.h.

Referenced by rflwrite().

◆ RF_MSG_WRES

#define RF_MSG_WRES   (RF_MSG_WREQ | RF_MSG_RESPONSE)

Definition at line 87 of file rfilesys.h.

◆ RF_MSG_XREQ

#define RF_MSG_XREQ   0x0008 /* Rmdir request and response */

Definition at line 104 of file rfilesys.h.

Referenced by rfscontrol().

◆ RF_MSG_XRES

#define RF_MSG_XRES   (RF_MSG_XREQ | RF_MSG_RESPONSE)

Definition at line 105 of file rfilesys.h.

◆ RF_NAMLEN

#define RF_NAMLEN   128 /* Maximum length of file name */

Definition at line 9 of file rfilesys.h.

Referenced by rflinit(), rflread(), rflwrite(), rfscontrol(), and rfsopen().

◆ RF_RETRIES

#define RF_RETRIES   3 /* Time to retry sending a msg */

Definition at line 62 of file rfilesys.h.

Referenced by rfscomm().

◆ RF_SERVER_IP

#define RF_SERVER_IP   "128.10.3.51"

Definition at line 21 of file rfilesys.h.

Referenced by rfsinit().

◆ RF_SERVER_PORT

#define RF_SERVER_PORT   33123

Definition at line 25 of file rfilesys.h.

Referenced by rfsinit().

◆ RF_TIMEOUT

#define RF_TIMEOUT   3000 /* Wait one second for a reply */

Definition at line 63 of file rfilesys.h.

Referenced by rfscomm().

◆ RF_USED

#define RF_USED   1 /* Entry is currently in use */

Definition at line 47 of file rfilesys.h.

Referenced by rfsopen().

◆ RFS_CTL_DEL

#define RFS_CTL_DEL   F_CTL_DEL /* Delete a file */

Definition at line 67 of file rfilesys.h.

Referenced by rfscontrol().

◆ RFS_CTL_MKDIR

#define RFS_CTL_MKDIR   F_CTL_MKDIR /* Make a directory */

Definition at line 69 of file rfilesys.h.

Referenced by rfscontrol().

◆ RFS_CTL_RMDIR

#define RFS_CTL_RMDIR   F_CTL_RMDIR /* Remove a directory */

Definition at line 70 of file rfilesys.h.

Referenced by rfscontrol().

◆ RFS_CTL_SIZE

#define RFS_CTL_SIZE   F_CTL_SIZE /* Obtain the size of a file */

Definition at line 71 of file rfilesys.h.

Referenced by rfscontrol().

◆ RFS_CTL_TRUNC

#define RFS_CTL_TRUNC   F_CTL_TRUNC /* Truncate a file */

Definition at line 68 of file rfilesys.h.

Referenced by rfscontrol().

Variable Documentation

◆ Rf_data

struct rfdata Rf_data

Definition at line 10 of file rfsinit.c.

Referenced by rflclose(), rflread(), rflseek(), rflwrite(), rfscomm(), rfscontrol(), rfsinit(), and rfsopen().

◆ rfltab

struct rflcblk rfltab[]

Definition at line 5 of file rflinit.c.

Referenced by rflclose(), rflinit(), rflread(), rflseek(), rflwrite(), and rfsopen().