狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线

代寫COP4600 File Systems編程代做

時間:2024-04-10  來源:  作者: 我要糾錯



P3: File Systems
Overview
Your cover in the Lizard Legion was blown, and you’ve been revealed as a double agent and driven out! It was
all very “James Bond”, if you do say so yourself, and what a daring underground helicopter escape it was… but
you feel lucky to have escaped with your skin. (Literally... they would have used you to make a “human suit”!)
Now that you’re back on the “outside”, you’ve been tasked with creating a scheme to allow remaining resistance
fighters still within the Lizard Legion to clandestinely move information back to your organization without raising
suspicion. As of late, members of the Lizard Legion have discovered the PC classic “DOOM”, and it has become
all the rage to build new mods for it at headquarters, so your team has decided to use mods for this title as a
vehicle for exfiltration. By burying encrypted bits within textures and other game data blocks, information can be
hidden within innocuous “WAD” (Where’s All the Data) files.
In this project, you will implement a userspace filesystem daemon using the FUSE (Filesystem in UserSpacE)
API to access data in WAD format, the standard used in a number of classic PC game titles (including DOOM
and Hexen). In this critical early prototype, you have been tasked with implementing read and write access to
files and directories within the WAD files as a proof-of-concept. As such, you will need to implement read and
write functionality for both files and directories within your FUSE-based program. We, as your comrades-inarms battling the Reptilian invasion, will provide sample WAD files to demonstrate the functionality of your
implementation. (The resistance is counting on you!) The resistance uses university courses as cover for
standard operations, so you’ll submit the project via Canvas.
Structure
The project is broken into three main parts:
1) Develop a library to read from and write to WAD files and create a directory and file structure from them.
2) Implement a userspace daemon (via FUSE) to access the directory structure once mounted.
3) Test your implementation by navigating the mounted directory, examining the names and file contents, and
adding directories and files of your own.
While exact implementation may vary, the daemon’s parameters must match those laid out in this document, and
the directory structure, naming, and file contents must be properly presented via the filesystem.
File Format
The WAD file format contains information in three sections: the header, which gives basic layout information,
the descriptors, which describe elements in the file, and the lumps, which contain the data themselves. NOTE:
all numbers are in little-Endian format and, where applicable, are designated in bytes! Since Reptilian stores
its variables in memory in little-Endian format as well, it is not necessary to perform any byte-order inversions
when reading in or writing data, but this is still important information to know.
File Header
The header contains the file magic, descriptor count, and location (offset) of the descriptors in the file:
The magic for a wad file is usually ASCII and always ends in the suffix "WAD" (e.g., "IWAD" or "PWAD").
It is also important to note that the descriptor list, beginning at the position indicated by the descriptor
offset, is always situated at the end of the WAD file.
Descriptors
The file’s descriptors contain information about elements in the WAD file – its file offset, length, and
name:
Some elements will have specific naming conventions that will differentiate them from regular content
files. These “marker” elements will be interpreted by the daemon as directories and should be displayed
accordingly in the filesystem (see below).
Lumps
Elements in the WAD format are stored as “lumps” described by the descriptors. These lumps will be
represented in the filesystem by the daemon as individual files that can be opened, read, and closed.
You cannot write to existing lumps, but you will be creating empty files whose lumps you will have
to write to.
Marker Elements
There are two primary types of marker elements in WAD files, each of which should be interpreted as
directories by our daemon. The type includes map markers and namespace markers.
Map marker names are of the format "E#M#", where # represents a single decimal digit (e.g., "E1M9").
They are followed by ten (10) map element descriptors. The elements for the next 10 descriptors should be
placed inside of a directory with the map’s name. Map marker directories cannot have files or directories
added to them.
Namespace markers come in pairs. A namespace’s beginning is marked with a descriptor whose name has
the suffix "_START" (e.g., "F1_START"), and its ending is marked with a descriptor whose name has the
suffix "_END" (e.g., "F1_END"). Any descriptors for elements falling between the beginning and ending
markers for a namespace should be placed within a directory with the namespace’s name (e.g., "F1").
The namespace marker's name, excluding the suffixes, will never exceed two characters. These will be
the kind of directories you will be responsible for creating.
As an example, the following descriptors, in order, in the descriptor list, should result in this organization:
Library
Your library will contain a class to represent WAD data as described in this section.
Wad Class
The Wad class is used to represent WAD data and should have the following functions. The root of all paths
in the WAD data should be "/", and each directory should be separated by '/' (e.g., "/F/F1/LOLWUT").
public static Wad* loadWad(const string &path)
Object allocator; dynamically creates a Wad object and loads the WAD file data from path into memory.
Caller must deallocate the memory using the delete keyword.
public string getMagic()
Returns the magic for this WAD data.
public bool isContent(const string &path)
Returns true if path represents content (data), and false otherwise.
public bool isDirectory(const string &path)
Returns true if path represents a directory, and false otherwise.
public int getSize(const string &path)
If path represents content, returns the number of bytes in its data; otherwise, returns -1.
public int getContents(const string &path, char *buffer, int length, int offset = 0)
If path represents content, copies as many bytes as are available, up to length, of content's data into the preexisting buffer. If offset is provided, data should be copied starting from that byte in the content. Returns
number of bytes copied into buffer, or -1 if path does not represent content (e.g., if it represents a directory).
public int getDirectory(const string &path, vector<string> *directory)
If path represents a directory, places entries for immediately contained elements in directory. The elements
should be placed in the directory in the same order as they are found in the WAD file. Returns the number of
elements in the directory, or -1 if path does not represent a directory (e.g., if it represents content).
Offset Length Name
0 0 F_START
0 0 F1_START
67500 0 E1M1
67500 1380 THINGS
68880 6650 LINEDEFS
75532 19440 SIDEDEFS
94972 1868 VERTEXES
96840 8784 SEGS
105624 948 SSECTORS
106572 6608 NODES
113180 2210 SECTORS
115392 904 REJECT
116296 6922 BLOCKMAP
42 9001 LOLWUT
0 0 F1_END
0 0 F_END
F
 F1
 E1M1
 THINGS
 LINEDEFS
 SIDEDEFS
 VERTEXES
 SEGS
 SSECTORS
 NODES
 SECTORS
 REJECT
 BLOCKMAP
