📄 shared.h
字号:
/* * Copyright (C) 2008 dhewg, #wiidev efnet * * this file is part of wiifuse * http://wiibrew.org/index.php?title=Wiifuse * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#ifndef _SHARED_H_#define _SHARED_H_#define WIIFUSE_VERSION "v0.2.0"#define WIIFUSE_AUTH_DATA "wiifuse " WIIFUSE_VERSION#define MODE_IRWXU 00700 // mask for file owner permissions#define MODE_IRUSR 00400 // owner has read permission#define MODE_IWUSR 00200 // owner has write permission#define MODE_IXUSR 00100 // owner has execute permission#define MODE_IRWXG 00070 // mask for group permissions#define MODE_IRGRP 00040 // group has read permission#define MODE_IWGRP 00020 // group has write permission#define MODE_IXGRP 00010 // group has execute permission#define MODE_IRWXO 00007 // mask for permissions for others (not in group)#define MODE_IROTH 00004 // others have read permission#define MODE_IWOTH 00002 // others have write permission#define MODE_IXOTH 00001 // others have execute permission#define ACCESS_R_OK 1#define ACCESS_W_OK 2#define ACCESS_X_OK 4struct remote_attr { u8 is_dir; u16 nlink; u32 size; u32 owner; u32 group; u16 perms;};enum remote_result { RES_UNKNOWN = 0, RES_OK, RES_ENOENT, RES_ENOTDIR, RES_EISDIR, RES_EACCES, RES_ENAMETOOLONG};enum remote_command { CMD_AUTH = 0, CMD_LOGLEVEL, CMD_UMOUNT, CMD_ES_IDENTIFY, CMD_FS_ACCESS, CMD_FS_GETATTR, CMD_FS_OPEN, CMD_FS_READ, CMD_FS_OPENDIR, CMD_FS_READDIR, CMD_FS_MKDIR, CMD_FS_RMDIR, CMD_FS_CREATE, CMD_FS_WRITE, CMD_FS_CHOWN, CMD_FS_CHMOD, CMD_FS_RENAME, CMD_FS_UNLINK, CMD_FS_STATFS};#define PACKET_REQUEST_PAYLOAD 7struct client_request { enum remote_command command; char *filename; u8 *data; u16 data_size;};#define PACKET_RESPONSE_PAYLOAD 6struct server_response { enum remote_result result; u8 *data; u16 data_size;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -