KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
fs_dcload.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 kernel/arch/dreamcast/include/dc/fs_dcload.h
4 (c)2002 Andrew Kieschnick
5
6*/
7
8/** \file dc/fs_dcload.h
9 \brief Implementation of dcload "filesystem".
10 \ingroup vfs_dcload
11
12 This file contains declarations related to using dcload, both in its -ip and
13 -serial forms. This is only used for dcload-ip support if the internal
14 network stack is not initialized at start via KOS_INIT_FLAGS().
15
16 \author Andrew Kieschnick
17 \see dc/fs_dclsocket.h
18*/
19
20#ifndef __DC_FS_DCLOAD_H
21#define __DC_FS_DCLOAD_H
22
23/* Definitions for the "dcload" file system */
24
25#include <sys/cdefs.h>
26__BEGIN_DECLS
27
28#include <kos/fs.h>
29#include <kos/dbgio.h>
30
31/** \defgroup vfs_dcload PC
32 \brief VFS driver for accessing a remote PC via
33 DC-Load/Tool
34 \ingroup vfs
35
36 @{
37*/
38
39/* \cond */
40extern dbgio_handler_t dbgio_dcload;
41/* \endcond */
42
43/* dcload magic value */
44/** \brief The dcload magic value! */
45#define DCLOADMAGICVALUE 0xdeadbeef
46
47/** \brief The address of the dcload magic value */
48#define DCLOADMAGICADDR (unsigned int *)0x8c004004
49
50/* Are we using dc-load-serial or dc-load-ip? */
51#define DCLOAD_TYPE_NONE -1 /**< \brief No dcload connection */
52#define DCLOAD_TYPE_SER 0 /**< \brief dcload-serial connection */
53#define DCLOAD_TYPE_IP 1 /**< \brief dcload-ip connection */
54
55/** \brief What type of dcload connection do we have? */
56extern int dcload_type;
57
58/* \cond */
59/* Available dcload console commands */
60
61#define DCLOAD_READ 0
62#define DCLOAD_WRITE 1
63#define DCLOAD_OPEN 2
64#define DCLOAD_CLOSE 3
65#define DCLOAD_CREAT 4
66#define DCLOAD_LINK 5
67#define DCLOAD_UNLINK 6
68#define DCLOAD_CHDIR 7
69#define DCLOAD_CHMOD 8
70#define DCLOAD_LSEEK 9
71#define DCLOAD_FSTAT 10
72#define DCLOAD_TIME 11
73#define DCLOAD_STAT 12
74#define DCLOAD_UTIME 13
75#define DCLOAD_ASSIGNWRKMEM 14
76#define DCLOAD_EXIT 15
77#define DCLOAD_OPENDIR 16
78#define DCLOAD_CLOSEDIR 17
79#define DCLOAD_READDIR 18
80#define DCLOAD_GETHOSTINFO 19
81#define DCLOAD_GDBPACKET 20
82#define DCLOAD_REWINDDIR 21
83
84/* dcload syscall function */
85
86int dcloadsyscall(unsigned int syscall, ...);
87
88/* dcload dirent */
89
90struct dcload_dirent {
91 long d_ino; /* inode number */
92 off_t d_off; /* offset to the next dirent */
93 unsigned short d_reclen;/* length of this record */
94 unsigned char d_type; /* type of file */
95 char d_name[256]; /* filename */
96};
97
98typedef struct dcload_dirent dcload_dirent_t;
99
100/* dcload stat */
101
102struct dcload_stat {
103 unsigned short st_dev;
104 unsigned short st_ino;
105 int st_mode;
106 unsigned short st_nlink;
107 unsigned short st_uid;
108 unsigned short st_gid;
109 unsigned short st_rdev;
110 long st_size;
111 long atime;
112 long st_spare1;
113 long mtime;
114 long st_spare2;
115 long ctime;
116 long st_spare3;
117 long st_blksize;
118 long st_blocks;
119 long st_spare4[2];
120};
121
122typedef struct dcload_stat dcload_stat_t;
123
124/* Printk replacement */
125void dcload_printk(const char *str);
126
127/* GDB tunnel */
128size_t dcload_gdbpacket(const char* in_buf, size_t in_size, char* out_buf, size_t out_size);
129
130/* Init func */
131void fs_dcload_init_console(void);
132void fs_dcload_init(void);
133void fs_dcload_shutdown(void);
134
135/* \endcond */
136
137/** @} */
138
139__END_DECLS
140
141#endif /* __DC_FS_DCLOAD_H */
Debug I/O.
Virtual filesystem support.
int dcload_type
What type of dcload connection do we have?
Debug I/O Interface.
Definition dbgio.h:39