LOLWUT
Directory Structure

public void createDirectory(const string &path)
path includes the name of the new directory to be created. If given a valid path, creates a new directory
using namespace markers at path. The two new namespace markers will be added just before the “_END”
marker of its parent directory. New directories cannot be created inside map markers.
public void createFile(const string &path)
path includes the name of the new file to be created. If given a valid path, creates an empty file at path,
with an offset and length of 0. The file will be added to the descriptor list just before the “_END” marker
of its parent directory. New files cannot be created inside map markers.
public int writeToFile(const string &path, const char *buffer, int length, int offset = 0)
If given a valid path to an empty file, augments file size and generates a lump offset, then writes length amount
of bytes from the buffer into the file’s lump data. If offset is provided, data should be written starting from that
byte in the lump content. Returns number of bytes copied from buffer, or -1 if path does not represent content
(e.g., if it represents a directory).
Daemon Command & Parameters
Your daemon should have name wadfs and should accept at a minimum three parameters – the single-threaded
flag "-s", the target WAD file, and the mount directory. For example, this command should mount TINY.WAD
in /home/reptilian/mountdir…
$ ./wadfs -s TINY.WAD /home/reptilian/mountdir
$
…and this should result from executing the ls command to show part of its contents:
$ ls /home/reptilian/mountdir/F/F1 -al
total 0
drwxrwxrwx. 2 root root 0 Jan 1 1970 .
drwxrwxrwx. 2 root root
drwxrwxrwx. 2 root root
 0 Jan 1 1970 ..
 0 Jan 1 1970 E1M1
-rwxrwxrwx. 2 root root 9001 Jan 1 1970 LOLWUT
Your daemon should run in the background. Do not hard-code the debug (-d) or foreground (-f) flags!
We will use the following command below to unmount your filesystem:
$ fusermount -u /home/reptilian/mountdir
Extra Credit
You may notice when testing with your daemon that there is an upper limit to how large files you create in
your filesystem can be. Your task is to configure your library and daemon such that you are able to create
large files in your filesystem (using "cp" to copy in a 200KB image file, for example). Running your
daemon in debug mode (-d) may give you hints as to how certain calls are expected to behave.
NOTE: If a file or directory is created inside the root directory, it will be placed at the very end of the
descriptor list, instead of before an "_END" namespace marker.
Building with FUSE
FUSE is a userspace filesystem API that is supported directly by the Linux kernel. It allows userspace programs
to provide information to the kernel about filesystems the kernel cannot interpret on its own.
Installation & Setup
To use the FUSE library, you will need to install it within Reptilian and change the FUSE permissions:
$ sudo apt install libfuse-dev fuse
$ sudo chmod 666 /dev/fuse
NOTE: if you reboot the virtual machine, you will need to re-add the FUSE permissions, as they will be reset!
Build Directives
In order to build programs using the FUSE library system, you will need to specify the file offset bits as 64 and
identify the FUSE version. We recommend specifying FUSE version 26 (though this is optional):
$ g++ -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 myproggy.cpp -o myproggy -lfuse
Submissions
You will submit the following at the end of this project:
 Report (p3.txt) in man page format on Canvas, including link to unlisted screencast video
 Compressed tar archive (wad.tar.gz) for libWad library and wadfs daemon on Canvas
Report
Your report will explain how you implemented the daemon, including your general architecture / program
structure. It must include an explanation of how you represent the WAD file elements as a directory structure
in memory, as well as how this structure was utilized in the daemon when running. It will include a
description of how testing was performed along with any known bugs. The report should be no more than 600
words, cover all relevant aspects of the project, and be organized and formatted professionally – this is not a
memo!
File and Directory Requirements
Your daemon must implement, at a minimum, the following filesystem functions to provide read and write
access:
1) Retrieving file and directory attributes
2) Reading from existing files, and writing to new ones
3) Reading from existing directories, and writing to new ones
Files and directories should be given full read, write, and execute permissions.
The above requirements will be achieved using, at a minimum, the following six fuse callback functions:
get_attr, mknod, mkdir, read, write, and readdir
It is highly recommended to closely follow the linked resources at the bottom of this pdf to assist with your
FUSE implementation. All changes to the filesystem, such as directory and file creation, must survive between
mounting and unmounting.
To build the library and daemon, we will execute these commands:
$ tar zxvf wad.tar.gz
$ cd libWad
$ make
$ cd ..
$ cd wadfs
$ make
$ cd ..
To run your daemon, we will execute this command:
$ ./wadfs/wadfs -s somewadfile.wad /some/mount/directory
To build another program using your library, we will execute this command:
$ c++ -o program_name sourcefile.cpp -L ./libWad -lWad
Helpful Links
You may find the following resources helpful when reading about how to implement a FUSE daemon:
https://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial/html/
https://engineering.facile.it/blog/eng/write-filesystem-fuse/
https://maastaar.net/fuse/linux/filesystem/c/2019/09/28/writing-less-simple-yet-stupid-filesystem-using-FUSE-in-C/
https://www.cs.hmc.edu/~geoff/classes/hmc.cs137.201601/homework/fuse/fuse_doc.html
http://slade.mancubus.net/index.php?page=about
Screencast
In addition to the written text report, you should submit a screencast (with audio) walking through your library
and the daemon you wrote to provide the filesystem interface, describing your primary functions and
structures (~5:30).
Compressed Archive (wad.tar.gz)
Your compressed tar file should have the following directory/file structure:
wad.tar.gz
wad.tar
libWad (directory)
Makefile
Wad.h
(Various source files)
wadfs (directory)
Makefile
(Various source files) 

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp
















 

標(biāo)簽:

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:代寫EECS 493、代做Java設(shè)計編程
  • 下一篇:代做EECE 6083、c/c++設(shè)計程序代寫
  • 無相關(guān)信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風(fēng)景名勝區(qū)
    昆明西山國家級風(fēng)景名勝區(qū)
    昆明旅游索道攻略
    昆明旅游索道攻略
  • NBA直播 短信驗證碼平臺 幣安官網(wǎng)下載 歐冠直播 WPS下載

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线
  • <dl id="akume"></dl>
  • <noscript id="akume"><object id="akume"></object></noscript>
  • <nav id="akume"><dl id="akume"></dl></nav>
  • <rt id="akume"></rt>
    <dl id="akume"><acronym id="akume"></acronym></dl><dl id="akume"><xmp id="akume"></xmp></dl>
    免费看毛片的网址| 男人天堂网站在线| 污网站免费在线| av动漫免费观看| 国产视频九色蝌蚪| 波多野结衣在线免费观看| 久久免费视频2| 免费大片在线观看| 日韩a一级欧美一级| 18视频在线观看娇喘| 2018国产在线| 中国一级大黄大黄大色毛片| 国产一级做a爰片久久毛片男| 无码人妻精品一区二区三区在线| 九九热99视频| 毛片av免费在线观看| 欧美一级欧美一级| youjizz.com在线观看| 国产一级免费大片| 亚洲久久中文字幕| 少妇性l交大片| 久草免费福利在线| 黄色三级中文字幕| 丰满女人性猛交| 色播五月综合网| 日本高清一区二区视频| 久久久国产欧美| 在线观看av日韩| 婷婷免费在线观看| 手机免费看av网站| 久久久九九九热| 日韩精品aaa| 韩日视频在线观看| 国产原创中文在线观看| 日韩精品一区二区三区久久| 999久久欧美人妻一区二区| 国产a级黄色大片| 无码专区aaaaaa免费视频| 日韩人妻精品无码一区二区三区| 亚洲精品无码国产| 青青在线视频观看| 日韩av在线中文| 国产深夜男女无套内射| 精品久久久久久久免费人妻| www.国产视频.com| 99色这里只有精品| 日韩爱爱小视频| aa视频在线播放| 亚洲不卡视频在线| 免费无码毛片一区二三区| 中文av一区二区三区| 日本久久久网站| 波多野结衣国产精品| 可以免费在线看黄的网站| 天天爱天天做天天操| 亚洲天堂国产视频| 国产在线青青草| 欧美国产视频一区| 男人日女人的bb| 91社在线播放| 99亚洲国产精品| 日本xxxxx18| 日韩视频在线免费播放| 视频在线观看免费高清| 三年中国国语在线播放免费| 黄色动漫网站入口| 成 年 人 黄 色 大 片大 全| 亚洲激情免费视频| av网站手机在线观看| 日韩欧美精品免费| 国产女大学生av| 人人爽人人av| 色中文字幕在线观看| 日本丰满大乳奶| 91丨porny丨探花| 毛片在线播放视频| 少妇人妻在线视频| 国产在线青青草| www.99av.com| 韩国黄色一级大片| 97视频久久久| 激情在线观看视频| 无码粉嫩虎白一线天在线观看| 国产九九九九九| 日本人69视频| 中文字幕无码精品亚洲资源网久久| 丁香色欲久久久久久综合网| 麻豆tv在线播放| 老司机av福利| 中文字幕av专区| 欧美性潮喷xxxxx免费视频看| 无码aⅴ精品一区二区三区浪潮| 国产精品人人妻人人爽人人牛| 精品一区二区成人免费视频| 激情六月丁香婷婷| 人人妻人人澡人人爽欧美一区双| 性生活免费在线观看| 成人午夜精品久久久久久久蜜臀| 91热视频在线观看| 久久精品免费网站| 日本在线一二三区| 草草草在线视频| 天天操天天摸天天爽| 各处沟厕大尺度偷拍女厕嘘嘘| 美女av免费观看| 日韩一区二区高清视频| 国产欧美日韩小视频| 欧美无砖专区免费| 成年网站在线免费观看| 欧美日韩亚洲一| av无码精品一区二区三区| 男女私大尺度视频| 欧美 日本 亚洲| 性猛交ⅹ×××乱大交| 久久久久久久久久一区二区| 在线免费视频一区| 久久久久久久免费视频| 日韩av中文字幕第一页| 日韩一级免费在线观看| 日韩a一级欧美一级| www.射射射| 手机在线国产视频| 欧美精品自拍视频| 91插插插影院| 亚洲人成无码www久久久| www.com污| 亚洲自偷自拍熟女另类| av中文字幕网址| 久草在在线视频| 国产无限制自拍| 成人短视频在线看| 成人亚洲免费视频| 人妻久久久一区二区三区| 欧美精品一区二区性色a+v| 国产成人久久777777| 欧美黑人在线观看| 伊人久久在线观看| 国产又黄又爽免费视频| 国产美女18xxxx免费视频| 9久久9毛片又大又硬又粗| 日韩精品久久一区二区| 神马午夜伦理影院| 交换做爰国语对白| 91视频成人免费| 日韩a级黄色片| 人妻无码久久一区二区三区免费| 亚洲天堂伊人网| 日本久久高清视频| 免费人成自慰网站| 国产99久久九九精品无码| 亚洲熟妇国产熟妇肥婆| av观看免费在线| 91视频这里只有精品| 潘金莲一级淫片aaaaaa播放1| 青青草原国产免费| 久操网在线观看| mm131国产精品| 久久最新免费视频| 欧美视频第三页| 欧美在线观看黄| av免费在线播放网站| 老汉色影院首页| 亚洲综合在线网站| 精品免费久久久久久久| 日本熟妇人妻中出| 青青草视频在线视频| 亚洲77777| 内射国产内射夫妻免费频道| wwwwxxxx日韩| av动漫在线看| 国内少妇毛片视频| 中文字幕在线乱| 无限资源日本好片| 精品视频无码一区二区三区| 香蕉视频免费版| 天堂av免费看| 久久久国产精华液999999 | 亚洲免费999| 国产v亚洲v天堂无码久久久 | www.中文字幕在线| 99在线免费视频观看| 97在线免费视频观看| 亚洲第一色av| 性做爰过程免费播放| 欧美日韩久久婷婷| 亚洲天堂第一区| 国产日韩欧美大片| www.国产在线视频| 777久久久精品一区二区三区| 久久久999免费视频| 国产a级片免费观看| xxxx一级片| 激情图片qvod| 99热成人精品热久久66| 欧美男女交配视频| 妞干网这里只有精品| 日本精品免费在线观看| 黄色国产小视频| 成人高清dvd| 国产精品欧美激情在线观看|