📄 image.h
字号:
/* * Copyright (C) 2008 dhewg, #wiidev efnet * based on code by: * Copyright (C) 2006 Mike Melanson (mike at multimedia.cx) * * 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 _IMAGE_H_#define _IMAGE_H_#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <string.h>#include <pthread.h>#include <openssl/aes.h>#include "tree.h"#include "tmd.h"struct part_header { char console; u8 is_gc; u8 is_wii; char gamecode[2]; char region; char publisher[2]; u8 has_magic; char name[0x60]; u64 dol_offset; u64 dol_size; u64 fst_offset; u64 fst_size;};enum partition_type { PART_UNKNOWN = 0, PART_DATA, PART_UPDATE, PART_INSTALLER, PART_VC};struct partition { u64 offset; struct part_header header; u64 appldr_size; u8 is_encrypted; u64 certs_offset; u64 certs_size; u64 tmd_offset; u64 tmd_size; u64 ticket_offset; u64 ticket_size; struct tmd *tmd; char title_id_str[17]; enum partition_type type; char chan_id[5]; char key_c[35]; AES_KEY key; u64 data_offset; u64 data_size; u8 dec_buffer[0x8000]; u32 cached_block; u8 cache[0x7c00];};struct image_file { FILE *fp; pthread_mutex_t mutex; u8 is_wii; u32 nparts; struct partition *parts; struct tree *tree; struct stat st; u64 nfiles; u64 nbytes; AES_KEY key;};u8 image_parse_header (struct part_header *header, u8 *buffer);struct image_file * image_init (const char *filename);int image_parse (struct image_file *image);void image_deinit (struct image_file *image);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -