

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.amigaos.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eldee+Stephens</id>
	<title>AmigaOS Documentation Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.amigaos.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eldee+Stephens"/>
	<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/wiki/Special:Contributions/Eldee_Stephens"/>
	<updated>2026-06-05T02:37:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Programming_AmigaOS_4:_The_Development_Environment&amp;diff=8579</id>
		<title>Programming AmigaOS 4: The Development Environment</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Programming_AmigaOS_4:_The_Development_Environment&amp;diff=8579"/>
		<updated>2016-08-29T14:55:56Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: added a few links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This article was adapted from Amiga Future magazine&#039;s series on developing for AmigaOS....&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We were shocked when we realised that while we&#039;ve covered several subjects in programming for AmigaOS 4 in [http://www.amigafuture.de Amiga Future] there&#039;s been no extensive coverage of all of the many aspects. Additionally, since the release of AmigaOS 4, quite a lot of time has passed by, and during that time new programming treasures have sneaked into the SDK virtually unnoticed. It&#039;s been nine years since the authors did a similar series in &amp;quot;Amiga Magazin&amp;quot;. So, we&#039;re launching a new 15-part series starting with a short peek at the SDK and the available development environments.&lt;br /&gt;
&lt;br /&gt;
= SDK =&lt;br /&gt;
&lt;br /&gt;
The Software Development Kit (SDK) for AmigaOS 4 has had some updates. You can find the latest version on from March 2010 on [http://www.hyperion-entertainment.biz/index.php?option=com_registration&amp;amp;view=files&amp;amp;parent=30&amp;amp;Itemid=63 Hyperion Entertainment&#039;s website]. The archive is easy to install and you can select which components you require. The base archives are always installed, and if you wish to use additional contributions you can select the appropriate archives. The installation has already been covered in Amiga Future 81 page 28 ([http://www.amigafuture.de/kb.php?mode=article&amp;amp;k=4174 link]) and issue 84 page 17 ([http://www.amigafuture.de/kb.php?mode=article&amp;amp;k=4325 link]). The SDK: assign holds all documentation ([[Autodocs:Main|Autodocs]]) and include files (include/include_h), the latter are required for developing your own code and they&#039;re included in the compiler&#039;s search path.&lt;br /&gt;
&lt;br /&gt;
= Compiler =&lt;br /&gt;
&lt;br /&gt;
The package installs the gcc compiler version 4.2.4, suitable for developing programs in C and C++. You can also create shared libraries, link libraries and shared object files (sobj). A detailed description of gcc and its command-line options can be found in SDK:Documentation.&lt;br /&gt;
&lt;br /&gt;
= Development Environment =&lt;br /&gt;
&lt;br /&gt;
Currently, the only complete development environment is [http://codebench.co.uk Codebench]. It allows you to easily join several files into a project, the makefile is created automatically. You can call the compiler directly from the DE.&lt;br /&gt;
&lt;br /&gt;
There&#039;s the new [https://www.alinea-computer.de/produkte_details_en.php?product=stormc5ed StormC5 Editor], optimized for developers, with several features. We&#039;ve covered this editor in Amiga Future&#039;s previous issue 102. StormC5 is planned to become a complete DE with project management and &amp;quot;integrated&amp;quot; compiler again.&lt;br /&gt;
&lt;br /&gt;
Additional editors are [http://www.cygnused.de/index-en.php CygnusEd] and GoldEd. Also, the operating system&#039;s Notepad is generally suitable for creating code, probably limited to smaller/shorter programs however.&lt;br /&gt;
&lt;br /&gt;
Generally, you can still use the older environments MaxonDevelop and [https://www.alinea-computer.de/produkte_details_en.php?product=stormc StormC4]. They feature project management and editors and provide for managing projects and editing the source code files. The required makefiles would need to be created manually however, the same applies to compiler or make calls.&lt;br /&gt;
&lt;br /&gt;
= Documentation =&lt;br /&gt;
&lt;br /&gt;
A constant issue is the inadequate, incomplete, and even some missing, documentation to the application programming interface (API). The first place to go would be the Autodocs files, at least providing short descriptions for each function, what parameters are to be passed to the function, which return values there are, and what purpose the function serves. The Autodocs should cover all functions although not always with up-to-date descriptions.&lt;br /&gt;
&lt;br /&gt;
Fortunately, there is this wiki where you can find numerous descriptions and sample code. Additionally, you can try to [http://support.amigaos.net/ contact fellow developers]. If you require more of a tutorial or description of the architectural aspects you should look into the RKRMs revised and updated on this wiki. A look into [http://os4depot.net/index.php?function=browse&amp;amp;cat=development OS4Depot] can also provide helpful tools and sample code for developers. A short overview has been given in issue 79 page 25.&lt;br /&gt;
&lt;br /&gt;
= The first step =&lt;br /&gt;
&lt;br /&gt;
To avoid keeping this first part all theoretical we&#039;d like to use a mini program to check whether AmigaOS version 4.1 (or better) is installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
** check_os4.1.c : Pr¸fen auf AmigaOS 4.1 Umgebung / Check for AmigaOS 4.1 enviroment&lt;br /&gt;
** gcc check_os4.1.c -o check_os4.1&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;proto/exec.h&amp;gt;&lt;br /&gt;
#include &amp;lt;proto/dos.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
  int res;&lt;br /&gt;
&lt;br /&gt;
  if(SysBase-&amp;gt;lib_Version &amp;gt;= 53)&lt;br /&gt;
  {&lt;br /&gt;
    IDOS-&amp;gt;Printf(&amp;quot;AmigaOS 4.1 ist vorhanden !\n&amp;quot;);&lt;br /&gt;
    IDOS-&amp;gt;Printf(&amp;quot;AmigaOS 4.1 is available !\n&amp;quot;);&lt;br /&gt;
    res = RETURN_OK;&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    IDOS-&amp;gt;Printf(&amp;quot;Das Programm benˆtigt AmigaOS 4.1\n&amp;quot;);&lt;br /&gt;
    IDOS-&amp;gt;Printf(&amp;quot;This program required AmigaOS 4.1\n&amp;quot;);&lt;br /&gt;
    res = RETURN_FAIL;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return( res );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can compile it directly from the console by&lt;br /&gt;
&lt;br /&gt;
 gcc check_os4.1.c -o check_os4.1&lt;br /&gt;
&lt;br /&gt;
When run it&#039;ll output an appropriate text. This codeblock is suitable if you want to make sure that your program requires a specific OS version. For this, these values are significant: 50 stands for AmigaOS 4.0 preview, 51 for 4.0 final, 52 for 4.0 update 4 and the current 53 for 4.1. Generally, you can expect version 53 to be running.&lt;br /&gt;
&lt;br /&gt;
= Outlook =&lt;br /&gt;
&lt;br /&gt;
The next installment will get us right into coding. The first thing the Amiga starts is the kernel and for this we&#039;ll take a look at Exec and the basic functions it provides.&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
&lt;br /&gt;
Written by Michael Christoph and Nils Petersen&amp;lt;br/&amp;gt;&lt;br /&gt;
Copyright (c) 2013 Michael Christoph&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_AmigaDOS_Understanding_the_Shell&amp;diff=8514</id>
		<title>AmigaOS Manual: AmigaDOS Understanding the Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_AmigaDOS_Understanding_the_Shell&amp;diff=8514"/>
		<updated>2015-11-30T21:28:51Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
An AmigaDOS Shell is a special window on the Workbench screen that accepts text input, allowing you to communicate with AmigaDOS. The Shell is a type of Command Line Interface or CLI. This chapter describes the following:&lt;br /&gt;
&lt;br /&gt;
= About the Shell =&lt;br /&gt;
&lt;br /&gt;
You can communicate directly with AmigaDOS through a Shell console window, a text-only interface that accepts input entered from the keyboard. The Shell window looks and acts like a Workbench window with some exceptions:&lt;br /&gt;
&lt;br /&gt;
* Icons dragged into the Shell window do not initiate a file move or copy operation; rather any icon dragged into the Shell window will cause the Shell to auto-type the icon&#039;s name and full path into the command prompt&lt;br /&gt;
* The mouse has somewhat limited use; it can be used for copy and paste operations, except within the ED and MEmacs text editors, or for selecting autocompleted commands from a pop-up menu if enabled in the Shell preferences&lt;br /&gt;
* Scroll gadgets work as you would expect, except that the length of Shell history captured may be limited by user preference&lt;br /&gt;
* The AmigaDOS Shell window uses a non-proportional font by default, normally the System Default Text font, e.g. DejaVu Sans Mono, specified by the Font Preferences editor.&lt;br /&gt;
* Any Workbench background patterns set in WBPattern do not appear in Shell windows&lt;br /&gt;
&lt;br /&gt;
Like Workbench, several independent Shell windows can be open at the same time. While commands entered in one Shell are being executed, you can enter and execute different commands in another Shell window. You can also combine Shell windows into a single window, with each Shell session accessible via tabs. Figure 2-1 illustrates a Shell window opened on the Workbench screen:&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-1.png|center|frame|Shell Window with Tabs]]&lt;br /&gt;
&lt;br /&gt;
= Opening Shell Windows =&lt;br /&gt;
&lt;br /&gt;
Shell windows can be opened in one of several ways:&lt;br /&gt;
&lt;br /&gt;
* Click on the Shell icon in the Workbench System drawer&lt;br /&gt;
* Click on the Shell icon in your AmiDock (if enabled)&lt;br /&gt;
* Use the NEWSHELL command described in Chapter 6&lt;br /&gt;
* Select &#039;New shell&#039; from any already open Shell session&lt;br /&gt;
* Select &#039;Shell Here&#039; from the &#039;New&#039; submenu in any Workbench contextual pop-up menu&lt;br /&gt;
&lt;br /&gt;
When a Shell window is opened:&lt;br /&gt;
&lt;br /&gt;
* The window is highlighted, indicating that it is the current window&lt;br /&gt;
* A prompt appears, such as 1.SYS: &amp;gt;&lt;br /&gt;
* To the right of the prompt is a cursor, the default being a small highlighted rectangle&lt;br /&gt;
&lt;br /&gt;
Like Workbench, only the currently selected Shell can receive input. To enter information in a different Shell, click in its window (or select its tab) to make it the current Shell session.&lt;br /&gt;
&lt;br /&gt;
= Closing Shell windows =&lt;br /&gt;
&lt;br /&gt;
Use one of the following four ways to close a Shell window:&lt;br /&gt;
&lt;br /&gt;
* Select the close gadget&lt;br /&gt;
* Select &#039;Close&#039; from the Project menu&lt;br /&gt;
* Enter the ENDCLI command&lt;br /&gt;
* Press Ctrl+\&lt;br /&gt;
&lt;br /&gt;
We recommend closing Shell windows when you are finished with them. Any open window uses memory.&lt;br /&gt;
&lt;br /&gt;
All non-detached programs that run from a Shell must be finished before you can close the window. You can tell that a program is still active if pressing Return does not produce a Shell prompt in the window. Although you can still enter commands into such a window, AmigaDOS does not respond to the commands until the running program is exited.&lt;br /&gt;
&lt;br /&gt;
= Using the Shell =&lt;br /&gt;
&lt;br /&gt;
Enter AmigaDOS commands at the Shell&#039;s text prompt. Include with the command any necessary information, such as file names or command options. Press Return at the end of each command line to execute the command. The Shell prompt reappears when the command is finished executing.&lt;br /&gt;
&lt;br /&gt;
To see command output that has scrolled out of the Shell window, use the scroller gadgets to scroll up or down; you can also enlarge the window by selecting the Shell zoom gadget or using the sizing gadget. The Shell window will keep a full scrollback history of as many lines as you specify using the Console prefs tool. Figure 2-2 illustrates a Shell window before and after using the zoom gadget to display the entire output of an INFO command.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-2a.png|center|frame|Current Output]]&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-2b.png|center|frame|Revealing Previous Output with the Scroller Gadget]]&lt;br /&gt;
&lt;br /&gt;
== Command Line Editing and Control ==&lt;br /&gt;
&lt;br /&gt;
To simplify entering and editing command line text, the AmigaDOS Shell provides the following editing key and key combination options:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| left arrow || Moves cursor one character to the left.&lt;br /&gt;
|-&lt;br /&gt;
| right arrow || Moves cursor one character to the right.&lt;br /&gt;
|-&lt;br /&gt;
| Shift+left arrow || Moves cursor to the beginning of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Shift+right arrow || Moves cursor to the end of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Backspace || Deletes the character to the left of the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Del || Deletes the character highlighted by the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+H || Deletes the last character (same as Backspace).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+M || Processes the command line (same as Return).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+J || Adds a line feed.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+W || Deletes the word to the left of the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+X || Deletes the current line.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+K || Deletes everything from the cursor forward to the end of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Y || Replaces the characters deleted with Ctrl+K.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+U || Deletes everything from the cursor backward to the start of the line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In addition, the Shell supports the following keys and key combinations:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Space bar (or any printable character) || Suspends output (stops scrolling).&lt;br /&gt;
|-&lt;br /&gt;
| Backspace || Resumes output (continues scrolling).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+C || Sends a BREAK command to the current process (halts the process).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+D || Sends at BREAK command to the current script (halts the script).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+F || Activates and brings Workbench program windows to the front.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+S || Suspends output.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Q || Resumes output if it was suspended with Ctrl+S.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+\ || Closes the Shell window. When console |/O is redirected to another device with * restores normal |/O.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Shell allows you to enter a command or other information while listing output. However, this stops the output until you press the Return key. The new command executes after the output is finished listing.&lt;br /&gt;
&lt;br /&gt;
If you enter a new command or text and then choose to delete it, the original output resumes scrolling as soon as the last character is erased.&lt;br /&gt;
&lt;br /&gt;
== Using the Command History ==&lt;br /&gt;
&lt;br /&gt;
The Shell uses a 2 KB command line buffer to retain command lines, which provides a command history. Using this history you can recall previously entered command lines, edit them, and re-execute them. This lets you easily repeat a command or enter several similar commands. Figure 2-3 illustrates a series of commands stored in the command history buffer.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-3.png|center|frame|Command History Buffer]]&lt;br /&gt;
&lt;br /&gt;
The exact number of lines retained in the command line buffer varies depending on the length of the lines actually stored. When the buffer is full, the oldest lines are removed. You can access lines in the buffer with the up and down arrow keys:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| up arrow || Moves backward in the history buffer (earlier lines).&lt;br /&gt;
|-&lt;br /&gt;
| down arrow || Moves forward in the history buffer (later lines).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, you can copy several .info files from one directory to another by enteringthe full command line with the complete path only once and then recalling the lines as many times as necessary, changing only the file name.&lt;br /&gt;
&lt;br /&gt;
You can also search for the most recent occurrence of a specific command by entering the command line, or the beginning of it, and pressing Shift+up arrow (or Ctrl+R). For example, if you enter DIR and press Shift+up arrow, you are returned to the last command entered to perform a DIR of any directory. Pressing Shift+down arrow goes to the bottom of the command history buffer, leaving the cursor on a blank line.&lt;br /&gt;
&lt;br /&gt;
== Copying and Pasting ==&lt;br /&gt;
&lt;br /&gt;
You can copy and paste information from one console window, such as a Shell or ED window, to the same or another window. This done by selecting commands in the Edit menu, just like in most Amiga tools. Figure 2-4 illustrates copying and pasting from the Shell window to a Notepad window.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-4a.png|center|frame|Copy]]&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-4b.png|center|frame|Paste]]&lt;br /&gt;
&lt;br /&gt;
Use the mouse to highlight the area of text to be copied and pasted. Highlight the text to be copied by moving the pointer to the beginning of the text area, holding down the selection button, and dragging the mouse pointer to the end of the desired text. Release the selection button and press Right Amiga+C or select Copy from the Edit menu. The highlighted area is copied into the Clipboard and the area is unhighlighted. The text you copied can be repeatedly pasted into any application window that supports reading text from the Clipboard, such as the Shell, Notepad, and MultiEdit.&lt;br /&gt;
&lt;br /&gt;
To position the cursor where you want to paste the text, move the mouse pointer to that location and click. Press right Amiga+V to paste the text.&lt;br /&gt;
&lt;br /&gt;
{{Note|If a block of text is pasted into a Shell window, the Shell attempts to execute each line of the text as a command. This can have unpredictable results if the block of text has embedded returns and is not an AmigaDOS script.}}&lt;br /&gt;
&lt;br /&gt;
== Working with the Shell ==&lt;br /&gt;
&lt;br /&gt;
The following are tips for speeding your work with the Shell.&lt;br /&gt;
&lt;br /&gt;
; Use command history and command line editing&lt;br /&gt;
: It sometimes takes several attempts using the same command before getting it right, especially when you are first learning how to use AmigaDOS. Use the arrow keys to recall a previous command and change only the part of the line that causes the problem to eliminate the need to retype the entire line.&lt;br /&gt;
&lt;br /&gt;
; Use aliases&lt;br /&gt;
: Defining short aliases for commands you use often is another time-saver. It also eliminates the need to remember a long and/or complex series of options. For complete instructions, see the ALIAS command in Chapter 6.&lt;br /&gt;
&lt;br /&gt;
; Omit unnecessary keywords&lt;br /&gt;
: For clarity, AmigaDOS command names and keywords throughout this book are often shown although they are optional. When you learn a command&#039;s format, however, you seldom need to include optional keywords.&lt;br /&gt;
&lt;br /&gt;
; Do not use capital letters&lt;br /&gt;
: Command names, keywords, and assigned directories are shown in all upper case letters throughout this manual even though AmigaDOS is case-indifferent. This is done to distinguish the keywords from the file names and other information on the example command line. There is no need to use capitalization, except in commands that create a file or directory whose name you want to appear capitalized.&lt;br /&gt;
&lt;br /&gt;
; Use implied CD&lt;br /&gt;
: This allows you to leave out the CD command, saving three keystrokes. Enter the only directory name, path, colon, or slashes at the prompt to change directories. For more information about changing directories, see the CD command in Chapter 6.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_AmigaDOS_Understanding_the_Shell&amp;diff=8513</id>
		<title>AmigaOS Manual: AmigaDOS Understanding the Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_AmigaDOS_Understanding_the_Shell&amp;diff=8513"/>
		<updated>2015-11-30T21:28:40Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
An AmigaDOS Shell is a special window on the Workbench screen that accepts text input, allowing you to communicate with AmigaDOS. The Shell is a type of Command Line Interface or CLI. This chapter describes the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= About the Shell =&lt;br /&gt;
&lt;br /&gt;
You can communicate directly with AmigaDOS through a Shell console window, a text-only interface that accepts input entered from the keyboard. The Shell window looks and acts like a Workbench window with some exceptions:&lt;br /&gt;
&lt;br /&gt;
* Icons dragged into the Shell window do not initiate a file move or copy operation; rather any icon dragged into the Shell window will cause the Shell to auto-type the icon&#039;s name and full path into the command prompt&lt;br /&gt;
* The mouse has somewhat limited use; it can be used for copy and paste operations, except within the ED and MEmacs text editors, or for selecting autocompleted commands from a pop-up menu if enabled in the Shell preferences&lt;br /&gt;
* Scroll gadgets work as you would expect, except that the length of Shell history captured may be limited by user preference&lt;br /&gt;
* The AmigaDOS Shell window uses a non-proportional font by default, normally the System Default Text font, e.g. DejaVu Sans Mono, specified by the Font Preferences editor.&lt;br /&gt;
* Any Workbench background patterns set in WBPattern do not appear in Shell windows&lt;br /&gt;
&lt;br /&gt;
Like Workbench, several independent Shell windows can be open at the same time. While commands entered in one Shell are being executed, you can enter and execute different commands in another Shell window. You can also combine Shell windows into a single window, with each Shell session accessible via tabs. Figure 2-1 illustrates a Shell window opened on the Workbench screen:&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-1.png|center|frame|Shell Window with Tabs]]&lt;br /&gt;
&lt;br /&gt;
= Opening Shell Windows =&lt;br /&gt;
&lt;br /&gt;
Shell windows can be opened in one of several ways:&lt;br /&gt;
&lt;br /&gt;
* Click on the Shell icon in the Workbench System drawer&lt;br /&gt;
* Click on the Shell icon in your AmiDock (if enabled)&lt;br /&gt;
* Use the NEWSHELL command described in Chapter 6&lt;br /&gt;
* Select &#039;New shell&#039; from any already open Shell session&lt;br /&gt;
* Select &#039;Shell Here&#039; from the &#039;New&#039; submenu in any Workbench contextual pop-up menu&lt;br /&gt;
&lt;br /&gt;
When a Shell window is opened:&lt;br /&gt;
&lt;br /&gt;
* The window is highlighted, indicating that it is the current window&lt;br /&gt;
* A prompt appears, such as 1.SYS: &amp;gt;&lt;br /&gt;
* To the right of the prompt is a cursor, the default being a small highlighted rectangle&lt;br /&gt;
&lt;br /&gt;
Like Workbench, only the currently selected Shell can receive input. To enter information in a different Shell, click in its window (or select its tab) to make it the current Shell session.&lt;br /&gt;
&lt;br /&gt;
= Closing Shell windows =&lt;br /&gt;
&lt;br /&gt;
Use one of the following four ways to close a Shell window:&lt;br /&gt;
&lt;br /&gt;
* Select the close gadget&lt;br /&gt;
* Select &#039;Close&#039; from the Project menu&lt;br /&gt;
* Enter the ENDCLI command&lt;br /&gt;
* Press Ctrl+\&lt;br /&gt;
&lt;br /&gt;
We recommend closing Shell windows when you are finished with them. Any open window uses memory.&lt;br /&gt;
&lt;br /&gt;
All non-detached programs that run from a Shell must be finished before you can close the window. You can tell that a program is still active if pressing Return does not produce a Shell prompt in the window. Although you can still enter commands into such a window, AmigaDOS does not respond to the commands until the running program is exited.&lt;br /&gt;
&lt;br /&gt;
= Using the Shell =&lt;br /&gt;
&lt;br /&gt;
Enter AmigaDOS commands at the Shell&#039;s text prompt. Include with the command any necessary information, such as file names or command options. Press Return at the end of each command line to execute the command. The Shell prompt reappears when the command is finished executing.&lt;br /&gt;
&lt;br /&gt;
To see command output that has scrolled out of the Shell window, use the scroller gadgets to scroll up or down; you can also enlarge the window by selecting the Shell zoom gadget or using the sizing gadget. The Shell window will keep a full scrollback history of as many lines as you specify using the Console prefs tool. Figure 2-2 illustrates a Shell window before and after using the zoom gadget to display the entire output of an INFO command.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-2a.png|center|frame|Current Output]]&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-2b.png|center|frame|Revealing Previous Output with the Scroller Gadget]]&lt;br /&gt;
&lt;br /&gt;
== Command Line Editing and Control ==&lt;br /&gt;
&lt;br /&gt;
To simplify entering and editing command line text, the AmigaDOS Shell provides the following editing key and key combination options:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| left arrow || Moves cursor one character to the left.&lt;br /&gt;
|-&lt;br /&gt;
| right arrow || Moves cursor one character to the right.&lt;br /&gt;
|-&lt;br /&gt;
| Shift+left arrow || Moves cursor to the beginning of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Shift+right arrow || Moves cursor to the end of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Backspace || Deletes the character to the left of the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Del || Deletes the character highlighted by the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+H || Deletes the last character (same as Backspace).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+M || Processes the command line (same as Return).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+J || Adds a line feed.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+W || Deletes the word to the left of the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+X || Deletes the current line.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+K || Deletes everything from the cursor forward to the end of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Y || Replaces the characters deleted with Ctrl+K.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+U || Deletes everything from the cursor backward to the start of the line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In addition, the Shell supports the following keys and key combinations:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Space bar (or any printable character) || Suspends output (stops scrolling).&lt;br /&gt;
|-&lt;br /&gt;
| Backspace || Resumes output (continues scrolling).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+C || Sends a BREAK command to the current process (halts the process).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+D || Sends at BREAK command to the current script (halts the script).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+F || Activates and brings Workbench program windows to the front.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+S || Suspends output.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Q || Resumes output if it was suspended with Ctrl+S.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+\ || Closes the Shell window. When console |/O is redirected to another device with * restores normal |/O.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Shell allows you to enter a command or other information while listing output. However, this stops the output until you press the Return key. The new command executes after the output is finished listing.&lt;br /&gt;
&lt;br /&gt;
If you enter a new command or text and then choose to delete it, the original output resumes scrolling as soon as the last character is erased.&lt;br /&gt;
&lt;br /&gt;
== Using the Command History ==&lt;br /&gt;
&lt;br /&gt;
The Shell uses a 2 KB command line buffer to retain command lines, which provides a command history. Using this history you can recall previously entered command lines, edit them, and re-execute them. This lets you easily repeat a command or enter several similar commands. Figure 2-3 illustrates a series of commands stored in the command history buffer.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-3.png|center|frame|Command History Buffer]]&lt;br /&gt;
&lt;br /&gt;
The exact number of lines retained in the command line buffer varies depending on the length of the lines actually stored. When the buffer is full, the oldest lines are removed. You can access lines in the buffer with the up and down arrow keys:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| up arrow || Moves backward in the history buffer (earlier lines).&lt;br /&gt;
|-&lt;br /&gt;
| down arrow || Moves forward in the history buffer (later lines).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, you can copy several .info files from one directory to another by enteringthe full command line with the complete path only once and then recalling the lines as many times as necessary, changing only the file name.&lt;br /&gt;
&lt;br /&gt;
You can also search for the most recent occurrence of a specific command by entering the command line, or the beginning of it, and pressing Shift+up arrow (or Ctrl+R). For example, if you enter DIR and press Shift+up arrow, you are returned to the last command entered to perform a DIR of any directory. Pressing Shift+down arrow goes to the bottom of the command history buffer, leaving the cursor on a blank line.&lt;br /&gt;
&lt;br /&gt;
== Copying and Pasting ==&lt;br /&gt;
&lt;br /&gt;
You can copy and paste information from one console window, such as a Shell or ED window, to the same or another window. This done by selecting commands in the Edit menu, just like in most Amiga tools. Figure 2-4 illustrates copying and pasting from the Shell window to a Notepad window.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-4a.png|center|frame|Copy]]&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-4b.png|center|frame|Paste]]&lt;br /&gt;
&lt;br /&gt;
Use the mouse to highlight the area of text to be copied and pasted. Highlight the text to be copied by moving the pointer to the beginning of the text area, holding down the selection button, and dragging the mouse pointer to the end of the desired text. Release the selection button and press Right Amiga+C or select Copy from the Edit menu. The highlighted area is copied into the Clipboard and the area is unhighlighted. The text you copied can be repeatedly pasted into any application window that supports reading text from the Clipboard, such as the Shell, Notepad, and MultiEdit.&lt;br /&gt;
&lt;br /&gt;
To position the cursor where you want to paste the text, move the mouse pointer to that location and click. Press right Amiga+V to paste the text.&lt;br /&gt;
&lt;br /&gt;
{{Note|If a block of text is pasted into a Shell window, the Shell attempts to execute each line of the text as a command. This can have unpredictable results if the block of text has embedded returns and is not an AmigaDOS script.}}&lt;br /&gt;
&lt;br /&gt;
== Working with the Shell ==&lt;br /&gt;
&lt;br /&gt;
The following are tips for speeding your work with the Shell.&lt;br /&gt;
&lt;br /&gt;
; Use command history and command line editing&lt;br /&gt;
: It sometimes takes several attempts using the same command before getting it right, especially when you are first learning how to use AmigaDOS. Use the arrow keys to recall a previous command and change only the part of the line that causes the problem to eliminate the need to retype the entire line.&lt;br /&gt;
&lt;br /&gt;
; Use aliases&lt;br /&gt;
: Defining short aliases for commands you use often is another time-saver. It also eliminates the need to remember a long and/or complex series of options. For complete instructions, see the ALIAS command in Chapter 6.&lt;br /&gt;
&lt;br /&gt;
; Omit unnecessary keywords&lt;br /&gt;
: For clarity, AmigaDOS command names and keywords throughout this book are often shown although they are optional. When you learn a command&#039;s format, however, you seldom need to include optional keywords.&lt;br /&gt;
&lt;br /&gt;
; Do not use capital letters&lt;br /&gt;
: Command names, keywords, and assigned directories are shown in all upper case letters throughout this manual even though AmigaDOS is case-indifferent. This is done to distinguish the keywords from the file names and other information on the example command line. There is no need to use capitalization, except in commands that create a file or directory whose name you want to appear capitalized.&lt;br /&gt;
&lt;br /&gt;
; Use implied CD&lt;br /&gt;
: This allows you to leave out the CD command, saving three keystrokes. Enter the only directory name, path, colon, or slashes at the prompt to change directories. For more information about changing directories, see the CD command in Chapter 6.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_AmigaDOS_Understanding_the_Shell&amp;diff=8512</id>
		<title>AmigaOS Manual: AmigaDOS Understanding the Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_AmigaDOS_Understanding_the_Shell&amp;diff=8512"/>
		<updated>2015-11-30T21:28:22Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
An AmigaDOS Shell is a special window on the Workbench screen that accepts text input, allowing you to communicate with AmigaDOS. The Shell is a type of Command Line Interface or CLI. This chapter describes the following:&lt;br /&gt;
&lt;br /&gt;
= About the Shell =&lt;br /&gt;
&lt;br /&gt;
You can communicate directly with AmigaDOS through a Shell console window, a text-only interface that accepts input entered from the keyboard. The Shell window looks and acts like a Workbench window with some exceptions:&lt;br /&gt;
&lt;br /&gt;
* Icons dragged into the Shell window do not initiate a file move or copy operation; rather any icon dragged into the Shell window will cause the Shell to auto-type the icon&#039;s name and full path into the command prompt&lt;br /&gt;
* The mouse has somewhat limited use; it can be used for copy and paste operations, except within the ED and MEmacs text editors, or for selecting autocompleted commands from a pop-up menu if enabled in the Shell preferences&lt;br /&gt;
* Scroll gadgets work as you would expect, except that the length of Shell history captured may be limited by user preference&lt;br /&gt;
* The AmigaDOS Shell window uses a non-proportional font by default, normally the System Default Text font, e.g. DejaVu Sans Mono, specified by the Font Preferences editor.&lt;br /&gt;
* Any Workbench background patterns set in WBPattern do not appear in Shell windows&lt;br /&gt;
&lt;br /&gt;
Like Workbench, several independent Shell windows can be open at the same time. While commands entered in one Shell are being executed, you can enter and execute different commands in another Shell window. You can also combine Shell windows into a single window, with each Shell session accessible via tabs. Figure 2-1 illustrates a Shell window opened on the Workbench screen:&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-1.png|center|frame|Shell Window with Tabs]]&lt;br /&gt;
&lt;br /&gt;
= Opening Shell Windows =&lt;br /&gt;
&lt;br /&gt;
Shell windows can be opened in one of several ways:&lt;br /&gt;
&lt;br /&gt;
* Click on the Shell icon in the Workbench System drawer&lt;br /&gt;
* Click on the Shell icon in your AmiDock (if enabled)&lt;br /&gt;
* Use the NEWSHELL command described in Chapter 6&lt;br /&gt;
* Select &#039;New shell&#039; from any already open Shell session&lt;br /&gt;
* Select &#039;Shell Here&#039; from the &#039;New&#039; submenu in any Workbench contextual pop-up menu&lt;br /&gt;
&lt;br /&gt;
When a Shell window is opened:&lt;br /&gt;
&lt;br /&gt;
* The window is highlighted, indicating that it is the current window&lt;br /&gt;
* A prompt appears, such as 1.SYS: &amp;gt;&lt;br /&gt;
* To the right of the prompt is a cursor, the default being a small highlighted rectangle&lt;br /&gt;
&lt;br /&gt;
Like Workbench, only the currently selected Shell can receive input. To enter information in a different Shell, click in its window (or select its tab) to make it the current Shell session.&lt;br /&gt;
&lt;br /&gt;
= Closing Shell windows =&lt;br /&gt;
&lt;br /&gt;
Use one of the following four ways to close a Shell window:&lt;br /&gt;
&lt;br /&gt;
* Select the close gadget&lt;br /&gt;
* Select &#039;Close&#039; from the Project menu&lt;br /&gt;
* Enter the ENDCLI command&lt;br /&gt;
* Press Ctrl+\&lt;br /&gt;
&lt;br /&gt;
We recommend closing Shell windows when you are finished with them. Any open window uses memory.&lt;br /&gt;
&lt;br /&gt;
All non-detached programs that run from a Shell must be finished before you can close the window. You can tell that a program is still active if pressing Return does not produce a Shell prompt in the window. Although you can still enter commands into such a window, AmigaDOS does not respond to the commands until the running program is exited.&lt;br /&gt;
&lt;br /&gt;
= Using the Shell =&lt;br /&gt;
&lt;br /&gt;
Enter AmigaDOS commands at the Shell&#039;s text prompt. Include with the command any necessary information, such as file names or command options. Press Return at the end of each command line to execute the command. The Shell prompt reappears when the command is finished executing.&lt;br /&gt;
&lt;br /&gt;
To see command output that has scrolled out of the Shell window, use the scroller gadgets to scroll up or down; you can also enlarge the window by selecting the Shell zoom gadget or using the sizing gadget. The Shell window will keep a full scrollback history of as many lines as you specify using the Console prefs tool. Figure 2-2 illustrates a Shell window before and after using the zoom gadget to display the entire output of an INFO command.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-2a.png|center|frame|Current Output]]&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-2b.png|center|frame|Revealing Previous Output with the Scroller Gadget]]&lt;br /&gt;
&lt;br /&gt;
== Command Line Editing and Control ==&lt;br /&gt;
&lt;br /&gt;
To simplify entering and editing command line text, the AmigaDOS Shell provides the following editing key and key combination options:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| left arrow || Moves cursor one character to the left.&lt;br /&gt;
|-&lt;br /&gt;
| right arrow || Moves cursor one character to the right.&lt;br /&gt;
|-&lt;br /&gt;
| Shift+left arrow || Moves cursor to the beginning of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Shift+right arrow || Moves cursor to the end of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Backspace || Deletes the character to the left of the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Del || Deletes the character highlighted by the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+H || Deletes the last character (same as Backspace).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+M || Processes the command line (same as Return).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+J || Adds a line feed.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+W || Deletes the word to the left of the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+X || Deletes the current line.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+K || Deletes everything from the cursor forward to the end of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Y || Replaces the characters deleted with Ctrl+K.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+U || Deletes everything from the cursor backward to the start of the line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In addition, the Shell supports the following keys and key combinations:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Space bar (or any printable character) || Suspends output (stops scrolling).&lt;br /&gt;
|-&lt;br /&gt;
| Backspace || Resumes output (continues scrolling).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+C || Sends a BREAK command to the current process (halts the process).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+D || Sends at BREAK command to the current script (halts the script).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+F || Activates and brings Workbench program windows to the front.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+S || Suspends output.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Q || Resumes output if it was suspended with Ctrl+S.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+\ || Closes the Shell window. When console |/O is redirected to another device with * restores normal |/O.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Shell allows you to enter a command or other information while listing output. However, this stops the output until you press the Return key. The new command executes after the output is finished listing.&lt;br /&gt;
&lt;br /&gt;
If you enter a new command or text and then choose to delete it, the original output resumes scrolling as soon as the last character is erased.&lt;br /&gt;
&lt;br /&gt;
== Using the Command History ==&lt;br /&gt;
&lt;br /&gt;
The Shell uses a 2 KB command line buffer to retain command lines, which provides a command history. Using this history you can recall previously entered command lines, edit them, and re-execute them. This lets you easily repeat a command or enter several similar commands. Figure 2-3 illustrates a series of commands stored in the command history buffer.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-3.png|center|frame|Command History Buffer]]&lt;br /&gt;
&lt;br /&gt;
The exact number of lines retained in the command line buffer varies depending on the length of the lines actually stored. When the buffer is full, the oldest lines are removed. You can access lines in the buffer with the up and down arrow keys:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| up arrow || Moves backward in the history buffer (earlier lines).&lt;br /&gt;
|-&lt;br /&gt;
| down arrow || Moves forward in the history buffer (later lines).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, you can copy several .info files from one directory to another by enteringthe full command line with the complete path only once and then recalling the lines as many times as necessary, changing only the file name.&lt;br /&gt;
&lt;br /&gt;
You can also search for the most recent occurrence of a specific command by entering the command line, or the beginning of it, and pressing Shift+up arrow (or Ctrl+R). For example, if you enter DIR and press Shift+up arrow, you are returned to the last command entered to perform a DIR of any directory. Pressing Shift+down arrow goes to the bottom of the command history buffer, leaving the cursor on a blank line.&lt;br /&gt;
&lt;br /&gt;
== Copying and Pasting ==&lt;br /&gt;
&lt;br /&gt;
You can copy and paste information from one console window, such as a Shell or ED window, to the same or another window. This done by selecting commands in the Edit menu, just like in most Amiga tools. Figure 2-4 illustrates copying and pasting from the Shell window to a Notepad window.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-4a.png|center|frame|Copy]]&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-4b.png|center|frame|Paste]]&lt;br /&gt;
&lt;br /&gt;
Use the mouse to highlight the area of text to be copied and pasted. Highlight the text to be copied by moving the pointer to the beginning of the text area, holding down the selection button, and dragging the mouse pointer to the end of the desired text. Release the selection button and press Right Amiga+C or select Copy from the Edit menu. The highlighted area is copied into the Clipboard and the area is unhighlighted. The text you copied can be repeatedly pasted into any application window that supports reading text from the Clipboard, such as the Shell, Notepad, and MultiEdit.&lt;br /&gt;
&lt;br /&gt;
To position the cursor where you want to paste the text, move the mouse pointer to that location and click. Press right Amiga+V to paste the text.&lt;br /&gt;
&lt;br /&gt;
{{Note|If a block of text is pasted into a Shell window, the Shell attempts to execute each line of the text as a command. This can have unpredictable results if the block of text has embedded returns and is not an AmigaDOS script.}}&lt;br /&gt;
&lt;br /&gt;
== Working with the Shell ==&lt;br /&gt;
&lt;br /&gt;
The following are tips for speeding your work with the Shell.&lt;br /&gt;
&lt;br /&gt;
; Use command history and command line editing&lt;br /&gt;
: It sometimes takes several attempts using the same command before getting it right, especially when you are first learning how to use AmigaDOS. Use the arrow keys to recall a previous command and change only the part of the line that causes the problem to eliminate the need to retype the entire line.&lt;br /&gt;
&lt;br /&gt;
; Use aliases&lt;br /&gt;
: Defining short aliases for commands you use often is another time-saver. It also eliminates the need to remember a long and/or complex series of options. For complete instructions, see the ALIAS command in Chapter 6.&lt;br /&gt;
&lt;br /&gt;
; Omit unnecessary keywords&lt;br /&gt;
: For clarity, AmigaDOS command names and keywords throughout this book are often shown although they are optional. When you learn a command&#039;s format, however, you seldom need to include optional keywords.&lt;br /&gt;
&lt;br /&gt;
; Do not use capital letters&lt;br /&gt;
: Command names, keywords, and assigned directories are shown in all upper case letters throughout this manual even though AmigaDOS is case-indifferent. This is done to distinguish the keywords from the file names and other information on the example command line. There is no need to use capitalization, except in commands that create a file or directory whose name you want to appear capitalized.&lt;br /&gt;
&lt;br /&gt;
; Use implied CD&lt;br /&gt;
: This allows you to leave out the CD command, saving three keystrokes. Enter the only directory name, path, colon, or slashes at the prompt to change directories. For more information about changing directories, see the CD command in Chapter 6.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_AmigaDOS_Understanding_the_Shell&amp;diff=8511</id>
		<title>AmigaOS Manual: AmigaDOS Understanding the Shell</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_AmigaDOS_Understanding_the_Shell&amp;diff=8511"/>
		<updated>2015-11-30T21:24:14Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An AmigaDOS Shell is a special window on the Workbench screen that accepts text input, allowing you to communicate with AmigaDOS. The Shell is a type of Command Line Interface or CLI. This chapter describes the following:&lt;br /&gt;
&lt;br /&gt;
= About the Shell =&lt;br /&gt;
&lt;br /&gt;
You can communicate directly with AmigaDOS through a Shell console window, a text-only interface that accepts input entered from the keyboard. The Shell window looks and acts like a Workbench window with some exceptions:&lt;br /&gt;
&lt;br /&gt;
* Icons dragged into the Shell window do not initiate a file move or copy operation; rather any icon dragged into the Shell window will cause the Shell to auto-type the icon&#039;s name and full path into the command prompt&lt;br /&gt;
* The mouse has somewhat limited use; it can be used for copy and paste operations, except within the ED and MEmacs text editors, or for selecting autocompleted commands from a pop-up menu if enabled in the Shell preferences&lt;br /&gt;
* Scroll gadgets work as you would expect, except that the length of Shell history captured may be limited by user preference&lt;br /&gt;
* The AmigaDOS Shell window uses a non-proportional font by default, normally the System Default Text font, e.g. DejaVu Sans Mono, specified by the Font Preferences editor.&lt;br /&gt;
* Any Workbench background patterns set in WBPattern do not appear in Shell windows&lt;br /&gt;
&lt;br /&gt;
Like Workbench, several independent Shell windows can be open at the same time. While commands entered in one Shell are being executed, you can enter and execute different commands in another Shell window. You can also combine Shell windows into a single window, with each Shell session accessible via tabs. Figure 2-1 illustrates a Shell window opened on the Workbench screen:&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-1.png|center|frame|Shell Window with Tabs]]&lt;br /&gt;
&lt;br /&gt;
= Opening Shell Windows =&lt;br /&gt;
&lt;br /&gt;
Shell windows can be opened in one of several ways:&lt;br /&gt;
&lt;br /&gt;
* Click on the Shell icon in the Workbench System drawer&lt;br /&gt;
* Click on the Shell icon in your AmiDock (if enabled)&lt;br /&gt;
* Use the NEWSHELL command described in Chapter 6&lt;br /&gt;
* Select &#039;New shell&#039; from any already open Shell session&lt;br /&gt;
* Select &#039;Shell Here&#039; from the &#039;New&#039; submenu in any Workbench contextual pop-up menu&lt;br /&gt;
&lt;br /&gt;
When a Shell window is opened:&lt;br /&gt;
&lt;br /&gt;
* The window is highlighted, indicating that it is the current window&lt;br /&gt;
* A prompt appears, such as 1.SYS: &amp;gt;&lt;br /&gt;
* To the right of the prompt is a cursor, the default being a small highlighted rectangle&lt;br /&gt;
&lt;br /&gt;
Like Workbench, only the currently selected Shell can receive input. To enter information in a different Shell, click in its window (or select its tab) to make it the current Shell session.&lt;br /&gt;
&lt;br /&gt;
= Closing Shell windows =&lt;br /&gt;
&lt;br /&gt;
Use one of the following four ways to close a Shell window:&lt;br /&gt;
&lt;br /&gt;
* Select the close gadget&lt;br /&gt;
* Select &#039;Close&#039; from the Project menu&lt;br /&gt;
* Enter the ENDCLI command&lt;br /&gt;
* Press Ctrl+\&lt;br /&gt;
&lt;br /&gt;
We recommend closing Shell windows when you are finished with them. Any open window uses memory.&lt;br /&gt;
&lt;br /&gt;
All non-detached programs that run from a Shell must be finished before you can close the window. You can tell that a program is still active if pressing Return does not produce a Shell prompt in the window. Although you can still enter commands into such a window, AmigaDOS does not respond to the commands until the running program is exited.&lt;br /&gt;
&lt;br /&gt;
= Using the Shell =&lt;br /&gt;
&lt;br /&gt;
Enter AmigaDOS commands at the Shell&#039;s text prompt. Include with the command any necessary information, such as file names or command options. Press Return at the end of each command line to execute the command. The Shell prompt reappears when the command is finished executing.&lt;br /&gt;
&lt;br /&gt;
To see command output that has scrolled out of the Shell window, use the scroller gadgets to scroll up or down; you can also enlarge the window by selecting the Shell zoom gadget or using the sizing gadget. The Shell window will keep a full scrollback history of as many lines as you specify using the Console prefs tool. Figure 2-2 illustrates a Shell window before and after using the zoom gadget to display the entire output of a LIST command.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-2a.png|center|frame|Current Output]]&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-2b.png|center|frame|Revealing Previous Output with the Scroller Gadget]]&lt;br /&gt;
&lt;br /&gt;
== Command Line Editing and Control ==&lt;br /&gt;
&lt;br /&gt;
To simplify entering and editing command line text, the AmigaDOS Shell provides the following editing key and key combination options:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| left arrow || Moves cursor one character to the left.&lt;br /&gt;
|-&lt;br /&gt;
| right arrow || Moves cursor one character to the right.&lt;br /&gt;
|-&lt;br /&gt;
| Shift+left arrow || Moves cursor to the beginning of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Shift+right arrow || Moves cursor to the end of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Backspace || Deletes the character to the left of the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Del || Deletes the character highlighted by the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+H || Deletes the last character (same as Backspace).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+M || Processes the command line (same as Return).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+J || Adds a line feed.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+W || Deletes the word to the left of the cursor.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+X || Deletes the current line.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+K || Deletes everything from the cursor forward to the end of the line.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Y || Replaces the characters deleted with Ctrl+K.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+U || Deletes everything from the cursor backward to the start of the line.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In addition, the Shell supports the following keys and key combinations:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Space bar (or any printable character) || Suspends output (stops scrolling).&lt;br /&gt;
|-&lt;br /&gt;
| Backspace || Resumes output (continues scrolling).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+C || Sends a BREAK command to the current process (halts the process).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+D || Sends at BREAK command to the current script (halts the script).&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+F || Activates and brings Workbench program windows to the front.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+S || Suspends output.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+Q || Resumes output if it was suspended with Ctrl+S.&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl+\ || Closes the Shell window. When console |/O is redirected to another device with * restores normal |/O.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Shell allows you to enter a command or other information while listing output. However, this stops the output until you press the Return key. The new command executes after the output is finished listing.&lt;br /&gt;
&lt;br /&gt;
If you enter a new command or text and then choose to delete it, the original output resumes scrolling as soon as the last character is erased.&lt;br /&gt;
&lt;br /&gt;
== Using the Command History ==&lt;br /&gt;
&lt;br /&gt;
The Shell uses a 2 KB command line buffer to retain command lines, which provides a command history. Using this history you can recall previously entered command lines, edit them, and re-execute them. This lets you easily repeat a command or enter several similar commands. Figure 2-3 illustrates a series of commands stored in the command history buffer.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-3.png|center|frame|Command History Buffer]]&lt;br /&gt;
&lt;br /&gt;
The exact number of lines retained in the command line buffer varies depending on the length of the lines actually stored. When the buffer is full, the oldest lines are removed. You can access lines in the buffer with the up and down arrow keys:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| up arrow || Moves backward in the history buffer (earlier lines).&lt;br /&gt;
|-&lt;br /&gt;
| down arrow || Moves forward in the history buffer (later lines).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, you can copy several .info files from one directory to another by enteringthe full command line with the complete path only once and then recalling the lines as many times as necessary, changing only the file name.&lt;br /&gt;
&lt;br /&gt;
You can also search for the most recent occurrence of a specific command by entering the command line, or the beginning of it, and pressing Shift+up arrow (or Ctrl+R). For example, if you enter DIR and press Shift+up arrow, you are returned to the last command entered to perform a DIR of any directory. Pressing Shift+down arrow goes to the bottom of the command history buffer, leaving the cursor on a blank line.&lt;br /&gt;
&lt;br /&gt;
== Copying and Pasting ==&lt;br /&gt;
&lt;br /&gt;
You can copy and paste information from one console window, such as a Shell or ED window, to the same or another window. This done by selecting commands in the Edit menu, just like in most Amiga tools. Figure 2-4 illustrates copying and pasting from the Shell window to a Notepad window.&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-4a.png|center|frame|Copy]]&lt;br /&gt;
&lt;br /&gt;
[[File:DosFig2-4b.png|center|frame|Paste]]&lt;br /&gt;
&lt;br /&gt;
Use the mouse to highlight the area of text to be copied and pasted. Highlight the text to be copied by moving the pointer to the beginning of the text area, holding down the selection button, and dragging the mouse pointer to the end of the desired text. Release the selection button and press Right Amiga+C or select Copy from the Edit menu. The highlighted area is copied into the Clipboard and the area is unhighlighted. The text you copied can be repeatedly pasted into any application window that supports reading text from the Clipboard, such as the Shell, Notepad, and MultiEdit.&lt;br /&gt;
&lt;br /&gt;
To position the cursor where you want to paste the text, move the mouse pointer to that location and click. Press right Amiga+V to paste the text.&lt;br /&gt;
&lt;br /&gt;
{{Note|If a block of text is pasted into a Shell window, the Shell attempts to execute each line of the text as a command. This can have unpredictable results if the block of text has embedded returns and is not an AmigaDOS script.}}&lt;br /&gt;
&lt;br /&gt;
== Working with the Shell ==&lt;br /&gt;
&lt;br /&gt;
The following are tips for speeding your work with the Shell.&lt;br /&gt;
&lt;br /&gt;
; Use command history and command line editing&lt;br /&gt;
: It sometimes takes several attempts using the same command before getting it right, especially when you are first learning how to use AmigaDOS. Use the arrow keys to recall a previous command and change only the part of the line that causes the problem to eliminate the need to retype the entire line.&lt;br /&gt;
&lt;br /&gt;
; Use aliases&lt;br /&gt;
: Defining short aliases for commands you use often is another time-saver. It also eliminates the need to remember a long and/or complex series of options. For complete instructions, see the ALIAS command in Chapter 6.&lt;br /&gt;
&lt;br /&gt;
; Omit unnecessary keywords&lt;br /&gt;
: For clarity, AmigaDOS command names and keywords throughout this book are often shown although they are optional. When you learn a command&#039;s format, however, you seldom need to include optional keywords.&lt;br /&gt;
&lt;br /&gt;
; Do not use capital letters&lt;br /&gt;
: Command names, keywords, and assigned directories are shown in all upper case letters throughout this manual even though AmigaDOS is case-indifferent. This is done to distinguish the keywords from the file names and other information on the example command line. There is no need to use capitalization, except in commands that create a file or directory whose name you want to appear capitalized.&lt;br /&gt;
&lt;br /&gt;
; Use implied CD&lt;br /&gt;
: This allows you to leave out the CD command, saving three keystrokes. Enter the only directory name, path, colon, or slashes at the prompt to change directories. For more information about changing directories, see the CD command in Chapter 6.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=File:DosFig2-2b.png&amp;diff=8510</id>
		<title>File:DosFig2-2b.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=File:DosFig2-2b.png&amp;diff=8510"/>
		<updated>2015-11-30T21:23:26Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: Eldee Stephens uploaded a new version of File:DosFig2-2b.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=File:DosFig2-2a.png&amp;diff=8509</id>
		<title>File:DosFig2-2a.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=File:DosFig2-2a.png&amp;diff=8509"/>
		<updated>2015-11-30T21:23:04Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: Eldee Stephens uploaded a new version of File:DosFig2-2a.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=File:DosFig2-1.png&amp;diff=8508</id>
		<title>File:DosFig2-1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=File:DosFig2-1.png&amp;diff=8508"/>
		<updated>2015-11-30T21:22:25Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: Eldee Stephens uploaded a new version of File:DosFig2-1.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8104</id>
		<title>Deprecated Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8104"/>
		<updated>2015-09-25T20:42:19Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, the following is a handy guide to items that have been deprecated or made obsolete with this most recent release. If your code uses any of these items, please refer to the [[Autodocs:Main|Autodocs]] for the component noted to review. Some functions may need to be replaced and others may have changed behavior. It&#039;s always a good idea to review the [[SDK Release Notes|Release Notes]] with each SDK release, of course, too. &lt;br /&gt;
&lt;br /&gt;
This article is inclusive of code made obsolete or deprecated since V50 of the components listed below. Please feel free to edit the document based on your findings should the author have overlooked anything.&lt;br /&gt;
&lt;br /&gt;
== Components to Review ==&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/asl.doc.txt ASL Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocFileRequest&lt;br /&gt;
| AllocAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| FreeFileRequest &lt;br /&gt;
| FreeAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| RequestFile&lt;br /&gt;
| AslRequest&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
The following components in the ASL_FileRequest object are obsolete: &#039;&#039;ASLFR_HookFunc, ASLFO_HookFunc,&#039;&#039; and &#039;&#039;ASLFR_FilterFunc.&#039;&#039; For the latter, use ASLFR_FilterHook as a possible replacement.&lt;br /&gt;
&lt;br /&gt;
=== BOOPSI Classes/Gadgets ===&lt;br /&gt;
&lt;br /&gt;
Generally all BOOPSI gadget classes and superclasses had a #?_GetClass() function to return a pointer to the class itself. These functions are deprecated as of V52. Developers should use the gadget public class ID as a replacement. Some gadgets are listed separately in this article as they have other items now deprecated or obsolete; if a gadget is not listed herein, the above note regarding pointers should be the only item considered deprecated for it.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/bsdsocket.doc.txt BSD Sockets Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| Errno&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNO tag)&lt;br /&gt;
|-&lt;br /&gt;
| getdtablesize&lt;br /&gt;
| SocketBaseTags (with SBTC_DTABLESIZE tag)&lt;br /&gt;
|-&lt;br /&gt;
| gethostid&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| SetErrnoPtr&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNOPTR tag)&lt;br /&gt;
|-&lt;br /&gt;
| SetSocketSignals&lt;br /&gt;
| SocketBaseTags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* The following IoctlSocket() calls are considered deprecated: SIOCSIFADDR, SIOCSIFDSTADDR, SIOCSIFBRDADDR, SIOCGIFADDR, SIOCGIFDSTADDR, SIOCGIFBRDADDR, SIOCSIFFLAGS, SIOCGIFFLAGS, SIOCSIFMETRIC, and SIOCGIFMETRIC. &lt;br /&gt;
* Several functions used in conjunction with SocketBaseTagList() are now deprecated as well: SBTC_FDCALLBACK, SBTC_IOERRNOSTRPTR, SBTC_S2ERRNOSTRPTR, SBTC_S2WERRNOSTRPTR, SBTC_SIGIOMASK, and SBTC_SIGURGMASK.h&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt Chooser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The CHOOSER_GetClass function is no longer available. Use the &amp;quot;chooser.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The chooser.gadget attribute CHOOSER_AutoFit is now unsupported&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt Console Device] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| AskKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_ASKKEYMAP_POINTERS&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| SetKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_SETKEYMAP_POINTERS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt DOS Library] ===&lt;br /&gt;
&lt;br /&gt;
The collective changes to the DOS subsystem are substantial and developers are urged to review the [http://wiki.amigaos.net/amiga/autodocs/dos.obsolete.doc.txt Obsolete DOS documentation] as a starting point. Additionally with the introduction of the new [[AmigaDOS Vector-Port|Vector-Port]] API, use of [[AmigaDOS Packets|DOS packets]] is (for the most part) no longer needed. Please carefully read through the documentation when starting a new project with the release of V54.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| CurrentDir&lt;br /&gt;
| SetCurrentDir&lt;br /&gt;
|-&lt;br /&gt;
| Examine&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| ExamineFH&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| FreeDosEntry&lt;br /&gt;
| FreeDosObject&lt;br /&gt;
|-&lt;br /&gt;
| GetConsoleTask&lt;br /&gt;
| GetConsolePort&lt;br /&gt;
|-&lt;br /&gt;
| GetFileSysTask&lt;br /&gt;
| GetFileSysPort&lt;br /&gt;
|-&lt;br /&gt;
| MakeDosEntry&lt;br /&gt;
| AllocDosObject&lt;br /&gt;
|- &lt;br /&gt;
| ReadItem&lt;br /&gt;
| ReadLineItem&lt;br /&gt;
|-&lt;br /&gt;
| SetConsoleTask&lt;br /&gt;
| SetConsolePort&lt;br /&gt;
|-&lt;br /&gt;
| SetFileSysTask&lt;br /&gt;
| SetFileSysPort&lt;br /&gt;
|-&lt;br /&gt;
| SetVBuf&lt;br /&gt;
| SetFileHandleAttr&lt;br /&gt;
|-&lt;br /&gt;
| SetOwner&lt;br /&gt;
| SetOwnerInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* Several functions had name changes in V53. Please review &#039;&#039;dos/obsolete.h&#039;&#039; in the SDK includes if you haven&#039;t already updated prior to the release of V54.&lt;br /&gt;
* Before V53, CreateDir() returned an exclusive lock on the new directory if it succeeded, it is now required that this be a a shared lock.  Exclusive directory locks have been deprecated. Only files may actually have exclusive locks.&lt;br /&gt;
* The id_NumSoftErrors and id_UnitNumber fields of the GDI_InfoData structure returned from GetDiskInfo() and Info() are considered deprecated.&lt;br /&gt;
* The following error codes returned from IoErr() are considered obsolete: ERROR_TASK_TABLE_FULL, ERROR_NO_DEFAULT_DIR, ERROR_OBJECT_LINKED, and ERROR_UNLOCK_ERROR.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt Exec Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocEntry&lt;br /&gt;
| AllocTaskMemEntry&lt;br /&gt;
|-&lt;br /&gt;
| AllocMem&lt;br /&gt;
| AllocVecTagList or AllocVecTags&lt;br /&gt;
|-&lt;br /&gt;
| AllocVec&lt;br /&gt;
| AllocVecTagList or AllocVecTags&lt;br /&gt;
|-&lt;br /&gt;
| CachePreDMA&lt;br /&gt;
| StartDMA&lt;br /&gt;
|-&lt;br /&gt;
| CachePostDMA&lt;br /&gt;
| EndDMA&lt;br /&gt;
|-&lt;br /&gt;
| CreatePool&lt;br /&gt;
| AllocSysObject&lt;br /&gt;
|-&lt;br /&gt;
| MakeLibrary&lt;br /&gt;
| CreateLibrary&lt;br /&gt;
|-&lt;br /&gt;
| AllocTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| FreeTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| GetCC&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| SetSR&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Memory Flags ====&lt;br /&gt;
&lt;br /&gt;
Allocating memory with modern Exec is slightly different than before. In addition to using AllocVecTagList or AllocVecTags rather than AllocMem, several flags are no longer relevant. Please review the article on [[Obsolete_Exec_Memory_Allocation|Obsolete Memory Allocation Techniques]] to note what to avoid. Developers should follow the documentation in the [[Exec Memory Allocation|Memory Allocation]] section instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/libamiga_a.doc.txt libamiga.a] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| BeginIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| BeginIO&lt;br /&gt;
|-&lt;br /&gt;
| CreateExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreatePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreatePort&lt;br /&gt;
|-&lt;br /&gt;
| CreateStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreateTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateTask&lt;br /&gt;
|-&lt;br /&gt;
| DeleteExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeletePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeletePort&lt;br /&gt;
|-&lt;br /&gt;
| DeleteStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeleteTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteTask&lt;br /&gt;
|-&lt;br /&gt;
| NewList&lt;br /&gt;
| exec.library&lt;br /&gt;
| NewList&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt Listbrowser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The LISTBROWSER_GetClass function is no longer available. Use the &amp;quot;listbrowser.gadget&amp;quot; public class ID instead&lt;br /&gt;
* The listbrowser.gadget attribute LISTBROWSER_FastRender is obsolete; there is no replacement.&lt;br /&gt;
* The SetLBColumnInfoAttrsA function no longer accepts flags via LBCIA_Flags. One should use the equivalent tags instead.&lt;br /&gt;
&lt;br /&gt;
=== Math IEEE libraries (68K) ===&lt;br /&gt;
&lt;br /&gt;
As of V45 of mathieeedoubbas.library, mathieeedoubtrans.library, mathieeesingbas.library, and mathieeesingtrans.library, the mathieee.resources are no longer  supported. It was felt that this solution was never very popular, neither very fast compared to a co-processor interface, and highly obsolete. This is doubly so in the PowerPC era of next-generation AmigaOne computers. They are included in the operating system merely for compatibility purposes and should not be used for new applications.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96 API Library] ===&lt;br /&gt;
&lt;br /&gt;
Starting with graphics.library V54, the vast majority of Picasso96 is now redundant. The graphics.library has been expanded and extended to seamlessly handle the traditional native (ECS, AGA) chip sets as well as modern graphics cards (RTG). Please carefully review the autodoc and consider migrating to the newer graphics.library-based API.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| p96AllocBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| AllocBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96FreeBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| FreeBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMapToBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapToBoardTags&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelArray&lt;br /&gt;
|-&lt;br /&gt;
| p96RectFill&lt;br /&gt;
| graphics.library&lt;br /&gt;
| RectFillColor&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMapFromBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMapFromBoard&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelArray&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/space_gc.doc.txt Space Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The SPACE_GetClass function is no longer available. Use the &amp;quot;space.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The space.gadget SPACE_AreaBox tag is deprecated because it is unsafe to use in a multi-tasking environment. Use SPACE_RenderBox instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/texteditor_gc.doc.txt Texteditor Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The TEXTEDITOR_GetClass function is no longer available. Use the &amp;quot;texteditor.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The texteditor.gadget attributes GA_TEXTEDITOR_Prop_DeltaFactor and GA_TEXTEDITOR_HProp_DeltaFactor are now obsolete.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/warp3d.doc.txt Warp3D Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| W3D_GetDestFmt&lt;br /&gt;
| W3D_Query&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt Window Class] ===&lt;br /&gt;
&lt;br /&gt;
* The WINDOW_HintInfo attribute for gadget HelpHints is now considered obsolete and only included for compatibility purposes. Developers should supply all of the hints via the GA_HintInfo attribute of each gadget, and set the WINDOW_GadgetHelp attribute for future projects.&lt;br /&gt;
* The WINDOW_Layout tag has 2 aliased definitions which are now obsolete but still supported in the include files.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8097</id>
		<title>Deprecated Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8097"/>
		<updated>2015-09-25T17:41:26Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, the following is a handy guide to items that have been deprecated or made obsolete with this most recent release. If your code uses any of these items, please refer to the [[Autodocs:Main|Autodocs]] for the component noted to review. Some functions may need to be replaced and others may have changed behavior. It&#039;s always a good idea to review the [[SDK Release Notes|Release Notes]] with each SDK release, of course, too. &lt;br /&gt;
&lt;br /&gt;
This article is inclusive of code made obsolete or deprecated since V50 of the components listed below. Please feel free to edit the document based on your findings should the author have overlooked anything.&lt;br /&gt;
&lt;br /&gt;
== Components to Review ==&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/asl.doc.txt ASL Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocFileRequest&lt;br /&gt;
| AllocAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| FreeFileRequest &lt;br /&gt;
| FreeAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| RequestFile&lt;br /&gt;
| AslRequest&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
The following components in the ASL_FileRequest object are obsolete: &#039;&#039;ASLFR_HookFunc, ASLFO_HookFunc,&#039;&#039; and &#039;&#039;ASLFR_FilterFunc.&#039;&#039; For the latter, use ASLFR_FilterHook as a possible replacement.&lt;br /&gt;
&lt;br /&gt;
=== BOOPSI Classes/Gadgets ===&lt;br /&gt;
&lt;br /&gt;
Generally all BOOPSI gadget classes and superclasses had a #?_GetClass() function to return a pointer to the class itself. These functions are deprecated as of V52. Developers should use the gadget public class ID as a replacement. Some gadgets are listed separately in this article as they have other items now deprecated or obsolete; if a gadget is not listed herein, the above note regarding pointers should be the only item considered deprecated for it.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/bsdsocket.doc.txt BSD Sockets Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| Errno&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNO tag)&lt;br /&gt;
|-&lt;br /&gt;
| getdtablesize&lt;br /&gt;
| SocketBaseTags (with SBTC_DTABLESIZE tag)&lt;br /&gt;
|-&lt;br /&gt;
| gethostid&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| SetErrnoPtr&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNOPTR tag)&lt;br /&gt;
|-&lt;br /&gt;
| SetSocketSignals&lt;br /&gt;
| SocketBaseTags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* The following IoctlSocket() calls are considered deprecated: SIOCSIFADDR, SIOCSIFDSTADDR, SIOCSIFBRDADDR, SIOCGIFADDR, SIOCGIFDSTADDR, SIOCGIFBRDADDR, SIOCSIFFLAGS, SIOCGIFFLAGS, SIOCSIFMETRIC, and SIOCGIFMETRIC. &lt;br /&gt;
* Several functions used in conjunction with SocketBaseTagList() are now deprecated as well: SBTC_FDCALLBACK, SBTC_IOERRNOSTRPTR, SBTC_S2ERRNOSTRPTR, SBTC_S2WERRNOSTRPTR, SBTC_SIGIOMASK, and SBTC_SIGURGMASK.h&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt Chooser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The CHOOSER_GetClass function is no longer available. Use the &amp;quot;chooser.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The chooser.gadget attribute CHOOSER_AutoFit is now unsupported&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt Console Device] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| AskKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_ASKKEYMAP_POINTERS&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| SetKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_SETKEYMAP_POINTERS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt DOS Library] ===&lt;br /&gt;
&lt;br /&gt;
The collective changes to the DOS subsystem are substantial and developers are urged to review the [http://wiki.amigaos.net/amiga/autodocs/dos.obsolete.doc.txt Obsolete DOS documentation] as a starting point. Additionally with the introduction of the new [[AmigaDOS Vector-Port|Vector-Port]] API, use of [[AmigaDOS Packets|DOS packets]] is (for the most part) no longer needed. Please carefully read through the documentation when starting a new project with the release of V54.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| CurrentDir&lt;br /&gt;
| SetCurrentDir&lt;br /&gt;
|-&lt;br /&gt;
| Examine&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| ExamineFH&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| FreeDosEntry&lt;br /&gt;
| FreeDosObject&lt;br /&gt;
|-&lt;br /&gt;
| GetConsoleTask&lt;br /&gt;
| GetConsolePort&lt;br /&gt;
|-&lt;br /&gt;
| GetFileSysTask&lt;br /&gt;
| GetFileSysPort&lt;br /&gt;
|-&lt;br /&gt;
| MakeDosEntry&lt;br /&gt;
| AllocDosObject&lt;br /&gt;
|- &lt;br /&gt;
| ReadItem&lt;br /&gt;
| ReadLineItem&lt;br /&gt;
|-&lt;br /&gt;
| SetConsoleTask&lt;br /&gt;
| SetConsolePort&lt;br /&gt;
|-&lt;br /&gt;
| SetFileSysTask&lt;br /&gt;
| SetFileSysPort&lt;br /&gt;
|-&lt;br /&gt;
| SetVBuf&lt;br /&gt;
| SetFileHandleAttr&lt;br /&gt;
|-&lt;br /&gt;
| SetOwner&lt;br /&gt;
| SetOwnerInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* Several functions had name changes in V53. Please review &#039;&#039;dos/obsolete.h&#039;&#039; in the SDK includes if you haven&#039;t already updated prior to the release of V54.&lt;br /&gt;
* Before V53, CreateDir() returned an exclusive lock on the new directory if it succeeded, it is now required that this be a a shared lock.  Exclusive directory locks have been deprecated. Only files may actually have exclusive locks.&lt;br /&gt;
* The id_NumSoftErrors and id_UnitNumber fields of the GDI_InfoData structure returned from GetDiskInfo() and Info() are considered deprecated.&lt;br /&gt;
* The following error codes returned from IoErr() are considered obsolete: ERROR_TASK_TABLE_FULL, ERROR_NO_DEFAULT_DIR, ERROR_OBJECT_LINKED, and ERROR_UNLOCK_ERROR.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt Exec Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocEntry&lt;br /&gt;
| AllocTaskMemEntry&lt;br /&gt;
|-&lt;br /&gt;
| AllocMem&lt;br /&gt;
| AllocVecTagList&lt;br /&gt;
|-&lt;br /&gt;
| AllocVec&lt;br /&gt;
| AllocVecTagList&lt;br /&gt;
|-&lt;br /&gt;
| CachePreDMA&lt;br /&gt;
| StartDMA&lt;br /&gt;
|-&lt;br /&gt;
| CachePostDMA&lt;br /&gt;
| EndDMA&lt;br /&gt;
|-&lt;br /&gt;
| CreatePool&lt;br /&gt;
| AllocSysObject&lt;br /&gt;
|-&lt;br /&gt;
| MakeLibrary&lt;br /&gt;
| CreateLibrary&lt;br /&gt;
|-&lt;br /&gt;
| AllocTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| FreeTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| GetCC&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| SetSR&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Memory Flags ====&lt;br /&gt;
&lt;br /&gt;
Allocating memory with modern Exec is slightly different than before. In addition to using AllocVecTagList or AllocVecTags rather than AllocMem, several flags are no longer relevant. Please review the article on [[Obsolete_Exec_Memory_Allocation|Obsolete Memory Allocation Techniques]] to note what to avoid. Developers should follow the documentation in the [[Exec Memory Allocation|Memory Allocation]] section instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/libamiga_a.doc.txt libamiga.a] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| BeginIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| BeginIO&lt;br /&gt;
|-&lt;br /&gt;
| CreateExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreatePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreatePort&lt;br /&gt;
|-&lt;br /&gt;
| CreateStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreateTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateTask&lt;br /&gt;
|-&lt;br /&gt;
| DeleteExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeletePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeletePort&lt;br /&gt;
|-&lt;br /&gt;
| DeleteStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeleteTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteTask&lt;br /&gt;
|-&lt;br /&gt;
| NewList&lt;br /&gt;
| exec.library&lt;br /&gt;
| NewList&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt Listbrowser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The LISTBROWSER_GetClass function is no longer available. Use the &amp;quot;listbrowser.gadget&amp;quot; public class ID instead&lt;br /&gt;
* The listbrowser.gadget attribute LISTBROWSER_FastRender is obsolete; there is no replacement.&lt;br /&gt;
* The SetLBColumnInfoAttrsA function no longer accepts flags via LBCIA_Flags. One should use the equivalent tags instead.&lt;br /&gt;
&lt;br /&gt;
=== Math IEEE libraries (68K) ===&lt;br /&gt;
&lt;br /&gt;
As of V45 of mathieeedoubbas.library, mathieeedoubtrans.library, mathieeesingbas.library, and mathieeesingtrans.library, the mathieee.resources are no longer  supported. It was felt that this solution was never very popular, neither very fast compared to a co-processor interface, and highly obsolete. This is doubly so in the PowerPC era of next-generation AmigaOne computers. They are included in the operating system merely for compatibility purposes and should not be used for new applications.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96 API Library] ===&lt;br /&gt;
&lt;br /&gt;
Starting with graphics.library V54, the vast majority of Picasso96 is now redundant. The graphics.library has been expanded and extended to seamlessly handle the traditional native (ECS, AGA) chip sets as well as modern graphics cards (RTG). Please carefully review the autodoc and consider migrating to the newer graphics.library-based API.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| p96AllocBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| AllocBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96FreeBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| FreeBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMapToBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapToBoardTags&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelArray&lt;br /&gt;
|-&lt;br /&gt;
| p96RectFill&lt;br /&gt;
| graphics.library&lt;br /&gt;
| RectFillColor&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMapFromBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMapFromBoard&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelArray&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/space_gc.doc.txt Space Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The SPACE_GetClass function is no longer available. Use the &amp;quot;space.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The space.gadget SPACE_AreaBox tag is deprecated because it is unsafe to use in a multi-tasking environment. Use SPACE_RenderBox instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/texteditor_gc.doc.txt Texteditor Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The TEXTEDITOR_GetClass function is no longer available. Use the &amp;quot;texteditor.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The texteditor.gadget attributes GA_TEXTEDITOR_Prop_DeltaFactor and GA_TEXTEDITOR_HProp_DeltaFactor are now obsolete.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/warp3d.doc.txt Warp3D Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| W3D_GetDestFmt&lt;br /&gt;
| W3D_Query&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt Window Class] ===&lt;br /&gt;
&lt;br /&gt;
* The WINDOW_HintInfo attribute for gadget HelpHints is now considered obsolete and only included for compatibility purposes. Developers should supply all of the hints via the GA_HintInfo attribute of each gadget, and set the WINDOW_GadgetHelp attribute for future projects.&lt;br /&gt;
* The WINDOW_Layout tag has 2 aliased definitions which are now obsolete but still supported in the include files.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8096</id>
		<title>SDK Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8096"/>
		<updated>2015-09-25T17:39:25Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Version 53.29 (AmigaOS 4.1 Final Edition) =&lt;br /&gt;
&lt;br /&gt;
== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, we have included a handy guide to items that have been deprecated or made obsolete with this most recent release: please see the article on [[Deprecated Functions]].&lt;br /&gt;
&lt;br /&gt;
== AutoDoc Changes ==&lt;br /&gt;
&lt;br /&gt;
In addition to the above section on deprecated items, the following summary lists &#039;&#039;any&#039;&#039; section of the AmigaOS API as described in the [[Autodocs:Main|Autodocs]] that have changed since the last public release, including new additions. This should aid developers in helping narrow their reading a little as they review what has changed with AmigaOS 4.1 Final Edition.&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/btree.doc.txt btree.doc] (btree.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diffview_gc.doc.txt diffview_gc.doc] (diffview.gadget)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskio.doc.txt diskio.doc] (diskio.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/filesysbox.doc.txt filesysbox.doc] (filesysbox.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/menu_cl.doc.txt menu_cl.doc] (menuclass)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/z.doc.txt z.doc] (z.library)&lt;br /&gt;
&lt;br /&gt;
=== Changed Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/amigaguide.doc.txt amigaguide.doc] (amigaguide.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddAmigaGuideA()&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/arexx_cl.doc.txt arexx_cl.doc] (arexx.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt chooser_gc.doc] (chooser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/clicktab_gc.doc.txt clicktab_gc.doc] (clicktab.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
*: AllocClickTabNodeA&lt;br /&gt;
*: FreeClickTabNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt console.doc] (console.device)&lt;br /&gt;
*; Added&lt;br /&gt;
*: CD_GETATTRS&lt;br /&gt;
*: CD_SETATTRS&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CD_ASKKEYMAP_POINTERS&lt;br /&gt;
*: CDInputHandler&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_WRITE&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskfont.doc.txt diskfont.doc] (diskfont.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AvailFonts&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt dos.doc] (dos.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CurrentDir&lt;br /&gt;
*: GetConsoleTask&lt;br /&gt;
*: GetFileSysTask&lt;br /&gt;
*: SetConsoleTask&lt;br /&gt;
*: SetFileSysTask&lt;br /&gt;
*; Added&lt;br /&gt;
*: GetConsolePort&lt;br /&gt;
*: GetFileSysPort&lt;br /&gt;
*: SetConsolePort&lt;br /&gt;
*: SetCurrentDir&lt;br /&gt;
*: SetFileSysPort&lt;br /&gt;
*: WriteProtectVolumePort&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AAA-Compatibility-Notice&lt;br /&gt;
*: AddBuffers&lt;br /&gt;
*: AddCmdPathNode&lt;br /&gt;
*: AddDosEntry&lt;br /&gt;
*: AddSegListTrail&lt;br /&gt;
*: AddSegmentTaskList&lt;br /&gt;
*: AllocDosObject&lt;br /&gt;
*: AllocSegList&lt;br /&gt;
*: AssignAddToList&lt;br /&gt;
*: ChangeFilePosition&lt;br /&gt;
*: ChangeFileSize&lt;br /&gt;
*: CopyStringBSTRToC&lt;br /&gt;
*: CreateDir&lt;br /&gt;
*: CreateDirTree&lt;br /&gt;
*: CreateNewProc&lt;br /&gt;
*: DateStamp&lt;br /&gt;
*: Delete&lt;br /&gt;
*: DevNameFromFH&lt;br /&gt;
*: DevNameFromLock&lt;br /&gt;
*: DismountDevice&lt;br /&gt;
*: DoPkt&lt;br /&gt;
*: DosControls&lt;br /&gt;
*: EndNotify&lt;br /&gt;
*: ExamineDir&lt;br /&gt;
*: ExamineObject&lt;br /&gt;
*: FilePart&lt;br /&gt;
*: FindDosEntry&lt;br /&gt;
*: FreeDosObject&lt;br /&gt;
*: GetCurrentDir&lt;br /&gt;
*: GetDiskFileSystemData&lt;br /&gt;
*: GetDiskInfo&lt;br /&gt;
*: GetPID&lt;br /&gt;
*: GetSegListInfoTags&lt;br /&gt;
*: GetVar&lt;br /&gt;
*: HexToLong&lt;br /&gt;
*: Info&lt;br /&gt;
*: IoErr&lt;br /&gt;
*: IsFileSystem&lt;br /&gt;
*: LockTagList&lt;br /&gt;
*: MakeLink&lt;br /&gt;
*: MatchFirst&lt;br /&gt;
*: MountDevice&lt;br /&gt;
*: NameFromFH&lt;br /&gt;
*: NameFromLock&lt;br /&gt;
*: NameFromPort&lt;br /&gt;
*: NotifyVar&lt;br /&gt;
*: ObtainDirContext&lt;br /&gt;
*: Open&lt;br /&gt;
*: ParsePattern&lt;br /&gt;
*: PathPart&lt;br /&gt;
*: ReadLineItemTags&lt;br /&gt;
*: ReadSoftLink&lt;br /&gt;
*: RemAssignList&lt;br /&gt;
*: Rename&lt;br /&gt;
*: RenameDosEntry&lt;br /&gt;
*: ResolvePath&lt;br /&gt;
*: RunCommand&lt;br /&gt;
*: SetComment&lt;br /&gt;
*: SetDate&lt;br /&gt;
*: SetIoErr&lt;br /&gt;
*: SetMode&lt;br /&gt;
*: SetOwnerInfo&lt;br /&gt;
*: SetProgramDir&lt;br /&gt;
*: SetProtection&lt;br /&gt;
*: StartNotify&lt;br /&gt;
*: TrackAddressList&lt;br /&gt;
*: WaitForChar&lt;br /&gt;
*: WaitForData&lt;br /&gt;
*: Write&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt exec.doc] (exec.library)&lt;br /&gt;
*; Added &lt;br /&gt;
*: ASOT_EXTMEM&lt;br /&gt;
*: debug/IsIn68kEmulator&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocEntry&lt;br /&gt;
*: AllocTaskMemEntry&lt;br /&gt;
*: ASOT_PORT&lt;br /&gt;
*: CreateTask&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/expansion.doc.txt expansion.doc] (expansion.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MakeDosNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/gadget_gc.doc.txt gadget_gc.doc] (gadgetclass)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet-- &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/graphics.doc.txt graphics.doc] (graphics.library)&lt;br /&gt;
*; Added&lt;br /&gt;
*: AllocBitMapTagList&lt;br /&gt;
*: GetBoardBytesPerRow&lt;br /&gt;
*: GetBoardDataTagList&lt;br /&gt;
*: GetMonitorDataTagList&lt;br /&gt;
*: GraphicsControlTagList&lt;br /&gt;
*: LockBitMapTagList&lt;br /&gt;
*: LockBitMapToBoardTagList&lt;br /&gt;
*: ReadPixelArray&lt;br /&gt;
*: ReadPixelColor&lt;br /&gt;
*: RectFillColor&lt;br /&gt;
*: UnlockBitMap&lt;br /&gt;
*: UnlockBitMapFromBoard&lt;br /&gt;
*: WritePixelArray&lt;br /&gt;
*: WritePixelColor&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AllocBitMap&lt;br /&gt;
*: AllocRaster&lt;br /&gt;
*: BestModeIDA&lt;br /&gt;
*: BltBitMapTagList&lt;br /&gt;
*: CalcIVG&lt;br /&gt;
*: ChangeVPBitMap&lt;br /&gt;
*: ClearScreen&lt;br /&gt;
*: CompositeTagList&lt;br /&gt;
*: FindColor&lt;br /&gt;
*: Flood&lt;br /&gt;
*: FreeBitMap&lt;br /&gt;
*: GetBitMapAttr&lt;br /&gt;
*: GetDisplayInfoData&lt;br /&gt;
*: GetRPAttrsA&lt;br /&gt;
*: InitTmpRas&lt;br /&gt;
*: LoadRGB32&lt;br /&gt;
*: LoadRGB4&lt;br /&gt;
*: MakeVPort&lt;br /&gt;
*: ModeNotAvailable&lt;br /&gt;
*: ReadPixel&lt;br /&gt;
*: ReadPixelArray8&lt;br /&gt;
*: ReadPixelLine8&lt;br /&gt;
*: RectFill&lt;br /&gt;
*: SetRPAttrsA&lt;br /&gt;
*: VideoControl&lt;br /&gt;
*: WritePixelLine8&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/icon.doc.txt icon.doc] (icon.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddFreeList&lt;br /&gt;
*: FreeAlloc&lt;br /&gt;
*: FreeFree&lt;br /&gt;
*: FreeFreeList&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/input.doc.txt input.doc] (input.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: IND_ADDEVENT&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/intuition.doc.txt intuition.doc] (intuition.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --boopsi--&lt;br /&gt;
*: GetScreenAttr&lt;br /&gt;
*: GetWindowAttr&lt;br /&gt;
*: OpenScreen&lt;br /&gt;
*: OpenWindow&lt;br /&gt;
*: SetWindowAttr&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt listbrowser_gc.doc] (listbrowser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: SetLBColumnInfoAttrsA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/page_gc.doc.txt page_gc.doc] (page.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/partition_gc.doc.txt partition_gc.doc] (partition.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: all references to &#039;partitiongclass&#039; corrected to &#039;partition.gadget&#039;  &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96API.doc] (Picasso96API.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: --bitmaps--&lt;br /&gt;
*: --colors--&lt;br /&gt;
*: p96AllocBitMap*&lt;br /&gt;
*: p96FreeBitMap*&lt;br /&gt;
*: p96LockBitMap*&lt;br /&gt;
*: p96LockBitMapToBoard*&lt;br /&gt;
*: p96ReadPixel*&lt;br /&gt;
*: p96ReadPixelArray*&lt;br /&gt;
*: p96RectFill*&lt;br /&gt;
*: p96UnlockBitMap*&lt;br /&gt;
*: p96UnlockBitMapFromBoard*&lt;br /&gt;
*: p96WritePixel*&lt;br /&gt;
*: p96WritePixelArray*&lt;br /&gt;
*: &lt;br /&gt;
*:(* = deprecated)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/serial_dev.doc.txt serial_dev.doc] (serial.device)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CloseDevice&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
*; Added  &lt;br /&gt;
*: AAA_Notice&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_START&lt;br /&gt;
*: CMD_wRITE&lt;br /&gt;
*: SDCMD_BREAK&lt;br /&gt;
*: SDCMD_SETPARAMS&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/timer.doc.txt timer.doc] (timer.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MicroDelay&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/usbsys.doc.txt usbsys.doc] (usbsys.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: USBEPGetDescriptorA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/utility.doc.txt utility.doc] (utility.library)&lt;br /&gt;
*; Added  &lt;br /&gt;
*: ASPrintf&lt;br /&gt;
*: SNPrintf&lt;br /&gt;
*: UCS4Count&lt;br /&gt;
*: UCS4ToLower&lt;br /&gt;
*: UCS4ToUpper&lt;br /&gt;
*: UCS4toUTF8&lt;br /&gt;
*: UCS4Valid&lt;br /&gt;
*: UTF8Count&lt;br /&gt;
*: UTF8Decode&lt;br /&gt;
*: UTF8Encode&lt;br /&gt;
*: UTF8Stricmp&lt;br /&gt;
*: UTF8Strnicmp&lt;br /&gt;
*: UTF8toUCS4&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CallHookPkt&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt window_cl.doc] (window.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8095</id>
		<title>SDK Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8095"/>
		<updated>2015-09-25T17:38:55Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Version 53.29 (AmigaOS 4.1 Final Edition) =&lt;br /&gt;
&lt;br /&gt;
== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, we have included a handy guide to items that have been deprecated or made obsolete with this most recent release: please see the article on [[Deprecated Functions]].&lt;br /&gt;
&lt;br /&gt;
== AutoDoc Changes ==&lt;br /&gt;
&lt;br /&gt;
In addition to the above section on deprecated items, the following summary lists &#039;&#039;any&#039;&#039; section of the AmigaOS API as described in the [[Autodocs:Main|Autodocs]] that have changed since the last public release, including new additions with this release. This should aid developers in helping narrow their reading a little as they review what has changed with AmigaOS 4.1 Final Edition.&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/btree.doc.txt btree.doc] (btree.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diffview_gc.doc.txt diffview_gc.doc] (diffview.gadget)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskio.doc.txt diskio.doc] (diskio.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/filesysbox.doc.txt filesysbox.doc] (filesysbox.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/menu_cl.doc.txt menu_cl.doc] (menuclass)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/z.doc.txt z.doc] (z.library)&lt;br /&gt;
&lt;br /&gt;
=== Changed Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/amigaguide.doc.txt amigaguide.doc] (amigaguide.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddAmigaGuideA()&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/arexx_cl.doc.txt arexx_cl.doc] (arexx.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt chooser_gc.doc] (chooser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/clicktab_gc.doc.txt clicktab_gc.doc] (clicktab.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
*: AllocClickTabNodeA&lt;br /&gt;
*: FreeClickTabNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt console.doc] (console.device)&lt;br /&gt;
*; Added&lt;br /&gt;
*: CD_GETATTRS&lt;br /&gt;
*: CD_SETATTRS&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CD_ASKKEYMAP_POINTERS&lt;br /&gt;
*: CDInputHandler&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_WRITE&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskfont.doc.txt diskfont.doc] (diskfont.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AvailFonts&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt dos.doc] (dos.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CurrentDir&lt;br /&gt;
*: GetConsoleTask&lt;br /&gt;
*: GetFileSysTask&lt;br /&gt;
*: SetConsoleTask&lt;br /&gt;
*: SetFileSysTask&lt;br /&gt;
*; Added&lt;br /&gt;
*: GetConsolePort&lt;br /&gt;
*: GetFileSysPort&lt;br /&gt;
*: SetConsolePort&lt;br /&gt;
*: SetCurrentDir&lt;br /&gt;
*: SetFileSysPort&lt;br /&gt;
*: WriteProtectVolumePort&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AAA-Compatibility-Notice&lt;br /&gt;
*: AddBuffers&lt;br /&gt;
*: AddCmdPathNode&lt;br /&gt;
*: AddDosEntry&lt;br /&gt;
*: AddSegListTrail&lt;br /&gt;
*: AddSegmentTaskList&lt;br /&gt;
*: AllocDosObject&lt;br /&gt;
*: AllocSegList&lt;br /&gt;
*: AssignAddToList&lt;br /&gt;
*: ChangeFilePosition&lt;br /&gt;
*: ChangeFileSize&lt;br /&gt;
*: CopyStringBSTRToC&lt;br /&gt;
*: CreateDir&lt;br /&gt;
*: CreateDirTree&lt;br /&gt;
*: CreateNewProc&lt;br /&gt;
*: DateStamp&lt;br /&gt;
*: Delete&lt;br /&gt;
*: DevNameFromFH&lt;br /&gt;
*: DevNameFromLock&lt;br /&gt;
*: DismountDevice&lt;br /&gt;
*: DoPkt&lt;br /&gt;
*: DosControls&lt;br /&gt;
*: EndNotify&lt;br /&gt;
*: ExamineDir&lt;br /&gt;
*: ExamineObject&lt;br /&gt;
*: FilePart&lt;br /&gt;
*: FindDosEntry&lt;br /&gt;
*: FreeDosObject&lt;br /&gt;
*: GetCurrentDir&lt;br /&gt;
*: GetDiskFileSystemData&lt;br /&gt;
*: GetDiskInfo&lt;br /&gt;
*: GetPID&lt;br /&gt;
*: GetSegListInfoTags&lt;br /&gt;
*: GetVar&lt;br /&gt;
*: HexToLong&lt;br /&gt;
*: Info&lt;br /&gt;
*: IoErr&lt;br /&gt;
*: IsFileSystem&lt;br /&gt;
*: LockTagList&lt;br /&gt;
*: MakeLink&lt;br /&gt;
*: MatchFirst&lt;br /&gt;
*: MountDevice&lt;br /&gt;
*: NameFromFH&lt;br /&gt;
*: NameFromLock&lt;br /&gt;
*: NameFromPort&lt;br /&gt;
*: NotifyVar&lt;br /&gt;
*: ObtainDirContext&lt;br /&gt;
*: Open&lt;br /&gt;
*: ParsePattern&lt;br /&gt;
*: PathPart&lt;br /&gt;
*: ReadLineItemTags&lt;br /&gt;
*: ReadSoftLink&lt;br /&gt;
*: RemAssignList&lt;br /&gt;
*: Rename&lt;br /&gt;
*: RenameDosEntry&lt;br /&gt;
*: ResolvePath&lt;br /&gt;
*: RunCommand&lt;br /&gt;
*: SetComment&lt;br /&gt;
*: SetDate&lt;br /&gt;
*: SetIoErr&lt;br /&gt;
*: SetMode&lt;br /&gt;
*: SetOwnerInfo&lt;br /&gt;
*: SetProgramDir&lt;br /&gt;
*: SetProtection&lt;br /&gt;
*: StartNotify&lt;br /&gt;
*: TrackAddressList&lt;br /&gt;
*: WaitForChar&lt;br /&gt;
*: WaitForData&lt;br /&gt;
*: Write&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt exec.doc] (exec.library)&lt;br /&gt;
*; Added &lt;br /&gt;
*: ASOT_EXTMEM&lt;br /&gt;
*: debug/IsIn68kEmulator&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocEntry&lt;br /&gt;
*: AllocTaskMemEntry&lt;br /&gt;
*: ASOT_PORT&lt;br /&gt;
*: CreateTask&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/expansion.doc.txt expansion.doc] (expansion.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MakeDosNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/gadget_gc.doc.txt gadget_gc.doc] (gadgetclass)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet-- &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/graphics.doc.txt graphics.doc] (graphics.library)&lt;br /&gt;
*; Added&lt;br /&gt;
*: AllocBitMapTagList&lt;br /&gt;
*: GetBoardBytesPerRow&lt;br /&gt;
*: GetBoardDataTagList&lt;br /&gt;
*: GetMonitorDataTagList&lt;br /&gt;
*: GraphicsControlTagList&lt;br /&gt;
*: LockBitMapTagList&lt;br /&gt;
*: LockBitMapToBoardTagList&lt;br /&gt;
*: ReadPixelArray&lt;br /&gt;
*: ReadPixelColor&lt;br /&gt;
*: RectFillColor&lt;br /&gt;
*: UnlockBitMap&lt;br /&gt;
*: UnlockBitMapFromBoard&lt;br /&gt;
*: WritePixelArray&lt;br /&gt;
*: WritePixelColor&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AllocBitMap&lt;br /&gt;
*: AllocRaster&lt;br /&gt;
*: BestModeIDA&lt;br /&gt;
*: BltBitMapTagList&lt;br /&gt;
*: CalcIVG&lt;br /&gt;
*: ChangeVPBitMap&lt;br /&gt;
*: ClearScreen&lt;br /&gt;
*: CompositeTagList&lt;br /&gt;
*: FindColor&lt;br /&gt;
*: Flood&lt;br /&gt;
*: FreeBitMap&lt;br /&gt;
*: GetBitMapAttr&lt;br /&gt;
*: GetDisplayInfoData&lt;br /&gt;
*: GetRPAttrsA&lt;br /&gt;
*: InitTmpRas&lt;br /&gt;
*: LoadRGB32&lt;br /&gt;
*: LoadRGB4&lt;br /&gt;
*: MakeVPort&lt;br /&gt;
*: ModeNotAvailable&lt;br /&gt;
*: ReadPixel&lt;br /&gt;
*: ReadPixelArray8&lt;br /&gt;
*: ReadPixelLine8&lt;br /&gt;
*: RectFill&lt;br /&gt;
*: SetRPAttrsA&lt;br /&gt;
*: VideoControl&lt;br /&gt;
*: WritePixelLine8&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/icon.doc.txt icon.doc] (icon.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddFreeList&lt;br /&gt;
*: FreeAlloc&lt;br /&gt;
*: FreeFree&lt;br /&gt;
*: FreeFreeList&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/input.doc.txt input.doc] (input.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: IND_ADDEVENT&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/intuition.doc.txt intuition.doc] (intuition.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --boopsi--&lt;br /&gt;
*: GetScreenAttr&lt;br /&gt;
*: GetWindowAttr&lt;br /&gt;
*: OpenScreen&lt;br /&gt;
*: OpenWindow&lt;br /&gt;
*: SetWindowAttr&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt listbrowser_gc.doc] (listbrowser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: SetLBColumnInfoAttrsA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/page_gc.doc.txt page_gc.doc] (page.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/partition_gc.doc.txt partition_gc.doc] (partition.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: all references to &#039;partitiongclass&#039; corrected to &#039;partition.gadget&#039;  &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96API.doc] (Picasso96API.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: --bitmaps--&lt;br /&gt;
*: --colors--&lt;br /&gt;
*: p96AllocBitMap*&lt;br /&gt;
*: p96FreeBitMap*&lt;br /&gt;
*: p96LockBitMap*&lt;br /&gt;
*: p96LockBitMapToBoard*&lt;br /&gt;
*: p96ReadPixel*&lt;br /&gt;
*: p96ReadPixelArray*&lt;br /&gt;
*: p96RectFill*&lt;br /&gt;
*: p96UnlockBitMap*&lt;br /&gt;
*: p96UnlockBitMapFromBoard*&lt;br /&gt;
*: p96WritePixel*&lt;br /&gt;
*: p96WritePixelArray*&lt;br /&gt;
*: &lt;br /&gt;
*:(* = deprecated)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/serial_dev.doc.txt serial_dev.doc] (serial.device)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CloseDevice&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
*; Added  &lt;br /&gt;
*: AAA_Notice&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_START&lt;br /&gt;
*: CMD_wRITE&lt;br /&gt;
*: SDCMD_BREAK&lt;br /&gt;
*: SDCMD_SETPARAMS&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/timer.doc.txt timer.doc] (timer.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MicroDelay&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/usbsys.doc.txt usbsys.doc] (usbsys.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: USBEPGetDescriptorA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/utility.doc.txt utility.doc] (utility.library)&lt;br /&gt;
*; Added  &lt;br /&gt;
*: ASPrintf&lt;br /&gt;
*: SNPrintf&lt;br /&gt;
*: UCS4Count&lt;br /&gt;
*: UCS4ToLower&lt;br /&gt;
*: UCS4ToUpper&lt;br /&gt;
*: UCS4toUTF8&lt;br /&gt;
*: UCS4Valid&lt;br /&gt;
*: UTF8Count&lt;br /&gt;
*: UTF8Decode&lt;br /&gt;
*: UTF8Encode&lt;br /&gt;
*: UTF8Stricmp&lt;br /&gt;
*: UTF8Strnicmp&lt;br /&gt;
*: UTF8toUCS4&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CallHookPkt&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt window_cl.doc] (window.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8094</id>
		<title>SDK Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8094"/>
		<updated>2015-09-25T17:38:04Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Version 53.29 (AmigaOS 4.1 Final Edition) =&lt;br /&gt;
&lt;br /&gt;
== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, we have included a handy guide to items that have been deprecated or made obsolete with this most recent release: please see the article on [[Deprecated Functions]].&lt;br /&gt;
&lt;br /&gt;
== AutoDoc Changes ==&lt;br /&gt;
&lt;br /&gt;
The following summary lists any section of the AmigaOS API as described in the [[Autodocs:Main|Autodocs]] that have changed since the last public release. This should aid developers in helping narrow their reading a little as they review what has changed with AmigaOS 4.1 Final Edition.&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/btree.doc.txt btree.doc] (btree.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diffview_gc.doc.txt diffview_gc.doc] (diffview.gadget)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskio.doc.txt diskio.doc] (diskio.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/filesysbox.doc.txt filesysbox.doc] (filesysbox.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/menu_cl.doc.txt menu_cl.doc] (menuclass)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/z.doc.txt z.doc] (z.library)&lt;br /&gt;
&lt;br /&gt;
=== Changed Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/amigaguide.doc.txt amigaguide.doc] (amigaguide.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddAmigaGuideA()&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/arexx_cl.doc.txt arexx_cl.doc] (arexx.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt chooser_gc.doc] (chooser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/clicktab_gc.doc.txt clicktab_gc.doc] (clicktab.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
*: AllocClickTabNodeA&lt;br /&gt;
*: FreeClickTabNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt console.doc] (console.device)&lt;br /&gt;
*; Added&lt;br /&gt;
*: CD_GETATTRS&lt;br /&gt;
*: CD_SETATTRS&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CD_ASKKEYMAP_POINTERS&lt;br /&gt;
*: CDInputHandler&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_WRITE&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskfont.doc.txt diskfont.doc] (diskfont.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AvailFonts&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt dos.doc] (dos.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CurrentDir&lt;br /&gt;
*: GetConsoleTask&lt;br /&gt;
*: GetFileSysTask&lt;br /&gt;
*: SetConsoleTask&lt;br /&gt;
*: SetFileSysTask&lt;br /&gt;
*; Added&lt;br /&gt;
*: GetConsolePort&lt;br /&gt;
*: GetFileSysPort&lt;br /&gt;
*: SetConsolePort&lt;br /&gt;
*: SetCurrentDir&lt;br /&gt;
*: SetFileSysPort&lt;br /&gt;
*: WriteProtectVolumePort&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AAA-Compatibility-Notice&lt;br /&gt;
*: AddBuffers&lt;br /&gt;
*: AddCmdPathNode&lt;br /&gt;
*: AddDosEntry&lt;br /&gt;
*: AddSegListTrail&lt;br /&gt;
*: AddSegmentTaskList&lt;br /&gt;
*: AllocDosObject&lt;br /&gt;
*: AllocSegList&lt;br /&gt;
*: AssignAddToList&lt;br /&gt;
*: ChangeFilePosition&lt;br /&gt;
*: ChangeFileSize&lt;br /&gt;
*: CopyStringBSTRToC&lt;br /&gt;
*: CreateDir&lt;br /&gt;
*: CreateDirTree&lt;br /&gt;
*: CreateNewProc&lt;br /&gt;
*: DateStamp&lt;br /&gt;
*: Delete&lt;br /&gt;
*: DevNameFromFH&lt;br /&gt;
*: DevNameFromLock&lt;br /&gt;
*: DismountDevice&lt;br /&gt;
*: DoPkt&lt;br /&gt;
*: DosControls&lt;br /&gt;
*: EndNotify&lt;br /&gt;
*: ExamineDir&lt;br /&gt;
*: ExamineObject&lt;br /&gt;
*: FilePart&lt;br /&gt;
*: FindDosEntry&lt;br /&gt;
*: FreeDosObject&lt;br /&gt;
*: GetCurrentDir&lt;br /&gt;
*: GetDiskFileSystemData&lt;br /&gt;
*: GetDiskInfo&lt;br /&gt;
*: GetPID&lt;br /&gt;
*: GetSegListInfoTags&lt;br /&gt;
*: GetVar&lt;br /&gt;
*: HexToLong&lt;br /&gt;
*: Info&lt;br /&gt;
*: IoErr&lt;br /&gt;
*: IsFileSystem&lt;br /&gt;
*: LockTagList&lt;br /&gt;
*: MakeLink&lt;br /&gt;
*: MatchFirst&lt;br /&gt;
*: MountDevice&lt;br /&gt;
*: NameFromFH&lt;br /&gt;
*: NameFromLock&lt;br /&gt;
*: NameFromPort&lt;br /&gt;
*: NotifyVar&lt;br /&gt;
*: ObtainDirContext&lt;br /&gt;
*: Open&lt;br /&gt;
*: ParsePattern&lt;br /&gt;
*: PathPart&lt;br /&gt;
*: ReadLineItemTags&lt;br /&gt;
*: ReadSoftLink&lt;br /&gt;
*: RemAssignList&lt;br /&gt;
*: Rename&lt;br /&gt;
*: RenameDosEntry&lt;br /&gt;
*: ResolvePath&lt;br /&gt;
*: RunCommand&lt;br /&gt;
*: SetComment&lt;br /&gt;
*: SetDate&lt;br /&gt;
*: SetIoErr&lt;br /&gt;
*: SetMode&lt;br /&gt;
*: SetOwnerInfo&lt;br /&gt;
*: SetProgramDir&lt;br /&gt;
*: SetProtection&lt;br /&gt;
*: StartNotify&lt;br /&gt;
*: TrackAddressList&lt;br /&gt;
*: WaitForChar&lt;br /&gt;
*: WaitForData&lt;br /&gt;
*: Write&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt exec.doc] (exec.library)&lt;br /&gt;
*; Added &lt;br /&gt;
*: ASOT_EXTMEM&lt;br /&gt;
*: debug/IsIn68kEmulator&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocEntry&lt;br /&gt;
*: AllocTaskMemEntry&lt;br /&gt;
*: ASOT_PORT&lt;br /&gt;
*: CreateTask&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/expansion.doc.txt expansion.doc] (expansion.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MakeDosNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/gadget_gc.doc.txt gadget_gc.doc] (gadgetclass)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet-- &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/graphics.doc.txt graphics.doc] (graphics.library)&lt;br /&gt;
*; Added&lt;br /&gt;
*: AllocBitMapTagList&lt;br /&gt;
*: GetBoardBytesPerRow&lt;br /&gt;
*: GetBoardDataTagList&lt;br /&gt;
*: GetMonitorDataTagList&lt;br /&gt;
*: GraphicsControlTagList&lt;br /&gt;
*: LockBitMapTagList&lt;br /&gt;
*: LockBitMapToBoardTagList&lt;br /&gt;
*: ReadPixelArray&lt;br /&gt;
*: ReadPixelColor&lt;br /&gt;
*: RectFillColor&lt;br /&gt;
*: UnlockBitMap&lt;br /&gt;
*: UnlockBitMapFromBoard&lt;br /&gt;
*: WritePixelArray&lt;br /&gt;
*: WritePixelColor&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AllocBitMap&lt;br /&gt;
*: AllocRaster&lt;br /&gt;
*: BestModeIDA&lt;br /&gt;
*: BltBitMapTagList&lt;br /&gt;
*: CalcIVG&lt;br /&gt;
*: ChangeVPBitMap&lt;br /&gt;
*: ClearScreen&lt;br /&gt;
*: CompositeTagList&lt;br /&gt;
*: FindColor&lt;br /&gt;
*: Flood&lt;br /&gt;
*: FreeBitMap&lt;br /&gt;
*: GetBitMapAttr&lt;br /&gt;
*: GetDisplayInfoData&lt;br /&gt;
*: GetRPAttrsA&lt;br /&gt;
*: InitTmpRas&lt;br /&gt;
*: LoadRGB32&lt;br /&gt;
*: LoadRGB4&lt;br /&gt;
*: MakeVPort&lt;br /&gt;
*: ModeNotAvailable&lt;br /&gt;
*: ReadPixel&lt;br /&gt;
*: ReadPixelArray8&lt;br /&gt;
*: ReadPixelLine8&lt;br /&gt;
*: RectFill&lt;br /&gt;
*: SetRPAttrsA&lt;br /&gt;
*: VideoControl&lt;br /&gt;
*: WritePixelLine8&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/icon.doc.txt icon.doc] (icon.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddFreeList&lt;br /&gt;
*: FreeAlloc&lt;br /&gt;
*: FreeFree&lt;br /&gt;
*: FreeFreeList&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/input.doc.txt input.doc] (input.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: IND_ADDEVENT&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/intuition.doc.txt intuition.doc] (intuition.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --boopsi--&lt;br /&gt;
*: GetScreenAttr&lt;br /&gt;
*: GetWindowAttr&lt;br /&gt;
*: OpenScreen&lt;br /&gt;
*: OpenWindow&lt;br /&gt;
*: SetWindowAttr&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt listbrowser_gc.doc] (listbrowser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: SetLBColumnInfoAttrsA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/page_gc.doc.txt page_gc.doc] (page.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/partition_gc.doc.txt partition_gc.doc] (partition.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: all references to &#039;partitiongclass&#039; corrected to &#039;partition.gadget&#039;  &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96API.doc] (Picasso96API.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: --bitmaps--&lt;br /&gt;
*: --colors--&lt;br /&gt;
*: p96AllocBitMap*&lt;br /&gt;
*: p96FreeBitMap*&lt;br /&gt;
*: p96LockBitMap*&lt;br /&gt;
*: p96LockBitMapToBoard*&lt;br /&gt;
*: p96ReadPixel*&lt;br /&gt;
*: p96ReadPixelArray*&lt;br /&gt;
*: p96RectFill*&lt;br /&gt;
*: p96UnlockBitMap*&lt;br /&gt;
*: p96UnlockBitMapFromBoard*&lt;br /&gt;
*: p96WritePixel*&lt;br /&gt;
*: p96WritePixelArray*&lt;br /&gt;
*: &lt;br /&gt;
*:(* = deprecated)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/serial_dev.doc.txt serial_dev.doc] (serial.device)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CloseDevice&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
*; Added  &lt;br /&gt;
*: AAA_Notice&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_START&lt;br /&gt;
*: CMD_wRITE&lt;br /&gt;
*: SDCMD_BREAK&lt;br /&gt;
*: SDCMD_SETPARAMS&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/timer.doc.txt timer.doc] (timer.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MicroDelay&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/usbsys.doc.txt usbsys.doc] (usbsys.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: USBEPGetDescriptorA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/utility.doc.txt utility.doc] (utility.library)&lt;br /&gt;
*; Added  &lt;br /&gt;
*: ASPrintf&lt;br /&gt;
*: SNPrintf&lt;br /&gt;
*: UCS4Count&lt;br /&gt;
*: UCS4ToLower&lt;br /&gt;
*: UCS4ToUpper&lt;br /&gt;
*: UCS4toUTF8&lt;br /&gt;
*: UCS4Valid&lt;br /&gt;
*: UTF8Count&lt;br /&gt;
*: UTF8Decode&lt;br /&gt;
*: UTF8Encode&lt;br /&gt;
*: UTF8Stricmp&lt;br /&gt;
*: UTF8Strnicmp&lt;br /&gt;
*: UTF8toUCS4&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CallHookPkt&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt window_cl.doc] (window.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8093</id>
		<title>SDK Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8093"/>
		<updated>2015-09-25T17:37:43Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Version 53.29 (AmigaOS 4.1 Final Edition) =&lt;br /&gt;
&lt;br /&gt;
== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, we have included a handy guide to items that have been deprecated or made obsolete with this most recent release: please see the article on [[Deprecated Functions]].&lt;br /&gt;
&lt;br /&gt;
== AutoDoc Changes ==&lt;br /&gt;
&lt;br /&gt;
The following summary lists any section of the AmigaOS API as described in the [[Autodocs:Main|Autodocs]] that have changed since the last public release. This should aid developers in helping narrow their reading a little as they review what has changed with AmigaOS 4.1 Final Edition.&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/btree.doc.txt btree.doc] (btree.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diffview_gc.doc.txt diffview_gc.doc] (diffview.gadget)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskio.doc.txt diskio.doc] (diskio.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/filesysbox.doc.txt filesysbox.doc] (filesysbox.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/menu_cl.doc.txt menu_cl.doc] (menuclass)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/z.doc.txt z.doc] (z.library)&lt;br /&gt;
&lt;br /&gt;
=== Changed Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/amigaguide.doc.txt amigaguide.doc] (amigaguide.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddAmigaGuideA()&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/arexx_cl.doc.txt arexx_cl.doc] (arexx.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt chooser_gc.doc] (chooser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/clicktab_gc.doc.txt clicktab_gc.doc] (clicktab.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
*: AllocClickTabNodeA&lt;br /&gt;
*: FreeClickTabNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt console.doc] (console.device)&lt;br /&gt;
*; Added&lt;br /&gt;
*: CD_GETATTRS&lt;br /&gt;
*: CD_SETATTRS&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CD_ASKKEYMAP_POINTERS&lt;br /&gt;
*: CDInputHandler&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_WRITE&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskfont.doc.txt diskfont.doc] (diskfont.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AvailFonts&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt dos.doc] (dos.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CurrentDir&lt;br /&gt;
*: GetConsoleTask&lt;br /&gt;
*: GetFileSysTask&lt;br /&gt;
*: SetConsoleTask&lt;br /&gt;
*: SetFileSysTask&lt;br /&gt;
*; Added&lt;br /&gt;
*: GetConsolePort&lt;br /&gt;
*: GetFileSysPort&lt;br /&gt;
*: SetConsolePort&lt;br /&gt;
*: SetCurrentDir&lt;br /&gt;
*: SetFileSysPort&lt;br /&gt;
*: WriteProtectVolumePort&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AAA-Compatibility-Notice&lt;br /&gt;
*: AddBuffers&lt;br /&gt;
*: AddCmdPathNode&lt;br /&gt;
*: AddDosEntry&lt;br /&gt;
*: AddSegListTrail&lt;br /&gt;
*: AddSegmentTaskList&lt;br /&gt;
*: AllocDosObject&lt;br /&gt;
*: AllocSegList&lt;br /&gt;
*: AssignAddToList&lt;br /&gt;
*: ChangeFilePosition&lt;br /&gt;
*: ChangeFileSize&lt;br /&gt;
*: CopyStringBSTRToC&lt;br /&gt;
*: CreateDir&lt;br /&gt;
*: CreateDirTree&lt;br /&gt;
*: CreateNewProc&lt;br /&gt;
*: DateStamp&lt;br /&gt;
*: Delete&lt;br /&gt;
*: DevNameFromFH&lt;br /&gt;
*: DevNameFromLock&lt;br /&gt;
*: DismountDevice&lt;br /&gt;
*: DoPkt&lt;br /&gt;
*: DosControls&lt;br /&gt;
*: EndNotify&lt;br /&gt;
*: ExamineDir&lt;br /&gt;
*: ExamineObject&lt;br /&gt;
*: FilePart&lt;br /&gt;
*: FindDosEntry&lt;br /&gt;
*: FreeDosObject&lt;br /&gt;
*: GetCurrentDir&lt;br /&gt;
*: GetDiskFileSystemData&lt;br /&gt;
*: GetDiskInfo&lt;br /&gt;
*: GetPID&lt;br /&gt;
*: GetSegListInfoTags&lt;br /&gt;
*: GetVar&lt;br /&gt;
*: HexToLong&lt;br /&gt;
*: Info&lt;br /&gt;
*: IoErr&lt;br /&gt;
*: IsFileSystem&lt;br /&gt;
*: LockTagList&lt;br /&gt;
*: MakeLink&lt;br /&gt;
*: MatchFirst&lt;br /&gt;
*: MountDevice&lt;br /&gt;
*: NameFromFH&lt;br /&gt;
*: NameFromLock&lt;br /&gt;
*: NameFromPort&lt;br /&gt;
*: NotifyVar&lt;br /&gt;
*: ObtainDirContext&lt;br /&gt;
*: Open&lt;br /&gt;
*: ParsePattern&lt;br /&gt;
*: PathPart&lt;br /&gt;
*: ReadLineItemTags&lt;br /&gt;
*: ReadSoftLink&lt;br /&gt;
*: RemAssignList&lt;br /&gt;
*: Rename&lt;br /&gt;
*: RenameDosEntry&lt;br /&gt;
*: ResolvePath&lt;br /&gt;
*: RunCommand&lt;br /&gt;
*: SetComment&lt;br /&gt;
*: SetDate&lt;br /&gt;
*: SetIoErr&lt;br /&gt;
*: SetMode&lt;br /&gt;
*: SetOwnerInfo&lt;br /&gt;
*: SetProgramDir&lt;br /&gt;
*: SetProtection&lt;br /&gt;
*: StartNotify&lt;br /&gt;
*: TrackAddressList&lt;br /&gt;
*: WaitForChar&lt;br /&gt;
*: WaitForData&lt;br /&gt;
*: Write&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt exec.doc] (exec.library)&lt;br /&gt;
*; Added &lt;br /&gt;
*: ASOT_EXTMEM&lt;br /&gt;
*: debug/IsIn68kEmulator&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocEntry&lt;br /&gt;
*: AllocTaskMemEntry&lt;br /&gt;
*: ASOT_PORT&lt;br /&gt;
*: CreateTask&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/expansion.doc.txt expansion.doc] (expansion.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MakeDosNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/gadget_gc.doc.txt gadget_gc.doc] (gadgetclass)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet-- &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/graphics.doc.txt graphics.doc] (graphics.library)&lt;br /&gt;
*; Added&lt;br /&gt;
*: AllocBitMapTagList&lt;br /&gt;
*: GetBoardBytesPerRow&lt;br /&gt;
*: GetBoardDataTagList&lt;br /&gt;
*: GetMonitorDataTagList&lt;br /&gt;
*: GraphicsControlTagList&lt;br /&gt;
*: LockBitMapTagList&lt;br /&gt;
*: LockBitMapToBoardTagList&lt;br /&gt;
*: ReadPixelArray&lt;br /&gt;
*: ReadPixelColor&lt;br /&gt;
*: RectFillColor&lt;br /&gt;
*: UnlockBitMap&lt;br /&gt;
*: UnlockBitMapFromBoard&lt;br /&gt;
*: WritePixelArray&lt;br /&gt;
*: WritePixelColor&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AllocBitMap&lt;br /&gt;
*: AllocRaster&lt;br /&gt;
*: BestModeIDA&lt;br /&gt;
*: BltBitMapTagList&lt;br /&gt;
*: CalcIVG&lt;br /&gt;
*: ChangeVPBitMap&lt;br /&gt;
*: ClearScreen&lt;br /&gt;
*: CompositeTagList&lt;br /&gt;
*: FindColor&lt;br /&gt;
*: Flood&lt;br /&gt;
*: FreeBitMap&lt;br /&gt;
*: GetBitMapAttr&lt;br /&gt;
*: GetDisplayInfoData&lt;br /&gt;
*: GetRPAttrsA&lt;br /&gt;
*: InitTmpRas&lt;br /&gt;
*: LoadRGB32&lt;br /&gt;
*: LoadRGB4&lt;br /&gt;
*: MakeVPort&lt;br /&gt;
*: ModeNotAvailable&lt;br /&gt;
*: ReadPixel&lt;br /&gt;
*: ReadPixelArray8&lt;br /&gt;
*: ReadPixelLine8&lt;br /&gt;
*: RectFill&lt;br /&gt;
*: SetRPAttrsA&lt;br /&gt;
*: VideoControl&lt;br /&gt;
*: WritePixelLine8&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/icon.doc.txt icon.doc] (icon.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddFreeList&lt;br /&gt;
*: FreeAlloc&lt;br /&gt;
*: FreeFree&lt;br /&gt;
*: FreeFreeList&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/input.doc.txt input.doc] (input.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: IND_ADDEVENT&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/intuition.doc.txt intuition.doc] (intuition.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --boopsi--&lt;br /&gt;
*: GetScreenAttr&lt;br /&gt;
*: GetWindowAttr&lt;br /&gt;
*: OpenScreen&lt;br /&gt;
*: OpenWindow&lt;br /&gt;
*: SetWindowAttr&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt listbrowser_gc.doc] (listbrowser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: SetLBColumnInfoAttrsA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/page_gc.doc.txt page_gc.doc] (page.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/partition_gc.doc.txt partition_gc.doc] (partition.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: all references to &#039;partitiongclass&#039; corrected to &#039;partition.gadget&#039;  &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96API.doc] (Picasso96API.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: --bitmaps--&lt;br /&gt;
*: --colors--&lt;br /&gt;
*: p96AllocBitMap*&lt;br /&gt;
*: p96FreeBitMap*&lt;br /&gt;
*: p96LockBitMap*&lt;br /&gt;
*: p96LockBitMapToBoard*&lt;br /&gt;
*: p96ReadPixel*&lt;br /&gt;
*: p96ReadPixelArray*&lt;br /&gt;
*: p96RectFill*&lt;br /&gt;
*: p96UnlockBitMap*&lt;br /&gt;
*: p96UnlockBitMapFromBoard*&lt;br /&gt;
*: p96WritePixel*&lt;br /&gt;
*: p96WritePixelArray*&lt;br /&gt;
*: &lt;br /&gt;
*:(* = deprecated)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/serial_dev.doc.txt serial_dev.doc] (serial.device)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CloseDevice&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
*; Added  &lt;br /&gt;
*: AAA_Notice&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_START&lt;br /&gt;
*: CMD_wRITE&lt;br /&gt;
*: SDCMD_BREAK&lt;br /&gt;
*: SDCMD_SETPARAMS&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/timer.doc.txt timer.doc] (timer.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MicroDelay&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/usbsys.doc.txt usbsys.doc] (usbsys.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: USBEPGetDescriptorA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/utility.doc.txt utility.doc] (utility.library)&lt;br /&gt;
*; Added  &lt;br /&gt;
*: ASPrintf&lt;br /&gt;
*: SNPrintf&lt;br /&gt;
*: UCS4Count&lt;br /&gt;
*: UCS4ToLower&lt;br /&gt;
*: UCS4ToUpper&lt;br /&gt;
*: UCS4toUTF8&lt;br /&gt;
*: UCS4Valid&lt;br /&gt;
*: UTF8Count&lt;br /&gt;
*: UTF8Decode&lt;br /&gt;
*: UTF8Encode&lt;br /&gt;
*: UTF8Stricmp&lt;br /&gt;
*: UTF8Strnicmp&lt;br /&gt;
*: UTF8toUCS4&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CallHookPkt&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt window_cl.doc] (window.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8092</id>
		<title>SDK Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8092"/>
		<updated>2015-09-25T17:36:48Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Version 53.29 (AmigaOS 4.1 Final Edition) =&lt;br /&gt;
&lt;br /&gt;
== AutoDocs ==&lt;br /&gt;
The following summary lists any section of the AmigaOS API as described in the [[Autodocs:Main|Autodocs]] that have changed since the last public release. This should aid developers in helping narrow their reading a little as they review what has changed with AmigaOS 4.1 Final Edition.&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/btree.doc.txt btree.doc] (btree.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diffview_gc.doc.txt diffview_gc.doc] (diffview.gadget)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskio.doc.txt diskio.doc] (diskio.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/filesysbox.doc.txt filesysbox.doc] (filesysbox.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/menu_cl.doc.txt menu_cl.doc] (menuclass)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/z.doc.txt z.doc] (z.library)&lt;br /&gt;
&lt;br /&gt;
=== Changed Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/amigaguide.doc.txt amigaguide.doc] (amigaguide.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddAmigaGuideA()&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/arexx_cl.doc.txt arexx_cl.doc] (arexx.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt chooser_gc.doc] (chooser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/clicktab_gc.doc.txt clicktab_gc.doc] (clicktab.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
*: AllocClickTabNodeA&lt;br /&gt;
*: FreeClickTabNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt console.doc] (console.device)&lt;br /&gt;
*; Added&lt;br /&gt;
*: CD_GETATTRS&lt;br /&gt;
*: CD_SETATTRS&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CD_ASKKEYMAP_POINTERS&lt;br /&gt;
*: CDInputHandler&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_WRITE&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskfont.doc.txt diskfont.doc] (diskfont.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AvailFonts&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt dos.doc] (dos.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CurrentDir&lt;br /&gt;
*: GetConsoleTask&lt;br /&gt;
*: GetFileSysTask&lt;br /&gt;
*: SetConsoleTask&lt;br /&gt;
*: SetFileSysTask&lt;br /&gt;
*; Added&lt;br /&gt;
*: GetConsolePort&lt;br /&gt;
*: GetFileSysPort&lt;br /&gt;
*: SetConsolePort&lt;br /&gt;
*: SetCurrentDir&lt;br /&gt;
*: SetFileSysPort&lt;br /&gt;
*: WriteProtectVolumePort&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AAA-Compatibility-Notice&lt;br /&gt;
*: AddBuffers&lt;br /&gt;
*: AddCmdPathNode&lt;br /&gt;
*: AddDosEntry&lt;br /&gt;
*: AddSegListTrail&lt;br /&gt;
*: AddSegmentTaskList&lt;br /&gt;
*: AllocDosObject&lt;br /&gt;
*: AllocSegList&lt;br /&gt;
*: AssignAddToList&lt;br /&gt;
*: ChangeFilePosition&lt;br /&gt;
*: ChangeFileSize&lt;br /&gt;
*: CopyStringBSTRToC&lt;br /&gt;
*: CreateDir&lt;br /&gt;
*: CreateDirTree&lt;br /&gt;
*: CreateNewProc&lt;br /&gt;
*: DateStamp&lt;br /&gt;
*: Delete&lt;br /&gt;
*: DevNameFromFH&lt;br /&gt;
*: DevNameFromLock&lt;br /&gt;
*: DismountDevice&lt;br /&gt;
*: DoPkt&lt;br /&gt;
*: DosControls&lt;br /&gt;
*: EndNotify&lt;br /&gt;
*: ExamineDir&lt;br /&gt;
*: ExamineObject&lt;br /&gt;
*: FilePart&lt;br /&gt;
*: FindDosEntry&lt;br /&gt;
*: FreeDosObject&lt;br /&gt;
*: GetCurrentDir&lt;br /&gt;
*: GetDiskFileSystemData&lt;br /&gt;
*: GetDiskInfo&lt;br /&gt;
*: GetPID&lt;br /&gt;
*: GetSegListInfoTags&lt;br /&gt;
*: GetVar&lt;br /&gt;
*: HexToLong&lt;br /&gt;
*: Info&lt;br /&gt;
*: IoErr&lt;br /&gt;
*: IsFileSystem&lt;br /&gt;
*: LockTagList&lt;br /&gt;
*: MakeLink&lt;br /&gt;
*: MatchFirst&lt;br /&gt;
*: MountDevice&lt;br /&gt;
*: NameFromFH&lt;br /&gt;
*: NameFromLock&lt;br /&gt;
*: NameFromPort&lt;br /&gt;
*: NotifyVar&lt;br /&gt;
*: ObtainDirContext&lt;br /&gt;
*: Open&lt;br /&gt;
*: ParsePattern&lt;br /&gt;
*: PathPart&lt;br /&gt;
*: ReadLineItemTags&lt;br /&gt;
*: ReadSoftLink&lt;br /&gt;
*: RemAssignList&lt;br /&gt;
*: Rename&lt;br /&gt;
*: RenameDosEntry&lt;br /&gt;
*: ResolvePath&lt;br /&gt;
*: RunCommand&lt;br /&gt;
*: SetComment&lt;br /&gt;
*: SetDate&lt;br /&gt;
*: SetIoErr&lt;br /&gt;
*: SetMode&lt;br /&gt;
*: SetOwnerInfo&lt;br /&gt;
*: SetProgramDir&lt;br /&gt;
*: SetProtection&lt;br /&gt;
*: StartNotify&lt;br /&gt;
*: TrackAddressList&lt;br /&gt;
*: WaitForChar&lt;br /&gt;
*: WaitForData&lt;br /&gt;
*: Write&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt exec.doc] (exec.library)&lt;br /&gt;
*; Added &lt;br /&gt;
*: ASOT_EXTMEM&lt;br /&gt;
*: debug/IsIn68kEmulator&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocEntry&lt;br /&gt;
*: AllocTaskMemEntry&lt;br /&gt;
*: ASOT_PORT&lt;br /&gt;
*: CreateTask&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/expansion.doc.txt expansion.doc] (expansion.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MakeDosNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/gadget_gc.doc.txt gadget_gc.doc] (gadgetclass)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet-- &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/graphics.doc.txt graphics.doc] (graphics.library)&lt;br /&gt;
*; Added&lt;br /&gt;
*: AllocBitMapTagList&lt;br /&gt;
*: GetBoardBytesPerRow&lt;br /&gt;
*: GetBoardDataTagList&lt;br /&gt;
*: GetMonitorDataTagList&lt;br /&gt;
*: GraphicsControlTagList&lt;br /&gt;
*: LockBitMapTagList&lt;br /&gt;
*: LockBitMapToBoardTagList&lt;br /&gt;
*: ReadPixelArray&lt;br /&gt;
*: ReadPixelColor&lt;br /&gt;
*: RectFillColor&lt;br /&gt;
*: UnlockBitMap&lt;br /&gt;
*: UnlockBitMapFromBoard&lt;br /&gt;
*: WritePixelArray&lt;br /&gt;
*: WritePixelColor&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AllocBitMap&lt;br /&gt;
*: AllocRaster&lt;br /&gt;
*: BestModeIDA&lt;br /&gt;
*: BltBitMapTagList&lt;br /&gt;
*: CalcIVG&lt;br /&gt;
*: ChangeVPBitMap&lt;br /&gt;
*: ClearScreen&lt;br /&gt;
*: CompositeTagList&lt;br /&gt;
*: FindColor&lt;br /&gt;
*: Flood&lt;br /&gt;
*: FreeBitMap&lt;br /&gt;
*: GetBitMapAttr&lt;br /&gt;
*: GetDisplayInfoData&lt;br /&gt;
*: GetRPAttrsA&lt;br /&gt;
*: InitTmpRas&lt;br /&gt;
*: LoadRGB32&lt;br /&gt;
*: LoadRGB4&lt;br /&gt;
*: MakeVPort&lt;br /&gt;
*: ModeNotAvailable&lt;br /&gt;
*: ReadPixel&lt;br /&gt;
*: ReadPixelArray8&lt;br /&gt;
*: ReadPixelLine8&lt;br /&gt;
*: RectFill&lt;br /&gt;
*: SetRPAttrsA&lt;br /&gt;
*: VideoControl&lt;br /&gt;
*: WritePixelLine8&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/icon.doc.txt icon.doc] (icon.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddFreeList&lt;br /&gt;
*: FreeAlloc&lt;br /&gt;
*: FreeFree&lt;br /&gt;
*: FreeFreeList&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/input.doc.txt input.doc] (input.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: IND_ADDEVENT&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/intuition.doc.txt intuition.doc] (intuition.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --boopsi--&lt;br /&gt;
*: GetScreenAttr&lt;br /&gt;
*: GetWindowAttr&lt;br /&gt;
*: OpenScreen&lt;br /&gt;
*: OpenWindow&lt;br /&gt;
*: SetWindowAttr&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt listbrowser_gc.doc] (listbrowser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: SetLBColumnInfoAttrsA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/page_gc.doc.txt page_gc.doc] (page.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/partition_gc.doc.txt partition_gc.doc] (partition.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: all references to &#039;partitiongclass&#039; corrected to &#039;partition.gadget&#039;  &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96API.doc] (Picasso96API.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: --bitmaps--&lt;br /&gt;
*: --colors--&lt;br /&gt;
*: p96AllocBitMap*&lt;br /&gt;
*: p96FreeBitMap*&lt;br /&gt;
*: p96LockBitMap*&lt;br /&gt;
*: p96LockBitMapToBoard*&lt;br /&gt;
*: p96ReadPixel*&lt;br /&gt;
*: p96ReadPixelArray*&lt;br /&gt;
*: p96RectFill*&lt;br /&gt;
*: p96UnlockBitMap*&lt;br /&gt;
*: p96UnlockBitMapFromBoard*&lt;br /&gt;
*: p96WritePixel*&lt;br /&gt;
*: p96WritePixelArray*&lt;br /&gt;
*: &lt;br /&gt;
*:(* = deprecated)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/serial_dev.doc.txt serial_dev.doc] (serial.device)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CloseDevice&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
*; Added  &lt;br /&gt;
*: AAA_Notice&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_START&lt;br /&gt;
*: CMD_wRITE&lt;br /&gt;
*: SDCMD_BREAK&lt;br /&gt;
*: SDCMD_SETPARAMS&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/timer.doc.txt timer.doc] (timer.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MicroDelay&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/usbsys.doc.txt usbsys.doc] (usbsys.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: USBEPGetDescriptorA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/utility.doc.txt utility.doc] (utility.library)&lt;br /&gt;
*; Added  &lt;br /&gt;
*: ASPrintf&lt;br /&gt;
*: SNPrintf&lt;br /&gt;
*: UCS4Count&lt;br /&gt;
*: UCS4ToLower&lt;br /&gt;
*: UCS4ToUpper&lt;br /&gt;
*: UCS4toUTF8&lt;br /&gt;
*: UCS4Valid&lt;br /&gt;
*: UTF8Count&lt;br /&gt;
*: UTF8Decode&lt;br /&gt;
*: UTF8Encode&lt;br /&gt;
*: UTF8Stricmp&lt;br /&gt;
*: UTF8Strnicmp&lt;br /&gt;
*: UTF8toUCS4&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CallHookPkt&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt window_cl.doc] (window.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
&lt;br /&gt;
== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, we have included a handy guide to items that have been deprecated or made obsolete with this most recent release: please see the article on [[Deprecated Functions]].&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8091</id>
		<title>Deprecated Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8091"/>
		<updated>2015-09-25T17:33:51Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, the following is a handy guide to items that have been deprecated or made obsolete with this most recent release. If your code uses any of these items, please refer to the [[Autodocs:Main|Autodocs]] for the component noted to review. Some functions may need to be replaced and others may have changed behavior. It&#039;s always a good idea to review the [[SDK Release Notes|Release Notes]] with each SDK release, of course, too. &lt;br /&gt;
&lt;br /&gt;
This article is inclusive of code made obsolete or deprecated since V50 of the components listed below. Please feel free to edit the document based on your findings should the author have overlooked anything.&lt;br /&gt;
&lt;br /&gt;
== Components to Review ==&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/asl.doc.txt ASL Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocFileRequest&lt;br /&gt;
| AllocAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| FreeFileRequest &lt;br /&gt;
| FreeAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| RequestFile&lt;br /&gt;
| AslRequest&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
The following components in the ASL_FileRequest object are obsolete: &#039;&#039;ASLFR_HookFunc, ASLFO_HookFunc,&#039;&#039; and &#039;&#039;ASLFR_FilterFunc.&#039;&#039; For the latter, use ASLFR_FilterHook as a possible replacement.&lt;br /&gt;
&lt;br /&gt;
=== BOOPSI Classes/Gadgets ===&lt;br /&gt;
&lt;br /&gt;
Generally all BOOPSI gadget classes and superclasses had a #?_GetClass() function to return a pointer to the class itself. These functions are deprecated as of V52. Developers should use the gadget public class ID as a replacement. Some gadgets are listed separately in this article as they have other items now deprecated or obsolete; if a gadget is not listed herein, the above note regarding pointers should be the only item considered deprecated for it.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/bsdsocket.doc.txt BSD Sockets Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| Errno&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNO tag)&lt;br /&gt;
|-&lt;br /&gt;
| getdtablesize&lt;br /&gt;
| SocketBaseTags (with SBTC_DTABLESIZE tag)&lt;br /&gt;
|-&lt;br /&gt;
| gethostid&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| SetErrnoPtr&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNOPTR tag)&lt;br /&gt;
|-&lt;br /&gt;
| SetSocketSignals&lt;br /&gt;
| SocketBaseTags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* The following IoctlSocket() calls are considered deprecated: SIOCSIFADDR, SIOCSIFDSTADDR, SIOCSIFBRDADDR, SIOCGIFADDR, SIOCGIFDSTADDR, SIOCGIFBRDADDR, SIOCSIFFLAGS, SIOCGIFFLAGS, SIOCSIFMETRIC, and SIOCGIFMETRIC. &lt;br /&gt;
* Several functions used in conjunction with SocketBaseTagList() are now deprecated as well: SBTC_FDCALLBACK, SBTC_IOERRNOSTRPTR, SBTC_S2ERRNOSTRPTR, SBTC_S2WERRNOSTRPTR, SBTC_SIGIOMASK, and SBTC_SIGURGMASK.h&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt Chooser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The CHOOSER_GetClass function is no longer available. Use the &amp;quot;chooser.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The chooser.gadget attribute CHOOSER_AutoFit is now unsupported&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt Console Device] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| AskKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_ASKKEYMAP_POINTERS&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| SetKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_SETKEYMAP_POINTERS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt DOS Library] ===&lt;br /&gt;
&lt;br /&gt;
The collective changes to the DOS subsystem are substantial and developers are urged to review the [http://wiki.amigaos.net/amiga/autodocs/dos.obsolete.doc.txt Obsolete DOS documentation] as a starting point. Additionally with the introduction of the new [[AmigaDOS Vector-Port|Vector-Port]] API, use of [[AmigaDOS Packets|DOS packets]] is (for the most part) no longer needed. Please carefully read through the documentation when starting a new project with the release of V54.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| CurrentDir&lt;br /&gt;
| SetCurrentDir&lt;br /&gt;
|-&lt;br /&gt;
| Examine&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| ExamineFH&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| FreeDosEntry&lt;br /&gt;
| FreeDosObject&lt;br /&gt;
|-&lt;br /&gt;
| GetConsoleTask&lt;br /&gt;
| GetConsolePort&lt;br /&gt;
|-&lt;br /&gt;
| GetFileSysTask&lt;br /&gt;
| GetFileSysPort&lt;br /&gt;
|-&lt;br /&gt;
| MakeDosEntry&lt;br /&gt;
| AllocDosObject&lt;br /&gt;
|- &lt;br /&gt;
| ReadItem&lt;br /&gt;
| ReadLineItem&lt;br /&gt;
|-&lt;br /&gt;
| SetConsoleTask&lt;br /&gt;
| SetConsolePort&lt;br /&gt;
|-&lt;br /&gt;
| SetFileSysTask&lt;br /&gt;
| SetFileSysPort&lt;br /&gt;
|-&lt;br /&gt;
| SetVBuf&lt;br /&gt;
| SetFileHandleAttr&lt;br /&gt;
|-&lt;br /&gt;
| SetOwner&lt;br /&gt;
| SetOwnerInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* Several functions had name changes in V53. Please review &#039;&#039;dos/obsolete.h&#039;&#039; in the SDK includes if you haven&#039;t already updated prior to the release of V54.&lt;br /&gt;
* Before V53, CreateDir() returned an exclusive lock on the new directory if it succeeded, it is now required that this be a a shared lock.  Exclusive directory locks have been deprecated. Only files may actually have exclusive locks.&lt;br /&gt;
* The id_NumSoftErrors and id_UnitNumber fields of the GDI_InfoData structure returned from GetDiskInfo() and Info() are considered deprecated.&lt;br /&gt;
* The following error codes returned from IoErr() are considered obsolete: ERROR_TASK_TABLE_FULL, ERROR_NO_DEFAULT_DIR, ERROR_OBJECT_LINKED, and ERROR_UNLOCK_ERROR.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt Exec Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocEntry&lt;br /&gt;
| AllocTaskMemEntry&lt;br /&gt;
|-&lt;br /&gt;
| AllocMem&lt;br /&gt;
| AllocVecTagList&lt;br /&gt;
|-&lt;br /&gt;
| AllocVec&lt;br /&gt;
| AllocVecTagList&lt;br /&gt;
|-&lt;br /&gt;
| CachePreDMA&lt;br /&gt;
| StartDMA&lt;br /&gt;
|-&lt;br /&gt;
| CachePostDMA&lt;br /&gt;
| EndDMA&lt;br /&gt;
|-&lt;br /&gt;
| CreatePool&lt;br /&gt;
| AllocSysObject&lt;br /&gt;
|-&lt;br /&gt;
| MakeLibrary&lt;br /&gt;
| CreateLibrary&lt;br /&gt;
|-&lt;br /&gt;
| AllocTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| FreeTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| GetCC&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| SetSR&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Memory Flags ====&lt;br /&gt;
&lt;br /&gt;
Allocating memory with modern Exec is slightly different than before. In addition to using AllocVecTagList or AllocVecTags rather than AllocMem, several flags are no longer relevant. Please review the article on [[Obsolete_Exec_Memory_Allocation|Obsolete Memory Allocation Techniques]] to note what to avoid. Developers should follow the documentation in the [[Exec Memory Allocation|Memory Allocation]] instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/libamiga_a.doc.txt libamiga.a] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| BeginIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| BeginIO&lt;br /&gt;
|-&lt;br /&gt;
| CreateExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreatePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreatePort&lt;br /&gt;
|-&lt;br /&gt;
| CreateStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreateTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateTask&lt;br /&gt;
|-&lt;br /&gt;
| DeleteExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeletePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeletePort&lt;br /&gt;
|-&lt;br /&gt;
| DeleteStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeleteTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteTask&lt;br /&gt;
|-&lt;br /&gt;
| NewList&lt;br /&gt;
| exec.library&lt;br /&gt;
| NewList&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt Listbrowser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The LISTBROWSER_GetClass function is no longer available. Use the &amp;quot;listbrowser.gadget&amp;quot; public class ID instead&lt;br /&gt;
* The listbrowser.gadget attribute LISTBROWSER_FastRender is obsolete; there is no replacement.&lt;br /&gt;
* The SetLBColumnInfoAttrsA function no longer accepts flags via LBCIA_Flags. One should use the equivalent tags instead.&lt;br /&gt;
&lt;br /&gt;
=== Math IEEE libraries (68K) ===&lt;br /&gt;
&lt;br /&gt;
As of V45 of mathieeedoubbas.library, mathieeedoubtrans.library, mathieeesingbas.library, and mathieeesingtrans.library, the mathieee.resources are no longer  supported. It was felt that this solution was never very popular, neither very fast compared to a co-processor interface, and highly obsolete. This is doubly so in the PowerPC era of next-generation AmigaOne computers. They are included in the operating system merely for compatibility purposes and should not be used for new applications.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96 API Library] ===&lt;br /&gt;
&lt;br /&gt;
Starting with graphics.library V54, the vast majority of Picasso96 is now redundant. The graphics.library has been expanded and extended to seamlessly handle the traditional native (ECS, AGA) chip sets as well as modern graphics cards (RTG). Please carefully review the autodoc and consider migrating to the newer graphics.library-based API.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| p96AllocBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| AllocBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96FreeBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| FreeBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMapToBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapToBoardTags&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelArray&lt;br /&gt;
|-&lt;br /&gt;
| p96RectFill&lt;br /&gt;
| graphics.library&lt;br /&gt;
| RectFillColor&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMapFromBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMapFromBoard&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelArray&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/space_gc.doc.txt Space Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The SPACE_GetClass function is no longer available. Use the &amp;quot;space.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The space.gadget SPACE_AreaBox tag is deprecated because it is unsafe to use in a multi-tasking environment. Use SPACE_RenderBox instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/texteditor_gc.doc.txt Texteditor Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The TEXTEDITOR_GetClass function is no longer available. Use the &amp;quot;texteditor.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The texteditor.gadget attributes GA_TEXTEDITOR_Prop_DeltaFactor and GA_TEXTEDITOR_HProp_DeltaFactor are now obsolete.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/warp3d.doc.txt Warp3D Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| W3D_GetDestFmt&lt;br /&gt;
| W3D_Query&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt Window Class] ===&lt;br /&gt;
&lt;br /&gt;
* The WINDOW_HintInfo attribute for gadget HelpHints is now considered obsolete and only included for compatibility purposes. Developers should supply all of the hints via the GA_HintInfo attribute of each gadget, and set the WINDOW_GadgetHelp attribute for future projects.&lt;br /&gt;
* The WINDOW_Layout tag has 2 aliased definitions which are now obsolete but still supported in the include files.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8090</id>
		<title>Deprecated Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8090"/>
		<updated>2015-09-25T17:30:01Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, the following is a handy guide to items that have been deprecated or made obsolete with this most recent release. If your code uses any of these items, please refer to the [[Autodocs:Main|Autodocs]] for the component noted to review. Some functions may need to be replaced and others may have changed behavior. It&#039;s always a good idea to review the [[SDK Release Notes|Release Notes]] with each SDK release, of course, too. &lt;br /&gt;
&lt;br /&gt;
This article is inclusive of code made obsolete or deprecated since V50 of the components listed below. Please feel free to edit the document based on your findings should the author have overlooked anything.&lt;br /&gt;
&lt;br /&gt;
== Components to Review ==&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/asl.doc.txt ASL Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocFileRequest&lt;br /&gt;
| AllocAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| FreeFileRequest &lt;br /&gt;
| FreeAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| RequestFile&lt;br /&gt;
| AslRequest&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
The following components in the ASL_FileRequest object are obsolete: &#039;&#039;ASLFR_HookFunc, ASLFO_HookFunc,&#039;&#039; and &#039;&#039;ASLFR_FilterFunc.&#039;&#039; For the latter, use ASLFR_FilterHook as a possible replacement.&lt;br /&gt;
&lt;br /&gt;
=== BOOPSI Classes/Gadgets ===&lt;br /&gt;
&lt;br /&gt;
Generally all BOOPSI gadget classes and superclasses had a #?_GetClass() function to return a pointer to the class itself. These functions are deprecated as of V52. Developers should use the gadget public class ID as a replacement. Some gadgets are listed separately in this article as they have other items now deprecated or obsolete; if a gadget is not listed herein, the above note regarding pointers should be the only item considered deprecated for it.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/bsdsocket.doc.txt BSD Sockets Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| Errno&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNO tag)&lt;br /&gt;
|-&lt;br /&gt;
| getdtablesize&lt;br /&gt;
| SocketBaseTags (with SBTC_DTABLESIZE tag)&lt;br /&gt;
|-&lt;br /&gt;
| gethostid&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| SetErrnoPtr&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNOPTR tag)&lt;br /&gt;
|-&lt;br /&gt;
| SetSocketSignals&lt;br /&gt;
| SocketBaseTags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* The following IoctlSocket() calls are considered deprecated: SIOCSIFADDR, SIOCSIFDSTADDR, SIOCSIFBRDADDR, SIOCGIFADDR, SIOCGIFDSTADDR, SIOCGIFBRDADDR, SIOCSIFFLAGS, SIOCGIFFLAGS, SIOCSIFMETRIC, and SIOCGIFMETRIC. &lt;br /&gt;
* Several functions used in conjunction with SocketBaseTagList() are now deprecated as well: SBTC_FDCALLBACK, SBTC_IOERRNOSTRPTR, SBTC_S2ERRNOSTRPTR, SBTC_S2WERRNOSTRPTR, SBTC_SIGIOMASK, and SBTC_SIGURGMASK.h&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt Chooser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The CHOOSER_GetClass function is no longer available. Use the &amp;quot;chooser.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The chooser.gadget attribute CHOOSER_AutoFit is now unsupported&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt Console Device] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| AskKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_ASKKEYMAP_POINTERS&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| SetKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_SETKEYMAP_POINTERS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt DOS Library] ===&lt;br /&gt;
&lt;br /&gt;
The collective changes to the DOS subsystem are substantial and developers are urged to review the [http://wiki.amigaos.net/amiga/autodocs/dos.obsolete.doc.txt Obsolete DOS documentation] as a starting point. Additionally with the introduction of the new [[AmigaDOS Vector-Port|Vector-Port]] API, use of [[AmigaDOS Packets|DOS packets]] is (for the most part) no longer needed. Please carefully read through the documentation when starting a new project with the release of V54.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| Examine&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| ExamineFH&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| FreeDosEntry&lt;br /&gt;
| FreeDosObject&lt;br /&gt;
|-&lt;br /&gt;
| MakeDosEntry&lt;br /&gt;
| AllocDosObject&lt;br /&gt;
|- &lt;br /&gt;
| ReadItem&lt;br /&gt;
| ReadLineItem&lt;br /&gt;
|-&lt;br /&gt;
| SetVBuf&lt;br /&gt;
| SetFileHandleAttr&lt;br /&gt;
|-&lt;br /&gt;
| SetOwner&lt;br /&gt;
| SetOwnerInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* Several functions had name changes in V53. Please review &#039;&#039;dos/obsolete.h&#039;&#039; in the SDK includes if you haven&#039;t already updated prior to the release of V54.&lt;br /&gt;
* Before V53, CreateDir() returned an exclusive lock on the new directory if it succeeded, it is now required that this be a a shared lock.  Exclusive directory locks have been deprecated. Only files may actually have exclusive locks.&lt;br /&gt;
* The id_NumSoftErrors and id_UnitNumber fields of the GDI_InfoData structure returned from GetDiskInfo() and Info() are considered deprecated.&lt;br /&gt;
* The following error codes returned from IoErr() are considered obsolete: ERROR_TASK_TABLE_FULL, ERROR_NO_DEFAULT_DIR, ERROR_OBJECT_LINKED, and ERROR_UNLOCK_ERROR.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt Exec Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocEntry&lt;br /&gt;
| AllocTaskMemEntry&lt;br /&gt;
|-&lt;br /&gt;
| AllocMem&lt;br /&gt;
| AllocVecTagList&lt;br /&gt;
|-&lt;br /&gt;
| AllocVec&lt;br /&gt;
| AllocVecTagList&lt;br /&gt;
|-&lt;br /&gt;
| CachePreDMA&lt;br /&gt;
| StartDMA&lt;br /&gt;
|-&lt;br /&gt;
| CachePostDMA&lt;br /&gt;
| EndDMA&lt;br /&gt;
|-&lt;br /&gt;
| CreatePool&lt;br /&gt;
| AllocSysObject&lt;br /&gt;
|-&lt;br /&gt;
| MakeLibrary&lt;br /&gt;
| CreateLibrary&lt;br /&gt;
|-&lt;br /&gt;
| AllocTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| FreeTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| GetCC&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| SetSR&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Memory Flags ====&lt;br /&gt;
&lt;br /&gt;
Allocating memory with modern Exec is slightly different than before. In addition to using AllocVecTagList or AllocVecTags rather than AllocMem, several flags are no longer relevant. Please review the article on [[Obsolete_Exec_Memory_Allocation|Obsolete Memory Allocation Techniques]] to note what to avoid. Developers should follow the documentation in the [[Exec Memory Allocation|Memory Allocation]] instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/libamiga_a.doc.txt libamiga.a] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| BeginIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| BeginIO&lt;br /&gt;
|-&lt;br /&gt;
| CreateExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreatePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreatePort&lt;br /&gt;
|-&lt;br /&gt;
| CreateStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreateTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateTask&lt;br /&gt;
|-&lt;br /&gt;
| DeleteExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeletePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeletePort&lt;br /&gt;
|-&lt;br /&gt;
| DeleteStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeleteTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteTask&lt;br /&gt;
|-&lt;br /&gt;
| NewList&lt;br /&gt;
| exec.library&lt;br /&gt;
| NewList&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt Listbrowser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The LISTBROWSER_GetClass function is no longer available. Use the &amp;quot;listbrowser.gadget&amp;quot; public class ID instead&lt;br /&gt;
* The listbrowser.gadget attribute LISTBROWSER_FastRender is obsolete; there is no replacement.&lt;br /&gt;
* The SetLBColumnInfoAttrsA function no longer accepts flags via LBCIA_Flags. One should use the equivalent tags instead.&lt;br /&gt;
&lt;br /&gt;
=== Math IEEE libraries (68K) ===&lt;br /&gt;
&lt;br /&gt;
As of V45 of mathieeedoubbas.library, mathieeedoubtrans.library, mathieeesingbas.library, and mathieeesingtrans.library, the mathieee.resources are no longer  supported. It was felt that this solution was never very popular, neither very fast compared to a co-processor interface, and highly obsolete. This is doubly so in the PowerPC era of next-generation AmigaOne computers. They are included in the operating system merely for compatibility purposes and should not be used for new applications.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96 API Library] ===&lt;br /&gt;
&lt;br /&gt;
Starting with graphics.library V54, the vast majority of Picasso96 is now redundant. The graphics.library has been expanded and extended to seamlessly handle the traditional native (ECS, AGA) chip sets as well as modern graphics cards (RTG). Please carefully review the autodoc and consider migrating to the newer graphics.library-based API.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| p96AllocBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| AllocBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96FreeBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| FreeBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMapToBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapToBoardTags&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelArray&lt;br /&gt;
|-&lt;br /&gt;
| p96RectFill&lt;br /&gt;
| graphics.library&lt;br /&gt;
| RectFillColor&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMapFromBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMapFromBoard&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelArray&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/space_gc.doc.txt Space Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The SPACE_GetClass function is no longer available. Use the &amp;quot;space.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The space.gadget SPACE_AreaBox tag is deprecated because it is unsafe to use in a multi-tasking environment. Use SPACE_RenderBox instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/texteditor_gc.doc.txt Texteditor Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The TEXTEDITOR_GetClass function is no longer available. Use the &amp;quot;texteditor.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The texteditor.gadget attributes GA_TEXTEDITOR_Prop_DeltaFactor and GA_TEXTEDITOR_HProp_DeltaFactor are now obsolete.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/warp3d.doc.txt Warp3D Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| W3D_GetDestFmt&lt;br /&gt;
| W3D_Query&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt Window Class] ===&lt;br /&gt;
&lt;br /&gt;
* The WINDOW_HintInfo attribute for gadget HelpHints is now considered obsolete and only included for compatibility purposes. Developers should supply all of the hints via the GA_HintInfo attribute of each gadget, and set the WINDOW_GadgetHelp attribute for future projects.&lt;br /&gt;
* The WINDOW_Layout tag has 2 aliased definitions which are now obsolete but still supported in the include files.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8089</id>
		<title>Deprecated Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Deprecated_Functions&amp;diff=8089"/>
		<updated>2015-09-25T17:26:51Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: Created page with &amp;quot;== Deprecated and Obsolete Functions ==  With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their pro...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Deprecated and Obsolete Functions ==&lt;br /&gt;
&lt;br /&gt;
With the introduction of AmigaOS 4.1 Final Edition, developers may have noticed additional compiler warnings when rebuilding their projects against the new SDK. While as much of the API has been maintained as is possible, some functions, structures, attributes, and tags have changed over time requiring the attention of application developers. To make life easier, the following is a handy guide to items that have been deprecated or made obsolete with this most recent release. If your code uses any of these items, please refer to the [[Autodocs:Main|Autodocs]] for the component noted to review. Some functions may need to be replaced and others may have changed behavior. It&#039;s always a good idea to review the [[SDK Release Notes|Release Notes]] with each SDK release, of course, too. &lt;br /&gt;
&lt;br /&gt;
This article is inclusive of code made obsolete or deprecated since V50 of the components listed below. Please feel free to edit the document based on your findings should the author have overlooked anything.&lt;br /&gt;
&lt;br /&gt;
== Components to Review ==&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/asl.doc.txt ASL Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocFileRequest&lt;br /&gt;
| AllocAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| FreeFileRequest &lt;br /&gt;
| FreeAslRequest&lt;br /&gt;
|-&lt;br /&gt;
| RequestFile&lt;br /&gt;
| AslRequest&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
The following components in the ASL_FileRequest object are obsolete: &#039;&#039;ASLFR_HookFunc, ASLFO_HookFunc,&#039;&#039; and &#039;&#039;ASLFR_FilterFunc.&#039;&#039; For the latter, use ASLFR_FilterHook as a possible replacement.&lt;br /&gt;
&lt;br /&gt;
=== BOOPSI Classes/Gadgets ===&lt;br /&gt;
&lt;br /&gt;
Generally all BOOPSI gadget classes and superclasses had a #?_GetClass() function to return a pointer to the class itself. These functions are deprecated as of V52. Developers should use the gadget public class ID as a replacement. Some gdagets are listed separately in this article as they have other items now deprecated or obsolete; if a gadget is not listed herein, the above note regarding pointers should be the only item considered deprecated for it.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/bsdsocket.doc.txt BSD Sockets Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| Errno&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNO tag)&lt;br /&gt;
|-&lt;br /&gt;
| getdtablesize&lt;br /&gt;
| SocketBaseTags (with SBTC_DTABLESIZE tag)&lt;br /&gt;
|-&lt;br /&gt;
| gethostid&lt;br /&gt;
| n/a&lt;br /&gt;
|-&lt;br /&gt;
| SetErrnoPtr&lt;br /&gt;
| SocketBaseTags (with SBTC_ERRNOPTR tag)&lt;br /&gt;
|-&lt;br /&gt;
| SetSocketSignals&lt;br /&gt;
| SocketBaseTags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* The following IoctlSocket() calls are considered deprecated: SIOCSIFADDR, SIOCSIFDSTADDR, SIOCSIFBRDADDR, SIOCGIFADDR, SIOCGIFDSTADDR, SIOCGIFBRDADDR, SIOCSIFFLAGS, SIOCGIFFLAGS, SIOCSIFMETRIC, and SIOCGIFMETRIC. &lt;br /&gt;
* Several functions used in conjunction with SocketBaseTagList() are now deprecated as well: SBTC_FDCALLBACK, SBTC_IOERRNOSTRPTR, SBTC_S2ERRNOSTRPTR, SBTC_S2WERRNOSTRPTR, SBTC_SIGIOMASK, and SBTC_SIGURGMASK.h&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt Chooser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The CHOOSER_GetClass function is no longer available. Use the &amp;quot;chooser.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The chooser.gadget attribute CHOOSER_AutoFit is now unsupported&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt Console Device] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| AskKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_ASKKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_ASKKEYMAP_POINTERS&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETDEFAULTKEYMAP&lt;br /&gt;
| keymap.library&lt;br /&gt;
| SetKeyMapDefault&lt;br /&gt;
|-&lt;br /&gt;
| CD_SETKEYMAP&lt;br /&gt;
| console.device&lt;br /&gt;
| CD_SETKEYMAP_POINTERS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt DOS Library] ===&lt;br /&gt;
&lt;br /&gt;
The collective changes to the DOS subsystem are substantial and developers are urged to review the [http://wiki.amigaos.net/amiga/autodocs/dos.obsolete.doc.txt Obsolete DOS documentation] as a starting point. Additionally with the introduction of the new [[AmigaDOS Vector-Port|Vector-Port]] API, use of [[AmigaDOS Packets|DOS packets]] is (for the most part) no longer needed. Please carefully read through the documentation when starting a new project with the release of V54.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| Examine&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| ExamineFH&lt;br /&gt;
| ExamineObject&lt;br /&gt;
|-&lt;br /&gt;
| FreeDosEntry&lt;br /&gt;
| FreeDosObject&lt;br /&gt;
|-&lt;br /&gt;
| MakeDosEntry&lt;br /&gt;
| AllocDosObject&lt;br /&gt;
|- &lt;br /&gt;
| ReadItem&lt;br /&gt;
| ReadLineItem&lt;br /&gt;
|-&lt;br /&gt;
| SetVBuf&lt;br /&gt;
| SetFileHandleAttr&lt;br /&gt;
|-&lt;br /&gt;
| SetOwner&lt;br /&gt;
| SetOwnerInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Other ====&lt;br /&gt;
&lt;br /&gt;
* Several functions had name changes in V53. Please review &#039;&#039;dos/obsolete.h&#039;&#039; in the SDK includes if you haven&#039;t already updated prior to the release of V54.&lt;br /&gt;
* Before V53, CreateDir() returned an exclusive lock on the new directory if it succeeded, it is now required that this be a a shared lock.  Exclusive directory locks have been deprecated. Only files may actually have exclusive locks.&lt;br /&gt;
* The id_NumSoftErrors and id_UnitNumber fields of the GDI_InfoData structure returned from GetDiskInfo() and Info() are considered deprecated.&lt;br /&gt;
* The following error codes returned from IoErr() are considered obsolete: ERROR_TASK_TABLE_FULL, ERROR_NO_DEFAULT_DIR, ERROR_OBJECT_LINKED, and ERROR_UNLOCK_ERROR.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt Exec Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| AllocEntry&lt;br /&gt;
| AllocTaskMemEntry&lt;br /&gt;
|-&lt;br /&gt;
| AllocMem&lt;br /&gt;
| AllocVecTagList&lt;br /&gt;
|-&lt;br /&gt;
| AllocVec&lt;br /&gt;
| AllocVecTagList&lt;br /&gt;
|-&lt;br /&gt;
| CachePreDMA&lt;br /&gt;
| StartDMA&lt;br /&gt;
|-&lt;br /&gt;
| CachePostDMA&lt;br /&gt;
| EndDMA&lt;br /&gt;
|-&lt;br /&gt;
| CreatePool&lt;br /&gt;
| AllocSysObject&lt;br /&gt;
|-&lt;br /&gt;
| MakeLibrary&lt;br /&gt;
| CreateLibrary&lt;br /&gt;
|-&lt;br /&gt;
| AllocTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| FreeTrap&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| GetCC&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| SetSR&lt;br /&gt;
| &#039;&#039;(for 68K only, no longer used)&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Memory Flags ====&lt;br /&gt;
&lt;br /&gt;
Allocating memory with modern Exec is slightly different than before. In addition to using AllocVecTagList or AllocVecTags rather than AllocMem, several flags are no longer relevant. Please review the article on [[Obsolete_Exec_Memory_Allocation|Obsolete Memory Allocation Techniques]] to note what to avoid. Developers should follow the documentation in the [[Exec Memory Allocation|Memory Allocation]] instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/libamiga_a.doc.txt libamiga.a] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| BeginIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| BeginIO&lt;br /&gt;
|-&lt;br /&gt;
| CreateExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreatePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreatePort&lt;br /&gt;
|-&lt;br /&gt;
| CreateStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateIORequest&lt;br /&gt;
|-&lt;br /&gt;
| CreateTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| CreateTask&lt;br /&gt;
|-&lt;br /&gt;
| DeleteExtIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeletePort&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeletePort&lt;br /&gt;
|-&lt;br /&gt;
| DeleteStdIO&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteIORequest&lt;br /&gt;
|-&lt;br /&gt;
| DeleteTask&lt;br /&gt;
| exec.library&lt;br /&gt;
| DeleteTask&lt;br /&gt;
|-&lt;br /&gt;
| NewList&lt;br /&gt;
| exec.library&lt;br /&gt;
| NewList&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt Listbrowser Gadget] ===&lt;br /&gt;
&lt;br /&gt;
# The LISTBROWSER_GetClass function is no longer available. Use the &amp;quot;listbrowser.gadget&amp;quot; public class ID instead&lt;br /&gt;
# The listbrowser.gadget attribute LISTBROWSER_FastRender is obsolete; there is no replacement.&lt;br /&gt;
# The SetLBColumnInfoAttrsA function no longer accepts flags via LBCIA_Flags. One should use the equivalent tags instead.&lt;br /&gt;
&lt;br /&gt;
=== Math IEEE libraries (68K) ===&lt;br /&gt;
&lt;br /&gt;
As of V45 of mathieeedoubbas.library, mathieeedoubtrans.library, mathieeesingbas.library, and mathieeesingtrans.library, the mathieee.resources are no longer  supported. It was felt that this solution was never very popular, neither very fast compared to a coprocessor interface, and highly obsolete. This is doubly so in the PowerPC era of next-generation AmigaOne computers. They are included in the operating system merely for compatibility purposes and should not be used for new applications.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96 API Library] ===&lt;br /&gt;
&lt;br /&gt;
Starting with graphics.library V54, the vast majority of Picasso96 is now redundant. The graphics.library has been expanded and extended to seemlessly handle the traditional native (ECS, AGA) chip sets as well as modern graphics cards (RTG). Please carefully review the autodoc and consider migrating to the newer graphics.library-based API.&lt;br /&gt;
&lt;br /&gt;
==== Deprecated Functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (component)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement (function)&lt;br /&gt;
|-&lt;br /&gt;
| p96AllocBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| AllocBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96FreeBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| FreeBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapTags&lt;br /&gt;
|-&lt;br /&gt;
| p96LockBitMapToBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| LockBitMapToBoardTags&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96ReadPixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| ReadPixelArray&lt;br /&gt;
|-&lt;br /&gt;
| p96RectFill&lt;br /&gt;
| graphics.library&lt;br /&gt;
| RectFillColor&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMap&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMap&lt;br /&gt;
|-&lt;br /&gt;
| p96UnlockBitMapFromBoard&lt;br /&gt;
| graphics.library&lt;br /&gt;
| UnlockBitMapFromBoard&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixel&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelColor&lt;br /&gt;
|-&lt;br /&gt;
| p96WritePixelArray&lt;br /&gt;
| graphics.library&lt;br /&gt;
| WritePixelArray&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/space_gc.doc.txt Space Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The SPACE_GetClass function is no longer available. Use the &amp;quot;space.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The space.gadget SPACE_AreaBox tag is deprecated because it is unsafe to use in a multi-tasking environment. Use SPACE_RenderBox instead.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/texteditor_gc.doc.txt Texteditor Gadget] ===&lt;br /&gt;
&lt;br /&gt;
* The TEXTEDITOR_GetClass function is no longer available. Use the &amp;quot;texteditor.gadget&amp;quot; public class ID instead.&lt;br /&gt;
* The texteditor.gadget attributes GA_TEXTEDITOR_Prop_DeltaFactor and GA_TEXTEDITOR_HProp_DeltaFactor are now obsolete.&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/warp3d.doc.txt Warp3D Library] ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecated functions ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Obsolete&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Replacement&lt;br /&gt;
|-&lt;br /&gt;
| W3D_GetDestFmt&lt;br /&gt;
| W3D_Query&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt Window Class] ===&lt;br /&gt;
&lt;br /&gt;
* The WINDOW_HintInfo attribute for gadget HelpHints is now considered obsolete and only included for compatibility purposes. Developers should supply all of the hints via the GA_HintInfo attribute of each gadget, and set the WINDOW_GadgetHelp attribute for future projects.&lt;br /&gt;
* The WINDOW_Layout tag has 2 aliased definitions which are now obsolete but still supported in the include files.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8068</id>
		<title>SDK Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8068"/>
		<updated>2015-09-02T22:31:52Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Version 53.29 (AmigaOS 4.1 Final Edition) =&lt;br /&gt;
&lt;br /&gt;
== AutoDocs ==&lt;br /&gt;
The following summary lists any section of the AmigaOS API as described in the [[Autodocs:Main|Autodocs]] that have changed since the last public release. This should aid developers in helping narrow their reading a little as they review what has changed with AmigaOS 4.1 Final Edition.&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/btree.doc.txt btree.doc] (btree.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diffview_gc.doc.txt diffview_gc.doc] (diffview.gadget)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskio.doc.txt diskio.doc] (diskio.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/filesysbox.doc.txt filesysbox.doc] (filesysbox.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/menu_cl.doc.txt menu_cl.doc] (menuclass)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/z.doc.txt z.doc] (z.library)&lt;br /&gt;
&lt;br /&gt;
=== Changed Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/amigaguide.doc.txt amigaguide.doc] (amigaguide.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddAmigaGuideA()&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/arexx_cl.doc.txt arexx_cl.doc] (arexx.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt chooser_gc.doc] (chooser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/clicktab_gc.doc.txt clicktab_gc.doc] (clicktab.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
*: AllocClickTabNodeA&lt;br /&gt;
*: FreeClickTabNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt console.doc] (console.device)&lt;br /&gt;
*; Added&lt;br /&gt;
*: CD_GETATTRS&lt;br /&gt;
*: CD_SETATTRS&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CD_ASKKEYMAP_POINTERS&lt;br /&gt;
*: CDInputHandler&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_WRITE&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskfont.doc.txt diskfont.doc] (diskfont.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AvailFonts&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt dos.doc] (dos.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CurrentDir&lt;br /&gt;
*: GetConsoleTask&lt;br /&gt;
*: GetFileSysTask&lt;br /&gt;
*: SetConsoleTask&lt;br /&gt;
*: SetFileSysTask&lt;br /&gt;
*; Added&lt;br /&gt;
*: GetConsolePort&lt;br /&gt;
*: GetFileSysPort&lt;br /&gt;
*: SetConsolePort&lt;br /&gt;
*: SetCurrentDir&lt;br /&gt;
*: SetFileSysPort&lt;br /&gt;
*: WriteProtectVolumePort&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AAA-Compatibility-Notice&lt;br /&gt;
*: AddBuffers&lt;br /&gt;
*: AddCmdPathNode&lt;br /&gt;
*: AddDosEntry&lt;br /&gt;
*: AddSegListTrail&lt;br /&gt;
*: AddSegmentTaskList&lt;br /&gt;
*: AllocDosObject&lt;br /&gt;
*: AllocSegList&lt;br /&gt;
*: AssignAddToList&lt;br /&gt;
*: ChangeFilePosition&lt;br /&gt;
*: ChangeFileSize&lt;br /&gt;
*: CopyStringBSTRToC&lt;br /&gt;
*: CreateDir&lt;br /&gt;
*: CreateDirTree&lt;br /&gt;
*: CreateNewProc&lt;br /&gt;
*: DateStamp&lt;br /&gt;
*: Delete&lt;br /&gt;
*: DevNameFromFH&lt;br /&gt;
*: DevNameFromLock&lt;br /&gt;
*: DismountDevice&lt;br /&gt;
*: DoPkt&lt;br /&gt;
*: DosControls&lt;br /&gt;
*: EndNotify&lt;br /&gt;
*: ExamineDir&lt;br /&gt;
*: ExamineObject&lt;br /&gt;
*: FilePart&lt;br /&gt;
*: FindDosEntry&lt;br /&gt;
*: FreeDosObject&lt;br /&gt;
*: GetCurrentDir&lt;br /&gt;
*: GetDiskFileSystemData&lt;br /&gt;
*: GetDiskInfo&lt;br /&gt;
*: GetPID&lt;br /&gt;
*: GetSegListInfoTags&lt;br /&gt;
*: GetVar&lt;br /&gt;
*: HexToLong&lt;br /&gt;
*: Info&lt;br /&gt;
*: IoErr&lt;br /&gt;
*: IsFileSystem&lt;br /&gt;
*: LockTagList&lt;br /&gt;
*: MakeLink&lt;br /&gt;
*: MatchFirst&lt;br /&gt;
*: MountDevice&lt;br /&gt;
*: NameFromFH&lt;br /&gt;
*: NameFromLock&lt;br /&gt;
*: NameFromPort&lt;br /&gt;
*: NotifyVar&lt;br /&gt;
*: ObtainDirContext&lt;br /&gt;
*: Open&lt;br /&gt;
*: ParsePattern&lt;br /&gt;
*: PathPart&lt;br /&gt;
*: ReadLineItemTags&lt;br /&gt;
*: ReadSoftLink&lt;br /&gt;
*: RemAssignList&lt;br /&gt;
*: Rename&lt;br /&gt;
*: RenameDosEntry&lt;br /&gt;
*: ResolvePath&lt;br /&gt;
*: RunCommand&lt;br /&gt;
*: SetComment&lt;br /&gt;
*: SetDate&lt;br /&gt;
*: SetIoErr&lt;br /&gt;
*: SetMode&lt;br /&gt;
*: SetOwnerInfo&lt;br /&gt;
*: SetProgramDir&lt;br /&gt;
*: SetProtection&lt;br /&gt;
*: StartNotify&lt;br /&gt;
*: TrackAddressList&lt;br /&gt;
*: WaitForChar&lt;br /&gt;
*: WaitForData&lt;br /&gt;
*: Write&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt exec.doc] (exec.library)&lt;br /&gt;
*; Added &lt;br /&gt;
*: ASOT_EXTMEM&lt;br /&gt;
*: debug/IsIn68kEmulator&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocEntry&lt;br /&gt;
*: AllocTaskMemEntry&lt;br /&gt;
*: ASOT_PORT&lt;br /&gt;
*: CreateTask&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/expansion.doc.txt expansion.doc] (expansion.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MakeDosNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/gadget_gc.doc.txt gadget_gc.doc] (gadgetclass)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet-- &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/graphics.doc.txt graphics.doc] (graphics.library)&lt;br /&gt;
*; Added&lt;br /&gt;
*: AllocBitMapTagList&lt;br /&gt;
*: GetBoardBytesPerRow&lt;br /&gt;
*: GetBoardDataTagList&lt;br /&gt;
*: GetMonitorDataTagList&lt;br /&gt;
*: GraphicsControlTagList&lt;br /&gt;
*: LockBitMapTagList&lt;br /&gt;
*: LockBitMapToBoardTagList&lt;br /&gt;
*: ReadPixelArray&lt;br /&gt;
*: ReadPixelColor&lt;br /&gt;
*: RectFillColor&lt;br /&gt;
*: UnlockBitMap&lt;br /&gt;
*: UnlockBitMapFromBoard&lt;br /&gt;
*: WritePixelArray&lt;br /&gt;
*: WritePixelColor&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocBitMap&lt;br /&gt;
*: AllocRaster&lt;br /&gt;
*: BestModeIDA&lt;br /&gt;
*: BltBitMapTagList&lt;br /&gt;
*: CalcIVG&lt;br /&gt;
*: ChangeVPBitMap&lt;br /&gt;
*: ClearScreen&lt;br /&gt;
*: CompositeTagList&lt;br /&gt;
*: FindColor&lt;br /&gt;
*: Flood&lt;br /&gt;
*: FreeBitMap&lt;br /&gt;
*: GetBitMapAttr&lt;br /&gt;
*: GetDisplayInfoData&lt;br /&gt;
*: GetRPAttrsA&lt;br /&gt;
*: InitTmpRas&lt;br /&gt;
*: LoadRGB32&lt;br /&gt;
*: LoadRGB4&lt;br /&gt;
*: MakeVPort&lt;br /&gt;
*: ModeNotAvailable&lt;br /&gt;
*: ReadPixel&lt;br /&gt;
*: ReadPixelArray8&lt;br /&gt;
*: ReadPixelLine8&lt;br /&gt;
*: RectFill&lt;br /&gt;
*: SetRPAttrsA&lt;br /&gt;
*: VideoControl&lt;br /&gt;
*: WritePixelLine8&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/icon.doc.txt icon.doc] (icon.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddFreeList&lt;br /&gt;
*: FreeAlloc&lt;br /&gt;
*: FreeFree&lt;br /&gt;
*: FreeFreeList&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/input.doc.txt input.doc] (input.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: IND_ADDEVENT&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/intuition.doc.txt intuition.doc] (intuition.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --boopsi--&lt;br /&gt;
*: GetScreenAttr&lt;br /&gt;
*: GetWindowAttr&lt;br /&gt;
*: OpenScreen&lt;br /&gt;
*: OpenWindow&lt;br /&gt;
*: SetWindowAttr&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt listbrowser_gc.doc] (listbrowser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: SetLBColumnInfoAttrsA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/page_gc.doc.txt page_gc.doc] (page.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/partition_gc.doc.txt partition_gc.doc] (partition.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: all references to &#039;partitiongclass&#039; corrected to &#039;partition.gadget&#039;  &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96API.doc] (Picasso96API.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: --bitmaps--&lt;br /&gt;
*: --colors--&lt;br /&gt;
*: p96AllocBitMap*&lt;br /&gt;
*: p96FreeBitMap*&lt;br /&gt;
*: p96LockBitMap*&lt;br /&gt;
*: p96LockBitMapToBoard*&lt;br /&gt;
*: p96ReadPixel*&lt;br /&gt;
*: p96ReadPixelArray*&lt;br /&gt;
*: p96RectFill*&lt;br /&gt;
*: p96UnlockBitMap*&lt;br /&gt;
*: p96UnlockBitMapFromBoard*&lt;br /&gt;
*: p96WritePixel*&lt;br /&gt;
*: p96WritePixelArray*&lt;br /&gt;
*: &lt;br /&gt;
*:(* = deprecated)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/serial_dev.doc.txt serial_dev.doc] (serial.device)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CloseDevice&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
*; Added  &lt;br /&gt;
*: AAA_Notice&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_START&lt;br /&gt;
*: CMD_wRITE&lt;br /&gt;
*: SDCMD_BREAK&lt;br /&gt;
*: SDCMD_SETPARAMS&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/timer.doc.txt timer.doc] (timer.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MicroDelay&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/usbsys.doc.txt usbsys.doc] (usbsys.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: USBEPGetDescriptorA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/utility.doc.txt utility.doc] (utility.library)&lt;br /&gt;
*; Added  &lt;br /&gt;
*: ASPrintf&lt;br /&gt;
*: SNPrintf&lt;br /&gt;
*: UCS4Count&lt;br /&gt;
*: UCS4ToLower&lt;br /&gt;
*: UCS4ToUpper&lt;br /&gt;
*: UCS4toUTF8&lt;br /&gt;
*: UCS4Valid&lt;br /&gt;
*: UTF8Count&lt;br /&gt;
*: UTF8Decode&lt;br /&gt;
*: UTF8Encode&lt;br /&gt;
*: UTF8Stricmp&lt;br /&gt;
*: UTF8Strnicmp&lt;br /&gt;
*: UTF8toUCS4&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CallHookPkt&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt window_cl.doc] (window.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8067</id>
		<title>SDK Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8067"/>
		<updated>2015-09-02T22:31:22Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Version 53.29 (AmigaOS 4.1 Final Edition) =&lt;br /&gt;
&lt;br /&gt;
== AutoDocs ==&lt;br /&gt;
The following summary lists any section of the AmigaOS API as described in the [Autodocs:Main | AutoDocs] that have changed since the last public release. This should aid developers in helping narrow their reading a little as they review what has changed with AmigaOS 4.1 Final Edition.&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/btree.doc.txt btree.doc] (btree.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diffview_gc.doc.txt diffview_gc.doc] (diffview.gadget)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskio.doc.txt diskio.doc] (diskio.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/filesysbox.doc.txt filesysbox.doc] (filesysbox.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/menu_cl.doc.txt menu_cl.doc] (menuclass)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/z.doc.txt z.doc] (z.library)&lt;br /&gt;
&lt;br /&gt;
=== Changed Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/amigaguide.doc.txt amigaguide.doc] (amigaguide.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddAmigaGuideA()&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/arexx_cl.doc.txt arexx_cl.doc] (arexx.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt chooser_gc.doc] (chooser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/clicktab_gc.doc.txt clicktab_gc.doc] (clicktab.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
*: AllocClickTabNodeA&lt;br /&gt;
*: FreeClickTabNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt console.doc] (console.device)&lt;br /&gt;
*; Added&lt;br /&gt;
*: CD_GETATTRS&lt;br /&gt;
*: CD_SETATTRS&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CD_ASKKEYMAP_POINTERS&lt;br /&gt;
*: CDInputHandler&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_WRITE&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskfont.doc.txt diskfont.doc] (diskfont.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AvailFonts&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt dos.doc] (dos.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CurrentDir&lt;br /&gt;
*: GetConsoleTask&lt;br /&gt;
*: GetFileSysTask&lt;br /&gt;
*: SetConsoleTask&lt;br /&gt;
*: SetFileSysTask&lt;br /&gt;
*; Added&lt;br /&gt;
*: GetConsolePort&lt;br /&gt;
*: GetFileSysPort&lt;br /&gt;
*: SetConsolePort&lt;br /&gt;
*: SetCurrentDir&lt;br /&gt;
*: SetFileSysPort&lt;br /&gt;
*: WriteProtectVolumePort&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AAA-Compatibility-Notice&lt;br /&gt;
*: AddBuffers&lt;br /&gt;
*: AddCmdPathNode&lt;br /&gt;
*: AddDosEntry&lt;br /&gt;
*: AddSegListTrail&lt;br /&gt;
*: AddSegmentTaskList&lt;br /&gt;
*: AllocDosObject&lt;br /&gt;
*: AllocSegList&lt;br /&gt;
*: AssignAddToList&lt;br /&gt;
*: ChangeFilePosition&lt;br /&gt;
*: ChangeFileSize&lt;br /&gt;
*: CopyStringBSTRToC&lt;br /&gt;
*: CreateDir&lt;br /&gt;
*: CreateDirTree&lt;br /&gt;
*: CreateNewProc&lt;br /&gt;
*: DateStamp&lt;br /&gt;
*: Delete&lt;br /&gt;
*: DevNameFromFH&lt;br /&gt;
*: DevNameFromLock&lt;br /&gt;
*: DismountDevice&lt;br /&gt;
*: DoPkt&lt;br /&gt;
*: DosControls&lt;br /&gt;
*: EndNotify&lt;br /&gt;
*: ExamineDir&lt;br /&gt;
*: ExamineObject&lt;br /&gt;
*: FilePart&lt;br /&gt;
*: FindDosEntry&lt;br /&gt;
*: FreeDosObject&lt;br /&gt;
*: GetCurrentDir&lt;br /&gt;
*: GetDiskFileSystemData&lt;br /&gt;
*: GetDiskInfo&lt;br /&gt;
*: GetPID&lt;br /&gt;
*: GetSegListInfoTags&lt;br /&gt;
*: GetVar&lt;br /&gt;
*: HexToLong&lt;br /&gt;
*: Info&lt;br /&gt;
*: IoErr&lt;br /&gt;
*: IsFileSystem&lt;br /&gt;
*: LockTagList&lt;br /&gt;
*: MakeLink&lt;br /&gt;
*: MatchFirst&lt;br /&gt;
*: MountDevice&lt;br /&gt;
*: NameFromFH&lt;br /&gt;
*: NameFromLock&lt;br /&gt;
*: NameFromPort&lt;br /&gt;
*: NotifyVar&lt;br /&gt;
*: ObtainDirContext&lt;br /&gt;
*: Open&lt;br /&gt;
*: ParsePattern&lt;br /&gt;
*: PathPart&lt;br /&gt;
*: ReadLineItemTags&lt;br /&gt;
*: ReadSoftLink&lt;br /&gt;
*: RemAssignList&lt;br /&gt;
*: Rename&lt;br /&gt;
*: RenameDosEntry&lt;br /&gt;
*: ResolvePath&lt;br /&gt;
*: RunCommand&lt;br /&gt;
*: SetComment&lt;br /&gt;
*: SetDate&lt;br /&gt;
*: SetIoErr&lt;br /&gt;
*: SetMode&lt;br /&gt;
*: SetOwnerInfo&lt;br /&gt;
*: SetProgramDir&lt;br /&gt;
*: SetProtection&lt;br /&gt;
*: StartNotify&lt;br /&gt;
*: TrackAddressList&lt;br /&gt;
*: WaitForChar&lt;br /&gt;
*: WaitForData&lt;br /&gt;
*: Write&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt exec.doc] (exec.library)&lt;br /&gt;
*; Added &lt;br /&gt;
*: ASOT_EXTMEM&lt;br /&gt;
*: debug/IsIn68kEmulator&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocEntry&lt;br /&gt;
*: AllocTaskMemEntry&lt;br /&gt;
*: ASOT_PORT&lt;br /&gt;
*: CreateTask&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/expansion.doc.txt expansion.doc] (expansion.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MakeDosNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/gadget_gc.doc.txt gadget_gc.doc] (gadgetclass)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet-- &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/graphics.doc.txt graphics.doc] (graphics.library)&lt;br /&gt;
*; Added&lt;br /&gt;
*: AllocBitMapTagList&lt;br /&gt;
*: GetBoardBytesPerRow&lt;br /&gt;
*: GetBoardDataTagList&lt;br /&gt;
*: GetMonitorDataTagList&lt;br /&gt;
*: GraphicsControlTagList&lt;br /&gt;
*: LockBitMapTagList&lt;br /&gt;
*: LockBitMapToBoardTagList&lt;br /&gt;
*: ReadPixelArray&lt;br /&gt;
*: ReadPixelColor&lt;br /&gt;
*: RectFillColor&lt;br /&gt;
*: UnlockBitMap&lt;br /&gt;
*: UnlockBitMapFromBoard&lt;br /&gt;
*: WritePixelArray&lt;br /&gt;
*: WritePixelColor&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocBitMap&lt;br /&gt;
*: AllocRaster&lt;br /&gt;
*: BestModeIDA&lt;br /&gt;
*: BltBitMapTagList&lt;br /&gt;
*: CalcIVG&lt;br /&gt;
*: ChangeVPBitMap&lt;br /&gt;
*: ClearScreen&lt;br /&gt;
*: CompositeTagList&lt;br /&gt;
*: FindColor&lt;br /&gt;
*: Flood&lt;br /&gt;
*: FreeBitMap&lt;br /&gt;
*: GetBitMapAttr&lt;br /&gt;
*: GetDisplayInfoData&lt;br /&gt;
*: GetRPAttrsA&lt;br /&gt;
*: InitTmpRas&lt;br /&gt;
*: LoadRGB32&lt;br /&gt;
*: LoadRGB4&lt;br /&gt;
*: MakeVPort&lt;br /&gt;
*: ModeNotAvailable&lt;br /&gt;
*: ReadPixel&lt;br /&gt;
*: ReadPixelArray8&lt;br /&gt;
*: ReadPixelLine8&lt;br /&gt;
*: RectFill&lt;br /&gt;
*: SetRPAttrsA&lt;br /&gt;
*: VideoControl&lt;br /&gt;
*: WritePixelLine8&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/icon.doc.txt icon.doc] (icon.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddFreeList&lt;br /&gt;
*: FreeAlloc&lt;br /&gt;
*: FreeFree&lt;br /&gt;
*: FreeFreeList&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/input.doc.txt input.doc] (input.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: IND_ADDEVENT&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/intuition.doc.txt intuition.doc] (intuition.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --boopsi--&lt;br /&gt;
*: GetScreenAttr&lt;br /&gt;
*: GetWindowAttr&lt;br /&gt;
*: OpenScreen&lt;br /&gt;
*: OpenWindow&lt;br /&gt;
*: SetWindowAttr&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt listbrowser_gc.doc] (listbrowser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: SetLBColumnInfoAttrsA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/page_gc.doc.txt page_gc.doc] (page.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/partition_gc.doc.txt partition_gc.doc] (partition.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: all references to &#039;partitiongclass&#039; corrected to &#039;partition.gadget&#039;  &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96API.doc] (Picasso96API.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: --bitmaps--&lt;br /&gt;
*: --colors--&lt;br /&gt;
*: p96AllocBitMap*&lt;br /&gt;
*: p96FreeBitMap*&lt;br /&gt;
*: p96LockBitMap*&lt;br /&gt;
*: p96LockBitMapToBoard*&lt;br /&gt;
*: p96ReadPixel*&lt;br /&gt;
*: p96ReadPixelArray*&lt;br /&gt;
*: p96RectFill*&lt;br /&gt;
*: p96UnlockBitMap*&lt;br /&gt;
*: p96UnlockBitMapFromBoard*&lt;br /&gt;
*: p96WritePixel*&lt;br /&gt;
*: p96WritePixelArray*&lt;br /&gt;
*: &lt;br /&gt;
*:(* = deprecated)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/serial_dev.doc.txt serial_dev.doc] (serial.device)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CloseDevice&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
*; Added  &lt;br /&gt;
*: AAA_Notice&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_START&lt;br /&gt;
*: CMD_wRITE&lt;br /&gt;
*: SDCMD_BREAK&lt;br /&gt;
*: SDCMD_SETPARAMS&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/timer.doc.txt timer.doc] (timer.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MicroDelay&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/usbsys.doc.txt usbsys.doc] (usbsys.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: USBEPGetDescriptorA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/utility.doc.txt utility.doc] (utility.library)&lt;br /&gt;
*; Added  &lt;br /&gt;
*: ASPrintf&lt;br /&gt;
*: SNPrintf&lt;br /&gt;
*: UCS4Count&lt;br /&gt;
*: UCS4ToLower&lt;br /&gt;
*: UCS4ToUpper&lt;br /&gt;
*: UCS4toUTF8&lt;br /&gt;
*: UCS4Valid&lt;br /&gt;
*: UTF8Count&lt;br /&gt;
*: UTF8Decode&lt;br /&gt;
*: UTF8Encode&lt;br /&gt;
*: UTF8Stricmp&lt;br /&gt;
*: UTF8Strnicmp&lt;br /&gt;
*: UTF8toUCS4&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CallHookPkt&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt window_cl.doc] (window.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8066</id>
		<title>SDK Release Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=SDK_Release_Notes&amp;diff=8066"/>
		<updated>2015-09-02T22:30:31Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Version 53.29 (AmigaOS 4.1 Final Edition) =&lt;br /&gt;
&lt;br /&gt;
== AutoDocs ==&lt;br /&gt;
The following summary lists any section of the AmigaOS API as described in the [Autodocs:Main|AutoDocs] that have changed since the last public release. This should aid developers in helping narrow their reading a little as they review what has changed with AmigaOS 4.1 Final Edition.&lt;br /&gt;
&lt;br /&gt;
=== New Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/btree.doc.txt btree.doc] (btree.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diffview_gc.doc.txt diffview_gc.doc] (diffview.gadget)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskio.doc.txt diskio.doc] (diskio.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/filesysbox.doc.txt filesysbox.doc] (filesysbox.library)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/menu_cl.doc.txt menu_cl.doc] (menuclass)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/z.doc.txt z.doc] (z.library)&lt;br /&gt;
&lt;br /&gt;
=== Changed Files ===&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/amigaguide.doc.txt amigaguide.doc] (amigaguide.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddAmigaGuideA()&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/arexx_cl.doc.txt arexx_cl.doc] (arexx.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/chooser_gc.doc.txt chooser_gc.doc] (chooser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/clicktab_gc.doc.txt clicktab_gc.doc] (clicktab.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
*: AllocClickTabNodeA&lt;br /&gt;
*: FreeClickTabNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/console.doc.txt console.doc] (console.device)&lt;br /&gt;
*; Added&lt;br /&gt;
*: CD_GETATTRS&lt;br /&gt;
*: CD_SETATTRS&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CD_ASKKEYMAP_POINTERS&lt;br /&gt;
*: CDInputHandler&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_WRITE&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/diskfont.doc.txt diskfont.doc] (diskfont.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AvailFonts&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/dos.doc.txt dos.doc] (dos.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CurrentDir&lt;br /&gt;
*: GetConsoleTask&lt;br /&gt;
*: GetFileSysTask&lt;br /&gt;
*: SetConsoleTask&lt;br /&gt;
*: SetFileSysTask&lt;br /&gt;
*; Added&lt;br /&gt;
*: GetConsolePort&lt;br /&gt;
*: GetFileSysPort&lt;br /&gt;
*: SetConsolePort&lt;br /&gt;
*: SetCurrentDir&lt;br /&gt;
*: SetFileSysPort&lt;br /&gt;
*: WriteProtectVolumePort&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AAA-Compatibility-Notice&lt;br /&gt;
*: AddBuffers&lt;br /&gt;
*: AddCmdPathNode&lt;br /&gt;
*: AddDosEntry&lt;br /&gt;
*: AddSegListTrail&lt;br /&gt;
*: AddSegmentTaskList&lt;br /&gt;
*: AllocDosObject&lt;br /&gt;
*: AllocSegList&lt;br /&gt;
*: AssignAddToList&lt;br /&gt;
*: ChangeFilePosition&lt;br /&gt;
*: ChangeFileSize&lt;br /&gt;
*: CopyStringBSTRToC&lt;br /&gt;
*: CreateDir&lt;br /&gt;
*: CreateDirTree&lt;br /&gt;
*: CreateNewProc&lt;br /&gt;
*: DateStamp&lt;br /&gt;
*: Delete&lt;br /&gt;
*: DevNameFromFH&lt;br /&gt;
*: DevNameFromLock&lt;br /&gt;
*: DismountDevice&lt;br /&gt;
*: DoPkt&lt;br /&gt;
*: DosControls&lt;br /&gt;
*: EndNotify&lt;br /&gt;
*: ExamineDir&lt;br /&gt;
*: ExamineObject&lt;br /&gt;
*: FilePart&lt;br /&gt;
*: FindDosEntry&lt;br /&gt;
*: FreeDosObject&lt;br /&gt;
*: GetCurrentDir&lt;br /&gt;
*: GetDiskFileSystemData&lt;br /&gt;
*: GetDiskInfo&lt;br /&gt;
*: GetPID&lt;br /&gt;
*: GetSegListInfoTags&lt;br /&gt;
*: GetVar&lt;br /&gt;
*: HexToLong&lt;br /&gt;
*: Info&lt;br /&gt;
*: IoErr&lt;br /&gt;
*: IsFileSystem&lt;br /&gt;
*: LockTagList&lt;br /&gt;
*: MakeLink&lt;br /&gt;
*: MatchFirst&lt;br /&gt;
*: MountDevice&lt;br /&gt;
*: NameFromFH&lt;br /&gt;
*: NameFromLock&lt;br /&gt;
*: NameFromPort&lt;br /&gt;
*: NotifyVar&lt;br /&gt;
*: ObtainDirContext&lt;br /&gt;
*: Open&lt;br /&gt;
*: ParsePattern&lt;br /&gt;
*: PathPart&lt;br /&gt;
*: ReadLineItemTags&lt;br /&gt;
*: ReadSoftLink&lt;br /&gt;
*: RemAssignList&lt;br /&gt;
*: Rename&lt;br /&gt;
*: RenameDosEntry&lt;br /&gt;
*: ResolvePath&lt;br /&gt;
*: RunCommand&lt;br /&gt;
*: SetComment&lt;br /&gt;
*: SetDate&lt;br /&gt;
*: SetIoErr&lt;br /&gt;
*: SetMode&lt;br /&gt;
*: SetOwnerInfo&lt;br /&gt;
*: SetProgramDir&lt;br /&gt;
*: SetProtection&lt;br /&gt;
*: StartNotify&lt;br /&gt;
*: TrackAddressList&lt;br /&gt;
*: WaitForChar&lt;br /&gt;
*: WaitForData&lt;br /&gt;
*: Write&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/exec.doc.txt exec.doc] (exec.library)&lt;br /&gt;
*; Added &lt;br /&gt;
*: ASOT_EXTMEM&lt;br /&gt;
*: debug/IsIn68kEmulator&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocEntry&lt;br /&gt;
*: AllocTaskMemEntry&lt;br /&gt;
*: ASOT_PORT&lt;br /&gt;
*: CreateTask&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/expansion.doc.txt expansion.doc] (expansion.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MakeDosNode&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/gadget_gc.doc.txt gadget_gc.doc] (gadgetclass)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet-- &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/graphics.doc.txt graphics.doc] (graphics.library)&lt;br /&gt;
*; Added&lt;br /&gt;
*: AllocBitMapTagList&lt;br /&gt;
*: GetBoardBytesPerRow&lt;br /&gt;
*: GetBoardDataTagList&lt;br /&gt;
*: GetMonitorDataTagList&lt;br /&gt;
*: GraphicsControlTagList&lt;br /&gt;
*: LockBitMapTagList&lt;br /&gt;
*: LockBitMapToBoardTagList&lt;br /&gt;
*: ReadPixelArray&lt;br /&gt;
*: ReadPixelColor&lt;br /&gt;
*: RectFillColor&lt;br /&gt;
*: UnlockBitMap&lt;br /&gt;
*: UnlockBitMapFromBoard&lt;br /&gt;
*: WritePixelArray&lt;br /&gt;
*: WritePixelColor&lt;br /&gt;
*: *; Changed&lt;br /&gt;
*: AllocBitMap&lt;br /&gt;
*: AllocRaster&lt;br /&gt;
*: BestModeIDA&lt;br /&gt;
*: BltBitMapTagList&lt;br /&gt;
*: CalcIVG&lt;br /&gt;
*: ChangeVPBitMap&lt;br /&gt;
*: ClearScreen&lt;br /&gt;
*: CompositeTagList&lt;br /&gt;
*: FindColor&lt;br /&gt;
*: Flood&lt;br /&gt;
*: FreeBitMap&lt;br /&gt;
*: GetBitMapAttr&lt;br /&gt;
*: GetDisplayInfoData&lt;br /&gt;
*: GetRPAttrsA&lt;br /&gt;
*: InitTmpRas&lt;br /&gt;
*: LoadRGB32&lt;br /&gt;
*: LoadRGB4&lt;br /&gt;
*: MakeVPort&lt;br /&gt;
*: ModeNotAvailable&lt;br /&gt;
*: ReadPixel&lt;br /&gt;
*: ReadPixelArray8&lt;br /&gt;
*: ReadPixelLine8&lt;br /&gt;
*: RectFill&lt;br /&gt;
*: SetRPAttrsA&lt;br /&gt;
*: VideoControl&lt;br /&gt;
*: WritePixelLine8&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/icon.doc.txt icon.doc] (icon.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: AddFreeList&lt;br /&gt;
*: FreeAlloc&lt;br /&gt;
*: FreeFree&lt;br /&gt;
*: FreeFreeList&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/input.doc.txt input.doc] (input.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: IND_ADDEVENT&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/intuition.doc.txt intuition.doc] (intuition.library)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --boopsi--&lt;br /&gt;
*: GetScreenAttr&lt;br /&gt;
*: GetWindowAttr&lt;br /&gt;
*: OpenScreen&lt;br /&gt;
*: OpenWindow&lt;br /&gt;
*: SetWindowAttr&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/listbrowser_gc.doc.txt listbrowser_gc.doc] (listbrowser.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: SetLBColumnInfoAttrsA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/page_gc.doc.txt page_gc.doc] (page.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/partition_gc.doc.txt partition_gc.doc] (partition.gadget)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: all references to &#039;partitiongclass&#039; corrected to &#039;partition.gadget&#039;  &lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/Picasso96API.doc.txt Picasso96API.doc] (Picasso96API.library)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: --bitmaps--&lt;br /&gt;
*: --colors--&lt;br /&gt;
*: p96AllocBitMap*&lt;br /&gt;
*: p96FreeBitMap*&lt;br /&gt;
*: p96LockBitMap*&lt;br /&gt;
*: p96LockBitMapToBoard*&lt;br /&gt;
*: p96ReadPixel*&lt;br /&gt;
*: p96ReadPixelArray*&lt;br /&gt;
*: p96RectFill*&lt;br /&gt;
*: p96UnlockBitMap*&lt;br /&gt;
*: p96UnlockBitMapFromBoard*&lt;br /&gt;
*: p96WritePixel*&lt;br /&gt;
*: p96WritePixelArray*&lt;br /&gt;
*: &lt;br /&gt;
*:(* = deprecated)&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/serial_dev.doc.txt serial_dev.doc] (serial.device)&lt;br /&gt;
*; Removed&lt;br /&gt;
*: CloseDevice&lt;br /&gt;
*: OpenDevice&lt;br /&gt;
*; Added  &lt;br /&gt;
*: AAA_Notice&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CMD_READ&lt;br /&gt;
*: CMD_START&lt;br /&gt;
*: CMD_wRITE&lt;br /&gt;
*: SDCMD_BREAK&lt;br /&gt;
*: SDCMD_SETPARAMS&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/timer.doc.txt timer.doc] (timer.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: MicroDelay&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/usbsys.doc.txt usbsys.doc] (usbsys.device)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: USBEPGetDescriptorA&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/utility.doc.txt utility.doc] (utility.library)&lt;br /&gt;
*; Added  &lt;br /&gt;
*: ASPrintf&lt;br /&gt;
*: SNPrintf&lt;br /&gt;
*: UCS4Count&lt;br /&gt;
*: UCS4ToLower&lt;br /&gt;
*: UCS4ToUpper&lt;br /&gt;
*: UCS4toUTF8&lt;br /&gt;
*: UCS4Valid&lt;br /&gt;
*: UTF8Count&lt;br /&gt;
*: UTF8Decode&lt;br /&gt;
*: UTF8Encode&lt;br /&gt;
*: UTF8Stricmp&lt;br /&gt;
*: UTF8Strnicmp&lt;br /&gt;
*: UTF8toUCS4&lt;br /&gt;
*; Changed&lt;br /&gt;
*: CallHookPkt&lt;br /&gt;
* [http://wiki.amigaos.net/amiga/autodocs/window_cl.doc.txt window_cl.doc] (window.class)&lt;br /&gt;
*; Changed&lt;br /&gt;
*: --datasheet--&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=DeveloperDoc:Main&amp;diff=8063</id>
		<title>DeveloperDoc:Main</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=DeveloperDoc:Main&amp;diff=8063"/>
		<updated>2015-09-02T22:01:57Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Software Development Kit (SDK) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The AmigaOS Documentation Wiki provides the latest information on how to program systems running AmigaOS 4.x. It has been updated for Release 4.0 and higher of AmigaOS and covers all the computer systems which run the Amiga operating system from the A1200 all the way up to the X1000.&lt;br /&gt;
&lt;br /&gt;
This wiki is meant to help you learn how to program AmigaOS systems. It assumes some previous experience with programming and familiarity with computers in general. Although it is not required, a knowledge of the C programming language will make it much easier to understand the material in this book. Most of the Amiga operating system is written in C, hence C is the language used for the programming examples. Other languages are available such as [http://home.ntelos.net/~tbreeden/ Modula-2], [http://cshandley.co.uk/portable/PortablE.html E] and C++ but the primary interface for all AmigaOS programming is still C.&lt;br /&gt;
&lt;br /&gt;
This wiki is intended for the following audiences:&lt;br /&gt;
&lt;br /&gt;
* Programmers who want to create application software for AmigaOS systems.&lt;br /&gt;
* Software developers who want to upgrade their software for Release 4.0 or higher of the operating system.&lt;br /&gt;
* Anyone who wants to know more about how AmigaOS works.&lt;br /&gt;
&lt;br /&gt;
The system software is organized into related groups of functions called libraries. The same basic organization is used for this wiki.&lt;br /&gt;
&lt;br /&gt;
== Software Development Kit (SDK) ==&lt;br /&gt;
&lt;br /&gt;
You can find the [http://www.hyperion-entertainment.biz/index.php?option=com_registration&amp;amp;view=files&amp;amp;parent=30&amp;amp;Itemid=63 AmigaOS SDK at this location].&lt;br /&gt;
&lt;br /&gt;
[[SDK FAQ|Frequency Asked Questions]]&lt;br /&gt;
&lt;br /&gt;
[[Autodocs:Main|Autodocs]]&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
[[Kernel]]&lt;br /&gt;
&lt;br /&gt;
[[Libraries]]&lt;br /&gt;
&lt;br /&gt;
[[Devices]]&lt;br /&gt;
&lt;br /&gt;
[[Resources]]&lt;br /&gt;
&lt;br /&gt;
== General Information ==&lt;br /&gt;
&lt;br /&gt;
[[AmigaOS Versions]]&lt;br /&gt;
&lt;br /&gt;
[[Fundamental Types]]&lt;br /&gt;
&lt;br /&gt;
[[Controlling Application Stack]]&lt;br /&gt;
&lt;br /&gt;
[[User Interface Style Guide]]&lt;br /&gt;
&lt;br /&gt;
[[GUI Programming]]&lt;br /&gt;
&lt;br /&gt;
[[Programming in the Amiga Environment]]&lt;br /&gt;
&lt;br /&gt;
[[Libraries and Devices]]&lt;br /&gt;
&lt;br /&gt;
[[Migration Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting Your Software]]&lt;br /&gt;
&lt;br /&gt;
[[Release 4 Compatibility]]&lt;br /&gt;
&lt;br /&gt;
[[Writing apps for Xena]]&lt;br /&gt;
&lt;br /&gt;
[[AmigaGuide 101]]&lt;br /&gt;
&lt;br /&gt;
[[Installation Utility]]&lt;br /&gt;
&lt;br /&gt;
[[Optimized Window Refreshing]]&lt;br /&gt;
&lt;br /&gt;
[[Autodoc Style Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Debug Kernel]]&lt;br /&gt;
&lt;br /&gt;
[[AmiDock and Dockies]]&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Exec_Extended_Memory&amp;diff=8059</id>
		<title>Exec Extended Memory</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Exec_Extended_Memory&amp;diff=8059"/>
		<updated>2015-09-02T13:22:42Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: removed extra white space in code example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
AmigaOS is a 32 bit OS. There is little we can change about it. The size of an address pointer is intrinsically entangled into the API, and getting rid of this legacy is, for the most part, a matter of replacing all of the API with a new one. Every time a programmer writes something like &amp;quot;sizeof(struct Message)&amp;quot; the 32 bit nature is fused into his code.&lt;br /&gt;
&lt;br /&gt;
This has some repercussions that cannot be easily ignored. It means that our address space is inherently limited to 32 bits (meaning 4 gigabytes). In reality this space is even smaller than that. PCI space, the kernel, memory buffers, and other memory areas take up a large chunk of the already limited address space, leaving roughly 2 gigabytes for the applications running on the machine – 2 gigs which also are shared between all of the programs running.&lt;br /&gt;
&lt;br /&gt;
= Physical versus Virtual =&lt;br /&gt;
&lt;br /&gt;
A physical address of a memory block is implicitly defined by its position within the memory chips and the order in which the modules are inserted into the main board’s memory slots. They start at zero and go up to a specific maximum.&lt;br /&gt;
&lt;br /&gt;
A virtual address, on the other hand, is what the CPU and hence the application program sees. They might be the same but as a general rule they are different. Virtual addresses are given on the fly but there is a rule that every memory cell must have a unique virtual address because all references to that cell are stored as the virtual address the application sees.&lt;br /&gt;
&lt;br /&gt;
[[File:fig1-ext-mem.jpg|frame|center|Physical Memory vs Virtual Address Space]]&lt;br /&gt;
&lt;br /&gt;
Modern systems like the AmigaOne X1000 and upcoming models can take more than 4 gigabytes of memory, but so far, the extra memory will never be used. Even in a 4 gigabyte system, there is memory that will never be touched because there is just no free address. Unfortunately, every byte needs to have its own virtual address and no two bytes can have the same.&lt;br /&gt;
&lt;br /&gt;
This is where extended memory objects enter the picture.&lt;br /&gt;
&lt;br /&gt;
= Extended Memory Object =&lt;br /&gt;
&lt;br /&gt;
Extended memory objects (ExtMem) are a means to access memory beyond the 2 gigabyte barrier by applications that are written to make use of them. In a nutshell, an extended memory object is a chunk of physical memory that exists in a &#039;&#039;nirvana&#039;&#039; state somewhere in the memory of the computer without a virtual address of its own. The memory cannot be accessed by anyone or anything in this state. In order to access it, an application must map part of the object into its own virtual address space. This mapping does make a part of the memory represented by the ExtMem object accessible in a memory window in the application’s own address space.&lt;br /&gt;
&lt;br /&gt;
There is no limit to the number of mappings an application can do. If needed, it can have several mappings active at a time and add or delete mappings as required. The only restriction is that mappings must not overlap (either in virtual address space or in the memory object itself). Each mapping opens up a view into a part of the memory object and, depending on how the mapping was performed, the application can read and/or write to the memory as if it were normal memory.&lt;br /&gt;
&lt;br /&gt;
[[File:fig2-ext-mem.jpg|frame|center|ExtMem Object Mapping]]&lt;br /&gt;
&lt;br /&gt;
A mapping is defined by the virtual address in application memory (which can be chosen by the application, or picked at random by the OS), the length of the map’s window, and the offset it maps to in the ExtMem object.&lt;br /&gt;
&lt;br /&gt;
There are some caveats though. Most notably, the ExtMem object itself doesn’t have an address. In that sense it should be treated more like a file than a memory block. If an application wants to have permanent references to memory in the ExtMem object, it needs to store them by offset just like it would with a file. The first offset is zero, so to address the 1000th byte in the memory block, the application needs to reference it by the offset of 1000. Obviously, this offset must be calculated against the base of the mapping’s offset; just like in a file, reading a part of the file into a buffer makes the first byte read the offset zero in the buffer.&lt;br /&gt;
&lt;br /&gt;
As an example, consider the following situation. We want to access byte 3000 of the ExtMem object. We created a mapping that has length 4000 and starts at offset 2000. The resulting address for our byte would be the base address of the mapping plus 1000, since the offset of the beginning is already at 2000.&lt;br /&gt;
&lt;br /&gt;
= Downsides of the ExtMem system =&lt;br /&gt;
&lt;br /&gt;
If you think now that this all sounds suspiciously like bank switching then you are correct. The method has been used way back in the Home computer age and even earlier. The Sinclair ZX Spectrum 128K was equipped with twice as much memory as the Z80 CPU could address; the upper 16k of the machine could be swapped between different chunks of the rest of the memory. Similarly, the Commodore 64 used bank switching to address a larger memory than its 6502 CPU could handle. It was the only possibility at the time to add more memory.&lt;br /&gt;
&lt;br /&gt;
This method we employ now is basically the same but with a bit more added comfort.&lt;br /&gt;
&lt;br /&gt;
Obviously, the method is a compromise. A &#039;&#039;real&#039;&#039; 64 bit system would be better and much more transparent to use. However, as stated earlier, there is a lot of work involved to make AmigaOS 64 bit compatible. With the method of ExtMem objects, breaking the barrier is possible now as opposed to years down the road.&lt;br /&gt;
&lt;br /&gt;
= Who can benefit from ExtMem objects? =&lt;br /&gt;
&lt;br /&gt;
Every application that, in some way or the other, has to cope with large amounts of data. Even if the dataset is only potentially large (like, for example, a text editor), using an ExtMem object has its advantages. The text editor (or word processor), by its nature, only presents a small subset of the text it is editing to the user. Likewise, a movie editor would only need to have access to a few frames in order to show thumbnails of the movie on a timeline or display a single frame that the user is working with.&lt;br /&gt;
&lt;br /&gt;
Another example is RAM disk. Plans are currently underway to update the RAM disk to make use of the ExtMem object interface, allowing out-of-the-box usage of those normally unassigned memory blocks without draining the valuable main memory. Since (depending on programmer setting) memory blocks can even be allocated &#039;&#039;on-demand&#039;&#039; instead of ahead of time. This will make RAM disk have an even lower footprint on top of making it possible to store larger amounts of data than ever before.&lt;br /&gt;
&lt;br /&gt;
It needs to be said that the ExtMem system doesn’t require memory beyond the 4 gigabyte bounds. It can work with normal memory as well, even though that is not its purpose.&lt;br /&gt;
&lt;br /&gt;
So, as you can see, a good number of applications have a natural tendency to only access a very small subset of their memory at a given time. All of these are good candidate for using ExtMem objects to break the memory barrier.&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
    /****************************************************************************/&lt;br /&gt;
    /*&lt;br /&gt;
    **  This example allocates blocks from the extmem space.&lt;br /&gt;
    **  The map() and unmap() allocate and free address space for the datablock-&amp;gt;data.&lt;br /&gt;
    **&lt;br /&gt;
    **  Note that memory returned in extmem space has addresses mapped above the&lt;br /&gt;
    **  first 2 gig.  (ie: High bit is always set).&lt;br /&gt;
    **  Be carefull passing these addresses to other system and user functions,&lt;br /&gt;
    **  they may not use unsigned pointers and addresses may appear negative.&lt;br /&gt;
    **&lt;br /&gt;
    **  This example is written without test compilation or decent formatting,&lt;br /&gt;
    **   be carefull of typos.  cjw.&lt;br /&gt;
    */&lt;br /&gt;
    /****************************************************************************/&lt;br /&gt;
    /*&lt;br /&gt;
    ** Example of a data block that can go into a list.&lt;br /&gt;
    */&lt;br /&gt;
    struct DataBlock   &lt;br /&gt;
    {&lt;br /&gt;
         struct MinNode      node;        /* minlist node */&lt;br /&gt;
         struct ExtMemIFace *iextmem;     /* extmem interface pointer */&lt;br /&gt;
         uint32              allocsize;   /* size of data allocated */&lt;br /&gt;
         APTR                data;        /* pointer to the mapped memory or 0 if unmapped */&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    /****************************************************************************/&lt;br /&gt;
    /*&lt;br /&gt;
    **  Block free function.&lt;br /&gt;
    */&lt;br /&gt;
    void free_block(struct DataBlock *block)&lt;br /&gt;
    {&lt;br /&gt;
       if( block )&lt;br /&gt;
       {&lt;br /&gt;
          if( block-&amp;gt;iextmem )&lt;br /&gt;
          {&lt;br /&gt;
             IExec-&amp;gt;FreeSysObject(ASOT_EXTMEM,block-&amp;gt;iextmem);&lt;br /&gt;
          }&lt;br /&gt;
          IExec-&amp;gt;FreeVec(block);&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
       return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /****************************************************************************/&lt;br /&gt;
    /*&lt;br /&gt;
    **  Deallocate all blocks in a list.&lt;br /&gt;
    */&lt;br /&gt;
    void free_block_list( struct List *list )&lt;br /&gt;
    {&lt;br /&gt;
       struct Node *n;&lt;br /&gt;
&lt;br /&gt;
       /* free all blocks in a list */&lt;br /&gt;
       while(( n = IExec-&amp;gt;RemTail(list) ))&lt;br /&gt;
       {&lt;br /&gt;
          free_block((APTR)n);&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
       return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /****************************************************************************/&lt;br /&gt;
    /*&lt;br /&gt;
    **  Allocate a single block.&lt;br /&gt;
    */&lt;br /&gt;
    struct DataBlock * allocate_block(uint32 size)&lt;br /&gt;
    {&lt;br /&gt;
       struct DataBlock *block, *result = NULL;&lt;br /&gt;
       uint64 size64;&lt;br /&gt;
&lt;br /&gt;
       if((block = IExec-&amp;gt;AllocVecTags(sizeof(*block),AVT_Type,MEMF_SHARED,&lt;br /&gt;
                                                      AVT_Lock,FALSE,&lt;br /&gt;
                                                      AVT_ClearWithValue,0,&lt;br /&gt;
                                                      TAG_END)))&lt;br /&gt;
       {&lt;br /&gt;
          size64 = size;  /* must be in a uint64 variable.*/&lt;br /&gt;
          block-&amp;gt;iextmem = IExec-&amp;gt;AllocSysObjectTags(ASOT_EXTMEM,&lt;br /&gt;
                                                     ASOEXTMEM_Size, &amp;amp;size64,&lt;br /&gt;
                                                     ASOEXTMEM_AllocationPolicy, EXTMEMPOLICY_IMMEDIATE,&lt;br /&gt;
                                                     TAG_END);&lt;br /&gt;
          if( block-&amp;gt;iextmem )&lt;br /&gt;
          {&lt;br /&gt;
             block-&amp;gt;allocsize = size;&lt;br /&gt;
             result = block;&lt;br /&gt;
          }&lt;br /&gt;
          else&lt;br /&gt;
          {&lt;br /&gt;
             free_block(block); /* free datablock struct on failure */&lt;br /&gt;
          }&lt;br /&gt;
       }&lt;br /&gt;
&lt;br /&gt;
       return(result);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /****************************************************************************/&lt;br /&gt;
    /*&lt;br /&gt;
    **  Map address space for block data.&lt;br /&gt;
    */&lt;br /&gt;
    int32 map_block_data(struct DataBlock *block)&lt;br /&gt;
    {&lt;br /&gt;
       int32 result = FALSE;   /* default for failure */&lt;br /&gt;
&lt;br /&gt;
       if( block )&lt;br /&gt;
       {&lt;br /&gt;
          if( block-&amp;gt;iextmem )&lt;br /&gt;
          {&lt;br /&gt;
             block-&amp;gt;data = block-&amp;gt;iextmem-&amp;gt;Map(0,block-&amp;gt;allocsize, 0LL, 0);&lt;br /&gt;
             if( block-&amp;gt;data )&lt;br /&gt;
             {&lt;br /&gt;
                result = TRUE;&lt;br /&gt;
             }&lt;br /&gt;
          }&lt;br /&gt;
       }&lt;br /&gt;
       return(result);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /****************************************************************************/&lt;br /&gt;
    /*&lt;br /&gt;
    **  Release address space for block data.&lt;br /&gt;
    */&lt;br /&gt;
    void unmap_block_data(struct DataBlock *block)&lt;br /&gt;
    {&lt;br /&gt;
       if( block )&lt;br /&gt;
       {&lt;br /&gt;
          if( block-&amp;gt;iextmem )&lt;br /&gt;
          {&lt;br /&gt;
             if( block-&amp;gt;data )&lt;br /&gt;
             {&lt;br /&gt;
                block-&amp;gt;iextmem-&amp;gt;Unmap(block-&amp;gt;data, block-&amp;gt;allocsize);&lt;br /&gt;
                block-&amp;gt;data = NULL;   /* clear pointer */&lt;br /&gt;
             }&lt;br /&gt;
          }&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
    /****************************************************************************/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Autodocs:Main&amp;diff=7264</id>
		<title>Autodocs:Main</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Autodocs:Main&amp;diff=7264"/>
		<updated>2014-02-25T22:25:05Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The idea would be to generate the autodocs from the AmigaOS source code and either post them here or link to where they are stored.&lt;br /&gt;
&lt;br /&gt;
This will be done at a later date. The first priority should be to update the existing documentation first.&lt;br /&gt;
&lt;br /&gt;
In the interim the autodocs are included in the latest AmigaOS [[SDK_FAQ|SDK]] and are also available as text files on the mirror at http://www.intuitionbase.com/autodocs/.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_Workbench_Basic_Operations&amp;diff=7237</id>
		<title>AmigaOS Manual: Workbench Basic Operations</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_Workbench_Basic_Operations&amp;diff=7237"/>
		<updated>2014-02-15T22:47:34Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before using your Amiga, you should familiarize yourself with the basic Amiga system concepts and techniques provided in this chapter. These include:&lt;br /&gt;
&lt;br /&gt;
* Booting your system&lt;br /&gt;
* Using the pointers&lt;br /&gt;
* Using the mouse&lt;br /&gt;
* Handling disks and using disk drives&lt;br /&gt;
* Creating and accessing files and directories&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Booting/Rebooting Your System =&lt;br /&gt;
&lt;br /&gt;
Booting powers on your computer and loads the operating system information from a disk to the computer&#039;s memory. Each time the Amiga is booted, the system must find the Amiga system software on a bootable disk device such as a hard disk, USB drive, compact flash card, or on the original Commodore Amiga systems, a floppy disk. If there are no bootable disks when the system is powered on, depending on your system, you may see an animated screen requesting insertion of a bootable disk into a floppy drive or a BIOS prompt, such as that provided by U-Boot, CFE, or Open Firmware.&lt;br /&gt;
&lt;br /&gt;
Rebooting resets you computer without turning off the power. This process terminates any active programs and erases any data stored in the Amiga&#039;s memory.&lt;br /&gt;
&lt;br /&gt;
For information about booting and rebooting older floppy-only systems, see Appendix B.&lt;br /&gt;
&lt;br /&gt;
Each time the Amiga is booted or rebooted, the following events occur:&lt;br /&gt;
&lt;br /&gt;
1. The Amiga executes a script file called the Startup-sequence. The Startup-sequence file contains AmigaDOS commands that load the Amiga software and handle various hardware and software setup tasks.&lt;br /&gt;
&lt;br /&gt;
2. The Startup-sequence executes a script file called User-startup, if you have created it. In general, User-startup files contain your own customized configurations, resident commands, and directory assignments. It also executes a script file called Network-startup. This script is designed to have any programs added to it that may require the networking to be functional before running programs that require it. The script is called in a special way so as not to delay the boot process while the network is initializing, but it will defer programs that rely on the network while it does.&lt;br /&gt;
Appendix B offer some instructions and suggestions of items that you can place in the User-startup and Network-startup files.&lt;br /&gt;
&lt;br /&gt;
3. The Amiga Workbench screen appears, as illustrated in Figure 2-1. &lt;br /&gt;
&lt;br /&gt;
[[File:Wb.png|480px|center|Workbench Screen]]&lt;br /&gt;
&lt;br /&gt;
4. Workbench runs any programs that are set up in the WBStartup preferences. By adding programs to the WBStartup preferences tool, you can also customize your system startup. &lt;br /&gt;
&lt;br /&gt;
Do not alter the Startup-sequence file, doing so can prevent the Amiga from booting properly.&lt;br /&gt;
&lt;br /&gt;
To reboot your system:&lt;br /&gt;
&lt;br /&gt;
# Be sure that all disk activity has stopped and that any floppy disk drive, hard disk drive lights, and USB device activity lights are unlit.&lt;br /&gt;
# If you are rebooting from a floppy disk drive, insert a copy of the Workbench disk into a floppy disk drive.&lt;br /&gt;
# Simultaneously hold down the Ctrl (Control), left Amiga, and right Amiga keys and then release them.&lt;br /&gt;
&lt;br /&gt;
== Special Boot Options ==&lt;br /&gt;
&lt;br /&gt;
Extra memory used for maintaining devices can prevent floppy-based games from running. See Appendix D for information about how to avoid this problem.&lt;br /&gt;
&lt;br /&gt;
= Using the Workbench Pointers =&lt;br /&gt;
&lt;br /&gt;
The Workbench has two pointers: the mouse pointer and the busy pointer.&lt;br /&gt;
&lt;br /&gt;
== Mouse Pointer ==&lt;br /&gt;
&lt;br /&gt;
The mouse pointer is a small movable picture that is used to indicate to the system the location at which you wish to do some operation. By default the mouse pointer is an image of an arrow. The mouse pointer is moved and positioned with the mouse. The tip of the pointer has a hot spot, which is one pixel (a dot of light that makes up the monitor screen display) that the system is programmed to recognize a the pointer&#039;s locator. The pointer indicates to the system the position of an item that you wish to work with. Through the mouse, you communicate the action that the system should take on this item. You can change the shape and color of the mouse pointer using the Pointer Preferences editor, described in Chapter 5.&lt;br /&gt;
&lt;br /&gt;
== Busy Pointer ==&lt;br /&gt;
&lt;br /&gt;
The busy pointer, also referred to as the wait pointer, is displayed in place of the mouse pointer to indicate that the system is attempting to execute an instruction. By default the busy pointer is an image of a stopwatch. Most Workbench operations are unavailable while the busy pointer is displayed. However, you can still move, size, and depth-arrange windows with the busy pointer. The appearance of this pointer can also be changed using the Pointer Preferences editor described in Chapter 5.&lt;br /&gt;
&lt;br /&gt;
= Using the Mouse =&lt;br /&gt;
&lt;br /&gt;
AmigaOS computers come equipped with a mouse, illustrated in Figure 2-2, used to communicate with the system through the pointer. The mouse pointer is positioned by moving the mouse. Manipulating the mouse so that the pointer is located over various objects and pictures on the screen and pressing the mouse buttons tells your Amiga what to do.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-2.png|center|frame|Amiga Mouse]]&lt;br /&gt;
&lt;br /&gt;
== Holding the Mouse ==&lt;br /&gt;
&lt;br /&gt;
Hold the mouse on a flat surface with the cable extending away from you so that the mouse box rests under the palm of your hand with the buttons under your fingertips. In this position, the left mouse button is the selection button and the right mouse button is the menu button.&lt;br /&gt;
&lt;br /&gt;
== Mouse Operations ==&lt;br /&gt;
&lt;br /&gt;
When using the mouse,&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Pointing || means moving the mouse so that the tip of the pointer is positioned over an object on the screen. The pointer moves in the same direction you move the mouse. The mouse can be lifted and repositioned at any time. Lifting the mouse does not move the pointer.&lt;br /&gt;
|-&lt;br /&gt;
| Clicking || means pressing and releasing the selection button.&lt;br /&gt;
|-&lt;br /&gt;
| Double-Clicking || means clicking the selection button twice in rapid succession. Double-clicking on an icon causes a window to appear or a program to start.&lt;br /&gt;
|-&lt;br /&gt;
| Holding Down || means pressing the mouse button until your action is completed.&lt;br /&gt;
|-&lt;br /&gt;
| Dragging || means moving screens, windows, and icons by holding down the selection button and moving the mouse. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using the Selection Button ==&lt;br /&gt;
&lt;br /&gt;
The left mouse button is the selection button, used for selecting items on the monitor display for processing. This button is also used to move, or drag, items on the screen. For information about these operations, see Chapter 3.&lt;br /&gt;
&lt;br /&gt;
== Using the Menu Button ==&lt;br /&gt;
&lt;br /&gt;
The right mouse button is the menu button, which is used to display the menu bar and menus and to choose items from them. Menu bars contain the headings of each menu available for a selected window, program, or icon. Menus contain lists of options for the operations that you can do with the selected item.&lt;br /&gt;
&lt;br /&gt;
=== Using Menus ===&lt;br /&gt;
&lt;br /&gt;
Menu bars appear across the top of the screen, containing any menu headings available.&lt;br /&gt;
&lt;br /&gt;
Hold down the menu button to display the menu bar as illustrated in Figure 2-3. Hol down the menu button while pointing to the different menu headings to show the available items listed beneath each. To choose a particular item, move the pointer down and release the menu button when the pointer touches it.&lt;br /&gt;
&lt;br /&gt;
[[File:LibFig2-4.png|center|frame|Sample Menu Bar and Menu]]&lt;br /&gt;
&lt;br /&gt;
Some menu items have submenus, which are additional related options that appear to the right of the menu item when it is selected. The symbol » after the item name indicates a submenu. If a menu has submenus, select one of the submenu options. Choosing a main menu item without choosing one of its submenus has no effect. In addition to the » symbol, other symbols may appear on the menu:&lt;br /&gt;
&lt;br /&gt;
* An ellipsis (...) follows the name of menu items that open a requester.&lt;br /&gt;
* A checkmark in the area to the left of a menu item indicates that the items is an option that is currently selected. When this area is empty, the option is deselected. &lt;br /&gt;
&lt;br /&gt;
To execute several menu options at once, hold down the menu button and, using the selection button, click on the menu options of your choice.&lt;br /&gt;
&lt;br /&gt;
The menu button can also be used to cancel operations being performed by the selection button, such as drag selection.&lt;br /&gt;
&lt;br /&gt;
=== Ghosted Menu Items ===&lt;br /&gt;
&lt;br /&gt;
If a menu item is not available for a particular operation, it is ghosted or displayed less distinctly than the others, as illustrated in Figure 2-4.&lt;br /&gt;
&lt;br /&gt;
[[File:SG6-3.png|frame|center|A menu with ghosted items]]&lt;br /&gt;
&lt;br /&gt;
== Canceling an Operation ==&lt;br /&gt;
&lt;br /&gt;
Cancel the operation being performed with the selection button by clicking the menu button while still holding down the selection button. The following operations can be cancelled:&lt;br /&gt;
&lt;br /&gt;
* Selecting&lt;br /&gt;
* Dragging&lt;br /&gt;
* Drag selection&lt;br /&gt;
* Changing the size of a window &lt;br /&gt;
&lt;br /&gt;
== Using the Amiga Without a Mouse ==&lt;br /&gt;
&lt;br /&gt;
All mouse actions can also be done using the keyboard. Certain key combinations allow use of the keyboard to move the pointer, select icons, and choose menu items. Keyboard shortcuts appear in the menu boxes to the right of some options. Holding down the right Amiga key and simultaneously pressing the letter displayed attains the same results as activating that menu option. Using the keyboard shortcuts instead of the menus speeds your work. For a full description of key functions, see the hardware manual for your Amiga model. Key shortcuts to manipulate the pointer directly can be found in your Workbench help files on your system disk.&lt;br /&gt;
&lt;br /&gt;
= Using Disk Drives =&lt;br /&gt;
&lt;br /&gt;
Disk drives are devices from which information is retrieved or to which information is written or stored. An Amiga can have one or more hard disk drives, as well as floppy disk drives, depending on the model. Classic Amiga floppy disk drives can use low density floppy disks. However, if you have a high density floppy disk drive on your Amiga, you can also use high density floppy disks. Refer to the hardware manual that came with your system if you are not sure about the type of floppy disk drive you have.&lt;br /&gt;
&lt;br /&gt;
Each disk drive has a device name, such as DF0: for the internal floppy drive. (Additional floppy drives are designated DF1:, DF2:, and DF3:). A disk icon is displayed on the Workbench screen for each disk inserted in a drive and for each hard disk partition.&lt;br /&gt;
&lt;br /&gt;
A similar convention is used for other disk devices. For example the default device name for your internal hard disk is DH0:, with additional devices designated DH1:, DH2:, and so forth. These devices may correspond to a physical disk or a disk partition. USB devices which are automounted typically are designated USB0:, USB1:, and so forth. Optical media drives, such as a CD-ROM or DVD-ROM drive follow a similar convention, with disk devices starting with ICD0: followed by ICD1:, ICD2:, and so forth. All disk device names are user editable.&lt;br /&gt;
&lt;br /&gt;
The device name and the volume name are two ways of identifying a given disk. For most purposes use either name to refer to the disk when entering a path or within a file requester. The device name refers to the disk that is in the specified disk drive. The volume name refers specifically to a particular disk. For example, if you have an internal hard disk labeled as device DH0: with a volume name of Mydisk, you can reference it as either DH0: or Mydisk:.&lt;br /&gt;
&lt;br /&gt;
Most disk drives have activity lights that are lit when a device is in use, either reading or writing data.&lt;br /&gt;
&lt;br /&gt;
{{Note|title=Caution|text=Never reboot or turn off you Amiga and never remove a disk (of any kind) from your Amiga when any of the drive activity lights are lit or you risk damaging the drive and/or the files on the disk.}}&lt;br /&gt;
&lt;br /&gt;
== Inserting Floppy Disks ==&lt;br /&gt;
&lt;br /&gt;
The standard 3.5-inch floppy disk can be inserted only one way. Insert the disk into the disk drive with the label side facing up and the metal end with the indicator arrow entering first.&lt;br /&gt;
&lt;br /&gt;
== Using Floppy Disks ==&lt;br /&gt;
&lt;br /&gt;
Floppy disks must be write-enabled and formatted before information can be written on them. To write-enable a floppy disk, turn the disk to its back side and push the plastic tab in the upper left corner down to cover the hole. Conversely, to write-protect a floppy disk, push the plastic tab up, uncovering the hole Figure 2-5 illustrates the write-enable/protect tab on a floppy disk. Formatting floppy disks is described in Chapter 3.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-5.png|center|frame|Write Protecting/Enabling Floppy Disks]]&lt;br /&gt;
&lt;br /&gt;
The disk from which information is copied is referred to as the source disk (FROM disk). The disk to which the information is copied is referred to as the destination disk (TO disk). The source disk should always be write-protected to avoid accidental erasure. The destination disk can be a blank disk or a previously used disk whose contents are no longer needed. This disk must be write-enabled to accept the information from the source disk.&lt;br /&gt;
&lt;br /&gt;
== Using the Ram Disk ==&lt;br /&gt;
&lt;br /&gt;
The Ram Disk icon represents RAM:, an area of the Amiga&#039;s internal memory that is set up as a file storage device like a disk. Files, directories, and entire floppy disk (available memory permitting) can be copied to RAM: for temporary storage. The Ram Disk serves as a work area that the system can quickly access.&lt;br /&gt;
&lt;br /&gt;
The size of RAM: is dynamic. It is never any larger than necessary to hold its contents. Therefore, it is always 100% full. Its maximum size is limited by the amount of free memory.&lt;br /&gt;
&lt;br /&gt;
The primary advantage of RAM: is speed. Since it is electronic rather than mechanical, storage and retrieval are almost instantaneous. The disadvantage of RAM: is that data stored in RAM: does not survive when the computer is powered down or rebooted. You must save to floppy disk or to hard disk anything in the Ram Disk that you want to use again.&lt;br /&gt;
&lt;br /&gt;
Applications commonly use RAM: to store temporary files created when the program runs or for backup files created when the program is exited. RAM: can also be used as storage for experimental script files, as a destination for testing command output, and when the creation of a file on an actual disk is too slow, risky, or inconvenient.&lt;br /&gt;
&lt;br /&gt;
Be careful when using RAM: for storing important files. If the Amiga loses power, has a software failure, or you reboot, everything stored in RAM: is lost. Be sure when working with RAM: to regularly back up any important files onto disk.&lt;br /&gt;
&lt;br /&gt;
{{Note|You cannot copy a disk to RAM: by dragging the source disk icon over the Ram Disk icon. To copy a disk to RAM:, open the Ram Disk icon and drag the source disk icon into the Ram Disk window. This creates a drawer with the name and contents of the original disk device.}}&lt;br /&gt;
&lt;br /&gt;
== Backup Disks ==&lt;br /&gt;
&lt;br /&gt;
Backup disks ensure against a loss of data in the event of damage, corruption, or accidental erasure of the original disk. We recommend that you make backup copies of important disks and files, following the licensing agreements provided with your applications software. Making and distributing unlicensed copies of disks is a copyright violation known as software piracy. Store your original disks in a safe place and use your backup disks for everyday purposes. For information on making backup copies of your system disks on floppy-only systems, see Appendix B.&lt;br /&gt;
&lt;br /&gt;
= Managing Your Files =&lt;br /&gt;
&lt;br /&gt;
The basic units of data management on your Amiga are files, directories, and drawers. Files are organized collections of data that are given a name and are stored on the system or on removable media. Files are contained in directories or drawers. Directories and drawers are the same thing - a subdivision in your Amiga&#039;s filing system that is used to organize files and other directories/drawers (subdirectories).&lt;br /&gt;
&lt;br /&gt;
== Organizing Information on Disks ==&lt;br /&gt;
&lt;br /&gt;
Information should be stored on disk in a logical manner to allow easy access to your files. The Amiga Workbench organizes information into a hierarchical system of drawers.&lt;br /&gt;
&lt;br /&gt;
A drawer - a directory in AmigaDOS - is a container for items that are related. These items can be files and even other drawers.&lt;br /&gt;
&lt;br /&gt;
On any disk you can create multiple drawers containing multiple files, as available disk space allows. Workbench also allows the creation of drawers within drawers, subdrawers or subdirectories, for further file management. Create as many drawers and subdrawers on your disk as needed.&lt;br /&gt;
&lt;br /&gt;
A drawer icon is displayed in the disk window for each drawer created on a particular disk. Each drawer window contains the icons of the files and subdrawers that exist in it.&lt;br /&gt;
&lt;br /&gt;
== Paths ==&lt;br /&gt;
&lt;br /&gt;
A path is a complete description of the location of a particular file on a disk. When a program requests the name of a file for retrieval, specify the file&#039;s path, including the volume or device name and all the drawers that lead to that file.&lt;br /&gt;
&lt;br /&gt;
The method for specifying paths varies from program to program. Most programs use a file requester with a scrolling list, in which the disk name, any drawer names, and the file name are displayed. Click on the appropriate names to specify the path. However, for some programs you may have to type in the complete path name.&lt;br /&gt;
&lt;br /&gt;
To enter a complete path:&lt;br /&gt;
&lt;br /&gt;
* Type the name of the disk followed by a colon. This name is the volume name of the disk, such as Mydisk:. You can substitute the disk&#039;s device name, such as DF0:, in place of the disk name. However, if you enter the device name rather than the volume name, be sure the correct disk is in that device.&amp;lt;br/&amp;gt;Diskname:&lt;br /&gt;
&lt;br /&gt;
* For a file that is not in a drawer, specify the file name after the colon following the disk name to complete the path.&amp;lt;br/&amp;gt;Diskname:filename&lt;br /&gt;
&lt;br /&gt;
* For a file in a drawer, after the colon following the disk name specify the drawer name followed by a slash (/) followed by the file name.&amp;lt;br/&amp;gt;Diskname:drawername/filename&lt;br /&gt;
&lt;br /&gt;
* If there are more drawers in the path, each drawer must be specified followed by a slash.&amp;lt;br/&amp;gt;Diskname:drawername/subdrawername/filename&lt;br /&gt;
&lt;br /&gt;
{{Note|File and drawer names containing spaces can cause recognition problems. We recommend that you avoid using spaces in file or drawer names. If you have trouble referencing a name that contains a space, enclose the entire path in double quotation marks.}}&lt;br /&gt;
&lt;br /&gt;
== File and Drawer Names ==&lt;br /&gt;
&lt;br /&gt;
The following rules apply for naming files and drawers:&lt;br /&gt;
&lt;br /&gt;
* Name length depends on the file system your disk is using; usually files can be up to 107 characters long. If you want your files to be used in pre-Release 4 systems, the name length must be limited to 30 characters. Names can contain upper case letters and any punctuation marks that are not reserved.&lt;br /&gt;
* Colons (:) and slashes (/) are not allowed within a name. These characters are reserved for path statements. However, other non-alphabetic characters can be used.&lt;br /&gt;
* The use of spaces before or after names should be avoided due to the possibility of omission.&lt;br /&gt;
* Upper and lower case differences (capitalization) are preserved and displayed by the Amiga. However, the system is not case-sensitive: upper and lower case are considered the same.&lt;br /&gt;
* Duplicate file names are not allowed within the same drawer. If you save a file with the same name as an existing file in a drawer, it overwrites the original file in that drawer.&lt;br /&gt;
* Two files with the same name can exist in separate drawers or within different paths.&lt;br /&gt;
&lt;br /&gt;
== Trashcan ==&lt;br /&gt;
&lt;br /&gt;
The Trashcan is a special drawer that can be placed on a disk for storing files that you no longer needed and may wish to delete. Discard icons or pseudo-icons for the files to be deleted by dragging them into the Trashcan. If the icon to be discarded is a drawer, is associated files are also moved to the Trashcan.&lt;br /&gt;
&lt;br /&gt;
Choosing Empty Trash from the Icons menu deletes the icons and all of their associated files from the Trashcan. Before choosing Empty Trash, you can still recover any of the Trashcan&#039;s contents by opening its window and dragging the icons back out.&lt;br /&gt;
&lt;br /&gt;
For more information about putting a Trashcan on a disk, see the Format Disk description in Chapter 3.&lt;br /&gt;
&lt;br /&gt;
= Using Application Software =&lt;br /&gt;
&lt;br /&gt;
Applications are software programs, such as databases, video and sound programs, word processing programs, recreational programs, and educational programs that are available for use on your Amiga. Most Amiga programs use windows, menus, and gadgets in ways very similar to the Workbench programs on your system disks. However, you should always read the documentation that comes with your applications for directions on using unfamiliar menu items and gadgets.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_Workbench_Basic_Operations&amp;diff=7232</id>
		<title>AmigaOS Manual: Workbench Basic Operations</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_Workbench_Basic_Operations&amp;diff=7232"/>
		<updated>2014-02-14T22:07:26Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before using your Amiga, you should familiarize yourself with the basic Amiga system concepts and techniques provided in this chapter. These include:&lt;br /&gt;
&lt;br /&gt;
* Booting your system&lt;br /&gt;
* Using the pointers&lt;br /&gt;
* Using the mouse&lt;br /&gt;
* Handling disks and using disk drives&lt;br /&gt;
* Creating and accessing files and directories&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Booting/Rebooting Your System =&lt;br /&gt;
&lt;br /&gt;
Booting powers on your computer and loads the operating system information from a disk to the computer&#039;s memory. Each time the Amiga is booted, the system must find the Amiga system software on a bootable disk device such as a hard disk, USB drive, compact flash card, or on the original Commodore Amiga systems, a floppy disk. If there are no bootable disks when the system is powered on, depending on your system, you may see an animated screen requesting insertion of a bootable disk into a floppy drive or a BIOS prompt, such as that provided by U-Boot, CFE, or Open Firmware.&lt;br /&gt;
&lt;br /&gt;
Rebooting resets you computer without turning off the power. This process terminates any active programs and erases any data stored in the Amiga&#039;s memory.&lt;br /&gt;
&lt;br /&gt;
For information about booting and rebooting older floppy-only systems, see Appendix B.&lt;br /&gt;
&lt;br /&gt;
Each time the Amiga is booted or rebooted, the following events occur:&lt;br /&gt;
&lt;br /&gt;
1. The Amiga executes a script file called the Startup-sequence. The Startup-sequence file contains AmigaDOS commands that load the Amiga software and handle various hardware and software setup tasks.&lt;br /&gt;
&lt;br /&gt;
2. The Startup-sequence executes a script file called User-startup, if you have created it. In general, User-startup files contain your own customized configurations, resident commands, and directory assignments. It also executes a script file called Network-startup. This script is designed to have any programs added to it that may require the networking to be functional before running programs that require it. The script is called in a special way so as not to delay the boot process while the network is initializing, but it will defer programs that rely on the network while it does.&lt;br /&gt;
Appendix B offer some instructions and suggestions of items that you can place in the User-startup and Network-startup files.&lt;br /&gt;
&lt;br /&gt;
3. The Amiga Workbench screen appears, as illustrated in Figure 2-1. &lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-1.png|center|frame|Workbench Screen]]&lt;br /&gt;
&lt;br /&gt;
4. Workbench runs any programs that are set up in the WBStartup preferences. By adding programs to the WBStartup preferences tool, you can also customize your system startup. &lt;br /&gt;
&lt;br /&gt;
Do not alter the Startup-sequence file, doing so can prevent the Amiga from booting properly.&lt;br /&gt;
&lt;br /&gt;
To reboot your system:&lt;br /&gt;
&lt;br /&gt;
# Be sure that all disk activity has stopped and that any floppy disk drive, hard disk drive lights, and USB device activity lights are unlit.&lt;br /&gt;
# If you are rebooting from a floppy disk drive, insert a copy of the Workbench disk into a floppy disk drive.&lt;br /&gt;
# Simultaneously hold down the Ctrl (Control), left Amiga, and right Amiga keys and then release them.&lt;br /&gt;
&lt;br /&gt;
== Special Boot Options ==&lt;br /&gt;
&lt;br /&gt;
Extra memory used for maintaining devices can prevent floppy-based games from running. See Appendix D for information about how to avoid this problem.&lt;br /&gt;
&lt;br /&gt;
= Using the Workbench Pointers =&lt;br /&gt;
&lt;br /&gt;
The Workbench has two pointers: the mouse pointer and the busy pointer.&lt;br /&gt;
&lt;br /&gt;
== Mouse Pointer ==&lt;br /&gt;
&lt;br /&gt;
The mouse pointer is a small movable picture that is used to indicate to the system the location at which you wish to do some operation. By default the mouse pointer is an image of an arrow. The mouse pointer is moved and positioned with the mouse. The tip of the pointer has a hot spot, which is one pixel (a dot of light that makes up the monitor screen display) that the system is programmed to recognize a the pointer&#039;s locator. The pointer indicates to the system the position of an item that you wish to work with. Through the mouse, you communicate the action that the system should take on this item. You can change the shape and color of the mouse pointer using the Pointer Preferences editor, described in Chapter 5.&lt;br /&gt;
&lt;br /&gt;
== Busy Pointer ==&lt;br /&gt;
&lt;br /&gt;
The busy pointer, also referred to as the wait pointer, is displayed in place of the mouse pointer to indicate that the system is attempting to execute an instruction. By default the busy pointer is an image of a stopwatch. Most Workbench operations are unavailable while the busy pointer is displayed. However, you can still move, size, and depth-arrange windows with the busy pointer. The appearance of this pointer can also be changed using the Pointer Preferences editor described in Chapter 5.&lt;br /&gt;
&lt;br /&gt;
= Using the Mouse =&lt;br /&gt;
&lt;br /&gt;
AmigaOS computers come equipped with a mouse, illustrated in Figure 2-2, used to communicate with the system through the pointer. The mouse pointer is positioned by moving the mouse. Manipulating the mouse so that the pointer is located over various objects and pictures on the screen and pressing the mouse buttons tells your Amiga what to do.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-2.png|center|frame|Amiga Mouse]]&lt;br /&gt;
&lt;br /&gt;
== Holding the Mouse ==&lt;br /&gt;
&lt;br /&gt;
Hold the mouse on a flat surface with the cable extending away from you so that the mouse box rests under the palm of your hand with the buttons under your fingertips. In this position, the left mouse button is the selection button and the right mouse button is the menu button.&lt;br /&gt;
&lt;br /&gt;
== Mouse Operations ==&lt;br /&gt;
&lt;br /&gt;
When using the mouse,&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Pointing || means moving the mouse so that the tip of the pointer is positioned over an object on the screen. The pointer moves in the same direction you move the mouse. The mouse can be lifted and repositioned at any time. Lifting the mouse does not move the pointer.&lt;br /&gt;
|-&lt;br /&gt;
| Clicking || means pressing and releasing the selection button.&lt;br /&gt;
|-&lt;br /&gt;
| Double-Clicking || means clicking the selection button twice in rapid succession. Double-clicking on an icon causes a window to appear or a program to start.&lt;br /&gt;
|-&lt;br /&gt;
| Holding Down || means pressing the mouse button until your action is completed.&lt;br /&gt;
|-&lt;br /&gt;
| Dragging || means moving screens, windows, and icons by holding down the selection button and moving the mouse. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using the Selection Button ==&lt;br /&gt;
&lt;br /&gt;
The left mouse button is the selection button, used for selecting items on the monitor display for processing. This button is also used to move, or drag, items on the screen. For information about these operations, see Chapter 3.&lt;br /&gt;
&lt;br /&gt;
== Using the Menu Button ==&lt;br /&gt;
&lt;br /&gt;
The right mouse button is the menu button, which is used to display the menu bar and menus and to choose items from them. Menu bars contain the headings of each menu available for a selected window, program, or icon. Menus contain lists of options for the operations that you can do with the selected item.&lt;br /&gt;
&lt;br /&gt;
=== Using Menus ===&lt;br /&gt;
&lt;br /&gt;
Menu bars appear across the top of the screen, containing any menu headings available.&lt;br /&gt;
&lt;br /&gt;
Hold down the menu button to display the menu bar as illustrated in Figure 2-3. Hol down the menu button while pointing to the different menu headings to show the available items listed beneath each. To choose a particular item, move the pointer down and release the menu button when the pointer touches it.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-3.png|center|frame|Sample Menu Bar and Menu]]&lt;br /&gt;
&lt;br /&gt;
Some menu items have submenus, which are additional related options that appear to the right of the menu item when it is selected. The symbol » after the item name indicates a submenu. If a menu has submenus, select one of the submenu options. Choosing a main menu item without choosing one of its submenus has no effect. In addition to the » symbol, other symbols may appear on the menu:&lt;br /&gt;
&lt;br /&gt;
* An ellipsis (...) follows the name of menu items that open a requester.&lt;br /&gt;
* A checkmark in the area to the left of a menu item indicates that the items is an option that is currently selected. When this area is empty, the option is deselected. &lt;br /&gt;
&lt;br /&gt;
To execute several menu options at once, hold down the menu button and, using the selection button, click on the menu options of your choice.&lt;br /&gt;
&lt;br /&gt;
The menu button can also be used to cancel operations being performed by the selection button, such as drag selection.&lt;br /&gt;
&lt;br /&gt;
=== Ghosted Menu Items ===&lt;br /&gt;
&lt;br /&gt;
If a menu item is not available for a particular operation, it is ghosted or displayed less distinctly than the others, as illustrated in Figure 2-4.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-4.png|center|frame|Ghosted versus Available Menu Items]]&lt;br /&gt;
&lt;br /&gt;
== Canceling an Operation ==&lt;br /&gt;
&lt;br /&gt;
Cancel the operation being performed with the selection button by clicking the menu button while still holding down the selection button. The following operations can be cancelled:&lt;br /&gt;
&lt;br /&gt;
* Selecting&lt;br /&gt;
* Dragging&lt;br /&gt;
* Drag selection&lt;br /&gt;
* Changing the size of a window &lt;br /&gt;
&lt;br /&gt;
== Using the Amiga Without a Mouse ==&lt;br /&gt;
&lt;br /&gt;
All mouse actions can also be done using the keyboard. Certain key combinations allow use of the keyboard to move the pointer, select icons, and choose menu items. Keyboard shortcuts appear in the menu boxes to the right of some options. Holding down the right Amiga key and simultaneously pressing the letter displayed attains the same results as activating that menu option. Using the keyboard shortcuts instead of the menus speeds your work. For a full description of key functions, see the hardware manual for your Amiga model. Key shortcuts to manipulate the pointer directly can be found in your Workbench help files on your system disk.&lt;br /&gt;
&lt;br /&gt;
= Using Disk Drives =&lt;br /&gt;
&lt;br /&gt;
Disk drives are devices from which information is retrieved or to which information is written or stored. An Amiga can have one or more hard disk drives, as well as floppy disk drives, depending on the model. Classic Amiga floppy disk drives can use low density floppy disks. However, if you have a high density floppy disk drive on your Amiga, you can also use high density floppy disks. Refer to the hardware manual that came with your system if you are not sure about the type of floppy disk drive you have.&lt;br /&gt;
&lt;br /&gt;
Each disk drive has a device name, such as DF0: for the internal floppy drive. (Additional floppy drives are designated DF1:, DF2:, and DF3:). A disk icon is displayed on the Workbench screen for each disk inserted in a drive and for each hard disk partition.&lt;br /&gt;
&lt;br /&gt;
A similar convention is used for other disk devices. For example the default device name for your internal hard disk is DH0:, with additional devices designated DH1:, DH2:, and so forth. These devices may correspond to a physical disk or a disk partition. USB devices which are automounted typically are designated USB0:, USB1:, and so forth. Optical media drives, such as a CD-ROM or DVD-ROM drive follow a similar convention, with disk devices starting with ICD0: followed by ICD1:, ICD2:, and so forth. All disk device names are user editable.&lt;br /&gt;
&lt;br /&gt;
The device name and the volume name are two ways of identifying a given disk. For most purposes use either name to refer to the disk when entering a path or within a file requester. The device name refers to the disk that is in the specified disk drive. The volume name refers specifically to a particular disk. For example, if you have an internal hard disk labeled as device DH0: with a volume name of Mydisk, you can reference it as either DH0: or Mydisk:.&lt;br /&gt;
&lt;br /&gt;
Most disk drives have activity lights that are lit when a device is in use, either reading or writing data.&lt;br /&gt;
&lt;br /&gt;
{{Note|title=Caution|text=Never reboot or turn off you Amiga and never remove a disk (of any kind) from your Amiga when any of the drive activity lights are lit or you risk damaging the drive and/or the files on the disk.}}&lt;br /&gt;
&lt;br /&gt;
== Inserting Floppy Disks ==&lt;br /&gt;
&lt;br /&gt;
The standard 3.5-inch floppy disk can be inserted only one way. Insert the disk into the disk drive with the label side facing up and the metal end with the indicator arrow entering first.&lt;br /&gt;
&lt;br /&gt;
== Using Floppy Disks ==&lt;br /&gt;
&lt;br /&gt;
Floppy disks must be write-enabled and formatted before information can be written on them. To write-enable a floppy disk, turn the disk to its back side and push the plastic tab in the upper left corner down to cover the hole. Conversely, to write-protect a floppy disk, push the plastic tab up, uncovering the hole Figure 2-5 illustrates the write-enable/protect tab on a floppy disk. Formatting floppy disks is described in Chapter 3.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-5.png|center|frame|Write Protecting/Enabling Floppy Disks]]&lt;br /&gt;
&lt;br /&gt;
The disk from which information is copied is referred to as the source disk (FROM disk). The disk to which the information is copied is referred to as the destination disk (TO disk). The source disk should always be write-protected to avoid accidental erasure. The destination disk can be a blank disk or a previously used disk whose contents are no longer needed. This disk must be write-enabled to accept the information from the source disk.&lt;br /&gt;
&lt;br /&gt;
== Using the Ram Disk ==&lt;br /&gt;
&lt;br /&gt;
The Ram Disk icon represents RAM:, an area of the Amiga&#039;s internal memory that is set up as a file storage device like a disk. Files, directories, and entire floppy disk (available memory permitting) can be copied to RAM: for temporary storage. The Ram Disk serves as a work area that the system can quickly access.&lt;br /&gt;
&lt;br /&gt;
The size of RAM: is dynamic. It is never any larger than necessary to hold its contents. Therefore, it is always 100% full. Its maximum size is limited by the amount of free memory.&lt;br /&gt;
&lt;br /&gt;
The primary advantage of RAM: is speed. Since it is electronic rather than mechanical, storage and retrieval are almost instantaneous. The disadvantage of RAM: is that data stored in RAM: does not survive when the computer is powered down or rebooted. You must save to floppy disk or to hard disk anything in the Ram Disk that you want to use again.&lt;br /&gt;
&lt;br /&gt;
Applications commonly use RAM: to store temporary files created when the program runs or for backup files created when the program is exited. RAM: can also be used as storage for experimental script files, as a destination for testing command output, and when the creation of a file on an actual disk is too slow, risky, or inconvenient.&lt;br /&gt;
&lt;br /&gt;
Be careful when using RAM: for storing important files. If the Amiga loses power, has a software failure, or you reboot, everything stored in RAM: is lost. Be sure when working with RAM: to regularly back up any important files onto disk.&lt;br /&gt;
&lt;br /&gt;
{{Note|You cannot copy a disk to RAM: by dragging the source disk icon over the Ram Disk icon. To copy a disk to RAM:, open the Ram Disk icon and drag the source disk icon into the Ram Disk window. This creates a drawer with the name and contents of the original disk device.}}&lt;br /&gt;
&lt;br /&gt;
== Backup Disks ==&lt;br /&gt;
&lt;br /&gt;
Backup disks ensure against a loss of data in the event of damage, corruption, or accidental erasure of the original disk. We recommend that you make backup copies of important disks and files, following the licensing agreements provided with your applications software. Making and distributing unlicensed copies of disks is a copyright violation known as software piracy. Store your original disks in a safe place and use your backup disks for everyday purposes. For information on making backup copies of your system disks on floppy-only systems, see Appendix B.&lt;br /&gt;
&lt;br /&gt;
= Managing Your Files =&lt;br /&gt;
&lt;br /&gt;
The basic units of data management on your Amiga are files, directories, and drawers. Files are organized collections of data that are given a name and are stored on the system or on removable media. Files are contained in directories or drawers. Directories and drawers are the same thing - a subdivision in your Amiga&#039;s filing system that is used to organize files and other directories/drawers (subdirectories).&lt;br /&gt;
&lt;br /&gt;
== Organizing Information on Disks ==&lt;br /&gt;
&lt;br /&gt;
Information should be stored on disk in a logical manner to allow easy access to your files. The Amiga Workbench organizes information into a hierarchical system of drawers.&lt;br /&gt;
&lt;br /&gt;
A drawer - a directory in AmigaDOS - is a container for items that are related. These items can be files and even other drawers.&lt;br /&gt;
&lt;br /&gt;
On any disk you can create multiple drawers containing multiple files, as available disk space allows. Workbench also allows the creation of drawers within drawers, subdrawers or subdirectories, for further file management. Create as many drawers and subdrawers on your disk as needed.&lt;br /&gt;
&lt;br /&gt;
A drawer icon is displayed in the disk window for each drawer created on a particular disk. Each drawer window contains the icons of the files and subdrawers that exist in it.&lt;br /&gt;
&lt;br /&gt;
== Paths ==&lt;br /&gt;
&lt;br /&gt;
A path is a complete description of the location of a particular file on a disk. When a program requests the name of a file for retrieval, specify the file&#039;s path, including the volume or device name and all the drawers that lead to that file.&lt;br /&gt;
&lt;br /&gt;
The method for specifying paths varies from program to program. Most programs use a file requester with a scrolling list, in which the disk name, any drawer names, and the file name are displayed. Click on the appropriate names to specify the path. However, for some programs you may have to type in the complete path name.&lt;br /&gt;
&lt;br /&gt;
To enter a complete path:&lt;br /&gt;
&lt;br /&gt;
* Type the name of the disk followed by a colon. This name is the volume name of the disk, such as Mydisk:. You can substitute the disk&#039;s device name, such as DF0:, in place of the disk name. However, if you enter the device name rather than the volume name, be sure the correct disk is in that device.&amp;lt;br/&amp;gt;Diskname:&lt;br /&gt;
&lt;br /&gt;
* For a file that is not in a drawer, specify the file name after the colon following the disk name to complete the path.&amp;lt;br/&amp;gt;Diskname:filename&lt;br /&gt;
&lt;br /&gt;
* For a file in a drawer, after the colon following the disk name specify the drawer name followed by a slash (/) followed by the file name.&amp;lt;br/&amp;gt;Diskname:drawername/filename&lt;br /&gt;
&lt;br /&gt;
* If there are more drawers in the path, each drawer must be specified followed by a slash.&amp;lt;br/&amp;gt;Diskname:drawername/subdrawername/filename&lt;br /&gt;
&lt;br /&gt;
{{Note|File and drawer names containing spaces can cause recognition problems. We recommend that you avoid using spaces in file or drawer names. If you have trouble referencing a name that contains a space, enclose the entire path in double quotation marks.}}&lt;br /&gt;
&lt;br /&gt;
== File and Drawer Names ==&lt;br /&gt;
&lt;br /&gt;
The following rules apply for naming files and drawers:&lt;br /&gt;
&lt;br /&gt;
* Name length depends on the file system your disk is using; usually files can be up to 107 characters long. If you want your files to be used in pre-Release 4 systems, the name length must be limited to 30 characters. Names can contain upper case letters and any punctuation marks that are not reserved.&lt;br /&gt;
* Colons (:) and slashes (/) are not allowed within a name. These characters are reserved for path statements. However, other non-alphabetic characters can be used.&lt;br /&gt;
* The use of spaces before or after names should be avoided due to the possibility of omission.&lt;br /&gt;
* Upper and lower case differences (capitalization) are preserved and displayed by the Amiga. However, the system is not case-sensitive: upper and lower case are considered the same.&lt;br /&gt;
* Duplicate file names are not allowed within the same drawer. If you save a file with the same name as an existing file in a drawer, it overwrites the original file in that drawer.&lt;br /&gt;
* Two files with the same name can exist in separate drawers or within different paths.&lt;br /&gt;
&lt;br /&gt;
== Trashcan ==&lt;br /&gt;
&lt;br /&gt;
The Trashcan is a special drawer that can be placed on a disk for storing files that you no longer needed and may wish to delete. Discard icons or pseudo-icons for the files to be deleted by dragging them into the Trashcan. If the icon to be discarded is a drawer, is associated files are also moved to the Trashcan.&lt;br /&gt;
&lt;br /&gt;
Choosing Empty Trash from the Icons menu deletes the icons and all of their associated files from the Trashcan. Before choosing Empty Trash, you can still recover any of the Trashcan&#039;s contents by opening its window and dragging the icons back out.&lt;br /&gt;
&lt;br /&gt;
For more information about putting a Trashcan on a disk, see the Format Disk description in Chapter 3.&lt;br /&gt;
&lt;br /&gt;
= Using Application Software =&lt;br /&gt;
&lt;br /&gt;
Applications are software programs, such as databases, video and sound programs, word processing programs, recreational programs, and educational programs that are available for use on your Amiga. Most Amiga programs use windows, menus, and gadgets in ways very similar to the Workbench programs on your system disks. However, you should always read the documentation that comes with your applications for directions on using unfamiliar menu items and gadgets.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_Workbench_Basic_Operations&amp;diff=7231</id>
		<title>AmigaOS Manual: Workbench Basic Operations</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_Workbench_Basic_Operations&amp;diff=7231"/>
		<updated>2014-02-14T21:42:26Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before using your Amiga, you should familiarize yourself with the basic Amiga system concepts and techniques provided in this chapter. These include:&lt;br /&gt;
&lt;br /&gt;
* Booting your system&lt;br /&gt;
* Using the pointers&lt;br /&gt;
* Using the mouse&lt;br /&gt;
* Handling disks and using disk drives&lt;br /&gt;
* Creating and accessing files and directories&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Booting/Rebooting Your System =&lt;br /&gt;
&lt;br /&gt;
Booting powers on your computer and loads the operating system information from a disk to the computer&#039;s memory. Each time the Amiga is booted, the system must find the Amiga system software on a bootable disk device such as a hard disk, USB drive, compact flash card, or on the original Commodore Amiga systems, a floppy disk. If there are no bootable disks when the system is powered on, depending on your system, you may see an animated screen requesting insertion of a bootable disk into a floppy drive or a BIOS prompt, such as that provided by U-Boot, CFE, or Open Firmware.&lt;br /&gt;
&lt;br /&gt;
Rebooting resets you computer without turning off the power. This process terminates any active programs and erases any data stored in the Amiga&#039;s memory.&lt;br /&gt;
&lt;br /&gt;
For information about booting and rebooting older floppy-only systems, see Appendix B.&lt;br /&gt;
&lt;br /&gt;
Each time the Amiga is booted or rebooted, the following events occur:&lt;br /&gt;
&lt;br /&gt;
1. The Amiga executes a script file called the Startup-sequence. The Startup-sequence file contains AmigaDOS commands that load the Amiga software and handle various hardware and software setup tasks.&lt;br /&gt;
&lt;br /&gt;
2. The Startup-sequence executes a script file called User-startup, if you have created it. In general, User-startup files contain your own customized configurations, resident commands, and directory assignments. It also executes a script file called Network-startup. This script is designed to have any programs added to it that may require the networking to be functional before running programs that require it. The script is called in a special way so as not to delay the boot process while the network is initializing, but it will defer programs that rely on the network while it does.&lt;br /&gt;
Appendix B offer some instructions and suggestions of items that you can place in the User-startup and Network-startup files.&lt;br /&gt;
&lt;br /&gt;
3. The Amiga Workbench screen appears, as illustrated in Figure 2-1. &lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-1.png|center|frame|Workbench Screen]]&lt;br /&gt;
&lt;br /&gt;
4. Workbench runs any programs that are set up in the WBStartup preferences. By adding programs to the WBStartup preferences tool, you can also customize your system startup. &lt;br /&gt;
&lt;br /&gt;
Do not alter the Startup-sequence file, doing so can prevent the Amiga from booting properly.&lt;br /&gt;
&lt;br /&gt;
To reboot your system:&lt;br /&gt;
&lt;br /&gt;
# Be sure that all disk activity has stopped and that any floppy disk drive, hard disk drive lights, and USB device activity lights are unlit.&lt;br /&gt;
# If you are rebooting from a floppy disk drive, insert a copy of the Workbench disk into a floppy disk drive.&lt;br /&gt;
# Simultaneously hold down the Ctrl (Control), left Amiga, and right Amiga keys and then release them.&lt;br /&gt;
&lt;br /&gt;
== Special Boot Options ==&lt;br /&gt;
&lt;br /&gt;
Extra memory used for maintaining devices can prevent floppy-based games from running. See Appendix D for information about how to avoid this problem.&lt;br /&gt;
&lt;br /&gt;
= Using the Workbench Pointers =&lt;br /&gt;
&lt;br /&gt;
The Workbench has two pointers: the mouse pointer and the busy pointer.&lt;br /&gt;
&lt;br /&gt;
== Mouse Pointer ==&lt;br /&gt;
&lt;br /&gt;
The mouse pointer is a small movable picture that is used to indicate to the system the location at which you wish to do some operation. By default the mouse pointer is an image of an arrow. The mouse pointer is moved and positioned with the mouse. The tip of the pointer has a hot spot, which is one pixel (a dot of light that makes up the monitor screen display) that the system is programmed to recognize a the pointer&#039;s locator. The pointer indicates to the system the position of an item that you wish to work with. Through the mouse, you communicate the action that the system should take on this item. You can change the shape and color of the mouse pointer using the Pointer Preferences editor, described in Chapter 5.&lt;br /&gt;
&lt;br /&gt;
== Busy Pointer ==&lt;br /&gt;
&lt;br /&gt;
The busy pointer, also referred to as the wait pointer, is displayed in place of the mouse pointer to indicate that the system is attempting to execute an instruction. By default the busy pointer is an image of a stopwatch. Most Workbench operations are unavailable while the busy pointer is displayed. However, you can still move, size, and depth-arrange windows with the busy pointer. The appearance of this pointer can also be changed using the Pointer Preferences editor described in Chapter 5.&lt;br /&gt;
&lt;br /&gt;
= Using the Mouse =&lt;br /&gt;
&lt;br /&gt;
AmigaOS computers come equipped with a mouse, illustrated in Figure 2-2, used to communicate with the system through the pointer. The mouse pointer is positioned by moving the mouse. Manipulating the mouse so that the pointer is located over various objects and pictures on the screen and pressing the mouse buttons tells your Amiga what to do.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-2.png|center|frame|Amiga Mouse]]&lt;br /&gt;
&lt;br /&gt;
== Holding the Mouse ==&lt;br /&gt;
&lt;br /&gt;
Hold the mouse on a flat surface with the cable extending away from you so that the mouse box rests under the palm of your hand with the buttons under your fingertips. In this position, the left mouse button is the selection button and the right mouse button is the menu button.&lt;br /&gt;
&lt;br /&gt;
== Mouse Operations ==&lt;br /&gt;
&lt;br /&gt;
When using the mouse,&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Pointing || means moving the mouse so that the tip of the pointer is positioned over an object on the screen. The pointer moves in the same direction you move the mouse. The mouse can be lifted and repositioned at any time. Lifting the mouse does not move the pointer.&lt;br /&gt;
|-&lt;br /&gt;
| Clicking || means pressing and releasing the selection button.&lt;br /&gt;
|-&lt;br /&gt;
| Double-Clicking || means clicking the selection button twice in rapid succession. Double-clicking on an icon causes a window to appear or a program to start.&lt;br /&gt;
|-&lt;br /&gt;
| Holding Down || means pressing the mouse button until your action is completed.&lt;br /&gt;
|-&lt;br /&gt;
| Dragging || means moving screens, windows, and icons by holding down the selection button and moving the mouse. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using the Selection Button ==&lt;br /&gt;
&lt;br /&gt;
The left mouse button is the selection button, used for selecting items on the monitor display for processing. This button is also used to move, or drag, items on the screen. For information about these operations, see Chapter 3.&lt;br /&gt;
&lt;br /&gt;
== Using the Menu Button ==&lt;br /&gt;
&lt;br /&gt;
The right mouse button is the menu button, which is used to display the menu bar and menus and to choose items from them. Menu bars contain the headings of each menu available for a selected window, program, or icon. Menus contain lists of options for the operations that you can do with the selected item.&lt;br /&gt;
&lt;br /&gt;
=== Using Menus ===&lt;br /&gt;
&lt;br /&gt;
Menu bars appear across the top of the screen, containing any menu headings available.&lt;br /&gt;
&lt;br /&gt;
Hold down the menu button to display the menu bar as illustrated in Figure 2-3. Hol down the menu button while pointing to the different menu headings to show the available items listed beneath each. To choose a particular item, move the pointer down and release the menu button when the pointer touches it.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-3.png|center|frame|Sample Menu Bar and Menu]]&lt;br /&gt;
&lt;br /&gt;
Some menu items have submenus, which are additional related options that appear to the right of the menu item when it is selected. The symbol » after the item name indicates a submenu. If a menu has submenus, select one of the submenu options. Choosing a main menu item without choosing one of its submenus has no effect. In addition to the » symbol, other symbols may appear on the menu:&lt;br /&gt;
&lt;br /&gt;
* An ellipsis (...) follows the name of menu items that open a requester.&lt;br /&gt;
* A checkmark in the area to the left of a menu item indicates that the items is an option that is currently selected. When this area is empty, the option is deselected. &lt;br /&gt;
&lt;br /&gt;
To execute several menu options at once, hold down the menu button and, using the selection button, click on the menu options of your choice.&lt;br /&gt;
&lt;br /&gt;
The menu button can also be used to cancel operations being performed by the selection button, such as drag selection.&lt;br /&gt;
&lt;br /&gt;
=== Ghosted Menu Items ===&lt;br /&gt;
&lt;br /&gt;
If a menu item is not available for a particular operation, it is ghosted or displayed less distinctly than the others, as illustrated in Figure 2-4.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-4.png|center|frame|Ghosted versus Available Menu Items]]&lt;br /&gt;
&lt;br /&gt;
== Canceling an Operation ==&lt;br /&gt;
&lt;br /&gt;
Cancel the operation being performed with the selection button by clicking the menu button while still holding down the selection button. The following operations can be cancelled:&lt;br /&gt;
&lt;br /&gt;
* Selecting&lt;br /&gt;
* Dragging&lt;br /&gt;
* Drag selection&lt;br /&gt;
* Changing the size of a window &lt;br /&gt;
&lt;br /&gt;
== Using the Amiga Without a Mouse ==&lt;br /&gt;
&lt;br /&gt;
All mouse actions can also be done using the keyboard. Certain key combinations allow use of the keyboard to move the pointer, select icons, and choose menu items. Keyboard shortcuts appear in the menu boxes to the right of some options. Holding down the right Amiga key and simultaneously pressing the letter displayed attains the same results as activating that menu option. Using the keyboard shortcuts instead of the menus speeds your work. For a full description of key functions, see the hardware manual for your Amiga model. Key shortcuts to manipulate the pointer directly can be found in your Workbench help files on your system disk.&lt;br /&gt;
&lt;br /&gt;
= Using Disk Drives =&lt;br /&gt;
&lt;br /&gt;
Disk drives are devices from which information is retrieved or to which information is written or stored. An Amiga can have one or more hard disk drives, as well as floppy disk drives, depending on the model. Classic Amiga floppy disk drives can use low density floppy disks. However, if you have a high density floppy disk drive on your Amiga, you can also use high density floppy disks. Refer to the hardware manual that came with your system if you are not sure about the type of floppy disk drive you have.&lt;br /&gt;
&lt;br /&gt;
Each disk drive has a device name, such as DF0: for the internal floppy drive. (Additional floppy drives are designated DF1:, DF2:, and DF3:). A disk icon is displayed on the Workbench screen for each disk inserted in a drive and for each hard disk partition.&lt;br /&gt;
&lt;br /&gt;
A similar convention is used for other disk devices. For example the default device name for your internal hard disk is DH0:, with additional devices designated DH1:, DH2:, and so forth. These devices may correspond to a physical disk or a disk partition. USB devices which are automounted typically are designated USB0:, USB1:, and so forth. Optical media drives, such as a CD-ROM or DVD-ROM drive follow a similar convention, with disk devices starting with ICD0: followed by ICD1:, ICD2:, and so forth. All disk device names are user editable.&lt;br /&gt;
&lt;br /&gt;
The device name and the volume name are two ways of identifying a given disk. For most purposes use either name to refer to the disk when entering a path or within a file requester. The device name refers to the disk that is in the specified disk drive. The volume name refers specifically to a particular disk. For example, if you have an internal hard disk labeled as device DH0: with a volume name of Mydisk, you can reference it as either DH0: or Mydisk:.&lt;br /&gt;
&lt;br /&gt;
Most disk drives have activity lights that are lit when a device is in use, either reading or writing data.&lt;br /&gt;
&lt;br /&gt;
{{Note|title=Caution|text=Never reboot or turn off you Amiga and never remove a disk (of any kind) from your Amiga when any of the drive activity lights are lit or you risk damaging the drive and/or the files on the disk.}}&lt;br /&gt;
&lt;br /&gt;
== Inserting Floppy Disks ==&lt;br /&gt;
&lt;br /&gt;
The standard 3.5-inch floppy disk can be inserted only one way. Insert the disk into the disk drive with the label side facing up and the metal end with the indicator arrow entering first.&lt;br /&gt;
&lt;br /&gt;
== Using Floppy Disks ==&lt;br /&gt;
&lt;br /&gt;
Floppy disks must be write-enabled and formatted before information can be written on them. To write-enable a floppy disk, turn the disk to its back side and push the plastic tab in the upper left corner down to cover the hole. Conversely, to write-protect a floppy disk, push the plastic tab up, uncovering the hole Figure 2-5 illustrates the write-enable/protect tab on a floppy disk. Formatting floppy disks is described in Chapter 3.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-5.png|center|frame|Write Protecting/Enabling Floppy Disks]]&lt;br /&gt;
&lt;br /&gt;
The disk from which information is copied is referred to as the source disk (FROM disk). The disk to which the information is copied is referred to as the destination disk (TO disk). The source disk should always be write-protected to avoid accidental erasure. The destination disk can be a blank disk or a previously used disk whose contents are no longer needed. This disk must be write-enabled to accept the information from the source disk.&lt;br /&gt;
&lt;br /&gt;
== Using the Ram Disk ==&lt;br /&gt;
&lt;br /&gt;
The Ram Disk icon represents RAM:, an area of the Amiga&#039;s internal memory that is set up as a file storage device like a disk. Files, directories, and entire floppy disk (available memory permitting) can be copied to RAM: for temporary storage. The Ram Disk serves as a work area that the system can quickly access.&lt;br /&gt;
&lt;br /&gt;
The size of RAM: is dynamic. It is never any larger than necessary to hold its contents. Therefore, it is always 100% full. Its maximum size is limited by the amount of free memory.&lt;br /&gt;
&lt;br /&gt;
The primary advantage of RAM: is speed. Since it is electronic rather than mechanical, storage and retrieval are almost instantaneous. The disadvantage of RAM: is that data stored in RAM: does not survive when the computer is powered down or rebooted. You must save to floppy disk or to hard disk anything in the Ram Disk that you want to use again.&lt;br /&gt;
&lt;br /&gt;
Applications commonly use RAM: to store temporary files created when the program runs or for backup files created when the program is exited. RAM: can also be used as storage for experimental script files, as a destination for testing command output, and when the creation of a file on an actual disk is too slow, risky, or inconvenient.&lt;br /&gt;
&lt;br /&gt;
Be careful when using RAM: for storing important files. If the Amiga loses power, has a software failure, or you reboot, everything stored in RAM: is lost. Be sure when working with RAM: to regularly back up any important files onto disk.&lt;br /&gt;
&lt;br /&gt;
{{Note|You cannot copy a disk to RAM: by dragging the source disk icon over the Ram Disk icon. To copy a disk to RAM:, open the Ram Disk icon and drag the floppy disk icon into the Ram Disk window. This creates a drawer with the name and contents of the floppy disk.}}&lt;br /&gt;
&lt;br /&gt;
== Backup Disks ==&lt;br /&gt;
&lt;br /&gt;
Backup disks ensure against a loss of data in the event of damage, corruption, or accidental erasure of the original disk. We recommend that you make backup copies of important disks and files, following the licensing agreements provided with your applications software. Making and distributing unlicensed copies of disks is a copyright violation known as software piracy. Store your original disks in a safe place and use your backup disks for everyday purposes. For information on making backup copies of your system disks on floppy-only systems, see Appendix B.&lt;br /&gt;
&lt;br /&gt;
= Managing Your Files =&lt;br /&gt;
&lt;br /&gt;
The basic units of data management on your Amiga are files, directories, and drawers. Files are organized collections of data that are given a name and are stored on the system or on removable media. Files are contained in directories or drawers. Directories and drawers are the same thing - a subdivision in your Amiga&#039;s filing system that is used to organize files and other directories/drawers (subdirectories).&lt;br /&gt;
&lt;br /&gt;
== Organizing Information on Disks ==&lt;br /&gt;
&lt;br /&gt;
Information should be stored on disk in a logical manner to allow easy access to your files. The Amiga Workbench organizes information into a hierarchical system of drawers.&lt;br /&gt;
&lt;br /&gt;
A drawer - a directory in AmigaDOS - is a container for items that are related. These items can be files and even other drawers.&lt;br /&gt;
&lt;br /&gt;
On any disk you can create multiple drawers containing multiple files, as available disk space allows. Workbench also allows the creation of drawers within drawers, subdrawers or subdirectories, for further file management. Create as many drawers and subdrawers on your disk as needed.&lt;br /&gt;
&lt;br /&gt;
A drawer icon is displayed in the disk window for each drawer created on a particular disk. Each drawer window contains the icons of the files and subdrawers that exist in it.&lt;br /&gt;
&lt;br /&gt;
== Paths ==&lt;br /&gt;
&lt;br /&gt;
A path is a complete description of the location of a particular file on a disk. When a program requests the name of a file for retrieval, specify the file&#039;s path, including the volume or device name and all the drawers that lead to that file.&lt;br /&gt;
&lt;br /&gt;
The method for specifying paths varies from program to program. Most programs use a file requester with a scrolling list, in which the disk name, any drawer names, and the file name are displayed. Click on the appropriate names to specify the path. However, for some programs you may have to type in the complete path name.&lt;br /&gt;
&lt;br /&gt;
To enter a complete path:&lt;br /&gt;
&lt;br /&gt;
* Type the name of the disk followed by a colon. This name is the volume name of the disk, such as Mydisk:. You can substitute the disk&#039;s device name, such as DF0:, in place of the disk name. However, if you enter the device name rather than the volume name, be sure the correct disk is in that device.&amp;lt;br/&amp;gt;Diskname:&lt;br /&gt;
&lt;br /&gt;
* For a file that is not in a drawer, specify the file name after the colon following the disk name to complete the path.&amp;lt;br/&amp;gt;Diskname:filename&lt;br /&gt;
&lt;br /&gt;
* For a file in a drawer, after the colon following the disk name specify the drawer name followed by a slash (/) followed by the file name.&amp;lt;br/&amp;gt;Diskname:drawername/filename&lt;br /&gt;
&lt;br /&gt;
* If there are more drawers in the path, each drawer must be specified followed by a slash.&amp;lt;br/&amp;gt;Diskname:drawername/subdrawername/filename&lt;br /&gt;
&lt;br /&gt;
{{Note|File and drawer names containing spaces can cause recognition problems. We recommend that you avoid using spaces in file or drawer names. If you have trouble referencing a name that contains a space, enclose the entire path in double quotation marks.}}&lt;br /&gt;
&lt;br /&gt;
== File and Drawer Names ==&lt;br /&gt;
&lt;br /&gt;
The following rules apply for naming files and drawers:&lt;br /&gt;
&lt;br /&gt;
* Name length depends on the file system your disk is using; usually files can be up to 107 characters long. If you want your files to be used in pre-Release 4 systems, the name length must be limited to 30 characters. Names can contain upper case letters and any punctuation marks that are not reserved.&lt;br /&gt;
* Colons (:) and slashes (/) are not allowed within a name. These characters are reserved for path statements. However, other non-alphabetic characters can be used.&lt;br /&gt;
* The use of spaces before or after names should be avoided due to the possibility of omission.&lt;br /&gt;
* Upper and lower case differences (capitalization) are preserved and displayed by the Amiga. However, the system is not case-sensitive: upper and lower case are considered the same.&lt;br /&gt;
* Duplicate file names are not allowed within the same drawer. If you save a file with the same name as an existing file in a drawer, it overwrites the original file in that drawer.&lt;br /&gt;
* Two files with the same name can exist in separate drawers or within different paths.&lt;br /&gt;
&lt;br /&gt;
== Trashcan ==&lt;br /&gt;
&lt;br /&gt;
The Trashcan is a special drawer that can be placed on a disk for storing files that you no longer needed and may wish to delete. Discard icons or pseudo-icons for the files to be deleted by dragging them into the Trashcan. If the icon to be discarded is a drawer, is associated files are also moved to the Trashcan.&lt;br /&gt;
&lt;br /&gt;
Choosing Empty Trash from the Icons menu deletes the icons and all of their associated files from the Trashcan. Before choosing Empty Trash, you can still recover any of the Trashcan&#039;s contents by opening its window and dragging the icons back out.&lt;br /&gt;
&lt;br /&gt;
For more information about putting a Trashcan on a disk, see the Format Disk description in Chapter 3.&lt;br /&gt;
&lt;br /&gt;
= Using Application Software =&lt;br /&gt;
&lt;br /&gt;
Applications are software programs, such as databases, video and sound programs, word processing programs, recreational programs, and educational programs that are available for use on your Amiga. Most Amiga programs use windows, menus, and gadgets in ways very similar to the Workbench programs on your system disks. However, you should always read the documentation that comes with your applications for directions on using unfamiliar menu items and gadgets.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_Workbench_Basic_Operations&amp;diff=7230</id>
		<title>AmigaOS Manual: Workbench Basic Operations</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaOS_Manual:_Workbench_Basic_Operations&amp;diff=7230"/>
		<updated>2014-02-14T21:40:51Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before using your Amiga, you should familiarize yourself with the basic Amiga system concepts and techniques provided in this chapter. These include:&lt;br /&gt;
&lt;br /&gt;
* Booting your system&lt;br /&gt;
* Using the pointers&lt;br /&gt;
* Using the mouse&lt;br /&gt;
* Handling disks and using disk drives&lt;br /&gt;
* Creating and accessing files and directories &lt;br /&gt;
&lt;br /&gt;
= Booting/Rebooting Your System =&lt;br /&gt;
&lt;br /&gt;
Booting powers on your computer and loads the operating system information from a disk to the computer&#039;s memory. Each time the Amiga is booted, the system must find the Amiga system software on a bootable disk device such as a hard disk, USB drive, compact flash card, or on the original Commodore Amiga systems, a floppy disk. If there are no bootable disks when the system is powered on, depending on your system, you may see an animated screen requesting insertion of a bootable disk into a floppy drive or a BIOS prompt, such as that provided by U-Boot, CFE, or Open Firmware.&lt;br /&gt;
&lt;br /&gt;
Rebooting resets you computer without turning off the power. This process terminates any active programs and erases any data stored in the Amiga&#039;s memory.&lt;br /&gt;
&lt;br /&gt;
For information about booting and rebooting older floppy-only systems, see Appendix B.&lt;br /&gt;
&lt;br /&gt;
Each time the Amiga is booted or rebooted, the following events occur:&lt;br /&gt;
&lt;br /&gt;
1. The Amiga executes a script file called the Startup-sequence. The Startup-sequence file contains AmigaDOS commands that load the Amiga software and handle various hardware and software setup tasks.&lt;br /&gt;
&lt;br /&gt;
2. The Startup-sequence executes a script file called User-startup, if you have created it. In general, User-startup files contain your own customized configurations, resident commands, and directory assignments. It also executes a script file called Network-startup. This script is designed to have any programs added to it that may require the networking to be functional before running programs that require it. The script is called in a special way so as not to delay the boot process while the network is initializing, but it will defer programs that rely on the network while it does.&lt;br /&gt;
Appendix B offer some instructions and suggestions of items that you can place in the User-startup and Network-startup files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. The Amiga Workbench screen appears, as illustrated in Figure 2-1. &lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-1.png|center|frame|Workbench Screen]]&lt;br /&gt;
&lt;br /&gt;
4. Workbench runs any programs that are set up in the WBStartup preferences. By adding programs to the WBStartup preferences tool, you can also customize your system startup. &lt;br /&gt;
&lt;br /&gt;
Do not alter the Startup-sequence file, doing so can prevent the Amiga from booting properly.&lt;br /&gt;
&lt;br /&gt;
To reboot your system:&lt;br /&gt;
&lt;br /&gt;
# Be sure that all disk activity has stopped and that any floppy disk drive, hard disk drive lights, and USB device activity lights are unlit.&lt;br /&gt;
# If you are rebooting from a floppy disk drive, insert a copy of the Workbench disk into a floppy disk drive.&lt;br /&gt;
# Simultaneously hold down the Ctrl (Control), left Amiga, and right Amiga keys and then release them.&lt;br /&gt;
&lt;br /&gt;
== Special Boot Options ==&lt;br /&gt;
&lt;br /&gt;
Extra memory used for maintaining devices can prevent floppy-based games from running. See Appendix D for information about how to avoid this problem.&lt;br /&gt;
&lt;br /&gt;
= Using the Workbench Pointers =&lt;br /&gt;
&lt;br /&gt;
The Workbench has two pointers: the mouse pointer and the busy pointer.&lt;br /&gt;
&lt;br /&gt;
== Mouse Pointer ==&lt;br /&gt;
&lt;br /&gt;
The mouse pointer is a small movable picture that is used to indicate to the system the location at which you wish to do some operation. By default the mouse pointer is an image of an arrow. The mouse pointer is moved and positioned with the mouse. The tip of the pointer has a hot spot, which is one pixel (a dot of light that makes up the monitor screen display) that the system is programmed to recognize a the pointer&#039;s locator. The pointer indicates to the system the position of an item that you wish to work with. Through the mouse, you communicate the action that the system should take on this item. You can change the shape and color of the mouse pointer using the Pointer Preferences editor, described in Chapter 5.&lt;br /&gt;
&lt;br /&gt;
== Busy Pointer ==&lt;br /&gt;
&lt;br /&gt;
The busy pointer, also referred to as the wait pointer, is displayed in place of the mouse pointer to indicate that the system is attempting to execute an instruction. By default the busy pointer is an image of a stopwatch. Most Workbench operations are unavailable while the busy pointer is displayed. However, you can still move, size, and depth-arrange windows with the busy pointer. The appearance of this pointer can also be changed using the Pointer Preferences editor described in Chapter 5.&lt;br /&gt;
&lt;br /&gt;
= Using the Mouse =&lt;br /&gt;
&lt;br /&gt;
AmigaOS computers come equipped with a mouse, illustrated in Figure 2-2, used to communicate with the system through the pointer. The mouse pointer is positioned by moving the mouse. Manipulating the mouse so that the pointer is located over various objects and pictures on the screen and pressing the mouse buttons tells your Amiga what to do.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-2.png|center|frame|Amiga Mouse]]&lt;br /&gt;
&lt;br /&gt;
== Holding the Mouse ==&lt;br /&gt;
&lt;br /&gt;
Hold the mouse on a flat surface with the cable extending away from you so that the mouse box rests under the palm of your hand with the buttons under your fingertips. In this position, the left mouse button is the selection button and the right mouse button is the menu button.&lt;br /&gt;
&lt;br /&gt;
== Mouse Operations ==&lt;br /&gt;
&lt;br /&gt;
When using the mouse,&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Pointing || means moving the mouse so that the tip of the pointer is positioned over an object on the screen. The pointer moves in the same direction you move the mouse. The mouse can be lifted and repositioned at any time. Lifting the mouse does not move the pointer.&lt;br /&gt;
|-&lt;br /&gt;
| Clicking || means pressing and releasing the selection button.&lt;br /&gt;
|-&lt;br /&gt;
| Double-Clicking || means clicking the selection button twice in rapid succession. Double-clicking on an icon causes a window to appear or a program to start.&lt;br /&gt;
|-&lt;br /&gt;
| Holding Down || means pressing the mouse button until your action is completed.&lt;br /&gt;
|-&lt;br /&gt;
| Dragging || means moving screens, windows, and icons by holding down the selection button and moving the mouse. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using the Selection Button ==&lt;br /&gt;
&lt;br /&gt;
The left mouse button is the selection button, used for selecting items on the monitor display for processing. This button is also used to move, or drag, items on the screen. For information about these operations, see Chapter 3.&lt;br /&gt;
&lt;br /&gt;
== Using the Menu Button ==&lt;br /&gt;
&lt;br /&gt;
The right mouse button is the menu button, which is used to display the menu bar and menus and to choose items from them. Menu bars contain the headings of each menu available for a selected window, program, or icon. Menus contain lists of options for the operations that you can do with the selected item.&lt;br /&gt;
&lt;br /&gt;
=== Using Menus ===&lt;br /&gt;
&lt;br /&gt;
Menu bars appear across the top of the screen, containing any menu headings available.&lt;br /&gt;
&lt;br /&gt;
Hold down the menu button to display the menu bar as illustrated in Figure 2-3. Hol down the menu button while pointing to the different menu headings to show the available items listed beneath each. To choose a particular item, move the pointer down and release the menu button when the pointer touches it.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-3.png|center|frame|Sample Menu Bar and Menu]]&lt;br /&gt;
&lt;br /&gt;
Some menu items have submenus, which are additional related options that appear to the right of the menu item when it is selected. The symbol » after the item name indicates a submenu. If a menu has submenus, select one of the submenu options. Choosing a main menu item without choosing one of its submenus has no effect. In addition to the » symbol, other symbols may appear on the menu:&lt;br /&gt;
&lt;br /&gt;
* An ellipsis (...) follows the name of menu items that open a requester.&lt;br /&gt;
* A checkmark in the area to the left of a menu item indicates that the items is an option that is currently selected. When this area is empty, the option is deselected. &lt;br /&gt;
&lt;br /&gt;
To execute several menu options at once, hold down the menu button and, using the selection button, click on the menu options of your choice.&lt;br /&gt;
&lt;br /&gt;
The menu button can also be used to cancel operations being performed by the selection button, such as drag selection.&lt;br /&gt;
&lt;br /&gt;
=== Ghosted Menu Items ===&lt;br /&gt;
&lt;br /&gt;
If a menu item is not available for a particular operation, it is ghosted or displayed less distinctly than the others, as illustrated in Figure 2-4.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-4.png|center|frame|Ghosted versus Available Menu Items]]&lt;br /&gt;
&lt;br /&gt;
== Canceling an Operation ==&lt;br /&gt;
&lt;br /&gt;
Cancel the operation being performed with the selection button by clicking the menu button while still holding down the selection button. The following operations can be cancelled:&lt;br /&gt;
&lt;br /&gt;
* Selecting&lt;br /&gt;
* Dragging&lt;br /&gt;
* Drag selection&lt;br /&gt;
* Changing the size of a window &lt;br /&gt;
&lt;br /&gt;
== Using the Amiga Without a Mouse ==&lt;br /&gt;
&lt;br /&gt;
All mouse actions can also be done using the keyboard. Certain key combinations allow use of the keyboard to move the pointer, select icons, and choose menu items. Keyboard shortcuts appear in the menu boxes to the right of some options. Holding down the right Amiga key and simultaneously pressing the letter displayed attains the same results as activating that menu option. Using the keyboard shortcuts instead of the menus speeds your work. For a full description of key functions, see the hardware manual for your Amiga model. Key shortcuts to manipulate the pointer directly can be found in your Workbench help files on your system disk.&lt;br /&gt;
&lt;br /&gt;
= Using Disk Drives =&lt;br /&gt;
&lt;br /&gt;
Disk drives are devices from which information is retrieved or to which information is written or stored. An Amiga can have one or more hard disk drives, as well as floppy disk drives, depending on the model. Classic Amiga floppy disk drives can use low density floppy disks. However, if you have a high density floppy disk drive on your Amiga, you can also use high density floppy disks. Refer to the hardware manual that came with your system if you are not sure about the type of floppy disk drive you have.&lt;br /&gt;
&lt;br /&gt;
Each disk drive has a device name, such as DF0: for the internal floppy drive. (Additional floppy drives are designated DF1:, DF2:, and DF3:). A disk icon is displayed on the Workbench screen for each disk inserted in a drive and for each hard disk partition.&lt;br /&gt;
&lt;br /&gt;
A similar convention is used for other disk devices. For example the default device name for your internal hard disk is DH0:, with additional devices designated DH1:, DH2:, and so forth. These devices may correspond to a physical disk or a disk partition. USB devices which are automounted typically are designated USB0:, USB1:, and so forth. Optical media drives, such as a CD-ROM or DVD-ROM drive follow a similar convention, with disk devices starting with ICD0: followed by ICD1:, ICD2:, and so forth. All disk device names are user editable.&lt;br /&gt;
&lt;br /&gt;
The device name and the volume name are two ways of identifying a given disk. For most purposes use either name to refer to the disk when entering a path or within a file requester. The device name refers to the disk that is in the specified disk drive. The volume name refers specifically to a particular disk. For example, if you have an internal hard disk labeled as device DH0: with a volume name of Mydisk, you can reference it as either DH0: or Mydisk:.&lt;br /&gt;
&lt;br /&gt;
Most disk drives have activity lights that are lit when a device is in use, either reading or writing data.&lt;br /&gt;
&lt;br /&gt;
{{Note|title=Caution|text=Never reboot or turn off you Amiga and never remove a disk (of any kind) from your Amiga when any of the drive activity lights are lit or you risk damaging the drive and/or the files on the disk.}}&lt;br /&gt;
&lt;br /&gt;
== Inserting Floppy Disks ==&lt;br /&gt;
&lt;br /&gt;
The standard 3.5-inch floppy disk can be inserted only one way. Insert the disk into the disk drive with the label side facing up and the metal end with the indicator arrow entering first.&lt;br /&gt;
&lt;br /&gt;
== Using Floppy Disks ==&lt;br /&gt;
&lt;br /&gt;
Floppy disks must be write-enabled and formatted before information can be written on them. To write-enable a floppy disk, turn the disk to its back side and push the plastic tab in the upper left corner down to cover the hole. Conversely, to write-protect a floppy disk, push the plastic tab up, uncovering the hole Figure 2-5 illustrates the write-enable/protect tab on a floppy disk. Formatting floppy disks is described in Chapter 3.&lt;br /&gt;
&lt;br /&gt;
[[File:WorkbenchFig2-5.png|center|frame|Write Protecting/Enabling Floppy Disks]]&lt;br /&gt;
&lt;br /&gt;
The disk from which information is copied is referred to as the source disk (FROM disk). The disk to which the information is copied is referred to as the destination disk (TO disk). The source disk should always be write-protected to avoid accidental erasure. The destination disk can be a blank disk or a previously used disk whose contents are no longer needed. This disk must be write-enabled to accept the information from the source disk.&lt;br /&gt;
&lt;br /&gt;
== Using the Ram Disk ==&lt;br /&gt;
&lt;br /&gt;
The Ram Disk icon represents RAM:, an area of the Amiga&#039;s internal memory that is set up as a file storage device like a disk. Files, directories, and entire floppy disk (available memory permitting) can be copied to RAM: for temporary storage. The Ram Disk serves as a work area that the system can quickly access.&lt;br /&gt;
&lt;br /&gt;
The size of RAM: is dynamic. It is never any larger than necessary to hold its contents. Therefore, it is always 100% full. Its maximum size is limited by the amount of free memory.&lt;br /&gt;
&lt;br /&gt;
The primary advantage of RAM: is speed. Since it is electronic rather than mechanical, storage and retrieval are almost instantaneous. The disadvantage of RAM: is that data stored in RAM: does not survive when the computer is powered down or rebooted. You must save to floppy disk or to hard disk anything in the Ram Disk that you want to use again.&lt;br /&gt;
&lt;br /&gt;
Applications commonly use RAM: to store temporary files created when the program runs or for backup files created when the program is exited. RAM: can also be used as storage for experimental script files, as a destination for testing command output, and when the creation of a file on an actual disk is too slow, risky, or inconvenient.&lt;br /&gt;
&lt;br /&gt;
Be careful when using RAM: for storing important files. If the Amiga loses power, has a software failure, or you reboot, everything stored in RAM: is lost. Be sure when working with RAM: to regularly back up any important files onto disk.&lt;br /&gt;
&lt;br /&gt;
{{Note|You cannot copy a disk to RAM: by dragging the source disk icon over the Ram Disk icon. To copy a disk to RAM:, open the Ram Disk icon and drag the floppy disk icon into the Ram Disk window. This creates a drawer with the name and contents of the floppy disk.}}&lt;br /&gt;
&lt;br /&gt;
== Backup Disks ==&lt;br /&gt;
&lt;br /&gt;
Backup disks ensure against a loss of data in the event of damage, corruption, or accidental erasure of the original disk. We recommend that you make backup copies of important disks and files, following the licensing agreements provided with your applications software. Making and distributing unlicensed copies of disks is a copyright violation known as software piracy. Store your original disks in a safe place and use your backup disks for everyday purposes. For information on making backup copies of your system disks on floppy-only systems, see Appendix B.&lt;br /&gt;
&lt;br /&gt;
= Managing Your Files =&lt;br /&gt;
&lt;br /&gt;
The basic units of data management on your Amiga are files, directories, and drawers. Files are organized collections of data that are given a name and are stored on the system or on removable media. Files are contained in directories or drawers. Directories and drawers are the same thing - a subdivision in your Amiga&#039;s filing system that is used to organize files and other directories/drawers (subdirectories).&lt;br /&gt;
&lt;br /&gt;
== Organizing Information on Disks ==&lt;br /&gt;
&lt;br /&gt;
Information should be stored on disk in a logical manner to allow easy access to your files. The Amiga Workbench organizes information into a hierarchical system of drawers.&lt;br /&gt;
&lt;br /&gt;
A drawer - a directory in AmigaDOS - is a container for items that are related. These items can be files and even other drawers.&lt;br /&gt;
&lt;br /&gt;
On any disk you can create multiple drawers containing multiple files, as available disk space allows. Workbench also allows the creation of drawers within drawers, subdrawers or subdirectories, for further file management. Create as many drawers and subdrawers on your disk as needed.&lt;br /&gt;
&lt;br /&gt;
A drawer icon is displayed in the disk window for each drawer created on a particular disk. Each drawer window contains the icons of the files and subdrawers that exist in it.&lt;br /&gt;
&lt;br /&gt;
== Paths ==&lt;br /&gt;
&lt;br /&gt;
A path is a complete description of the location of a particular file on a disk. When a program requests the name of a file for retrieval, specify the file&#039;s path, including the volume or device name and all the drawers that lead to that file.&lt;br /&gt;
&lt;br /&gt;
The method for specifying paths varies from program to program. Most programs use a file requester with a scrolling list, in which the disk name, any drawer names, and the file name are displayed. Click on the appropriate names to specify the path. However, for some programs you may have to type in the complete path name.&lt;br /&gt;
&lt;br /&gt;
To enter a complete path:&lt;br /&gt;
&lt;br /&gt;
* Type the name of the disk followed by a colon. This name is the volume name of the disk, such as Mydisk:. You can substitute the disk&#039;s device name, such as DF0:, in place of the disk name. However, if you enter the device name rather than the volume name, be sure the correct disk is in that device.&amp;lt;br/&amp;gt;Diskname:&lt;br /&gt;
&lt;br /&gt;
* For a file that is not in a drawer, specify the file name after the colon following the disk name to complete the path.&amp;lt;br/&amp;gt;Diskname:filename&lt;br /&gt;
&lt;br /&gt;
* For a file in a drawer, after the colon following the disk name specify the drawer name followed by a slash (/) followed by the file name.&amp;lt;br/&amp;gt;Diskname:drawername/filename&lt;br /&gt;
&lt;br /&gt;
* If there are more drawers in the path, each drawer must be specified followed by a slash.&amp;lt;br/&amp;gt;Diskname:drawername/subdrawername/filename&lt;br /&gt;
&lt;br /&gt;
{{Note|File and drawer names containing spaces can cause recognition problems. We recommend that you avoid using spaces in file or drawer names. If you have trouble referencing a name that contains a space, enclose the entire path in double quotation marks.}}&lt;br /&gt;
&lt;br /&gt;
== File and Drawer Names ==&lt;br /&gt;
&lt;br /&gt;
The following rules apply for naming files and drawers:&lt;br /&gt;
&lt;br /&gt;
* Name length depends on the file system your disk is using; usually files can be up to 107 characters long. If you want your files to be used in pre-Release 4 systems, the name length must be limited to 30 characters. Names can contain upper case letters and any punctuation marks that are not reserved.&lt;br /&gt;
* Colons (:) and slashes (/) are not allowed within a name. These characters are reserved for path statements. However, other non-alphabetic characters can be used.&lt;br /&gt;
* The use of spaces before or after names should be avoided due to the possibility of omission.&lt;br /&gt;
* Upper and lower case differences (capitalization) are preserved and displayed by the Amiga. However, the system is not case-sensitive: upper and lower case are considered the same.&lt;br /&gt;
* Duplicate file names are not allowed within the same drawer. If you save a file with the same name as an existing file in a drawer, it overwrites the original file in that drawer.&lt;br /&gt;
* Two files with the same name can exist in separate drawers or within different paths.&lt;br /&gt;
&lt;br /&gt;
== Trashcan ==&lt;br /&gt;
&lt;br /&gt;
The Trashcan is a special drawer that can be placed on a disk for storing files that you no longer needed and may wish to delete. Discard icons or pseudo-icons for the files to be deleted by dragging them into the Trashcan. If the icon to be discarded is a drawer, is associated files are also moved to the Trashcan.&lt;br /&gt;
&lt;br /&gt;
Choosing Empty Trash from the Icons menu deletes the icons and all of their associated files from the Trashcan. Before choosing Empty Trash, you can still recover any of the Trashcan&#039;s contents by opening its window and dragging the icons back out.&lt;br /&gt;
&lt;br /&gt;
For more information about putting a Trashcan on a disk, see the Format Disk description in Chapter 3.&lt;br /&gt;
&lt;br /&gt;
= Using Application Software =&lt;br /&gt;
&lt;br /&gt;
Applications are software programs, such as databases, video and sound programs, word processing programs, recreational programs, and educational programs that are available for use on your Amiga. Most Amiga programs use windows, menus, and gadgets in ways very similar to the Workbench programs on your system disks. However, you should always read the documentation that comes with your applications for directions on using unfamiliar menu items and gadgets.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Grim_Reaper&amp;diff=6696</id>
		<title>Grim Reaper</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Grim_Reaper&amp;diff=6696"/>
		<updated>2013-12-02T18:33:11Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Glossary]]&lt;br /&gt;
AmigaOS is a very stable platform, however there are third-party software applications that aren&#039;t as stable and can potentially bring your computer to its knees.&lt;br /&gt;
&lt;br /&gt;
The Grim Reaper will appear if this happens and will try its best to lock down the misbehaving application, preventing it from crashing the whole system.  Choosing the option &#039;Kill&#039; will suspend the troublesome application.&lt;br /&gt;
&lt;br /&gt;
There are other options as well such as creating a Crash Log - which can be useful for developers to try and identify the problem.&lt;br /&gt;
&lt;br /&gt;
Previously known as &#039;Guru Meditation&#039; on &#039;Classic&#039; Amiga systems.&lt;br /&gt;
&lt;br /&gt;
== Tooltypes ==&lt;br /&gt;
&lt;br /&gt;
The following tooltypes are available to control the Grim Reaper. To change them you&#039;ll need to edit the icon tooltypes for &#039;&#039;&#039;SYS:System/GrimReaper&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;LOGDIR&#039;&#039;&#039;&lt;br /&gt;
   Name of the directory to write crash reports to.&lt;br /&gt;
   (Default is &amp;quot;RAM:&amp;quot;)   &lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;DISLINES&#039;&#039;&#039;&lt;br /&gt;
   Number of lines to disassemble when creating a crash report.&lt;br /&gt;
   (Default is 5)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;DEBUGSHELL&#039;&#039;&#039;&lt;br /&gt;
   Specifies the shell command used when attaching a debugger.&lt;br /&gt;
   (Default is &amp;quot;CON:50/50/800/480/GDB/CLOSE/WAIT&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;DEBUGCOMMAND&#039;&#039;&#039;&lt;br /&gt;
   Specifies the name of the debugger to launch.&lt;br /&gt;
   (Default is &amp;quot;SDK:C/gdb&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The default debugger, GDB, is included with the current AmigaOS SDK and uses a command-line interface. Amigans unfamiliar with GDB might find the [[GDB for Beginners]] tutorial useful. If you&#039;d prefer a graphical debugger, try the third-party [http://os4depot.net/index.php?function=showfile&amp;amp;file=development/debug/db101.lha DB101] from Alfkil Wennermark.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Grim_Reaper&amp;diff=6695</id>
		<title>Grim Reaper</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Grim_Reaper&amp;diff=6695"/>
		<updated>2013-12-02T18:29:35Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Glossary]]&lt;br /&gt;
AmigaOS is a very stable platform, however there are third-party software applications that aren&#039;t as stable and can potentially bring your computer to its knees.&lt;br /&gt;
&lt;br /&gt;
The Grim Reaper will appear if this happens and will try its best to lock down the misbehaving application, preventing it from crashing the whole system.  Choosing the option &#039;Kill&#039; will suspend the troublesome application.&lt;br /&gt;
&lt;br /&gt;
There are other options as well such as creating a Crash Log - which can be useful for developers to try and identify the problem.&lt;br /&gt;
&lt;br /&gt;
Previously known as &#039;Guru Meditation&#039; on &#039;Classic&#039; Amiga systems.&lt;br /&gt;
&lt;br /&gt;
== Tooltypes ==&lt;br /&gt;
&lt;br /&gt;
The following tooltypes are available to control the Grim Reaper. To change them you&#039;ll need to edit the icon tooltypes for &#039;&#039;&#039;SYS:System/GrimReaper&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;LOGDIR&#039;&#039;&#039;&lt;br /&gt;
   Name of the directory to write crash reports to.&lt;br /&gt;
   (Default is &amp;quot;RAM:&amp;quot;)   &lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;DISLINES&#039;&#039;&#039;&lt;br /&gt;
   Number of lines to disassemble when creating a crash report.&lt;br /&gt;
   (Default is 5)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;DEBUGSHELL&#039;&#039;&#039;&lt;br /&gt;
   Specifies the shell command used when attaching a debugger.&lt;br /&gt;
   (Default is &amp;quot;CON:50/50/800/480/GDB/CLOSE/WAIT&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;DEBUGCOMMAND&#039;&#039;&#039;&lt;br /&gt;
   Specifies the name of the debugger to launch.&lt;br /&gt;
   (Default is &amp;quot;SDK:C/gdb&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The default debugger, GDB, is included with the current AmigaOS SDK and uses a command-line interface. If you&#039;d prefer a graphical debugger, try the third-party [http://os4depot.net/index.php?function=showfile&amp;amp;file=development/debug/db101.lha DB101] from Alfkil Wennermark.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Developing_Network_Applications&amp;diff=4816</id>
		<title>Developing Network Applications</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Developing_Network_Applications&amp;diff=4816"/>
		<updated>2013-01-30T21:56:57Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;adapted from the original AmigaMail article by Dale Larson&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|This article no longer applies to applications running under Release 4 of later of the Amiga Operating System, which uses an entirely new TCP/IP networking stack. Nonetheless this article from the Commodore-Amiga days can be useful in how to develop a networking application on a general level and is interesting from a historical perspective. More relevant networking-related documentation is soon to come. If you&#039;re interested in developing networking drivers, please see the [[SANA-II_Revision_7|SANA2 Revision 7]] specification&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
When you run a wire between two or more computers, you have a network. Big Deal.  When your applications use that wire however, you have a revolution. Although some of the following software is only internal or experimental, these are things I can do now with my Amiga, with software that I have now:&lt;br /&gt;
&lt;br /&gt;
* From my Amiga, I can transparently access filesystems on Suns, on the local Vax system (cbmvax), and on other Amigas.&lt;br /&gt;
&lt;br /&gt;
* Whenever I print, I send my files to a network printer.&lt;br /&gt;
&lt;br /&gt;
* I continuously receive mail on my Amiga--from as far as Seattle, Sydney and Denmark, and near as a desk next to mine.&lt;br /&gt;
&lt;br /&gt;
* Every night when I go home, my Amigas at work (and several others) are used to do distributed graphics rendering.  The&lt;br /&gt;
process is started over the network and all data is sent over the network.  A picture that would have taken a week can be finished overnight.&lt;br /&gt;
&lt;br /&gt;
In the scheme of what is possible, this is only the tip of the iceberg.&lt;br /&gt;
&lt;br /&gt;
* In a high school environment, a network could allow students to interactively participate in computer simulations.  It could allow them to collaborate electronically.  It could allow teachers to electronically monitor and assist students.  It could save schools money because peripherals such as printers, hard-drives and CD-ROMs could be easily shared.  Even the computational power of one expensive machine could be shared by the students.&lt;br /&gt;
&lt;br /&gt;
* A small office can use a network for an email-like facility for phone messages and other notes.  Another application might replace the intercom. Form letters can be kept in a central database accessed by a word processor.  A distributed appointment calendar could allow a secretary to add a new appointment even as the boss is looking at what his afternoon schedule is.  A distributed database application would allow access to such things as a central client database, outstanding orders and the present inventory.&lt;br /&gt;
&lt;br /&gt;
* Imagine multi-player games that use the computational power of each machine connected by a high speed Local Area Network (LAN).&lt;br /&gt;
&lt;br /&gt;
* In a software development environment, several programmers can work on the same project, updating the same sources.  Debugging information could be sent over the network, or a debugger on one machine could control the programs on others (For example, there is a version of Wack that runs over a network).&lt;br /&gt;
&lt;br /&gt;
* Multimedia applications might do any number of exciting things with the network.  A few of the applications which have been experimented with on other machines are: real-time audio and video conferencing, interactive demos for groups, and shared electronic blackboards.&lt;br /&gt;
&lt;br /&gt;
In much the same way as all applications are candidates for a GUI interface, all applications are candidates for becoming network applications.  The GUI has only changed the ways in which people interact with their computers.  Networks will change the ways in which people interact with each other.&lt;br /&gt;
&lt;br /&gt;
This article introduces some of the principles of writing network programs using the AS225&#039;s Berkeley Socket interface.  Even more so than in most of software development, networking seems simple in theory, but, in reality, gets complicated in a hurry.  To develop network software for AS225, you will need to obtain the Network Developer&#039;s kit from CATS.  It has all the necessary include files and Autodocs to develop for the AS225&#039;s socket.library.  Also, you should plan read at least some of the material in the &amp;quot;References&amp;quot; section of this article.&lt;br /&gt;
&lt;br /&gt;
== Protocol Layers and the BSD Sockets Interface ==&lt;br /&gt;
&lt;br /&gt;
Network applications should always be written to the Application Programmer&#039;s Interface (API) of a particular protocol, not to the network hardware.  Network standards usually include several protocols layered one on top of another. These groups are often referred to as protocol stacks. At the lowest level, one of the protocols must interface to some network hardware.  Each layer adds some abstraction to using the network on a lower level.  This serves to make it easier to program network software as the developer doesn&#039;t have to deal with networking details that are well below the level of the software under development.&lt;br /&gt;
&lt;br /&gt;
The International Standards Organization (ISO) has created a reference model on which to base new network layerings.  The ISO 7-Layer Reference Model of Open Systems Interconnection looks like this:&lt;br /&gt;
&lt;br /&gt;
                 ------------------------------------&lt;br /&gt;
                | 7  Application                     |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 6  Presentation                    |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 5  Session                         |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 4  Transport                       |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 3  Network                         |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 2  Data Link (Hardware Interface)  |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 1  Physical Hardware Connection    |&lt;br /&gt;
                 ------------------------------------&lt;br /&gt;
                 Figure: ISO-7 Layer Reference Model&lt;br /&gt;
&lt;br /&gt;
The only protocol stack for the Amiga which is currently available from Commodore is TCP/IP.  Our AS225 software package includes the standard TCP/IP protocols and several standard Internet applications.  It has the same API as most Unix machines running TCP/IP using the Berkeley Sockets interface.&lt;br /&gt;
&lt;br /&gt;
Unix was designed to have a common method of accessing both files and devices. Before a Unix application can perform any I/O operations on a file, it has to open() it.  The Unix open call returns an integer called a file descriptor that corresponds to the open file.  The application uses this file descriptor to manipulate the file.&lt;br /&gt;
&lt;br /&gt;
This method of I/O is not quite general enough for networking.  Instead, there is the Berkeley Sockets interface.  A socket is an entity used to send and receive data across a network.  A socket can be &amp;quot;plugged in&amp;quot; or bound directly to the socket of some other application on another machine somewhere on the network.  Like the Unix file system, applications access their sockets using a file descriptor, although it is typically referred to as a socket descriptor.&lt;br /&gt;
&lt;br /&gt;
Thousands of network applications have been written to the socket interface. AS225 has been shipping since December, 1990, and everything needed to write network applications for AS225 is included on the 1991 DevCon disks and on the Network Developer&#039;s Disk.&lt;br /&gt;
&lt;br /&gt;
On the Amiga, layers 1 and 2 should always be the network hardware and SANA-II Network Device Driver (SANA-II defines the lowest level software interface to networking hardware).  In AS225, layer 3 is the IP and ICMP protocols of the TCP/IP protocol stack.  These protocols aren&#039;t used directly by application developers.  Essentially, they handle machine to machine communication.  The transport layer uses the network layer (and the layers below it) to provide communication between individual processes on different machines.  Most current network applications use transport protocols.  The transport protocols in TCP/IP are TCP and UDP.&lt;br /&gt;
&lt;br /&gt;
The TCP transport protocol is a connection-oriented, stream protocol. Basically, the socket of one application connects to the socket of another application and they communicate across the network in data streams.  The two applications can be running on arbitrary machines on a network.  The big plus of using TCP is that it is a reliable protocol.  If the data is put in one end of a TCP stream, it either gets to the other end intact, or not at all (which causes an error at the sender&#039;s end).  This makes it easier to program applications because the application programmer does not have to worry about packet corruption.&lt;br /&gt;
&lt;br /&gt;
UDP is a connectionless, datagram protocol.  An application using UDP sends datagrams to some other application on the network.  A datagram is a fixed-length message.  Because the sockets of UDP applications are not connected, a datagram sent from a socket can be sent to an arbitrary UDP socket.  Unlike TCP, UDP is not a reliable protocol, so an application that uses UDP has to account for errors that can occur during transmission.&lt;br /&gt;
&lt;br /&gt;
The details of all the various protocols and how they behave are quite complex and are beyond the scope of this article.  This article deals with the difference between connection-oriented stream protocols (sockets which are obtained as type SOCK_STREAM) and connectionless datagram protocols (type SOCK_DGRAM).&lt;br /&gt;
&lt;br /&gt;
The Amiga Shared Socket Library (socket.library) is Commodore&#039;s implementation of the standard functions for manipulating, sending data to, and receiving data from sockets.  Other network APIs for TCP/IP have been written for other platforms (most notably TLI on Unix SVR4 systems). Programs written using sockets on one machine can communicate just fine with programs written using another API (i.e., TLI) on another machine. Sockets are not specific to TCP/IP.  They can be used with different &amp;quot;domains&amp;quot;.  TCP/IP is one domain, another network protocol is another domain and local Inter-Process Communication (IPC) is yet another.  Our socket library currently supports only TCP/IP.&lt;br /&gt;
&lt;br /&gt;
Layers 5 and 6 of the OSI model, the presentation and session layers, do not exist in TCP/IP, or most other protocol stacks.  So with TCP/IP on the Amiga, the protocol stack looks like this:&lt;br /&gt;
&lt;br /&gt;
                 -------------------------------------------&lt;br /&gt;
                | Application                               |&lt;br /&gt;
                |-------------------------------------------|&lt;br /&gt;
                | Transport (TCP, UDP)                      |&lt;br /&gt;
                |-------------------------------------------|&lt;br /&gt;
                | Network   (IP, ICMP)                      |&lt;br /&gt;
                |-------------------------------------------|&lt;br /&gt;
                | Data Link (SANA-II Network Device Driver) |&lt;br /&gt;
                |-------------------------------------------|&lt;br /&gt;
                | Hardware  (ethernet, arcnet, ...)         |&lt;br /&gt;
                 -------------------------------------------&lt;br /&gt;
                       Figure: TCP/IP Protocol Stack&lt;br /&gt;
&lt;br /&gt;
In spite of the fact that protocols come in a stack, your application will only come into direct contact with a protocol at the top of the stack.  In the case of TCP/IP, this is the transport layer.  In theory, you are not required to know protocols below the one used for your application.  In practice, higher-level protocols are often described in terms of additions to lower-level protocols.&lt;br /&gt;
&lt;br /&gt;
== Network Applications ==&lt;br /&gt;
&lt;br /&gt;
Most network applications are built around a client/server model.  In the client/server model, a server application runs on one machine somewhere on a network.  That server waits for a request for a particular service it provides. These requests come from client applications that are running on other machines on the network.  A service can be as simple as echoing back text sent to the server or as complex as providing a remote login facility.  For example, the ftp (File Transfer Program) application copies files between networked machines.  Ftp actually consists of two programs, a client and a server.  The server waits around for a client to request some service, like listing a directory or transferring a file.&lt;br /&gt;
&lt;br /&gt;
On most networks, each machine is capable of running both client and server programs simultaneously, but on some networks a machine is either a client or a server and may only run programs of that type.  The focus of this article is peer-to-peer networks (the former), not client-server networks (the latter).&lt;br /&gt;
&lt;br /&gt;
=== Application Protocols ===&lt;br /&gt;
&lt;br /&gt;
Every networked program must agree on how to send data across the network and on what meaning to attach to that data.  Therefore, the application itself has a protocol.  This is the application layer of the ISO reference model and TCP/IP protocol stack.  The application-specific protocol can include such things as what transport protocol will be used, what initialization takes place, how any security is implemented, what format data will be in, etc.&lt;br /&gt;
&lt;br /&gt;
For standard Internet applications (ftp for example), the application protocols are specified in detail in one or more reference documents called Requests for Comments, or RFCs.  RFCs are the specifications for Internet protocols and standard applications.  Even if you aren&#039;t implementing a standard Internet application, the RFCs offer insight into the complexities of application protocols and how they should be specified.  See the &amp;quot;References&amp;quot; section of this article for more information on RFCs and standard Internet applications.&lt;br /&gt;
&lt;br /&gt;
Normally application protocols are general enough that network applications can be ported to any machine which supports the network protocol.  Neither the client nor the server knows (or cares) what type of machine is at the other end.  Sometimes only one half of the application (client or server) is available for a given machine.  For example, the currently released version of AS225 includes an NFS (Network File System) client program, but no NFS server program.  To use NFS with AS225 requires access to any machine with an NFS server--it does not require any particular type of machine.&lt;br /&gt;
&lt;br /&gt;
=== Kinds of Servers ===&lt;br /&gt;
&lt;br /&gt;
There are two kinds of servers.  Those which process one request at a time are called &amp;quot;iterative servers&amp;quot;.  Those which simultaneously service multiple requests (often by spawning a process to handle each request) are called &amp;quot;concurrent servers&amp;quot;.  Iterative servers are generally easier to write, but are only suitable for services which can be handled quickly and/or will not be accessed by multiple clients.  Applications which use connectionless protocols (UDP) frequently have iterative servers, while applications with connection-oriented protocols (TCP) usually have concurrent servers.&lt;br /&gt;
&lt;br /&gt;
== Addressing ==&lt;br /&gt;
&lt;br /&gt;
All data on the network is sent to and from network addresses.  There are many different types of network addresses, at least one type for each layer of the protocol stack.  For example, the Network layer of the TCP/IP protocol stack uses the IP and ICMP protocols which use 32-bit internet addresses (which are usually represented in &amp;quot;dotted decimal notation&amp;quot; e.g., 192.9.210.4) to talk to a specific machine at a specific internet-style address.  When applications communicate with each other, they usually use a transport layer protocol, therefore the data is sent from one transport address to another.  A transport address generally corresponds to a specific program running on a specific machine somewhere on a network.&lt;br /&gt;
&lt;br /&gt;
A transport address consists of three parts: a protocol, a host address, and a process association.  In AS225, the protocol in a transport address is either TCP or UDP.  The host address is dependent upon the protocol, but in AS225, the host address is always the internet address of the host. The process association is also protocol dependent, and in AS225, the process association is a port number.  TCP/IP port numbers are 16-bit integers that are used by the transport protocols on each host to direct network traffic to a specific process running on the machine at that internet address.&lt;br /&gt;
&lt;br /&gt;
The set of port numbers is unique to each protocol.  For example, port number 42 for UDP might belong to a different process than that which belongs to port number 42 for TCP.  Without port numbers, multiple network programs could not run simultaneously.&lt;br /&gt;
&lt;br /&gt;
Transport protocols are analogous in some ways to Amiga Exec devices.  In such an analogy, there is a TCP device and a UDP device.  Each device has about 65,000 units and none of the units can be opened in shared mode.&lt;br /&gt;
&lt;br /&gt;
Once a socket is created, it has to be bound to a transport address.  An application binds an address to a socket in one of two ways.  The binding can be made explicitly by the program to a specific transport address (using the bind() call).  Servers normally use this type of binding.  In this case, the server uses a preset, &amp;quot;well-known&amp;quot; port number in its transport address.  The port number is well-known because all of the server&#039;s possible clients know what that particular server&#039;s port number is.   Because these clients know the server&#039;s port number, the clients can construct a transport address for that particular service on any machine that runs that server.  For example, the default, well-known port number for ftp is 21.  If a client wants to use ftp to transfer files from a machine at the internet address 192.9.210.4, it can use ftp&#039;s port number, the machine&#039;s internet address, and the protocol (ftp uses TCP) to find the ftp server at 192.9.210.4.  As long as there is an ftp server running at 192.9.210.4, the client should have no problem finding the server. This type of socket is analogous to a public message port.&lt;br /&gt;
&lt;br /&gt;
The other way to bind a socket to a transport address is to let the socket library arbitrarily choose a port number for the application.  Normally client applications bind this way because a client does not need a well-known address. The client supplies the server with its transport address when it sets up communication with the server.  This type of socket is analogous to a private [[Exec]] message port.&lt;br /&gt;
&lt;br /&gt;
=== Finding Servers ===&lt;br /&gt;
&lt;br /&gt;
A client &amp;quot;finds&amp;quot; its server by the server&#039;s transport address.  As was mentioned eariler, the transport address consists of a protocol, a host address, and a port number.  For the TCP/IP protocol stack, the protocol is either TCP or UDP.&lt;br /&gt;
&lt;br /&gt;
The next thing the client needs to build after the transport address is an internet address for the server&#039;s machine.  Normally the client obtains that address from the user.  The address can be in one of two forms, an internet address (in dotted decimal notation), or a host name which is an ASCII string that corresponds to the host&#039;s internet address.  If the client gets a host name, it asks the socket.library what internet address corresponds to the host name.&lt;br /&gt;
&lt;br /&gt;
When a server starts, it opens a socket and &#039;&#039;&#039;bind()&#039;&#039;&#039;s that socket using the server&#039;s well-known port number.  There are two ways for the server&#039;s well-known port to become well-known:&lt;br /&gt;
&lt;br /&gt;
# A server&#039;s well-known port number can be hard-coded into both the client and server.  This is recommended for prototyping new programs, but is a Very Bad Thing for programs which will be distributed.  The port number is arbitrary, but must not be one of the reserved ports (see the next section) and must not conflict with a port number already in use.&lt;br /&gt;
&lt;br /&gt;
# Port numbers can be configurable.  All distributed network applications should use configurable port numbers.  In programs written for AS225, you should use the inet:db/services file to configure a port number.  The function &#039;&#039;&#039;getservbyname()&#039;&#039;&#039; accepts a protocol (UDP or TCP) and the name of a well-known server and returns the port number of that service.  This requires you to configure your application by adding an entry to the inet:db/services file on every machine which will use the application.  Many standard Internet applications and Unix remote services are already in the inet:db/services file that comes with AS225.  If your application isn&#039;t already included, your installation scripts should add the entry for your application to inet:db/services.  Offer a default value, but let your user actually pick the number since your port number must not conflict with another (pre-existing) port number.&lt;br /&gt;
&lt;br /&gt;
=== Reserved Ports ===&lt;br /&gt;
&lt;br /&gt;
Port numbers 1-255 are reserved for standard Internet applications (like ftp) and port numbers 256-1023 are reserved for standard Unix remote services (which are often available for machines other than Unix).  You should never choose any of these port numbers for your application unless it is an implementation of a standard for which the port number is reserved.  For more information on port numbering and reserved ports, see the &amp;quot;References&amp;quot; section at the end of this article.&lt;br /&gt;
&lt;br /&gt;
== Skeleton for Applications Using TCP ==&lt;br /&gt;
&lt;br /&gt;
Aside from the special quirks of the socket.library (which is discussed in the &amp;quot;Shared Socket Library&amp;quot; section below), the basic outline of the core of most client/server model applications written with TCP starts with the server:&lt;br /&gt;
&lt;br /&gt;
First, create a socket:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int socket(int family, int type, int protocol)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where family specifies the protocol family (which for the TCP/IP protocol stack is AF_INET from &amp;lt;sys/socket.h&amp;gt;), type specifies the abstract type of communication (either SOCK_STREAM for TCP or SOCK_DGRAM for UDP), and protocol is not generally used in the TCP/IP protocol stack and should be set to zero. If &#039;&#039;&#039;socket()&#039;&#039;&#039; fails, it returns a -1, otherwise it returns a socket descriptor.&lt;br /&gt;
&lt;br /&gt;
Next, get the well-known port number of the server&#039;s service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct servent *getservbyname(char *family, char *service)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where family is one of two strings, &amp;quot;tcp&amp;quot; or &amp;quot;udp&amp;quot;.  The service argument is the name of the service that this server provides.  The function returns a NULL if there was an error.  Otherwise, it returns pointer to a servent structure (from &amp;lt;netdb.h&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct  servent {&lt;br /&gt;
        char   *s_name;      /* official service name */&lt;br /&gt;
        char   **s_aliases;     /* alias list */&lt;br /&gt;
        int    s_port;       /* port # */&lt;br /&gt;
        char   *s_proto;     /* protocol to use */&lt;br /&gt;
    };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, build a sockaddr_in (from &amp;lt;netinet/in.h&amp;gt;) structure using the port number from the s_port field of the servent structure returned by &#039;&#039;&#039;getservbyname()&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct in_addr {&lt;br /&gt;
        u_long s_addr;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    struct sockaddr_in {&lt;br /&gt;
        short     sin_family;        /* address family.  Make this&lt;br /&gt;
                                        AF_INET for TCP/IP */&lt;br /&gt;
        u_short   sin_port;          /* the port number (the value from&lt;br /&gt;
                                        servent.s_port)    */&lt;br /&gt;
        struct    in_addr sin_addr;  /* internet address. For TCP/IP, make&lt;br /&gt;
                                        sin_addr.s_addr INADDR_ANY.  Bind&lt;br /&gt;
                                        will know what to do with this. */&lt;br /&gt;
        char      sin_zero[8];       /* unused by TCP/IP */&lt;br /&gt;
    };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sockaddr_in structure is a TCP/IP specific version of the sockaddr structure. Now give the sockaddr_in to &#039;&#039;&#039;bind()&#039;&#039;&#039; in order to attach a specific address&lt;br /&gt;
to the socket:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int bind(int servsocket, struct sockaddr *name, int namelength)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where, servsocket is the socket descriptor of the socket that needs a specific address, name is a pointer to the sockaddr structure (or, for TCP/IP purposes, a sockaddr_in structure) that describes the address, and namelength is the length of the sockaddr structure.&lt;br /&gt;
&lt;br /&gt;
Once the socket is bound to an address, the server calls &#039;&#039;&#039;listen()&#039;&#039;&#039; to indicate that it is waiting to receive connections.&lt;br /&gt;
&lt;br /&gt;
The server is ready to start its main processing loop.  The &#039;&#039;&#039;accept()&#039;&#039;&#039;&lt;br /&gt;
function waits for and accepts a new connection at a socket:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int accept(int servsocket, struct sockaddr *name, int namelength)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where, servsocket is the socket (descriptor) on which the server is waiting for connections, name points to a buffer where &#039;&#039;&#039;accept()&#039;&#039;&#039; copies a sockaddr structure describing the client that is trying to connect to the server, and namelength is the length of the name buffer.&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;accept()&#039;&#039;&#039; fails, it returns a negative value, otherwise &#039;&#039;&#039;accept()&#039;&#039;&#039; returns a socket descriptor of a new socket that is connected to the client&#039;s socket.&lt;br /&gt;
&lt;br /&gt;
The server can communicate with the client using the new socket while it continues to listen to its original socket for new connections.  The server may serve one client at a time (an iterative server), or give the new socket (the one returned by &#039;&#039;&#039;accept()&#039;&#039;&#039;) to a new process so it can handle talking to the client (a concurrent server).&lt;br /&gt;
&lt;br /&gt;
Setting up the client is similar to setting up the server.  You have to create a socket, find the service&#039;s well-known port number, and initialize a sockaddr_in structure that refers to the server.  Creating the socket and finding the service&#039;s port number are identical to the method described above.&lt;br /&gt;
&lt;br /&gt;
To initialize the sockaddr_in structure, fill in the sin_family (AF_INET) and sin_port (service&#039;s well-known port number) fields as in the server. To fill in the sin_addr field, the client needs to find the internet address of the server&#039;s machine.  The client has to find this from either from an ASCII string of the IP address or the host name (either of which the client will probably get from the user).  The &#039;&#039;&#039;inet_addr()&#039;&#039;&#039; function accepts an ASCII string of a numeric IP address and returns the internet address to put in the sockaddr_in&#039;s sin_addr.s_addr field.  If the client only has the host name, it has to call &#039;&#039;&#039;gethostbyname()&#039;&#039;&#039; to find out the server&#039;s machine address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct hostent *gethostbyname(char *hostname)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The parameter hostname is an ASCII string naming the host.  This function figures out the address of the host (usually by looking it up in the inet:db/hosts file).  This function returns a pointer to a hostent structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct  hostent {&lt;br /&gt;
        char   *h_name;       /* official name of host */&lt;br /&gt;
        char   **h_aliases;   /* alias list */&lt;br /&gt;
        int    h_addrtype;    /* host address type */&lt;br /&gt;
        int    h_length;      /* length of address */&lt;br /&gt;
        char   **h_addr_list; /* list of addresses from name server */&lt;br /&gt;
    #define  h_addr  h_addr_list[0]  /* address, for backward&lt;br /&gt;
                                        compatibility */&lt;br /&gt;
    };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The #defined field, h_addr, contains a pointer to an in_addr structure, which contains the actual host address.  Copy this value into the sockaddr_in.sin_addr.s_addr field.&lt;br /&gt;
&lt;br /&gt;
Now the client needs to establish a connection between itself and the server. It does this with the &#039;&#039;&#039;connect()&#039;&#039;&#039; function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int connect(int clientsocket, struct sockaddr *servname,&lt;br /&gt;
                int namelength)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where, clientsocket is the socket the client created earlier, servname points to the sockaddr_in structure the client just built, and namelength is the length of that sockaddr_in structure.&lt;br /&gt;
&lt;br /&gt;
The server and client communicate using the &#039;&#039;&#039;send()&#039;&#039;&#039; and &#039;&#039;&#039;recv()&#039;&#039;&#039; functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int send(int socket, char *buf, int buflength, int flags)&lt;br /&gt;
    int recv(int socket, char *buf, int buflength, int flags)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where, socket is the socket to send to/receive from, buf is a buffer that&lt;br /&gt;
contains the data to transmit/is a place for &#039;&#039;&#039;recv()&#039;&#039;&#039; to put the data it&lt;br /&gt;
receives, buflength is the length of buf, and flags is beyond the scope of&lt;br /&gt;
this article.  For the moment, you can set it to zero.&lt;br /&gt;
&lt;br /&gt;
The data is a continuous stream, with any meaning assigned by the application protocol (not to be confused with the network protocol).  The data is always received either intact or not at all.  The data almost always gets there unless there is a serious network or host machine problem.  When the communications are finished, both sides &#039;&#039;&#039;s_close()&#039;&#039;&#039; the sockets which were connected.&lt;br /&gt;
&lt;br /&gt;
== Skeleton for Applications Using UDP ==&lt;br /&gt;
&lt;br /&gt;
The basic outline of most client/server model applications written with UDP look something like this:&lt;br /&gt;
&lt;br /&gt;
Server gets a socket with socket(), gets a port number with getservbyname(), builds a sockaddr_in structure describing the server, and gives that structure to bind() in order to attach a specific address to the socket.  It then loops, waiting to recvfrom() any incoming datagrams and responding to any requests in those datagrams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int recvfrom(int socket, char *buf, int buflength, int flags,&lt;br /&gt;
                 struct sockaddr *clientname, int namelength)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The recvfrom() function is similar to the recv() function except it has two extra parameters.  clientname is a buffer for a sockaddr_in structure. When recvfrom() receives a datagram from some application on the network, it fills in clientname with the transport address of that application. The size of the structure is namelength.&lt;br /&gt;
&lt;br /&gt;
The client gets a server hostname from the user, gets a socket(), gets the server&#039;s port number with getservbyname(), builds a sockaddr_in structure describing the server, and sendto()s a datagram to the server&#039;s well-known address:&lt;br /&gt;
&lt;br /&gt;
int sendto(int socket, char *buf, int buflength, int flags, struct sockaddr *servername, int namelength) The client either waits for the server to send back a datagram to the client&#039;s socket, or give up because the server took too much time to reply.  The client does this by calling select().  This function puts the client to sleep until either a particular set of sockets is ready for reading, writing, or exception processing, or after a timeout period has passed without any activity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int select(int numsocks, fd_set *readsocks, fd_set *writesocks,&lt;br /&gt;
               fd_set *exceptsocks, struct timeval *timeout)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numsocks parameter is 1 plus the number of sockets select() is waiting on. The readsocks, writesocks, and exceptsocks parameters are each a bitmask which tells select() which socket (or sockets) to wait for activity on.  The fd_set structure (defined in &amp;lt;sys/types.h&amp;gt;), is basically a handle to one of these bitmasks.  Programs cannot directly manipulate the bits in these masks. Instead, there are functions to do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    FD_ZERO(struct fd_set *mymask)                /* clear all bits in&lt;br /&gt;
                                                     mymask */&lt;br /&gt;
    FD_SET(int mysocket, struct fd_set *mymask)   /* turn on the bit for&lt;br /&gt;
                                                     mysocket in mymask */&lt;br /&gt;
    FD_CLR(int mysocket, struct fd_set *mymask)   /* turn off the bit for&lt;br /&gt;
                                                     mysocket in mymask */&lt;br /&gt;
    FD_ISSET(int mysocket, struct fd_set *mymask) /* test if mysocket&#039;s bit&lt;br /&gt;
                                                     in mymask is set */&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the purposes of this article, the only relevant mask is readsocks, because the client is only waiting to read from a socket.  Since the client isn&#039;t interested in the other masks, it makes writesocks and exceptsocks NULL.&lt;br /&gt;
&lt;br /&gt;
The last parameter, timeout, sets the maximum amount of time that select() should wait for activity on the sockets it is watching.&lt;br /&gt;
&lt;br /&gt;
When select() returns, its return value is either -1 if it failed, 0 if there was a timeout, or a positive number, which is the number of sockets that became ready.  When select returns, it sets the bits in the bitmasks according to which socket (or sockets) became ready.&lt;br /&gt;
&lt;br /&gt;
When select() returns, if a socket became ready, the client calls recvfrom() to get the datagram the server sent back.  On timeout, the client might try to re-send the datagram since it may have been lost or corrupted.  Datagrams can be also be received in an order different from that in which they were sent and can be received in duplicate.&lt;br /&gt;
&lt;br /&gt;
== Which protocol is right for my application? ==&lt;br /&gt;
&lt;br /&gt;
Generally, if your application requires moving bulk data to far away places, you should be using TCP.  For many other applications, TCP is also appropriate just because its reliability makes it easy to use.  TCP is so easy to use because it provides so much functionality.  The price paid for ease of use is performance.&lt;br /&gt;
&lt;br /&gt;
TCP does a good job of moving bulk data from one side of the planet to another. For data which will only be sent across one physical network (one LAN), or for data sent in small pieces, TCP doesn&#039;t perform so well.  A much more specific set of functionality can always provide better performance than the most general set can. For performance-critical applications which don&#039;t move bulk data, UDP is usually the protocol of choice.  Unfortunately, since UDP doesn&#039;t provide reliability, the application protocol must.  This means a much more complicated application protocol.  It isn&#039;t nearly as bad as it sounds, though, and Stevens (1990) offers two examples.&lt;br /&gt;
&lt;br /&gt;
== The Shared Socket Library ==&lt;br /&gt;
&lt;br /&gt;
The primary goal of the Shared Socket Library is to provide a network API which is as compatible with standard Unix as possible.  This makes porting many applications much easier, but it also creates many little quirks that cannot be &amp;quot;fixed&amp;quot;.  The justification behind this is: faithfully emulating Unix&#039;s quirks is better than creating new ones, since at least you can then write more portable software and only need to remember one set of quirks.  Remember this when you wish that some function returned *void rather than *foo, etc.  Expect to get a few spurious compiler warnings from your nice ANSI &#039;C&#039; compiler.&lt;br /&gt;
&lt;br /&gt;
Many functions in socket.library are only needed by those developers porting standard Unix remote services and probably should not be used by most Amiga applications.  For example, all the functions dealing with user and group IDs belong in this category.&lt;br /&gt;
&lt;br /&gt;
To use the socket.library functions, the first thing you have to do, of course, is open it.  This library is a little unconventional because it returns a different library base for each OpenLibrary() call.  The Shared Socket Library uses different library bases to keep track of some global data for each process that opens it.  If you start a new process with a new context, the new process must open and initialize socket.library. Tasks should not access the socket.library, only processes should.&lt;br /&gt;
&lt;br /&gt;
Before using any other function in the socket.library, you must call its function setup_sockets() to initialize the library:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    ULONG retval = setup_sockets( UWORD max_sockets, int *errnop );&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where max_sockets is the maximum number of sockets that can be open at once and errnop points to errno, a global integer that provides details about error conditions.  This global value is used extensively by the standard socket functions.  The standard Amiga C startup code (c.o) creates a global variable labelled &amp;quot;errno&amp;quot; which you can use as the global pointer.&lt;br /&gt;
&lt;br /&gt;
The setup_sockets() call must be matched with the cleanup_sockets() call. This takes care of deallocating system resources that setup_sockets() allocates.&lt;br /&gt;
&lt;br /&gt;
The socket.library assumes that all ints are 32-bit values.  If you are using a compiler which doesn&#039;t use 32-bit ints, you must make sure that all ints are converted to longs by your code.&lt;br /&gt;
&lt;br /&gt;
There are a couple of important differences between the AS225 socket.library and the standard Unix implementation.  When writing softwarefor AS225, you cannot use the read(), write(), close(), and ioctl() functions on sockets. These functions come from Unix and apply both to files and sockets.  To avoid confusion, socket.library does not contain these functions.  Use the socket.library functions recv(), send(), s_close(), and s_ioctl() instead.&lt;br /&gt;
&lt;br /&gt;
The standard Unix implementation has a series of get*() functions.  These functions return a pointer to a static buffer.  The buffer returned by a call to getX*() is cleared on the next invocation of getX*().  For example, the buffer pointed to by the return of gethostent() is cleared by another call to gethostent(), gethostbyaddr() or gethostbyname(), but not by a call to getprotoent(), etc.  None of the get*ent(), set*ent() or end*ent() functions should normally be used except for porting existing programs.&lt;br /&gt;
&lt;br /&gt;
The Shared Socket Library contains a function called selectwait().  This function combines the select() function with the exec.library Wait() function so that an Amiga networked application can wait on both Amiga events and network events at the same time.&lt;br /&gt;
&lt;br /&gt;
This article, the examples from the Network Developer&#039;s disk,  and the include files and the Autodocs should be enough to get you started. Writing network applications can be very complex and difficult, but is well worth the effort. This article only introduces you to writing network applications for the Amiga with AS225, and has left a lot unsaid about the socket interface and about networking in general.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4815</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4815"/>
		<updated>2013-01-30T16:58:20Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Console Only Packets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Note for OS4 Developers ===&lt;br /&gt;
&lt;br /&gt;
The following specification of [[AmigaDOS]] packet types dates back to the original documentation as provided by Commodore-Amiga in an AmigaMail article published concurrently with the release of OS2.0.  Developers working on current versions of the Amiga Operating System need to refer to the SDK documentation and included AutoDocs as the following has not been updated to reflect changes in dos.library itself, nor changes to the implementation of FFS, nor to new packet types introduced alongside SFS or JXFS. The following specification is only provided as an additional reference and is to be updated to reflect changes introduced with Release 3 and Release 4 of the operating system.&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
The Volume Manipulation and Information actions are used to allow access to the underlying volume currently being manipulated by the file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CURRENT_VOLUME&#039;&#039;&#039;    7       &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BPTR    Pointer to volume node of current volume&lt;br /&gt;
&lt;br /&gt;
This action returns a pointer to the volume node (from the DOS device list) associated with the file system.  As the volume node may be removed from the device list when the file system mounts a different volume (such as when directed to by an ACTION_INHIBIT) there is no guarantee that this pointer will remain valid for any amount of time. This action is generally used by AmigaDOS to provide the volume line of a requester.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      Info(...)&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_INFO&#039;&#039;&#039;              26      &amp;lt;sendpkt only&amp;gt;&lt;br /&gt;
 ARG1:   LOCK    Lock&lt;br /&gt;
 ARG2:   BPTR    Pointer to a InfoData Structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
These actions are used to get information about the device and status of the file handler.  ACTION_DISK_INFO is used by the info command to report the status of the volume currently in the drive.  It fills in an InfoData structure about the volume the file system currently controls.  This structure should be longword aligned.  ACTION_INFO fills in an InfoData structure for  the volume the lock (ARG1) is on instead of the volume currently in the drive.  These actions are generally expected to return DOSTRUE.&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_DISK&#039;&#039;&#039;      9       Relabel(...) in 2.0&lt;br /&gt;
 ARG1:   BSTR    New disk name&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the name of the current volume.  A file system implementing this function must also change the name stored in the volume node of the DOS device list.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FORMAT&#039;&#039;&#039;            1020    Format(fs,vol,type)&lt;br /&gt;
 ARG1:   BSTR    Name for volume (if supported)&lt;br /&gt;
 ARG2:   LONG    Type of format (file system specific)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet tells a file system to perform any device or file system specific formatting on any newly initialized media.  Upon receiving this action, a file system can assume that the media has already been low level formatted and should proceed to write out any high level disk structure necessary to create an empty volume.&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
A number of packets are defined to give an application some control over a file system:&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DIE&#039;&#039;&#039;               5      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
As its name implies, the ACTION_DIE packet tells a handler to quit. All new handlers are expected to implement this packet.  Because of outstanding locks and the fact that the handler address is returned by the DeviceProc() routine, it is unlikely that the handler can disappear completely, but instead will have to release as many resources as possible and simply return an error on all packets sent to it.&lt;br /&gt;
&lt;br /&gt;
In the future, the system may be able to determine if there are any outstanding DeviceProc() references to a handler, and therefore make it is safe to shut down completely.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FLUSH&#039;&#039;&#039;             27     &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This action causes the file system to flush out all buffers to disk before returning this packet.  If any writes are pending, they must be processed before responding to this packet.  This packet allows an application to make sure that the data that is supposed to be on the disk is actually written to the disk instead of waiting in a buffer.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MORE_CACHE&#039;&#039;&#039;        18      AddBuffers(...) in 2.0&lt;br /&gt;
 ARG1:   LONG    Number of buffers to add&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE (-1L)&lt;br /&gt;
 RES2:   LONG    New total number of buffers&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the number of internal buffers used by the file system for caching.  Note that a positive number increases the number of buffers while a negative number decreases the number of buffers.  In all cases, the number of current buffers should be returned in RES2.  This allows an application to inquire the number of buffers by sending in a value of 0 (resulting in no change).  Note that the OFS and FFS in 1.3 do not accept a negative number of buffers.&lt;br /&gt;
&lt;br /&gt;
Note that there is a bug in the ROM file system in both Release 2.04 and Release 3.0 that jumbles its return values for this packet.  The file system erroneously returns the new number of buffers in RES1 instead of RES2 (it returns a failure code in RES2).  To work around this bug when using this packet, test RES1 to see if it is DOSTRUE (-1L).  If it is, look at RES2 for the number of buffers, otherwise RES1 should contain the new total number of buffers.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_INHIBIT&#039;&#039;&#039;           31     Inhibit(...) in 2.0&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE = inhibit,      DOSFALSE = uninhibit&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action is probably one of the most dangerous that a file system has to handle.  When inhibited (ARG1 = DOSTRUE), the file system must not access any underlying media and return an error code on all attempts to access the device.  Once uninhibited (ARG1 = DOSFALSE), the file system must assume that the medium has been changed.  The file system must flush the buffers before the ACTION_INHIBIT, popping up a requester demanding that the user put back the current disk, if necessary.  The handler may choose to reject an inhibit request if any objects are open for writing.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required, a handler should nest inhibits.  Prior to 2.0, the system handlers did not keep a nesting count and were subject to some obscure race conditions.  The 2.0 ROM filing system introduced a nesting count.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_PROTECT&#039;&#039;&#039;     1023    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE/DOSFALSE (write protect /un-write protect)&lt;br /&gt;
 ARG2:   LONG    32 Bit pass key&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE/DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This is a new packet defined for the Fast File System.  This packet allows an application to change the write protect flag of a disk (if possible - applications cannot write to floppies that have their write-protect tabs set).  This packet is primarily intended to allow write-protecting non-removable media such as hard disks.  The value in ARG1 toggles the write status.  The 32-bit passkey allows a program to prevent other programs from unwrite-protecting a disk.  To unlock a disk, ARG2 must match the passkey of the packet that locked the disk, unless the disk was locked with a passkey of 0.  In this case, no passkey is necessary to unlock the disk.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_IS_FILESYSTEM&#039;&#039;&#039;     1027    IsFileSystem(devname)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Through this function, a handler can indicates whether or not it is a file system (whether or not it can  support separate files for storing information).  Programs will assume a handler can create multiple, distinct files through calls to Open() if the handler returns this packet with a DOSTRUE value.  A handler does not need to support directories and subdirectories in order to qualify as a file system.  It does have to support the Examine()/ExNext() calls.&lt;br /&gt;
&lt;br /&gt;
Note that the AmigaDOS routine IsFileSystem() will attempt to use Lock(&amp;quot;:&amp;quot;,SHARED_ACCESS) if this packet returns ERROR_ACTION_NOT_KNOWN.&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
There are several actions that are generally used by handlers to allow messages returning from requested services (typically an [[Exec]] device) to look like incoming request packets.  This allows the handler to request an asynchronous operation but be notified of the completion.  For example, a handler sends the serial.device a request for a read, but instead of sending a plain IO request, it sends a DOS packet disguised as an IO request.  The serial.device treats the packet like a normal IO request, returning it to the handler when it is finished. When the handler gets back its disguised DOS packet, it knows that the read has completed.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_NIL&#039;&#039;&#039;               0       &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Although not specifically an action, many returns look like this value because the action field has not been filled in.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_RETURN&#039;&#039;&#039;       1001    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous read request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_RETURN&#039;&#039;&#039;      1002    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous write request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_TIMER&#039;&#039;&#039;             30     &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to indicate the passage of a time interval.  Many handlers have a steady stream of ACTION_TIMER packets so that they can schedule house keeping and flush buffers when no activity has occurred for a given time interval.&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
There are several packet types that are documented within the system include files that are obsolete.  A file system is not expected to handle these packets and any program which sends these packets can not expect them to work:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_CHANGE&#039;&#039;&#039;      33      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_TYPE&#039;&#039;&#039;        32      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_EVENT&#039;&#039;&#039;             6      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_GET_BLOCK&#039;&#039;&#039;         2      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_MAP&#039;&#039;&#039;           4      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of particular note here is ACTION_DISK_CHANGE.  The DiskChange command uses the ACTION_INHIBIT packet to accomplish its task.&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
The remaining packets are only used for console handlers and do not need to be implemented by a file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SCREEN_MODE&#039;&#039;&#039;       994    SetMode() in 2.0+&lt;br /&gt;
 ARG1:   LONG    Mode (zero or one)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Switch the console to and from RAW mode.  An ARG1 of one indicates the unprocessed, raw mode while an ARG1 of zero indicates the processed, &#039;&#039;cooked&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_SIGNAL&#039;&#039;&#039;     995    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   LONG    The fh_Arg1 of the console file handle&lt;br /&gt;
 ARG2:   APTR    MsgPort of the process to signal&lt;br /&gt;
 ARG3:   LONG    Reserved, currently this must be zero&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet redirects what process the console handler signals when the user hits  Control-C, Control-D, Control-E, or Control-F. Normally the process that opened the file handle receives the break signal.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WAIT_CHAR&#039;&#039;&#039;         20     WaitForChar()&lt;br /&gt;
 ARG1:   ULONG   Timeout in microseconds&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Performs a timed read of a character.  The WaitForChar() function uses this packet.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle in the InfoData structure&#039;s id_VolumeNode field (the InfoData structure is defined in &amp;lt;dos/dos.h&amp;gt;).  Note that some consoles can return a NULL Window pointer (for example, an AUTO CON: or a AUX: console).  The Amiga&#039;s standard console handler, CON:, also returns a pointer to the console handler&#039;s IO request in the id_InUse field. In some cases, the IO request&#039;s io_Unit field (which normally point to a ConUnit structure) will be NULL.  See also the ACTION_DISK_INFO packet in the [[#Volume Manipulation/Information|Volume Manipulation/Information]] section.&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4814</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4814"/>
		<updated>2013-01-30T16:57:21Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Console Only Packets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Note for OS4 Developers ===&lt;br /&gt;
&lt;br /&gt;
The following specification of [[AmigaDOS]] packet types dates back to the original documentation as provided by Commodore-Amiga in an AmigaMail article published concurrently with the release of OS2.0.  Developers working on current versions of the Amiga Operating System need to refer to the SDK documentation and included AutoDocs as the following has not been updated to reflect changes in dos.library itself, nor changes to the implementation of FFS, nor to new packet types introduced alongside SFS or JXFS. The following specification is only provided as an additional reference and is to be updated to reflect changes introduced with Release 3 and Release 4 of the operating system.&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
The Volume Manipulation and Information actions are used to allow access to the underlying volume currently being manipulated by the file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CURRENT_VOLUME&#039;&#039;&#039;    7       &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BPTR    Pointer to volume node of current volume&lt;br /&gt;
&lt;br /&gt;
This action returns a pointer to the volume node (from the DOS device list) associated with the file system.  As the volume node may be removed from the device list when the file system mounts a different volume (such as when directed to by an ACTION_INHIBIT) there is no guarantee that this pointer will remain valid for any amount of time. This action is generally used by AmigaDOS to provide the volume line of a requester.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      Info(...)&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_INFO&#039;&#039;&#039;              26      &amp;lt;sendpkt only&amp;gt;&lt;br /&gt;
 ARG1:   LOCK    Lock&lt;br /&gt;
 ARG2:   BPTR    Pointer to a InfoData Structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
These actions are used to get information about the device and status of the file handler.  ACTION_DISK_INFO is used by the info command to report the status of the volume currently in the drive.  It fills in an InfoData structure about the volume the file system currently controls.  This structure should be longword aligned.  ACTION_INFO fills in an InfoData structure for  the volume the lock (ARG1) is on instead of the volume currently in the drive.  These actions are generally expected to return DOSTRUE.&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_DISK&#039;&#039;&#039;      9       Relabel(...) in 2.0&lt;br /&gt;
 ARG1:   BSTR    New disk name&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the name of the current volume.  A file system implementing this function must also change the name stored in the volume node of the DOS device list.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FORMAT&#039;&#039;&#039;            1020    Format(fs,vol,type)&lt;br /&gt;
 ARG1:   BSTR    Name for volume (if supported)&lt;br /&gt;
 ARG2:   LONG    Type of format (file system specific)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet tells a file system to perform any device or file system specific formatting on any newly initialized media.  Upon receiving this action, a file system can assume that the media has already been low level formatted and should proceed to write out any high level disk structure necessary to create an empty volume.&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
A number of packets are defined to give an application some control over a file system:&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DIE&#039;&#039;&#039;               5      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
As its name implies, the ACTION_DIE packet tells a handler to quit. All new handlers are expected to implement this packet.  Because of outstanding locks and the fact that the handler address is returned by the DeviceProc() routine, it is unlikely that the handler can disappear completely, but instead will have to release as many resources as possible and simply return an error on all packets sent to it.&lt;br /&gt;
&lt;br /&gt;
In the future, the system may be able to determine if there are any outstanding DeviceProc() references to a handler, and therefore make it is safe to shut down completely.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FLUSH&#039;&#039;&#039;             27     &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This action causes the file system to flush out all buffers to disk before returning this packet.  If any writes are pending, they must be processed before responding to this packet.  This packet allows an application to make sure that the data that is supposed to be on the disk is actually written to the disk instead of waiting in a buffer.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MORE_CACHE&#039;&#039;&#039;        18      AddBuffers(...) in 2.0&lt;br /&gt;
 ARG1:   LONG    Number of buffers to add&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE (-1L)&lt;br /&gt;
 RES2:   LONG    New total number of buffers&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the number of internal buffers used by the file system for caching.  Note that a positive number increases the number of buffers while a negative number decreases the number of buffers.  In all cases, the number of current buffers should be returned in RES2.  This allows an application to inquire the number of buffers by sending in a value of 0 (resulting in no change).  Note that the OFS and FFS in 1.3 do not accept a negative number of buffers.&lt;br /&gt;
&lt;br /&gt;
Note that there is a bug in the ROM file system in both Release 2.04 and Release 3.0 that jumbles its return values for this packet.  The file system erroneously returns the new number of buffers in RES1 instead of RES2 (it returns a failure code in RES2).  To work around this bug when using this packet, test RES1 to see if it is DOSTRUE (-1L).  If it is, look at RES2 for the number of buffers, otherwise RES1 should contain the new total number of buffers.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_INHIBIT&#039;&#039;&#039;           31     Inhibit(...) in 2.0&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE = inhibit,      DOSFALSE = uninhibit&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action is probably one of the most dangerous that a file system has to handle.  When inhibited (ARG1 = DOSTRUE), the file system must not access any underlying media and return an error code on all attempts to access the device.  Once uninhibited (ARG1 = DOSFALSE), the file system must assume that the medium has been changed.  The file system must flush the buffers before the ACTION_INHIBIT, popping up a requester demanding that the user put back the current disk, if necessary.  The handler may choose to reject an inhibit request if any objects are open for writing.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required, a handler should nest inhibits.  Prior to 2.0, the system handlers did not keep a nesting count and were subject to some obscure race conditions.  The 2.0 ROM filing system introduced a nesting count.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_PROTECT&#039;&#039;&#039;     1023    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE/DOSFALSE (write protect /un-write protect)&lt;br /&gt;
 ARG2:   LONG    32 Bit pass key&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE/DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This is a new packet defined for the Fast File System.  This packet allows an application to change the write protect flag of a disk (if possible - applications cannot write to floppies that have their write-protect tabs set).  This packet is primarily intended to allow write-protecting non-removable media such as hard disks.  The value in ARG1 toggles the write status.  The 32-bit passkey allows a program to prevent other programs from unwrite-protecting a disk.  To unlock a disk, ARG2 must match the passkey of the packet that locked the disk, unless the disk was locked with a passkey of 0.  In this case, no passkey is necessary to unlock the disk.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_IS_FILESYSTEM&#039;&#039;&#039;     1027    IsFileSystem(devname)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Through this function, a handler can indicates whether or not it is a file system (whether or not it can  support separate files for storing information).  Programs will assume a handler can create multiple, distinct files through calls to Open() if the handler returns this packet with a DOSTRUE value.  A handler does not need to support directories and subdirectories in order to qualify as a file system.  It does have to support the Examine()/ExNext() calls.&lt;br /&gt;
&lt;br /&gt;
Note that the AmigaDOS routine IsFileSystem() will attempt to use Lock(&amp;quot;:&amp;quot;,SHARED_ACCESS) if this packet returns ERROR_ACTION_NOT_KNOWN.&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
There are several actions that are generally used by handlers to allow messages returning from requested services (typically an [[Exec]] device) to look like incoming request packets.  This allows the handler to request an asynchronous operation but be notified of the completion.  For example, a handler sends the serial.device a request for a read, but instead of sending a plain IO request, it sends a DOS packet disguised as an IO request.  The serial.device treats the packet like a normal IO request, returning it to the handler when it is finished. When the handler gets back its disguised DOS packet, it knows that the read has completed.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_NIL&#039;&#039;&#039;               0       &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Although not specifically an action, many returns look like this value because the action field has not been filled in.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_RETURN&#039;&#039;&#039;       1001    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous read request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_RETURN&#039;&#039;&#039;      1002    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous write request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_TIMER&#039;&#039;&#039;             30     &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to indicate the passage of a time interval.  Many handlers have a steady stream of ACTION_TIMER packets so that they can schedule house keeping and flush buffers when no activity has occurred for a given time interval.&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
There are several packet types that are documented within the system include files that are obsolete.  A file system is not expected to handle these packets and any program which sends these packets can not expect them to work:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_CHANGE&#039;&#039;&#039;      33      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_TYPE&#039;&#039;&#039;        32      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_EVENT&#039;&#039;&#039;             6      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_GET_BLOCK&#039;&#039;&#039;         2      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_MAP&#039;&#039;&#039;           4      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of particular note here is ACTION_DISK_CHANGE.  The DiskChange command uses the ACTION_INHIBIT packet to accomplish its task.&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
The remaining packets are only used for console handlers and do not need to be implemented by a file system.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SCREEN_MODE&#039;&#039;&#039;       994    SetMode() in 2.0+&lt;br /&gt;
 ARG1:   LONG    Mode (zero or one)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Switch the console to and from RAW mode.  An ARG1 of one indicates the unprocessed, raw mode while an ARG1 of zero indicates the processed, &#039;&#039;cooked&#039;&#039; mode.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_SIGNAL&#039;&#039;&#039;     995    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   LONG    The fh_Arg1 of the console file handle&lt;br /&gt;
 ARG2:   APTR    MsgPort of the process to signal&lt;br /&gt;
 ARG3:   LONG    Reserved, currently this must be zero&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet redirects what process the console handler signals when the user hits  Control-C, Control-D, Control-E, or Control-F. Normally the process that opened the file handle receives the break signal.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WAIT_CHAR&#039;&#039;&#039;         20     WaitForChar()&lt;br /&gt;
 ARG1:   ULONG   Timeout in microseconds&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Performs a timed read of a character.  The WaitForChar() function uses this packet.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle in the InfoData structure&#039;s id_VolumeNode field (the InfoData structure is defined in &amp;lt;dos/dos.h&amp;gt;).  Note that some consoles can return a NULL Window pointer (for example, an AUTO CON: or a AUX: console).  The Amiga&#039;s standard console handler, CON:, also returns a pointer to the console handler&#039;s IO request in the id_InUse field. In some cases, the IO request&#039;s io_Unit field (which normally point to a ConUnit structure) will be NULL.  See also the ACTION_DISK_INFO packet in the [[#Volume Manipulation/Information|Volume Manipulation/Information]] section.&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4813</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4813"/>
		<updated>2013-01-30T16:54:46Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Warning! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Important Note for OS4 Developers ===&lt;br /&gt;
&lt;br /&gt;
The following specification of [[AmigaDOS]] packet types dates back to the original documentation as provided by Commodore-Amiga in an AmigaMail article published concurrently with the release of OS2.0.  Developers working on current versions of the Amiga Operating System need to refer to the SDK documentation and included AutoDocs as the following has not been updated to reflect changes in dos.library itself, nor changes to the implementation of FFS, nor to new packet types introduced alongside SFS or JXFS. The following specification is only provided as an additional reference and is to be updated to reflect changes introduced with Release 3 and Release 4 of the operating system.&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
The Volume Manipulation and Information actions are used to allow access to the underlying volume currently being manipulated by the file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CURRENT_VOLUME&#039;&#039;&#039;    7       &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BPTR    Pointer to volume node of current volume&lt;br /&gt;
&lt;br /&gt;
This action returns a pointer to the volume node (from the DOS device list) associated with the file system.  As the volume node may be removed from the device list when the file system mounts a different volume (such as when directed to by an ACTION_INHIBIT) there is no guarantee that this pointer will remain valid for any amount of time. This action is generally used by AmigaDOS to provide the volume line of a requester.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      Info(...)&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_INFO&#039;&#039;&#039;              26      &amp;lt;sendpkt only&amp;gt;&lt;br /&gt;
 ARG1:   LOCK    Lock&lt;br /&gt;
 ARG2:   BPTR    Pointer to a InfoData Structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
These actions are used to get information about the device and status of the file handler.  ACTION_DISK_INFO is used by the info command to report the status of the volume currently in the drive.  It fills in an InfoData structure about the volume the file system currently controls.  This structure should be longword aligned.  ACTION_INFO fills in an InfoData structure for  the volume the lock (ARG1) is on instead of the volume currently in the drive.  These actions are generally expected to return DOSTRUE.&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_DISK&#039;&#039;&#039;      9       Relabel(...) in 2.0&lt;br /&gt;
 ARG1:   BSTR    New disk name&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the name of the current volume.  A file system implementing this function must also change the name stored in the volume node of the DOS device list.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FORMAT&#039;&#039;&#039;            1020    Format(fs,vol,type)&lt;br /&gt;
 ARG1:   BSTR    Name for volume (if supported)&lt;br /&gt;
 ARG2:   LONG    Type of format (file system specific)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet tells a file system to perform any device or file system specific formatting on any newly initialized media.  Upon receiving this action, a file system can assume that the media has already been low level formatted and should proceed to write out any high level disk structure necessary to create an empty volume.&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
A number of packets are defined to give an application some control over a file system:&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DIE&#039;&#039;&#039;               5      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
As its name implies, the ACTION_DIE packet tells a handler to quit. All new handlers are expected to implement this packet.  Because of outstanding locks and the fact that the handler address is returned by the DeviceProc() routine, it is unlikely that the handler can disappear completely, but instead will have to release as many resources as possible and simply return an error on all packets sent to it.&lt;br /&gt;
&lt;br /&gt;
In the future, the system may be able to determine if there are any outstanding DeviceProc() references to a handler, and therefore make it is safe to shut down completely.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FLUSH&#039;&#039;&#039;             27     &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This action causes the file system to flush out all buffers to disk before returning this packet.  If any writes are pending, they must be processed before responding to this packet.  This packet allows an application to make sure that the data that is supposed to be on the disk is actually written to the disk instead of waiting in a buffer.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MORE_CACHE&#039;&#039;&#039;        18      AddBuffers(...) in 2.0&lt;br /&gt;
 ARG1:   LONG    Number of buffers to add&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE (-1L)&lt;br /&gt;
 RES2:   LONG    New total number of buffers&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the number of internal buffers used by the file system for caching.  Note that a positive number increases the number of buffers while a negative number decreases the number of buffers.  In all cases, the number of current buffers should be returned in RES2.  This allows an application to inquire the number of buffers by sending in a value of 0 (resulting in no change).  Note that the OFS and FFS in 1.3 do not accept a negative number of buffers.&lt;br /&gt;
&lt;br /&gt;
Note that there is a bug in the ROM file system in both Release 2.04 and Release 3.0 that jumbles its return values for this packet.  The file system erroneously returns the new number of buffers in RES1 instead of RES2 (it returns a failure code in RES2).  To work around this bug when using this packet, test RES1 to see if it is DOSTRUE (-1L).  If it is, look at RES2 for the number of buffers, otherwise RES1 should contain the new total number of buffers.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_INHIBIT&#039;&#039;&#039;           31     Inhibit(...) in 2.0&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE = inhibit,      DOSFALSE = uninhibit&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action is probably one of the most dangerous that a file system has to handle.  When inhibited (ARG1 = DOSTRUE), the file system must not access any underlying media and return an error code on all attempts to access the device.  Once uninhibited (ARG1 = DOSFALSE), the file system must assume that the medium has been changed.  The file system must flush the buffers before the ACTION_INHIBIT, popping up a requester demanding that the user put back the current disk, if necessary.  The handler may choose to reject an inhibit request if any objects are open for writing.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required, a handler should nest inhibits.  Prior to 2.0, the system handlers did not keep a nesting count and were subject to some obscure race conditions.  The 2.0 ROM filing system introduced a nesting count.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_PROTECT&#039;&#039;&#039;     1023    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE/DOSFALSE (write protect /un-write protect)&lt;br /&gt;
 ARG2:   LONG    32 Bit pass key&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE/DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This is a new packet defined for the Fast File System.  This packet allows an application to change the write protect flag of a disk (if possible - applications cannot write to floppies that have their write-protect tabs set).  This packet is primarily intended to allow write-protecting non-removable media such as hard disks.  The value in ARG1 toggles the write status.  The 32-bit passkey allows a program to prevent other programs from unwrite-protecting a disk.  To unlock a disk, ARG2 must match the passkey of the packet that locked the disk, unless the disk was locked with a passkey of 0.  In this case, no passkey is necessary to unlock the disk.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_IS_FILESYSTEM&#039;&#039;&#039;     1027    IsFileSystem(devname)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Through this function, a handler can indicates whether or not it is a file system (whether or not it can  support separate files for storing information).  Programs will assume a handler can create multiple, distinct files through calls to Open() if the handler returns this packet with a DOSTRUE value.  A handler does not need to support directories and subdirectories in order to qualify as a file system.  It does have to support the Examine()/ExNext() calls.&lt;br /&gt;
&lt;br /&gt;
Note that the AmigaDOS routine IsFileSystem() will attempt to use Lock(&amp;quot;:&amp;quot;,SHARED_ACCESS) if this packet returns ERROR_ACTION_NOT_KNOWN.&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
There are several actions that are generally used by handlers to allow messages returning from requested services (typically an [[Exec]] device) to look like incoming request packets.  This allows the handler to request an asynchronous operation but be notified of the completion.  For example, a handler sends the serial.device a request for a read, but instead of sending a plain IO request, it sends a DOS packet disguised as an IO request.  The serial.device treats the packet like a normal IO request, returning it to the handler when it is finished. When the handler gets back its disguised DOS packet, it knows that the read has completed.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_NIL&#039;&#039;&#039;               0       &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Although not specifically an action, many returns look like this value because the action field has not been filled in.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_RETURN&#039;&#039;&#039;       1001    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous read request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_RETURN&#039;&#039;&#039;      1002    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous write request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_TIMER&#039;&#039;&#039;             30     &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to indicate the passage of a time interval.  Many handlers have a steady stream of ACTION_TIMER packets so that they can schedule house keeping and flush buffers when no activity has occurred for a given time interval.&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
There are several packet types that are documented within the system include files that are obsolete.  A file system is not expected to handle these packets and any program which sends these packets can not expect them to work:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_CHANGE&#039;&#039;&#039;      33      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_TYPE&#039;&#039;&#039;        32      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_EVENT&#039;&#039;&#039;             6      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_GET_BLOCK&#039;&#039;&#039;         2      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_MAP&#039;&#039;&#039;           4      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of particular note here is ACTION_DISK_CHANGE.  The DiskChange command uses the ACTION_INHIBIT packet to accomplish its task.&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4812</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4812"/>
		<updated>2013-01-30T16:53:25Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Obsolete Packets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Warning! ===&lt;br /&gt;
&lt;br /&gt;
The following specification of [[AmigaDOS]] packet types dates back to the original documentation as provided by Commodore-Amiga in an AmigaMail article published concurrently with the release of OS2.0.  Developers working on current versions of the Amiga Operating System need to refer to the SDK documentation and included AutoDocs as the following has not been updated to reflect changes in dos.library itself, nor changes to the implementation of FFS, nor to new packet types introduced alongside SFS or JXFS. The following specification is only provided as an additional reference and is to be updated to reflect changes introduced with Release 3 and Release 4 of the operating system.&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
The Volume Manipulation and Information actions are used to allow access to the underlying volume currently being manipulated by the file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CURRENT_VOLUME&#039;&#039;&#039;    7       &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BPTR    Pointer to volume node of current volume&lt;br /&gt;
&lt;br /&gt;
This action returns a pointer to the volume node (from the DOS device list) associated with the file system.  As the volume node may be removed from the device list when the file system mounts a different volume (such as when directed to by an ACTION_INHIBIT) there is no guarantee that this pointer will remain valid for any amount of time. This action is generally used by AmigaDOS to provide the volume line of a requester.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      Info(...)&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_INFO&#039;&#039;&#039;              26      &amp;lt;sendpkt only&amp;gt;&lt;br /&gt;
 ARG1:   LOCK    Lock&lt;br /&gt;
 ARG2:   BPTR    Pointer to a InfoData Structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
These actions are used to get information about the device and status of the file handler.  ACTION_DISK_INFO is used by the info command to report the status of the volume currently in the drive.  It fills in an InfoData structure about the volume the file system currently controls.  This structure should be longword aligned.  ACTION_INFO fills in an InfoData structure for  the volume the lock (ARG1) is on instead of the volume currently in the drive.  These actions are generally expected to return DOSTRUE.&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_DISK&#039;&#039;&#039;      9       Relabel(...) in 2.0&lt;br /&gt;
 ARG1:   BSTR    New disk name&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the name of the current volume.  A file system implementing this function must also change the name stored in the volume node of the DOS device list.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FORMAT&#039;&#039;&#039;            1020    Format(fs,vol,type)&lt;br /&gt;
 ARG1:   BSTR    Name for volume (if supported)&lt;br /&gt;
 ARG2:   LONG    Type of format (file system specific)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet tells a file system to perform any device or file system specific formatting on any newly initialized media.  Upon receiving this action, a file system can assume that the media has already been low level formatted and should proceed to write out any high level disk structure necessary to create an empty volume.&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
A number of packets are defined to give an application some control over a file system:&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DIE&#039;&#039;&#039;               5      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
As its name implies, the ACTION_DIE packet tells a handler to quit. All new handlers are expected to implement this packet.  Because of outstanding locks and the fact that the handler address is returned by the DeviceProc() routine, it is unlikely that the handler can disappear completely, but instead will have to release as many resources as possible and simply return an error on all packets sent to it.&lt;br /&gt;
&lt;br /&gt;
In the future, the system may be able to determine if there are any outstanding DeviceProc() references to a handler, and therefore make it is safe to shut down completely.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FLUSH&#039;&#039;&#039;             27     &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This action causes the file system to flush out all buffers to disk before returning this packet.  If any writes are pending, they must be processed before responding to this packet.  This packet allows an application to make sure that the data that is supposed to be on the disk is actually written to the disk instead of waiting in a buffer.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MORE_CACHE&#039;&#039;&#039;        18      AddBuffers(...) in 2.0&lt;br /&gt;
 ARG1:   LONG    Number of buffers to add&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE (-1L)&lt;br /&gt;
 RES2:   LONG    New total number of buffers&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the number of internal buffers used by the file system for caching.  Note that a positive number increases the number of buffers while a negative number decreases the number of buffers.  In all cases, the number of current buffers should be returned in RES2.  This allows an application to inquire the number of buffers by sending in a value of 0 (resulting in no change).  Note that the OFS and FFS in 1.3 do not accept a negative number of buffers.&lt;br /&gt;
&lt;br /&gt;
Note that there is a bug in the ROM file system in both Release 2.04 and Release 3.0 that jumbles its return values for this packet.  The file system erroneously returns the new number of buffers in RES1 instead of RES2 (it returns a failure code in RES2).  To work around this bug when using this packet, test RES1 to see if it is DOSTRUE (-1L).  If it is, look at RES2 for the number of buffers, otherwise RES1 should contain the new total number of buffers.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_INHIBIT&#039;&#039;&#039;           31     Inhibit(...) in 2.0&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE = inhibit,      DOSFALSE = uninhibit&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action is probably one of the most dangerous that a file system has to handle.  When inhibited (ARG1 = DOSTRUE), the file system must not access any underlying media and return an error code on all attempts to access the device.  Once uninhibited (ARG1 = DOSFALSE), the file system must assume that the medium has been changed.  The file system must flush the buffers before the ACTION_INHIBIT, popping up a requester demanding that the user put back the current disk, if necessary.  The handler may choose to reject an inhibit request if any objects are open for writing.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required, a handler should nest inhibits.  Prior to 2.0, the system handlers did not keep a nesting count and were subject to some obscure race conditions.  The 2.0 ROM filing system introduced a nesting count.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_PROTECT&#039;&#039;&#039;     1023    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE/DOSFALSE (write protect /un-write protect)&lt;br /&gt;
 ARG2:   LONG    32 Bit pass key&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE/DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This is a new packet defined for the Fast File System.  This packet allows an application to change the write protect flag of a disk (if possible - applications cannot write to floppies that have their write-protect tabs set).  This packet is primarily intended to allow write-protecting non-removable media such as hard disks.  The value in ARG1 toggles the write status.  The 32-bit passkey allows a program to prevent other programs from unwrite-protecting a disk.  To unlock a disk, ARG2 must match the passkey of the packet that locked the disk, unless the disk was locked with a passkey of 0.  In this case, no passkey is necessary to unlock the disk.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_IS_FILESYSTEM&#039;&#039;&#039;     1027    IsFileSystem(devname)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Through this function, a handler can indicates whether or not it is a file system (whether or not it can  support separate files for storing information).  Programs will assume a handler can create multiple, distinct files through calls to Open() if the handler returns this packet with a DOSTRUE value.  A handler does not need to support directories and subdirectories in order to qualify as a file system.  It does have to support the Examine()/ExNext() calls.&lt;br /&gt;
&lt;br /&gt;
Note that the AmigaDOS routine IsFileSystem() will attempt to use Lock(&amp;quot;:&amp;quot;,SHARED_ACCESS) if this packet returns ERROR_ACTION_NOT_KNOWN.&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
There are several actions that are generally used by handlers to allow messages returning from requested services (typically an [[Exec]] device) to look like incoming request packets.  This allows the handler to request an asynchronous operation but be notified of the completion.  For example, a handler sends the serial.device a request for a read, but instead of sending a plain IO request, it sends a DOS packet disguised as an IO request.  The serial.device treats the packet like a normal IO request, returning it to the handler when it is finished. When the handler gets back its disguised DOS packet, it knows that the read has completed.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_NIL&#039;&#039;&#039;               0       &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Although not specifically an action, many returns look like this value because the action field has not been filled in.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_RETURN&#039;&#039;&#039;       1001    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous read request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_RETURN&#039;&#039;&#039;      1002    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous write request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_TIMER&#039;&#039;&#039;             30     &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to indicate the passage of a time interval.  Many handlers have a steady stream of ACTION_TIMER packets so that they can schedule house keeping and flush buffers when no activity has occurred for a given time interval.&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
There are several packet types that are documented within the system include files that are obsolete.  A file system is not expected to handle these packets and any program which sends these packets can not expect them to work:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_CHANGE&#039;&#039;&#039;      33      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_TYPE&#039;&#039;&#039;        32      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_EVENT&#039;&#039;&#039;             6      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_GET_BLOCK&#039;&#039;&#039;         2      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_MAP&#039;&#039;&#039;           4      &#039;&#039;Obsolete&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Of particular note here is ACTION_DISK_CHANGE.  The DiskChange command uses the ACTION_INHIBIT packet to accomplish its task.&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4811</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4811"/>
		<updated>2013-01-30T16:51:19Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Handler Internal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Warning! ===&lt;br /&gt;
&lt;br /&gt;
The following specification of [[AmigaDOS]] packet types dates back to the original documentation as provided by Commodore-Amiga in an AmigaMail article published concurrently with the release of OS2.0.  Developers working on current versions of the Amiga Operating System need to refer to the SDK documentation and included AutoDocs as the following has not been updated to reflect changes in dos.library itself, nor changes to the implementation of FFS, nor to new packet types introduced alongside SFS or JXFS. The following specification is only provided as an additional reference and is to be updated to reflect changes introduced with Release 3 and Release 4 of the operating system.&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
The Volume Manipulation and Information actions are used to allow access to the underlying volume currently being manipulated by the file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CURRENT_VOLUME&#039;&#039;&#039;    7       &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BPTR    Pointer to volume node of current volume&lt;br /&gt;
&lt;br /&gt;
This action returns a pointer to the volume node (from the DOS device list) associated with the file system.  As the volume node may be removed from the device list when the file system mounts a different volume (such as when directed to by an ACTION_INHIBIT) there is no guarantee that this pointer will remain valid for any amount of time. This action is generally used by AmigaDOS to provide the volume line of a requester.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      Info(...)&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_INFO&#039;&#039;&#039;              26      &amp;lt;sendpkt only&amp;gt;&lt;br /&gt;
 ARG1:   LOCK    Lock&lt;br /&gt;
 ARG2:   BPTR    Pointer to a InfoData Structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
These actions are used to get information about the device and status of the file handler.  ACTION_DISK_INFO is used by the info command to report the status of the volume currently in the drive.  It fills in an InfoData structure about the volume the file system currently controls.  This structure should be longword aligned.  ACTION_INFO fills in an InfoData structure for  the volume the lock (ARG1) is on instead of the volume currently in the drive.  These actions are generally expected to return DOSTRUE.&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_DISK&#039;&#039;&#039;      9       Relabel(...) in 2.0&lt;br /&gt;
 ARG1:   BSTR    New disk name&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the name of the current volume.  A file system implementing this function must also change the name stored in the volume node of the DOS device list.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FORMAT&#039;&#039;&#039;            1020    Format(fs,vol,type)&lt;br /&gt;
 ARG1:   BSTR    Name for volume (if supported)&lt;br /&gt;
 ARG2:   LONG    Type of format (file system specific)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet tells a file system to perform any device or file system specific formatting on any newly initialized media.  Upon receiving this action, a file system can assume that the media has already been low level formatted and should proceed to write out any high level disk structure necessary to create an empty volume.&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
A number of packets are defined to give an application some control over a file system:&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DIE&#039;&#039;&#039;               5      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
As its name implies, the ACTION_DIE packet tells a handler to quit. All new handlers are expected to implement this packet.  Because of outstanding locks and the fact that the handler address is returned by the DeviceProc() routine, it is unlikely that the handler can disappear completely, but instead will have to release as many resources as possible and simply return an error on all packets sent to it.&lt;br /&gt;
&lt;br /&gt;
In the future, the system may be able to determine if there are any outstanding DeviceProc() references to a handler, and therefore make it is safe to shut down completely.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FLUSH&#039;&#039;&#039;             27     &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This action causes the file system to flush out all buffers to disk before returning this packet.  If any writes are pending, they must be processed before responding to this packet.  This packet allows an application to make sure that the data that is supposed to be on the disk is actually written to the disk instead of waiting in a buffer.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MORE_CACHE&#039;&#039;&#039;        18      AddBuffers(...) in 2.0&lt;br /&gt;
 ARG1:   LONG    Number of buffers to add&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE (-1L)&lt;br /&gt;
 RES2:   LONG    New total number of buffers&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the number of internal buffers used by the file system for caching.  Note that a positive number increases the number of buffers while a negative number decreases the number of buffers.  In all cases, the number of current buffers should be returned in RES2.  This allows an application to inquire the number of buffers by sending in a value of 0 (resulting in no change).  Note that the OFS and FFS in 1.3 do not accept a negative number of buffers.&lt;br /&gt;
&lt;br /&gt;
Note that there is a bug in the ROM file system in both Release 2.04 and Release 3.0 that jumbles its return values for this packet.  The file system erroneously returns the new number of buffers in RES1 instead of RES2 (it returns a failure code in RES2).  To work around this bug when using this packet, test RES1 to see if it is DOSTRUE (-1L).  If it is, look at RES2 for the number of buffers, otherwise RES1 should contain the new total number of buffers.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_INHIBIT&#039;&#039;&#039;           31     Inhibit(...) in 2.0&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE = inhibit,      DOSFALSE = uninhibit&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action is probably one of the most dangerous that a file system has to handle.  When inhibited (ARG1 = DOSTRUE), the file system must not access any underlying media and return an error code on all attempts to access the device.  Once uninhibited (ARG1 = DOSFALSE), the file system must assume that the medium has been changed.  The file system must flush the buffers before the ACTION_INHIBIT, popping up a requester demanding that the user put back the current disk, if necessary.  The handler may choose to reject an inhibit request if any objects are open for writing.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required, a handler should nest inhibits.  Prior to 2.0, the system handlers did not keep a nesting count and were subject to some obscure race conditions.  The 2.0 ROM filing system introduced a nesting count.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_PROTECT&#039;&#039;&#039;     1023    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE/DOSFALSE (write protect /un-write protect)&lt;br /&gt;
 ARG2:   LONG    32 Bit pass key&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE/DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This is a new packet defined for the Fast File System.  This packet allows an application to change the write protect flag of a disk (if possible - applications cannot write to floppies that have their write-protect tabs set).  This packet is primarily intended to allow write-protecting non-removable media such as hard disks.  The value in ARG1 toggles the write status.  The 32-bit passkey allows a program to prevent other programs from unwrite-protecting a disk.  To unlock a disk, ARG2 must match the passkey of the packet that locked the disk, unless the disk was locked with a passkey of 0.  In this case, no passkey is necessary to unlock the disk.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_IS_FILESYSTEM&#039;&#039;&#039;     1027    IsFileSystem(devname)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Through this function, a handler can indicates whether or not it is a file system (whether or not it can  support separate files for storing information).  Programs will assume a handler can create multiple, distinct files through calls to Open() if the handler returns this packet with a DOSTRUE value.  A handler does not need to support directories and subdirectories in order to qualify as a file system.  It does have to support the Examine()/ExNext() calls.&lt;br /&gt;
&lt;br /&gt;
Note that the AmigaDOS routine IsFileSystem() will attempt to use Lock(&amp;quot;:&amp;quot;,SHARED_ACCESS) if this packet returns ERROR_ACTION_NOT_KNOWN.&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
There are several actions that are generally used by handlers to allow messages returning from requested services (typically an [[Exec]] device) to look like incoming request packets.  This allows the handler to request an asynchronous operation but be notified of the completion.  For example, a handler sends the serial.device a request for a read, but instead of sending a plain IO request, it sends a DOS packet disguised as an IO request.  The serial.device treats the packet like a normal IO request, returning it to the handler when it is finished. When the handler gets back its disguised DOS packet, it knows that the read has completed.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_NIL&#039;&#039;&#039;               0       &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Although not specifically an action, many returns look like this value because the action field has not been filled in.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_RETURN&#039;&#039;&#039;       1001    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous read request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_RETURN&#039;&#039;&#039;      1002    &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Generally used to indicate the completion of an asynchronous write request.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_TIMER&#039;&#039;&#039;             30     &#039;&#039;internal&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Used to indicate the passage of a time interval.  Many handlers have a steady stream of ACTION_TIMER packets so that they can schedule house keeping and flush buffers when no activity has occurred for a given time interval.&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4810</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4810"/>
		<updated>2013-01-30T16:48:15Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Packet Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Warning! ===&lt;br /&gt;
&lt;br /&gt;
The following specification of [[AmigaDOS]] packet types dates back to the original documentation as provided by Commodore-Amiga in an AmigaMail article published concurrently with the release of OS2.0.  Developers working on current versions of the Amiga Operating System need to refer to the SDK documentation and included AutoDocs as the following has not been updated to reflect changes in dos.library itself, nor changes to the implementation of FFS, nor to new packet types introduced alongside SFS or JXFS. The following specification is only provided as an additional reference and is to be updated to reflect changes introduced with Release 3 and Release 4 of the operating system.&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
The Volume Manipulation and Information actions are used to allow access to the underlying volume currently being manipulated by the file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CURRENT_VOLUME&#039;&#039;&#039;    7       &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BPTR    Pointer to volume node of current volume&lt;br /&gt;
&lt;br /&gt;
This action returns a pointer to the volume node (from the DOS device list) associated with the file system.  As the volume node may be removed from the device list when the file system mounts a different volume (such as when directed to by an ACTION_INHIBIT) there is no guarantee that this pointer will remain valid for any amount of time. This action is generally used by AmigaDOS to provide the volume line of a requester.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      Info(...)&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_INFO&#039;&#039;&#039;              26      &amp;lt;sendpkt only&amp;gt;&lt;br /&gt;
 ARG1:   LOCK    Lock&lt;br /&gt;
 ARG2:   BPTR    Pointer to a InfoData Structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
These actions are used to get information about the device and status of the file handler.  ACTION_DISK_INFO is used by the info command to report the status of the volume currently in the drive.  It fills in an InfoData structure about the volume the file system currently controls.  This structure should be longword aligned.  ACTION_INFO fills in an InfoData structure for  the volume the lock (ARG1) is on instead of the volume currently in the drive.  These actions are generally expected to return DOSTRUE.&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_DISK&#039;&#039;&#039;      9       Relabel(...) in 2.0&lt;br /&gt;
 ARG1:   BSTR    New disk name&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the name of the current volume.  A file system implementing this function must also change the name stored in the volume node of the DOS device list.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FORMAT&#039;&#039;&#039;            1020    Format(fs,vol,type)&lt;br /&gt;
 ARG1:   BSTR    Name for volume (if supported)&lt;br /&gt;
 ARG2:   LONG    Type of format (file system specific)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet tells a file system to perform any device or file system specific formatting on any newly initialized media.  Upon receiving this action, a file system can assume that the media has already been low level formatted and should proceed to write out any high level disk structure necessary to create an empty volume.&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
A number of packets are defined to give an application some control over a file system:&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DIE&#039;&#039;&#039;               5      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
As its name implies, the ACTION_DIE packet tells a handler to quit. All new handlers are expected to implement this packet.  Because of outstanding locks and the fact that the handler address is returned by the DeviceProc() routine, it is unlikely that the handler can disappear completely, but instead will have to release as many resources as possible and simply return an error on all packets sent to it.&lt;br /&gt;
&lt;br /&gt;
In the future, the system may be able to determine if there are any outstanding DeviceProc() references to a handler, and therefore make it is safe to shut down completely.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FLUSH&#039;&#039;&#039;             27     &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This action causes the file system to flush out all buffers to disk before returning this packet.  If any writes are pending, they must be processed before responding to this packet.  This packet allows an application to make sure that the data that is supposed to be on the disk is actually written to the disk instead of waiting in a buffer.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MORE_CACHE&#039;&#039;&#039;        18      AddBuffers(...) in 2.0&lt;br /&gt;
 ARG1:   LONG    Number of buffers to add&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE (-1L)&lt;br /&gt;
 RES2:   LONG    New total number of buffers&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the number of internal buffers used by the file system for caching.  Note that a positive number increases the number of buffers while a negative number decreases the number of buffers.  In all cases, the number of current buffers should be returned in RES2.  This allows an application to inquire the number of buffers by sending in a value of 0 (resulting in no change).  Note that the OFS and FFS in 1.3 do not accept a negative number of buffers.&lt;br /&gt;
&lt;br /&gt;
Note that there is a bug in the ROM file system in both Release 2.04 and Release 3.0 that jumbles its return values for this packet.  The file system erroneously returns the new number of buffers in RES1 instead of RES2 (it returns a failure code in RES2).  To work around this bug when using this packet, test RES1 to see if it is DOSTRUE (-1L).  If it is, look at RES2 for the number of buffers, otherwise RES1 should contain the new total number of buffers.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_INHIBIT&#039;&#039;&#039;           31     Inhibit(...) in 2.0&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE = inhibit,      DOSFALSE = uninhibit&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action is probably one of the most dangerous that a file system has to handle.  When inhibited (ARG1 = DOSTRUE), the file system must not access any underlying media and return an error code on all attempts to access the device.  Once uninhibited (ARG1 = DOSFALSE), the file system must assume that the medium has been changed.  The file system must flush the buffers before the ACTION_INHIBIT, popping up a requester demanding that the user put back the current disk, if necessary.  The handler may choose to reject an inhibit request if any objects are open for writing.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required, a handler should nest inhibits.  Prior to 2.0, the system handlers did not keep a nesting count and were subject to some obscure race conditions.  The 2.0 ROM filing system introduced a nesting count.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_PROTECT&#039;&#039;&#039;     1023    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE/DOSFALSE (write protect /un-write protect)&lt;br /&gt;
 ARG2:   LONG    32 Bit pass key&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE/DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This is a new packet defined for the Fast File System.  This packet allows an application to change the write protect flag of a disk (if possible - applications cannot write to floppies that have their write-protect tabs set).  This packet is primarily intended to allow write-protecting non-removable media such as hard disks.  The value in ARG1 toggles the write status.  The 32-bit passkey allows a program to prevent other programs from unwrite-protecting a disk.  To unlock a disk, ARG2 must match the passkey of the packet that locked the disk, unless the disk was locked with a passkey of 0.  In this case, no passkey is necessary to unlock the disk.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_IS_FILESYSTEM&#039;&#039;&#039;     1027    IsFileSystem(devname)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Through this function, a handler can indicates whether or not it is a file system (whether or not it can  support separate files for storing information).  Programs will assume a handler can create multiple, distinct files through calls to Open() if the handler returns this packet with a DOSTRUE value.  A handler does not need to support directories and subdirectories in order to qualify as a file system.  It does have to support the Examine()/ExNext() calls.&lt;br /&gt;
&lt;br /&gt;
Note that the AmigaDOS routine IsFileSystem() will attempt to use Lock(&amp;quot;:&amp;quot;,SHARED_ACCESS) if this packet returns ERROR_ACTION_NOT_KNOWN.&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4809</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4809"/>
		<updated>2013-01-30T16:44:09Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Handler Maintenance and Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
The Volume Manipulation and Information actions are used to allow access to the underlying volume currently being manipulated by the file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CURRENT_VOLUME&#039;&#039;&#039;    7       &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BPTR    Pointer to volume node of current volume&lt;br /&gt;
&lt;br /&gt;
This action returns a pointer to the volume node (from the DOS device list) associated with the file system.  As the volume node may be removed from the device list when the file system mounts a different volume (such as when directed to by an ACTION_INHIBIT) there is no guarantee that this pointer will remain valid for any amount of time. This action is generally used by AmigaDOS to provide the volume line of a requester.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      Info(...)&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_INFO&#039;&#039;&#039;              26      &amp;lt;sendpkt only&amp;gt;&lt;br /&gt;
 ARG1:   LOCK    Lock&lt;br /&gt;
 ARG2:   BPTR    Pointer to a InfoData Structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
These actions are used to get information about the device and status of the file handler.  ACTION_DISK_INFO is used by the info command to report the status of the volume currently in the drive.  It fills in an InfoData structure about the volume the file system currently controls.  This structure should be longword aligned.  ACTION_INFO fills in an InfoData structure for  the volume the lock (ARG1) is on instead of the volume currently in the drive.  These actions are generally expected to return DOSTRUE.&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_DISK&#039;&#039;&#039;      9       Relabel(...) in 2.0&lt;br /&gt;
 ARG1:   BSTR    New disk name&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the name of the current volume.  A file system implementing this function must also change the name stored in the volume node of the DOS device list.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FORMAT&#039;&#039;&#039;            1020    Format(fs,vol,type)&lt;br /&gt;
 ARG1:   BSTR    Name for volume (if supported)&lt;br /&gt;
 ARG2:   LONG    Type of format (file system specific)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet tells a file system to perform any device or file system specific formatting on any newly initialized media.  Upon receiving this action, a file system can assume that the media has already been low level formatted and should proceed to write out any high level disk structure necessary to create an empty volume.&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
A number of packets are defined to give an application some control over a file system:&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DIE&#039;&#039;&#039;               5      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
As its name implies, the ACTION_DIE packet tells a handler to quit. All new handlers are expected to implement this packet.  Because of outstanding locks and the fact that the handler address is returned by the DeviceProc() routine, it is unlikely that the handler can disappear completely, but instead will have to release as many resources as possible and simply return an error on all packets sent to it.&lt;br /&gt;
&lt;br /&gt;
In the future, the system may be able to determine if there are any outstanding DeviceProc() references to a handler, and therefore make it is safe to shut down completely.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FLUSH&#039;&#039;&#039;             27     &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This action causes the file system to flush out all buffers to disk before returning this packet.  If any writes are pending, they must be processed before responding to this packet.  This packet allows an application to make sure that the data that is supposed to be on the disk is actually written to the disk instead of waiting in a buffer.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MORE_CACHE&#039;&#039;&#039;        18      AddBuffers(...) in 2.0&lt;br /&gt;
 ARG1:   LONG    Number of buffers to add&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE (-1L)&lt;br /&gt;
 RES2:   LONG    New total number of buffers&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the number of internal buffers used by the file system for caching.  Note that a positive number increases the number of buffers while a negative number decreases the number of buffers.  In all cases, the number of current buffers should be returned in RES2.  This allows an application to inquire the number of buffers by sending in a value of 0 (resulting in no change).  Note that the OFS and FFS in 1.3 do not accept a negative number of buffers.&lt;br /&gt;
&lt;br /&gt;
Note that there is a bug in the ROM file system in both Release 2.04 and Release 3.0 that jumbles its return values for this packet.  The file system erroneously returns the new number of buffers in RES1 instead of RES2 (it returns a failure code in RES2).  To work around this bug when using this packet, test RES1 to see if it is DOSTRUE (-1L).  If it is, look at RES2 for the number of buffers, otherwise RES1 should contain the new total number of buffers.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_INHIBIT&#039;&#039;&#039;           31     Inhibit(...) in 2.0&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE = inhibit,      DOSFALSE = uninhibit&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action is probably one of the most dangerous that a file system has to handle.  When inhibited (ARG1 = DOSTRUE), the file system must not access any underlying media and return an error code on all attempts to access the device.  Once uninhibited (ARG1 = DOSFALSE), the file system must assume that the medium has been changed.  The file system must flush the buffers before the ACTION_INHIBIT, popping up a requester demanding that the user put back the current disk, if necessary.  The handler may choose to reject an inhibit request if any objects are open for writing.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required, a handler should nest inhibits.  Prior to 2.0, the system handlers did not keep a nesting count and were subject to some obscure race conditions.  The 2.0 ROM filing system introduced a nesting count.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_PROTECT&#039;&#039;&#039;     1023    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE/DOSFALSE (write protect /un-write protect)&lt;br /&gt;
 ARG2:   LONG    32 Bit pass key&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE/DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This is a new packet defined for the Fast File System.  This packet allows an application to change the write protect flag of a disk (if possible - applications cannot write to floppies that have their write-protect tabs set).  This packet is primarily intended to allow write-protecting non-removable media such as hard disks.  The value in ARG1 toggles the write status.  The 32-bit passkey allows a program to prevent other programs from unwrite-protecting a disk.  To unlock a disk, ARG2 must match the passkey of the packet that locked the disk, unless the disk was locked with a passkey of 0.  In this case, no passkey is necessary to unlock the disk.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_IS_FILESYSTEM&#039;&#039;&#039;     1027    IsFileSystem(devname)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Through this function, a handler can indicates whether or not it is a file system (whether or not it can  support separate files for storing information).  Programs will assume a handler can create multiple, distinct files through calls to Open() if the handler returns this packet with a DOSTRUE value.  A handler does not need to support directories and subdirectories in order to qualify as a file system.  It does have to support the Examine()/ExNext() calls.&lt;br /&gt;
&lt;br /&gt;
Note that the AmigaDOS routine IsFileSystem() will attempt to use Lock(&amp;quot;:&amp;quot;,SHARED_ACCESS) if this packet returns ERROR_ACTION_NOT_KNOWN.&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4808</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4808"/>
		<updated>2013-01-30T16:43:43Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Handler Maintenance and Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
The Volume Manipulation and Information actions are used to allow access to the underlying volume currently being manipulated by the file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CURRENT_VOLUME&#039;&#039;&#039;    7       &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BPTR    Pointer to volume node of current volume&lt;br /&gt;
&lt;br /&gt;
This action returns a pointer to the volume node (from the DOS device list) associated with the file system.  As the volume node may be removed from the device list when the file system mounts a different volume (such as when directed to by an ACTION_INHIBIT) there is no guarantee that this pointer will remain valid for any amount of time. This action is generally used by AmigaDOS to provide the volume line of a requester.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      Info(...)&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_INFO&#039;&#039;&#039;              26      &amp;lt;sendpkt only&amp;gt;&lt;br /&gt;
 ARG1:   LOCK    Lock&lt;br /&gt;
 ARG2:   BPTR    Pointer to a InfoData Structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
These actions are used to get information about the device and status of the file handler.  ACTION_DISK_INFO is used by the info command to report the status of the volume currently in the drive.  It fills in an InfoData structure about the volume the file system currently controls.  This structure should be longword aligned.  ACTION_INFO fills in an InfoData structure for  the volume the lock (ARG1) is on instead of the volume currently in the drive.  These actions are generally expected to return DOSTRUE.&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_DISK&#039;&#039;&#039;      9       Relabel(...) in 2.0&lt;br /&gt;
 ARG1:   BSTR    New disk name&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the name of the current volume.  A file system implementing this function must also change the name stored in the volume node of the DOS device list.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FORMAT&#039;&#039;&#039;            1020    Format(fs,vol,type)&lt;br /&gt;
 ARG1:   BSTR    Name for volume (if supported)&lt;br /&gt;
 ARG2:   LONG    Type of format (file system specific)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet tells a file system to perform any device or file system specific formatting on any newly initialized media.  Upon receiving this action, a file system can assume that the media has already been low level formatted and should proceed to write out any high level disk structure necessary to create an empty volume.&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
A number of packets are defined to give an application some control over a file system:&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DIE&#039;&#039;&#039;               5      &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
As its name implies, the ACTION_DIE packet tells a handler to quit. All new handlers are expected to implement this packet.  Because of outstanding locks and the fact that the handler address is returned by the DeviceProc() routine, it is unlikely that the handler can disappear completely, but instead will have to release as many resources as possible and simply return an error on all packets sent to it.&lt;br /&gt;
&lt;br /&gt;
In the future, the system may be able to determine if there are any outstanding DeviceProc() references to a handler, and therefore make it is safe to shut down completely.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FLUSH&#039;&#039;&#039;             27     &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BOOL    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This action causes the file system to flush out all buffers to disk before returning this packet.  If any writes are pending, they must be processed before responding to this packet.  This packet allows an application to make sure that the data that is supposed to be on the disk is actually written to the disk instead of waiting in a buffer.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MORE_CACHE&#039;&#039;&#039;        18      AddBuffers(...) in 2.0&lt;br /&gt;
 ARG1:   LONG    Number of buffers to add&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE (-1L)&lt;br /&gt;
 RES2:   LONG    New total number of buffers&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the number of internal buffers used by the file system for caching.  Note that a positive number increases the number of buffers while a negative number decreases the number of buffers.  In all cases, the number of current buffers should be returned in RES2.  This allows an application to inquire the number of buffers by sending in a value of 0 (resulting in no change).  Note that the OFS and FFS in 1.3 do not accept a negative number of buffers.&lt;br /&gt;
&lt;br /&gt;
Note that there is a bug in the ROM file system in both Release 2.04 and Release 3.0 that jumbles its return values for this packet.  The file system erroneously returns the new number of buffers in RES1 instead of RES2 (it returns a failure code in RES2).  To work around this bug when using this packet, test RES1 to see if it is DOSTRUE (-1L).  If it is, look at RES2 for the number of buffers, otherwise RES1 should contain the new total number of buffers.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_INHIBIT&#039;&#039;&#039;           31     Inhibit(...) in 2.0&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE = inhibit,      DOSFALSE = uninhibit&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action is probably one of the most dangerous that a file system has to handle.  When inhibited (ARG1 = DOSTRUE), the file system must not access any underlying media and return an error code on all attempts to access the device.  Once uninhibited (ARG1 = DOSFALSE), the file system must assume that the medium has been changed.  The file system must flush the buffers before the ACTION_INHIBIT, popping up a requester demanding that the user put back the current disk, if necessary.  The handler may choose to reject an inhibit request if any objects are open for writing.&lt;br /&gt;
&lt;br /&gt;
Although it&#039;s not required, a handler should nest inhibits.  Prior to 2.0, the system handlers did not keep a nesting count and were subject to some obscure race conditions.  The 2.0 ROM filing system introduced a nesting count.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE_PROTECT&#039;&#039;&#039;     1023    &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 ARG1:   BOOL    DOSTRUE/DOSFALSE (write protect /un-write protect)&lt;br /&gt;
 ARG2:   LONG    32 Bit pass key&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    DOSTRUE/DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This is a new packet defined for the Fast File System.  This packet allows an application to change the write protect flag of a disk (if possible - applications cannot write to floppies that have their write-protect tabs set).  This packet is primarily intended to allow write-protecting non-removable media such as hard disks.  The value in ARG1 toggles the write status.  The 32-bit passkey allows a program to prevent other programs from unwrite-protecting a disk.  To unlock a disk, ARG2 must match the passkey of the packet that locked the disk, unless the disk was locked with a passkey of 0.  In this case, no passkey is necessary to unlock the disk.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_IS_FILESYSTEM&#039;&#039;&#039;     1027    IsFileSystem(devname)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
Through this function, a handler can indicates whether or not it is a file system (whether or not it can  support separate files for storing information).  Programs will assume a handler can create multiple, distinct files through calls to Open() if the handler returns this packet with a DOSTRUE value.  A handler does not need to support directories and subdirectories in order to qualify as a file system.  It does have to support the Examine()/ExNext() calls.&lt;br /&gt;
&lt;br /&gt;
Note that the AmigaDOS routine IsFileSystem() will attempt to use Lock(\&amp;quot;:\&amp;quot;,SHARED_ACCESS) if this packet returns ERROR_ACTION_NOT_KNOWN.&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4807</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4807"/>
		<updated>2013-01-30T16:39:16Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Volume Manipulation/Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
The Volume Manipulation and Information actions are used to allow access to the underlying volume currently being manipulated by the file system.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CURRENT_VOLUME&#039;&#039;&#039;    7       &#039;&#039;sendpkt only&#039;&#039;&lt;br /&gt;
 RES1:   BPTR    Pointer to volume node of current volume&lt;br /&gt;
&lt;br /&gt;
This action returns a pointer to the volume node (from the DOS device list) associated with the file system.  As the volume node may be removed from the device list when the file system mounts a different volume (such as when directed to by an ACTION_INHIBIT) there is no guarantee that this pointer will remain valid for any amount of time. This action is generally used by AmigaDOS to provide the volume line of a requester.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_DISK_INFO&#039;&#039;&#039;         25      Info(...)&lt;br /&gt;
 ARG1:   BPTR    Pointer to an InfoData structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_INFO&#039;&#039;&#039;              26      &amp;lt;sendpkt only&amp;gt;&lt;br /&gt;
 ARG1:   LOCK    Lock&lt;br /&gt;
 ARG2:   BPTR    Pointer to a InfoData Structure to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
These actions are used to get information about the device and status of the file handler.  ACTION_DISK_INFO is used by the info command to report the status of the volume currently in the drive.  It fills in an InfoData structure about the volume the file system currently controls.  This structure should be longword aligned.  ACTION_INFO fills in an InfoData structure for  the volume the lock (ARG1) is on instead of the volume currently in the drive.  These actions are generally expected to return DOSTRUE.&lt;br /&gt;
&lt;br /&gt;
The ACTION_DISK_INFO packet has a special meaning for console style handlers.  When presented with this packet, a console style handler should return a pointer to the window associated with the open handle.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_DISK&#039;&#039;&#039;      9       Relabel(...) in 2.0&lt;br /&gt;
 ARG1:   BSTR    New disk name&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
&lt;br /&gt;
This action allows an application to change the name of the current volume.  A file system implementing this function must also change the name stored in the volume node of the DOS device list.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FORMAT&#039;&#039;&#039;            1020    Format(fs,vol,type)&lt;br /&gt;
 ARG1:   BSTR    Name for volume (if supported)&lt;br /&gt;
 ARG2:   LONG    Type of format (file system specific)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet tells a file system to perform any device or file system specific formatting on any newly initialized media.  Upon receiving this action, a file system can assume that the media has already been low level formatted and should proceed to write out any high level disk structure necessary to create an empty volume.&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4806</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4806"/>
		<updated>2013-01-30T16:35:37Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Directory/File Manipulation/Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. &#039;&#039;&#039;:&#039;&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4805</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4805"/>
		<updated>2013-01-30T16:34:44Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Directory/File Manipulation/Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
 &lt;br /&gt;
The directory/file actions permits an application to make queries about and modifications to handler objects. These packets perform functions such as creating subdirectories, resolving links, and filling in FileInfoBlock structures for specific files.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCATE_OBJECT&#039;&#039;&#039;     8       Lock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name (possibly with a path) of object to lock&lt;br /&gt;
 ARG3:   LONG    Mode:   ACCESS_READ/SHARED_LOCK, ACCESS_WRITE/EXCLUSIVE_LOCK&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on requested object or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
The AmigaDOS function Lock() uses this action to create its locks. Given a name for the object, which may include a path, (ARG2)  and a lock on a directory from which to look for the name (and path), ACTION_LOCATE_OBJECT will locate the object within the file system and create a FileLock structure associated with the object.  If  the directory lock in ARG1 is NULL, the name is relative to the root of the file handler&#039;s volume (a.k.a. ``:&#039;&#039;).  The memory for the FileLock structure returned in RES1 is maintained by the handler and freed by an ACTION_FREE_LOCK.  Although it&#039;s not a requirement, if an handler expects to support the pre-1.3 Format command, it must accept any illegal mode as ACCESS_READ.&lt;br /&gt;
&lt;br /&gt;
A handler can create an exclusive lock only if there are no other outstanding locks on the given object. Once created, an exclusive lock prevents any other locks from being created for that object.  In general, a handler uses the FileLock-&amp;gt;fl_Key field to uniquely identify an object.  Note that some applications rely on this (although a handler is not required to implement this packet).&lt;br /&gt;
&lt;br /&gt;
The fl_Volume field of the returned FileLock structure should point to the DOS device list&#039;s volume entry for the volume on which the lock exists.  In addition, there are several diagnostic programs that expect all locks for a volume to be chained together off the dl_LockList field in the volume entry.  Note that relying on this chaining is not safe, and can cause serious problems including a system crash.  No application should use it.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR&#039;&#039;&#039;          19      DupLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to duplicate&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Duplicated Lock or 0 to indicate failure&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action&#039;s name is misleading as it does not manipulate directories.  Instead, it creates a copy of a shared lock.  The copy is subsequently freed with an ACTION_FREE_LOCK.  Note that it is valid to pass a NULL lock.  Currently, the DupLock() call always returns 0 if passed a 0, although a handler is not required to return a 0.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_LOCK&#039;&#039;&#039;         15      UnLock(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to free&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    TRUE&lt;br /&gt;
&lt;br /&gt;
This action frees the lock passed to it.  The AmigaDOS function Unlock() uses this packet.  If passed a NULL lock, the handler should return success.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_OBJECT&#039;&#039;&#039;    23      Examine(...)&lt;br /&gt;
 ARG1:   LOCK    Lock of object to examine&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action fills in the FileInfoBlock with information about the locked object.  The Examine() function uses this packet.  This packet is actually used for two different types of operations.  It is called to obtain information about a given object while in other cases, it is called to prepare for a sequence of EXAMINE_NEXT operations in order to traverse a directory.&lt;br /&gt;
&lt;br /&gt;
This seemingly simple operation is not without its quirks.  One in particular is the FileInfoBlock-&amp;gt;fib_Comment field.  This field used to be 116 bytes long, but was changed to 80 bytes in release 1.2. The extra 36 bytes lie in the fib_Reserved field.  Another quirk of this packet is that both the fib_EntryType and the fib_DirEntryType fields must be set to the same value, as some programs look at one field while other programs look at the other.&lt;br /&gt;
&lt;br /&gt;
File systems should use the same values for fib_DirEntryType as the ROM file system and ram-handler do.  These are as follows:&lt;br /&gt;
&lt;br /&gt;
 ST_ROOT          1&lt;br /&gt;
 ST_USERDIR       2&lt;br /&gt;
 ST_SOFTLINK      3 NOTE: this Shows up as a directory unless checked for explicitly&lt;br /&gt;
 ST_LINKDIR       4&lt;br /&gt;
 ST_FILE         -3&lt;br /&gt;
 ST_LINKFILE     -4&lt;br /&gt;
&lt;br /&gt;
Also note that for directories, handlers must use numbers greater than 0, since some programs test to see if fib_DirEntryType is greater than zero, ignoring the case where fib_DirEntryType equals 0. Handlers should avoid using 0 because it is not interpreted consistently.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_NEXT&#039;&#039;&#039;      24      ExNext(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on directory being examined&lt;br /&gt;
 ARG2:   BPTR    BPTR FileInfoBlock&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
The ExNext() function uses this packet to obtain information on all the objects in a directory.   ACTION_EXAMINE fills in a FileInfoBlock structure describing the first file or directory stored in the directory referred to in the lock in ARG1.  ACTION_EXAMINE_NEXT is used to find out about the rest of the files and directories stored in the ARG1 directory.  ARG2 contains a pointer to a valid FileInfoBlock field that was filled in by either an ACTION_EXAMINE or a previous ACTION_EXAMINE_NEXT call.  It uses this structure to find the next entry in the directory.  This packets writes over the old FileInfoBlock with information on the next file or directory in the ARG2 directory.  ACTION_EXAMINE_NEXT returns a failure code of ERROR_NO_MORE_ENTRIES when there are no more files or directories left to be examined.  Unfortunately, like ACTION_EXAMINE, this packet has its own peculiarities.  Among the quirks that ACTION_EXAMINE_NEXT must account for are:&lt;br /&gt;
&lt;br /&gt;
* The situation where an application calls ACTION_EXAMINE_NEXT one or more times and then stops invoking it before encountering the end of the directory.&lt;br /&gt;
&lt;br /&gt;
* The situation where a FileInfoBlock passed to ACTION_EXAMINE_NEXT is not the same as the one passed to ACTION_EXAMINE or even the previous EXAMINE_NEXT operation.  Instead, it is a copy of the FileInfoBlock with only the fib_DiskKey and the first 30 bytes of the fib_FileName fields copied over.  This is now considered to be illegal and will not work in the future.  Any new code should not be written in this manner.&lt;br /&gt;
&lt;br /&gt;
* Because a handler can receive other packet types between ACTION_EXAMINE_NEXT operations, the ACTION_EXAMINE_NEXT function must handle any special cases that may result.&lt;br /&gt;
&lt;br /&gt;
* The LOCK passed to ACTION_EXAMINE_NEXT is not always the same lock used in previous operations.  It is however a lock on the same object.&lt;br /&gt;
&lt;br /&gt;
Because of these problems, ACTION_EXAMINE_NEXT is probably the trickiest action to write in any handler.  Failure to handle any of the above cases can be quite disastrous.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CREATE_DIR&#039;&#039;&#039;        22      CreateDir(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of new directory  (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Lock on new directory&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_DELETE_OBJECT&#039;&#039;&#039;     16      DeleteFile(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to delete (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;ACTION_RENAME_OBJECT&#039;&#039;&#039;     17      Rename(...)&lt;br /&gt;
 ARG1:   LOCK    Lock to which ARG2 is relative&lt;br /&gt;
 ARG2:   BSTR    Name of object to rename (relative to ARG1)&lt;br /&gt;
 ARG3:   LOCK    Lock associated with target directory&lt;br /&gt;
 ARG4:   BSTR    Requested new name for the object&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
These three actions perform most of the work behind the AmigaDOS commands MakeDir, Delete, and Rename  (for single files).  These packets take as their parameters a lock describing where the file is and a name relative to that lock.  It is the responsibility of the file system to ensure that the operation is not going to cause adverse effects.  In particular, the RENAME_OBJECT action allows moving files across directory bounds and as such must ensure that it doesn&#039;t create hidden directory loops by renaming a directory into a child of itself.&lt;br /&gt;
&lt;br /&gt;
For Directory objects, the DELETE_OBJECT action must ensure that the directory is empty before allowing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT&#039;&#039;&#039;            29      Parent(...)&lt;br /&gt;
 ARG1:   LOCK    Lock on object to get the parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LOCK    Parent Lock&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = 0&lt;br /&gt;
&lt;br /&gt;
This action receives a lock on an object and creates a shared lock on the object&#039;s parent.  If the original object has no parent, then a lock of 0 is returned.  Note that this operation is typically used in the process of constructing the absolute path name of a given object.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_PROTECT&#039;&#039;&#039;       21      SetProtection(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   LONG    Mask of new protection bits&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to modify the protection bits of an object.  The 4 lowest order bits (RWED) are a bit peculiar.  If their respective bit is set, that operation is not allowed (i.e. if a file&#039;s delete bit is set the file is not deleteable).  By default, files are created with the RWED bits set and all others cleared. Additionally, any action which modifies a file is required to clear the A (archive) bit.  See the dos/dos.h include file for the definitions of the bit fields.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_COMMENT&#039;&#039;&#039;       28      SetComment(...)&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of object (relative to ARG2)&lt;br /&gt;
 ARG4:   BSTR    New Comment string&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set the comment string of an object.  If the object does not exist then DOSFALSE will be returned in RES1 with the failure code in RES2.  The comment string is limited to 79 characters.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_DATE&#039;&#039;&#039;          34      SetFileDate(...) in 2.0&lt;br /&gt;
 ARG1:   Unused&lt;br /&gt;
 ARG2:   LOCK    Lock to which ARG3 is relative&lt;br /&gt;
 ARG3:   BSTR    Name of Object (relative to ARG2)&lt;br /&gt;
 ARG4:   CPTR    DateStamp&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to set an object&#039;s creation date.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FH_FROM_LOCK&#039;&#039;&#039;      1026    OpenFromLock(lock)&lt;br /&gt;
 ARG1:   BPTR    BPTR to file handle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock of file to open&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action open a file from a given lock.  If this action is successful, the file system will essentially steal the lock so a program should not use it anymore.  If ACTION_FH_FROM_LOCK fails, the lock is still usable by an application.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SAME_LOCK&#039;&#039;&#039;         40      SameLock(lock1,lock2)&lt;br /&gt;
 ARG1:   BPTR    Lock 1 to compare&lt;br /&gt;
 ARG2:   BPTR    Lock 2 to compare&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Result of comparison, one of&lt;br /&gt;
     DOSTRUE           if locks are for the same object&lt;br /&gt;
     DOSFALSE          if locks are on different objects&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is LOCK_DIFFERENT&lt;br /&gt;
&lt;br /&gt;
This action compares the targets of two locks.  If they point to the same object, ACTION_SAME_LOCK should return LOCK_SAME.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_MAKE_LINK&#039;&#039;&#039;         1021    MakeLink(name,targ,mode)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory ARG2 is relative to&lt;br /&gt;
 ARG2:   BSTR    Name of the link to be created (relative to ARG1)&lt;br /&gt;
 ARG3:   BPTR    Lock on target object or name (for soft links).&lt;br /&gt;
 ARG4:   LONG    Mode of link, either LINK_SOFT or LINK_HARD&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This packet causes the file system to create a link to an already existing file or directory.  There are two kinds of links, hard links and soft links.  The basic difference between them is that a file system resolves a hard link itself, while the file system passes a string back to DOS telling it where to find a soft linked file or directory.   To the packet level programmer, there is essentially no difference between referencing a file by its original name or by its hard link name.  In the case of a hard link, ARG3 is a lock on the file or directory that the link is linked to, while in a soft link, ARG3 is a pointer (CPTR) to a C-style string.&lt;br /&gt;
&lt;br /&gt;
In an over-simplified model of the ROM file system, when asked to locate a file, the system scans a disk looking for a file header with a specific (file) name.  That file header points to the actual file data somewhere on the disk.  With hard links, more than one file header can point to the same file data, so data can be referenced by more than one name.  When the user tries to delete a hard link to a file, the system first checks to see if there are any other hard links to the file.  If there are, only the hard link is deleted, the actual file data the hard link used to reference remains, so the existing hard links can still use it.  In the case where the original link (not a hard or soft link) to a file is deleted, the file system will make one of its hard links the new &#039;&#039;real&#039;&#039; link to the file. Hard links can exist on directories as well.  Because hard links &#039;&#039;link&#039;&#039; directly to the underlying media, hard links in one file system cannot reference objects in another file system.&lt;br /&gt;
&lt;br /&gt;
Soft links are resolved through DOS calls.  When the file system scans a disk for a file or directory name and finds that the name is a soft link, it returns an error code (ERROR_IS_SOFT_LINK).  If this happens, the application must ask the file system to tell it what the link the link refers to by calling ACTION_READ_LINK.  Soft Links are stored on the media, but instead of pointing directly to data on the disk, a soft link contains a path to its object.  This path can be relative to the lock in ARG1, relative to the volume (where the string will be prepended by a colon &#039;:&#039;), or an absolute path.  An absolute path contains the name of another volume, so a soft link can reference files and directories on other disks.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ_LINK&#039;&#039;&#039;         1024  ReadLink(port,lck,nam,buf,len)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory that ARG2 is relative to&lt;br /&gt;
 ARG2:   CPTR    Path and name of link (relative to ARG1).&lt;br /&gt;
                   NOTE: This is a C string not a BSTR&lt;br /&gt;
 ARG3:   APTR    Buffer for new path string&lt;br /&gt;
 ARG4:   LONG    Size of buffer in bytes&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Actual length of returned string, -2 if there isn&#039;t&lt;br /&gt;
                   enough space in buffer,or -1 for other errors&lt;br /&gt;
 RES2:   CODE    Failure code&lt;br /&gt;
&lt;br /&gt;
This action reads a link and returns a path name to the link&#039;s object.  The link&#039;s name (plus any necessary path) is passed as a CPTR (ARG2) which points to a C-style string, not a BSTR. ACTION_READ_LINK returns the path name in ARG3.  The length of the target string is returned in RES1 (or a -1 indicating an error).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_CHANGE_MODE&#039;&#039;&#039;       1028    ChangeMode(type,obj,mode)&lt;br /&gt;
 ARG1:   LONG    Type of object to change - either CHANGE_FH&lt;br /&gt;
                   or CHANGE_LOCK&lt;br /&gt;
 ARG2:   BPTR    object to be changed&lt;br /&gt;
 ARG3:   LONG    New mode for object - see ACTION_FINDINPUT,&lt;br /&gt;
                   and ACTION_LOCATE_OBJECT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler change the mode of the given file handle or lock to the mode in ARG3.  This request should fail if the handler can&#039;t change the mode as requested  (for example an exclusive request for an object that has multiple users).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_COPY_DIR_FH&#039;&#039;&#039;       1030    DupLockFromFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of file handle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock associated with file handle or NULL&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action requests that the handler return a lock associated with the currently opened file handle.  The request may fail for any restriction imposed by the file system (for example when the file handle is not opened in a shared mode).  The file handle is still usable after this call, unlike the lock in ACTION_FH_FROM_LOCK.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_PARENT_FH&#039;&#039;&#039;         1031    ParentOfFH(fh)&lt;br /&gt;
 ARG1:   LONG    fh_Arg1 of File handle to get parent of&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BPTR    Lock on parent of a file handle&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = NULL&lt;br /&gt;
&lt;br /&gt;
This action obtains a lock on the parent directory (or root of the volume if at the top level) for a currently opened file handle.  The lock is returned as a shared lock and must be freed.  Note that unlike ACTION_COPY_DIR_FH, the mode of the file handle is unimportant.   For an open file, ACTION_PARENT_FH should return a lock under all circumstances.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_ALL&#039;&#039;&#039;       1033    ExAll(lock,buff,size,type,ctl)&lt;br /&gt;
 ARG1:   BPTR    Lock on directory to examine&lt;br /&gt;
 ARG2:   APTR    Buffer to store results&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of buffer (ARG2)&lt;br /&gt;
 ARG4:   LONG    Type of request - one of the following:&lt;br /&gt;
            ED_NAME Return only file names&lt;br /&gt;
            ED_TYPE Return above plus file type&lt;br /&gt;
            ED_SIZE Return above plus file size&lt;br /&gt;
            ED_PROTECTION Return above plus file protection&lt;br /&gt;
            ED_DATE Return above plus 3 longwords of date&lt;br /&gt;
            ED_COMMENT Return above plus comment or NULL&lt;br /&gt;
 ARG5:   BPTR    Control structure to store state information.  The control&lt;br /&gt;
                   structure must be allocated with AllocDosObject()!&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Continuation flag - DOSFALSE indicates termination&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action allows an application to obtain information on multiple directory entries.  It is particularly useful for applications that need to obtain information on a large number of files and directories.&lt;br /&gt;
&lt;br /&gt;
This action fills the buffer (ARG2) with partial or whole ExAllData structures.  The size of the ExAllData structure depends on the type of request.  If the request type field (ARG4) is set to ED_NAME, only the ed_Name field is filled in.  Instead of copying the unused fields of the ExAllData structure into the buffer, ACTION_EXAMINE_ALL truncates the unused fields.  This effect is cumulative, so requests to fill in other fields in the ExAllData structure causes all fields that appear in the structure before the requested field will be filled in as well.  Like the ED_NAME case mentioned above, any field that appears after the requested field will be truncated (see the ExAllData structure below).  For example, if the request field is set to ED_COMMENT, ACTION_EXAMINE_ALL fills in all the fields of the ExAllData structure, because the ed_Comment field is last.  This is the only case where the packet returns entire ExAllData structures.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct ExAllData {&lt;br /&gt;
         struct ExAllData *ed_Next;&lt;br /&gt;
         UBYTE  *ed_Name;&lt;br /&gt;
         LONG    ed_Type;&lt;br /&gt;
         ULONG   ed_Size;&lt;br /&gt;
         ULONG   ed_Prot;&lt;br /&gt;
         ULONG   ed_Days;&lt;br /&gt;
         ULONG   ed_Mins;&lt;br /&gt;
         ULONG   ed_Ticks;&lt;br /&gt;
         UBYTE  *ed_Comment;     /* strings will be after last used field. */&lt;br /&gt;
 }; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each ExAllData structure entry has an ead_Next field which points to the next ExAllData structure.  Using these links, a program can easily chain through the ExAllData structures without having to worry about how large the structure is.  Do not examine the fields beyond those requested as they certainly will not be initialized (and will probably overlay the next entry).&lt;br /&gt;
&lt;br /&gt;
The most important part of this action is the ExAllControl structure. It must be allocated and freed through AllocDosObject()/FreeDosObject().  This allows the structure to grow if necessary with future revisions of the operating and file systems. Currently, ExAllControl contains four fields:&lt;br /&gt;
&lt;br /&gt;
* Entries - This field is maintained by the file system and indicates the actual number of entries present in the buffer after the action is complete.  Note that a value of zero is possible here as no entries may match the match string.&lt;br /&gt;
&lt;br /&gt;
* LastKey - This field must be initialized to 0 by the calling application before using this packet for the first time.  This field is maintained by the file system as a state indicator of the current place in the list of entries to be examined.  The file system may test this field to determine if this is the first or a subsequent call to this action.&lt;br /&gt;
&lt;br /&gt;
* MatchString - This field points to a pattern matching string parsed by ParsePattern() or ParsePatternNoCase(). The string controls which directory entries are returned. If this field is NULL, then all entries are returned. Otherwise, this string is used to pattern match the names of all directory entries before putting them into the buffer.  The default AmigaDOS pattern match routine is used unless MatchFunc is not NULL (see below).  Note that it is not acceptable for the application to change this field between subsequent calls to this action for the same directory.&lt;br /&gt;
&lt;br /&gt;
* MatchFunc - This field contains a pointer to an alternate pattern matching routine to validate entries.  If it is NULL then the standard AmigaDOS wild card routines will be used.  Otherwise, MatchFunc points to a hook function that is called in the following manner:&lt;br /&gt;
&lt;br /&gt;
 BOOL = MatchFunc(hookptr, data,typeptr)&lt;br /&gt;
                    A0      A1    A2&lt;br /&gt;
 hookptr    Pointer to hook being called&lt;br /&gt;
 data       Pointer to (partially) filled in ExAllData for item&lt;br /&gt;
              being checked.&lt;br /&gt;
 typeptr    Pointer to longword indicating the type of the&lt;br /&gt;
              ExAll request (ARG4).&lt;br /&gt;
&lt;br /&gt;
This function is expected to return DOSTRUE if the entry is acceptedand DOSFALSE if it is to be discarded.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_EXAMINE_FH&#039;&#039;&#039;        1034    ExamineFH(fh,fib)&lt;br /&gt;
 ARG1:   BPTR    File handle on open file&lt;br /&gt;
 ARG2:   BPTR    FileInfoBlock to fill in&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function examines a file handle and fills in the FileInfoBlock (found in ARG2) with information about the current state of the file. This routine is analogous to the ACTION_EXAMINE_OBJECT action for locks.  Because it is not always possible to provide an accurate file size (for example when buffers have not been flushed or two processes are writing to a file), the fib_Size field (see dos/dos.h) may be inaccurate.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_ADD_NOTIFY&#039;&#039;&#039;        4097    StartNotify(NotifyRequest)&lt;br /&gt;
 ARG1:   BPTR    NotifyRequest structure&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action asks a file system to notify the calling program if a particular file is altered.  A file system notifies a program either by sending a message or by signaling a task.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;syntaxhighlight&amp;gt;struct NotifyRequest {&lt;br /&gt;
         UBYTE *nr_Name;&lt;br /&gt;
         UBYTE *nr_FullName;             /* set by dos - don&#039;t touch */&lt;br /&gt;
         ULONG nr_UserData;              /* for applications use */&lt;br /&gt;
         ULONG nr_Flags;&lt;br /&gt;
 &lt;br /&gt;
         union {&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct MsgPort *nr_Port;        /* for SEND_MESSAGE */&lt;br /&gt;
             } nr_Msg;&lt;br /&gt;
 &lt;br /&gt;
             struct {&lt;br /&gt;
                 struct Task *nr_Task;           /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_SignalNum;             /* for SEND_SIGNAL */&lt;br /&gt;
                 UBYTE nr_pad[3];&lt;br /&gt;
             } nr_Signal;&lt;br /&gt;
         } nr_stuff;&lt;br /&gt;
 &lt;br /&gt;
         ULONG nr_Reserved[4];           /* leave 0 for now */&lt;br /&gt;
 &lt;br /&gt;
         /* internal use by handlers */&lt;br /&gt;
         ULONG nr_MsgCount;              /* # of outstanding msgs */&lt;br /&gt;
         struct MsgPort *nr_Handler;     /* handler sent to (for EndNotify) */&lt;br /&gt;
 };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use this packet, an application needs to allocate and initialize a NotifyRequest structure (see above).  As of this writing, NotifyRequest structures are not allocated by AllocDosObject(), but this may change in the future.  The handler gets the watched file&#039;s name from the nr_FullName field.  The current file system does not currently support wild cards in this field, although there is nothing to prevent other handlers from doing so.&lt;br /&gt;
&lt;br /&gt;
The string in nr_FullName must be an absolute path, including the name of the root volume (no assigns).  The absolute path is necessary because the file or its parent directories do not have to exist when the notification is set up.  This allows notification on files in directories that do not yet exist.  Notification will not occur until the directories and file are created.&lt;br /&gt;
&lt;br /&gt;
An application that uses the StartNotify() DOS call does not fill in the NotifyRequest&#039;s nr_FullName field, but instead fills in the nr_Name field.  StartNotify() takes the name from the nr_Name field and uses GetDeviceProc() and NameFromLock() to expand any assigns (such as ENV:), storing the result in nr_FullName.  Any application utilizing the packet level interface instead of StartNotify() must expand their own assigns.  Handlers must not count on nr_Name being correct.&lt;br /&gt;
&lt;br /&gt;
The notification type depends on which bit is set in the NotifyRequest.nr_Flags field.  If the NRF_SEND_MESSAGE bit is set, an application receives notification of changes to the file through a message (see NotifyMessage from dos/notify.h).  In this case, the nr_Port field must point to the message port that will receive the notifying message .  If the nr_Flags NRF_SEND_SIGNAL bit is set, the file system will signal a task instead of sending a message.  In this case, nr_Task points to the task and nr_SignalNum is the signal number.  Only one of these two bits should be set!&lt;br /&gt;
&lt;br /&gt;
When an application wants to limit the number of NotifyMessages an handler can send per NotifyRequest, the application sets the NRF_WAIT_REPLY bit in the nr_Flags field.  This bit tells the handler not to send new NotifyMessages to a NotifyRequest&#039;s message port if the application has not returned a previous NotifyMessage.  This pertains only to a specific NotifyRequest--if other NotifyRequests exist on the same file (or directory) the handler will still send NotifyMessages to the other NotifyRequest&#039;s message ports.  The NRF_WAIT_REPLY bit only applies to message notification.&lt;br /&gt;
&lt;br /&gt;
If an application needs to know if a file or directory exists at the time the application sets up notification on that file or directory, the application can set the NRF_NOTIFY_INITIAL bit in the nr_Flags field.  If the file or directory exists, the handler sends an initial message or gives an initial signal.&lt;br /&gt;
&lt;br /&gt;
Handlers should only perform a notification when the actual contents of the file have changed.  This includes ACTION_WRITE, ACTION_SET_DATE, ACTION_DELETE, ACTION_RENAME_OBJECT, ACTION_FINDUPDATE, ACTION_FINDINPUT, and ACTION_FINDOUTPUT.  It may also include other actions such as ACTION_SET_COMMENT or ACTION_SET_PROTECT, but this is not required (and may not be expected by the application as there is no need to reread the data).&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_REMOVE_NOTIFY&#039;&#039;&#039;     4098    EndNotify(NotifyRequest) &lt;br /&gt;
 ARG1:   BPTR    Pointer to previously added notify request&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This action cancels a notification (see ACTION_ADD_NOTIFY) .  ARG1 is the NotifyRequest structure used to initiate the notification.  The handler should abandon any pending notification messages.  Note that it is possible for a file system to receive a reply from a previously sent notification message even after the notification has been terminated.  It should accept these messages silently and throw them away.&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=DeveloperDoc:Main&amp;diff=4804</id>
		<title>DeveloperDoc:Main</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=DeveloperDoc:Main&amp;diff=4804"/>
		<updated>2013-01-30T03:56:44Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The AmigaOS Documentation Wiki provides the latest information on how to program systems running AmigaOS 4.x. It has been updated for Release 4.0 and higher of AmigaOS and covers all the computer systems which run the Amiga operating system from the A1200 all the way up to the X1000.&lt;br /&gt;
&lt;br /&gt;
This wiki is meant to help you learn how to program AmigaOS systems. It assumes some previous experience with programming and familiarity with computers in general. Although it is not required, a knowledge of the C programming language will make it much easier to understand the material in this book. Most of the Amiga operating system is written in C, hence C is the language used for the programming examples. Other languages are available such as [http://home.ntelos.net/~tbreeden/ Modula-2], [http://cshandley.co.uk/portable/PortablE.html E] and C++ but the primary interface for all AmigaOS programming is still C.&lt;br /&gt;
&lt;br /&gt;
This wiki is intended for the following audiences:&lt;br /&gt;
&lt;br /&gt;
* Programmers who want to create application software for AmigaOS systems.&lt;br /&gt;
* Software developers who want to upgrade their software for Release 4.0 or higher of the operating system.&lt;br /&gt;
* Anyone who wants to know more about how AmigaOS works.&lt;br /&gt;
&lt;br /&gt;
The system software is organized into related groups of functions called libraries. The same basic organization is used for this wiki.&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
[[Kernel]]&lt;br /&gt;
&lt;br /&gt;
[[Libraries]]&lt;br /&gt;
&lt;br /&gt;
[[Devices]]&lt;br /&gt;
&lt;br /&gt;
[[Resources]]&lt;br /&gt;
&lt;br /&gt;
[[BOOPSI Class Reference]]&lt;br /&gt;
&lt;br /&gt;
== General Information ==&lt;br /&gt;
&lt;br /&gt;
[[GUI Programming]]&lt;br /&gt;
&lt;br /&gt;
[[User Interface Style Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Programming in the Amiga Environment]]&lt;br /&gt;
&lt;br /&gt;
[[Libraries and Devices]]&lt;br /&gt;
&lt;br /&gt;
[[Migration Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Troubleshooting Your Software]]&lt;br /&gt;
&lt;br /&gt;
[[Release 4 Compatibility]]&lt;br /&gt;
&lt;br /&gt;
[[Writing apps for Xena]]&lt;br /&gt;
&lt;br /&gt;
[[AmigaGuide 101]]&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaGuide_101&amp;diff=4803</id>
		<title>AmigaGuide 101</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaGuide_101&amp;diff=4803"/>
		<updated>2013-01-30T03:56:04Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;adapted from the original AmigaMail article by Jerry Hartzler&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Compared to other platforms, Amiga-based utilities that display on-line documentation are relatively weak.  Until 1991, Amiga users had to rely on basic text viewing utilities like More, which lack the navigational capabilities of hypertext programs.  In a hypertext environment, when the user wants more information on a subject, the user simply clicks on a word and the hypertext utility automatically cross references the subject.  No type of hypertext-like utility was available on the Amiga--that is, until AmigaGuide came along.&lt;br /&gt;
&lt;br /&gt;
[[AmigaGuide]] can display plain ASCII text files and AmigaGuide databases.  An AmigaGuide database is a single file that consists of a set of documents called nodes.  If you were to convert a book into an AmigaGuide database, a convenient way to organize the database is to make each chapter of the book into a node.  Each node may contain references to other nodes (chapters) or databases (other books), using a link.  When a user selects a link--which usually appears in the form of a button within the text--AmigaGuide dereferences the link and displays its node.  This makes it easier for the user to find the information he is looking for because the user no longer needs to search through a document.  AmigaGuide already knows where the information is.&lt;br /&gt;
&lt;br /&gt;
Buttons within AmigaGuide can do other actions as well, such as execute Shell or ARexx commands.  An ARexx port is also built into AmigaGuide providing users the means to support and control the utility.  Therefore, like a book, an AmigaGuide database can display illustrations.  It can go a step beyond by playing sounds and music, and by being truly interactive with the user, able to ask questions and evaluate responses.&lt;br /&gt;
&lt;br /&gt;
This article was written to familiarize you with AmigaGuide and the format of its databases.&lt;br /&gt;
&lt;br /&gt;
== Setting up AmigaGuide ==&lt;br /&gt;
&lt;br /&gt;
AmigaGuide consists of the AmigaGuide utility and an Exec library called amigaguide.library.  AmigaGuide should be placed in the SYS:Utilities drawer and amigaguide.library placed in the Libs: drawer.  As of Release 3, the OS comes with a utility called MultiView that understands and displays AmigaGuide databases. MultiView requires amigaguide.datatype and datatypes.library in order to display AmigaGuide databases.&lt;br /&gt;
&lt;br /&gt;
AmigaGuide can run from the Workbench or the Shell.  To run from Workbench, the default tool of an AmigaGuide database or text icon should be set to &#039;&#039;&#039;AmigaGuide&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
From the Shell, use the following command template:&lt;br /&gt;
&lt;br /&gt;
    AmigaGuide &amp;lt;my_DataBase&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;my_DataBase&amp;gt; is the name of the AmigaGuide database or text file to display.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
    1&amp;gt; AmigaGuide Autodocs&lt;br /&gt;
&lt;br /&gt;
attempts to open the Autodocs database.  In its search for a database, AmigaGuide will first look in the current directory and then through the AmigaGuide path for the database.&lt;br /&gt;
&lt;br /&gt;
The AmigaGuide path is a global environment variable.  AmigaGuide stores its environment variables in the ENV:AmigaGuide directory assigned in RAM:.&lt;br /&gt;
&lt;br /&gt;
The variable named path contains the list of directory names that AmigaGuide will search through when it attempts to open a database. Directory names are separated by a space.  The path variable is set and stored in the ENV:AmigaGuide directory through the use of the AmigaDOS SetEnv command (Note that as of Release 3, if the AmigaGuide directory does not exist, SetEnv will not create it).&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
    1&amp;gt; SetEnv AmigaGuide/Path &amp;quot;Workbench:Autodocs Workbench:Includes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Of course all variables set in RAM: disappear once the computer is turned off.  To prevent this, copy the file ENV:AmigaGuide/Path to the ENVARC:AmigaGuide directory.  The system copies the ENVARC: directory to ENV: upon start-up.&lt;br /&gt;
&lt;br /&gt;
The MultiView utility uses the  amigaguide.datatype which uses this the environment variable as its path.&lt;br /&gt;
&lt;br /&gt;
== The AmigaGuide Window ==&lt;br /&gt;
&lt;br /&gt;
AmigaGuide displays text within an Intuition window.  The window contains scroll bars, buttons and pull-down menus making it easy to browse, search and print text.&lt;br /&gt;
&lt;br /&gt;
[[File:Amigaguide.png]]&lt;br /&gt;
&lt;br /&gt;
Along the top edge of the AmigaGuide window is a row of six navigation buttons:&lt;br /&gt;
&lt;br /&gt;
* Contents: This button displays the Table Of Contents for the current database or node.  See the @NODE and @TOC commands below.&lt;br /&gt;
&lt;br /&gt;
* Index: This button displays the Index for the current database.  See the @INDEX command below.&lt;br /&gt;
&lt;br /&gt;
* Help: By default, this button displays the database named help.guide in the s: directory.  Under 3.0, the database is named amigaguide.guide in the Help:&amp;lt;country&amp;gt;/sys directory.  This database contains help in using AmigaGuide.&lt;br /&gt;
&lt;br /&gt;
* Retrace: This button goes back to the previous node.&lt;br /&gt;
&lt;br /&gt;
* Browse: These buttons step through the nodes in sequential order (the order they appear in the database).&lt;br /&gt;
&lt;br /&gt;
== AmigaGuide Databases ==&lt;br /&gt;
&lt;br /&gt;
Creating an AmigaGuide database is quite simple.  An AmigaGuide database is basically an ASCII text file, embedded with commands to tell AmigaGuide what to do.  Let&#039;s take a look at the commands used in AmigaGuide and then make up a simple database.&lt;br /&gt;
&lt;br /&gt;
There are three types of AmigaGuide commands.  Database commands break up a document into nodes.  Node commands set attributes within a node.  Action commands are only found within a special node command called a &#039;&#039;&#039;link point&#039;&#039;&#039;.  As the name implies, action commands perform some action.&lt;br /&gt;
&lt;br /&gt;
=== Database Commands ===&lt;br /&gt;
&lt;br /&gt;
Database commands should not be used within the nodes themselves. They must start in the first column of a line.  If a line in an AmigaGuide database begins with an at (@) sign, then AmigaGuide interprets the line as a command.  Although the AmigaGuide commands appear here in upper-case, AmigaGuide commands are not case sensitive.&lt;br /&gt;
&lt;br /&gt;
* @DATABASE &amp;lt;name&amp;gt; - This command identifies a file as an AmigaGuide database.  It must be the first line of the database.&lt;br /&gt;
&lt;br /&gt;
* @NODE &amp;lt;name&amp;gt; &amp;lt;title&amp;gt; - This command indicates the start of a node. The first node of a database should be named MAIN.  MAIN is typically the master table of contents for the database (see the @TOC node command in the next section).  When AmigaGuide displays the node, it displays &amp;lt;title&amp;gt; in the window&#039;s title bar.  If there are any spaces in the &amp;lt;title&amp;gt;, it must be in quotes.  A node name cannot contain spaces, tabs, colons (&#039;:&#039;) or slants (&#039;/&#039;).&lt;br /&gt;
&lt;br /&gt;
* @DNODE &amp;lt;name&amp;gt; - This command indicates the start of a dynamic node. Dynamic nodes are beyond the scope of this introductory article and therefore are not discussed here.&lt;br /&gt;
&lt;br /&gt;
* @INDEX &amp;lt;node name&amp;gt; - This command tells AmigaGuide which node to use as the index for the database.  When the user hits the &#039;&#039;&#039;Index&#039;&#039;&#039; button at the top of the AmigaGuide window, AmigaGuide will display the node specified by this command.  The node can be in another database.  If the node is in another database, the node name is the file name of the database followed by a slant (`/`), followed by the name of the node in the other database.  For example, to access the MAIN node in another database called other_database, the link point looks like this:&lt;br /&gt;
&lt;br /&gt;
    @{&amp;quot;my label&amp;quot; LINK other_database/MAIN}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The name of the other database can contain a full path to the other database.  If it doesn&#039;t, AmigaGuide will search the AmigaGuide path for the other database.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* @REMARK &amp;lt;remark&amp;gt; - This commands lets you add programmer remarks to a database.  AmigaGuide ignores the remarks.&lt;br /&gt;
&lt;br /&gt;
=== Node Commands ===&lt;br /&gt;
&lt;br /&gt;
These commands are only valid within a @NODE.  They must start in the&lt;br /&gt;
first column of a line unless otherwise noted.&lt;br /&gt;
&lt;br /&gt;
* @ENDNODE &amp;lt;name&amp;gt; - This command ends a node.&lt;br /&gt;
&lt;br /&gt;
* @TITLE &amp;lt;title&amp;gt; - AmigaGuide displays &amp;lt;title&amp;gt; in the node&#039;s window title bar.  It must start at the beginning of a line.  This command isn&#039;t necessary if you use the &amp;lt;title&amp;gt; option in @NODE.&lt;br /&gt;
&lt;br /&gt;
* @TOC &amp;lt;node name&amp;gt; - This command tells AmigaGuide which node to display when the user hits the Contents button while displaying this node.  If a node does not have a @TOC command, the table of contents defaults to MAIN.  The &amp;lt;node name&amp;gt; can be in another database.  See the @INDEX command in the [[#Database Commands|Database Commands]] section for more information on the format of &amp;lt;node name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* @PREV &amp;lt;node name&amp;gt; - The Browse buttons can be reprogrammed so as not to step through the nodes in sequential order.  For example, if this command appears in a @NODE, AmigaGuide  will display the &amp;lt;node name&amp;gt; node when the user selects the &#039;&#039;&#039;&amp;lt; Browse&#039;&#039;&#039; button while in the current node.  The &amp;lt;node name&amp;gt; can be in another database.  See the @INDEX command in the [[#Database Commands|Database Commands]] section for more information on the format of &amp;lt;node name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* @NEXT &amp;lt;node name&amp;gt; - Similar to @PREV but will display the &amp;lt;node name&amp;gt; node when the user selects &#039;&#039;&#039;Browse &amp;gt;&#039;&#039;&#039; button while in the current node.  The &amp;lt;node name&amp;gt; can be in another database.  See the @INDEX command in the [[#Database Commands|Database Commands]] section for more information on the format of &amp;lt;node name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* @{&amp;quot;&amp;lt;label&amp;gt;&amp;quot; &amp;lt;action command&amp;gt;} - This command is referred to as a link point.  AmigaGuide makes the string &amp;lt;label&amp;gt; into a button.  The &amp;lt;label&amp;gt; must be enclosed by quotes.  When the user hits that button, AmigaGuide carries out &amp;lt;action command&amp;gt; (see the next section of this article for a description of action commands).  A link point does not have to start in the first column, it can appear anywhere on a line.&lt;br /&gt;
&lt;br /&gt;
=== Action Commands ===&lt;br /&gt;
&lt;br /&gt;
These commands are for use with the link point command described in the [[#Node Commands|Node Commands]] section of this article.&lt;br /&gt;
&lt;br /&gt;
* LINK &amp;lt;node name&amp;gt; &amp;lt;line#&amp;gt; - This command loads and displays the &amp;lt;node name&amp;gt; node at the line number specified in &amp;lt;line #&amp;gt;.  The &amp;lt;line #&amp;gt; parameter is optional and it defaults to zero.  The node can be in another database.  The &amp;lt;node name&amp;gt; can be in another database.  See the @INDEX command in the [[#Database Commands|Database Commands]] section for more information on the format of &amp;lt;node name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The &amp;lt;line #&amp;gt; parameter is optional and it defaults to zero.  The default line number is line zero.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* RX &amp;lt;ARexx command&amp;gt; - This commands executes the ARexx macro named in &amp;lt;ARexx command&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* RXS &amp;lt;command&amp;gt; - This commands executes the ARexx string file named in &amp;lt;command&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* SYSTEM &amp;lt;command&amp;gt; - This commands executes the AmigaDOS command named in &amp;lt;command&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* QUIT - When AmigaGuide encounters this command is shuts down the current database.&lt;br /&gt;
&lt;br /&gt;
== A Working Database ==&lt;br /&gt;
&lt;br /&gt;
As an example, Let&#039;s make the text file below into a simple AmigaGuide database.  The simple database will consists of a single node.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt; What is a user interface? This sweeping phrase covers all&lt;br /&gt;
  aspects of communication between the user and the computer. It&lt;br /&gt;
  includes the innermost mechanisms of the computer and rises to&lt;br /&gt;
  the height of defining a philosophy to guide the interaction&lt;br /&gt;
  between human and machine.  Intuition is, above all else, a&lt;br /&gt;
  philosophy turned into software.  See the Amiga ROM Kernel&lt;br /&gt;
  Reference Manual: Libraries for more information.&lt;br /&gt;
&lt;br /&gt;
  Intuition screens are the basis of any display Intuition can&lt;br /&gt;
  make. Screens determine the fundamental characteristics of the&lt;br /&gt;
  display such as the resolution and palette and they set up the&lt;br /&gt;
  environment for multiple, overlapping windows that makes it&lt;br /&gt;
  possible for each application to have its own separate visual&lt;br /&gt;
  context.&lt;br /&gt;
&lt;br /&gt;
  Windows are rectangular display areas that open on screens.&lt;br /&gt;
  The window acts as a virtual terminal allowing a program to&lt;br /&gt;
  interact with the user as if it had the entire display all to&lt;br /&gt;
  itself. Windows are moveable and can be positioned anywhere&lt;br /&gt;
  within the screen on which they exist.  Windows may also have a&lt;br /&gt;
  title and borders containing various gadgets for controlling&lt;br /&gt;
  the window.&lt;br /&gt;
&lt;br /&gt;
  Gadgets are software controls symbolized by an image that the&lt;br /&gt;
  user can operate with the mouse or keyboard.  They are the&lt;br /&gt;
  Amiga&#039;s equivalent of buttons, knobs and dials.&lt;br /&gt;
&lt;br /&gt;
  Menus are command and option lists associated with an&lt;br /&gt;
  application window that the user can bring into view at any&lt;br /&gt;
  time.  These lists provide the user with a simple way to access&lt;br /&gt;
  features of the application without having to remember or enter&lt;br /&gt;
  complex character-based command strings.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If AmigaGuide displayed the file above, it would appear without any buttons linking it to text files or databases.  To mark this file as an AmigaGuide database, add the @DATABASE command.  As mentioned earlier, it must start on the first line in the first column of the file.&lt;br /&gt;
&lt;br /&gt;
Since there will be no index for this database, the next command can be a @NODE.  For AmigaGuide to open a database, it must contain a node.  Since this will be the first node in the database, it should be named MAIN.&lt;br /&gt;
&lt;br /&gt;
At the bottom of the file, on a separate line, add the @ENDNODE command.  This tells AmigaGuide that the current node ends here.  All nodes must contain an @ENDNODE command.&lt;br /&gt;
&lt;br /&gt;
This is what we have so far:&lt;br /&gt;
&lt;br /&gt;
    @DATABASE&lt;br /&gt;
    @NODE MAIN&lt;br /&gt;
    What is a user interface? This sweeping phrase covers all&lt;br /&gt;
            .&lt;br /&gt;
            .&lt;br /&gt;
            .&lt;br /&gt;
    complex character-based command strings.&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
The file is now an AmigaGuide database.  However, since the database has only one node and has no link points, the database will still appear as plain text.  Also, AmigaGuide will ghost all of the navigation buttons.  The database can be broken into smaller nodes if desired.  Normally such a short file would not need to be broken up, but it makes a good example.&lt;br /&gt;
&lt;br /&gt;
One important issue to consider while designing an AmigaGuide database is how to lay it out.  Some thought should go into the break-up of a document into manageable nodes, and how these nodes relate--and eventually link--to one another.  Each node should consist of information dealing with one topic and should contain links to other related nodes.&lt;br /&gt;
&lt;br /&gt;
Notice that the example text is about Intuition, but each paragraph discusses a different topic of Intuition.  The first paragraph is an overview followed by four paragraphs: one each on screens, windows, gadgets and menus.  This organization makes it convenient to make each paragraph a node with a table of contents in the beginning: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;    Intuition Table of Contents&lt;br /&gt;
&lt;br /&gt;
    Introduction&lt;br /&gt;
    Screens&lt;br /&gt;
    Windows&lt;br /&gt;
    Gadgets&lt;br /&gt;
    Menus&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since the Table of Contents node is first, it is the MAIN node. The other paragraphs follow the MAIN node, each in their own separate node.  So as not to confuse AmigaGuide, each node within a database must have a different name.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;    @DATABASE&lt;br /&gt;
    @NODE MAIN &amp;quot;Intuition Table of Contents&amp;quot;&lt;br /&gt;
    Introduction&lt;br /&gt;
    Screens&lt;br /&gt;
    Windows&lt;br /&gt;
    Gadgets&lt;br /&gt;
    Menus&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Intro &amp;quot;Introduction&amp;quot;&lt;br /&gt;
    What is a user interface? This sweeping phrase...&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Screen &amp;quot;Screens&amp;quot;&lt;br /&gt;
    Intuition screens are the basis of any display...&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Window &amp;quot;Windows&amp;quot;&lt;br /&gt;
    Windows are rectangular display areas that open...&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Gadget &amp;quot;Gadgets&amp;quot;&lt;br /&gt;
    Gadgets are software controls symbolized by an...&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Menu &amp;quot;Menus&amp;quot;&lt;br /&gt;
    Menus are command and option lists associated...&lt;br /&gt;
    @ENDNODE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When AmigaGuide loads the database above, AmigaGuide displays the MAIN node with the title string Intuition Table of Contents in the window&#039;s title bar.  As the user clicks the Browse buttons at the top of the AmigaGuide window, AmigaGuide steps through each node in the database, displaying each paragraph.  Notice that each node in the database uses the window title parameter.  As the Browse buttons step through the database displaying the different nodes in sequence, the AmigaGuide window title changes to match the title from the current node.&lt;br /&gt;
&lt;br /&gt;
An important limitation of the database above is the only way to access the different nodes is using the ``Browse&#039;&#039; button to step through them in the order they appear in the database.  The database still has no buttons within the nodes to link to other nodes.&lt;br /&gt;
&lt;br /&gt;
== Using Link Points ==&lt;br /&gt;
&lt;br /&gt;
The link point command is probably the most commonly used command in a database.  With it you can make a word in one node reference another node.  For example, in the Table of Contents node from the previous example, you can make each entry from the table into a button that references its respective node.&lt;br /&gt;
&lt;br /&gt;
The template for a link point is:&lt;br /&gt;
&lt;br /&gt;
    @{&amp;lt;label&amp;gt; &amp;lt;action command&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
The label parameter is the word or phrase in a database that is made into a button, and the action command is the action AmigaGuide takes when the user clicks the button.  For our example, we want each topic in the table of contents to be a label and the action command for each to be a LINK command.  The LINK command loads and displays another node.&lt;br /&gt;
&lt;br /&gt;
    @{&amp;lt;label&amp;gt; LINK &amp;lt;name&amp;gt; &amp;lt;line#&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
For example, if you change the word Introduction from the Table of Contents node into a link point it would look like this:&lt;br /&gt;
&lt;br /&gt;
    @{&amp;quot;Introduction&amp;quot; LINK Intro}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;label&amp;gt; string must be in quotes.  If you load the database into AmigaGuide after making the change above, the word Introduction would appear as a button on the Table of Contents screen.  If the user clicks on the Introduction button, AmigaGuide displays the node named Intro.&lt;br /&gt;
&lt;br /&gt;
Unlike other AmigaGuide commands, link points do not need to start in the first column.  This makes it easy to indent a button from the left edge of the window and also to embed a button within a block of text.&lt;br /&gt;
&lt;br /&gt;
Link points can also link to nodes in other databases.  As an example, consider the following excerpt from the Intro node:&lt;br /&gt;
&lt;br /&gt;
  philosophy turned into software.  See the Amiga ROM Kernel Reference&lt;br /&gt;
  Manual: Libraries for more information.&lt;br /&gt;
&lt;br /&gt;
If an AmigaGuide database of Amiga ROM Kernel Reference Manual: Libraries was readily available,  it would be convenient if the word &#039;&#039;Libraries&#039;&#039; from the excerpt was a button, linking the word &#039;&#039;Libraries&#039;&#039; directly to the Libraries manual database.  If the Libraries manual database was named Libraries_Manual and it was in the current AmigaGuide path, to make the word Libraries from the Intro node into a link point that opens the Libraries_Manual database, change the excerpt above to the following:&lt;br /&gt;
&lt;br /&gt;
  philosophy turned into software.  See the Amiga ROM Kernel&lt;br /&gt;
  Reference Manual: @{&amp;quot;Libraries&amp;quot; LINK Libraries_Manual/Intro} for more information.&lt;br /&gt;
&lt;br /&gt;
In the example above, when the user selects the Libraries button, AmigaGuide will try to display the MAIN node from the database called Libraries_Manual.  AmigaGuide will first look for Libraries_Manual in the directory where the example database resides.  If it&#039;s not there, AmigaGuide searches through its path for the database.  Alternately, you can supply a full path name to Libraries_Manual.&lt;br /&gt;
&lt;br /&gt;
A link point can also be used to display a picture.  For example, to display an ILBM image of a Workbench screen from the Screen node, use the SYSTEM action command:&lt;br /&gt;
&lt;br /&gt;
    @{&amp;quot;Picture of a Workbench Screen&amp;quot; SYSTEM sys:utilities/Display sys:Workbench.pic}&lt;br /&gt;
&lt;br /&gt;
From the command above, when the user click the &#039;&#039;Picture of a Workbench Screen&#039;&#039; button, SYSTEM executes the Display utility. Display shows the ILBM file sys:Workbench.pic.  Because Display is merely a shell command, you can substitute your own ILBM viewer for Display.&lt;br /&gt;
&lt;br /&gt;
Below is the finished database with a few more interactive link points.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;  @DATABASE&lt;br /&gt;
  @NODE MAIN &amp;quot;Intuition Table of Contents&amp;quot;&lt;br /&gt;
  @{&amp;quot;Introduction&amp;quot; LINK Intro}&lt;br /&gt;
  @{&amp;quot;Screens&amp;quot; LINK Screen}&lt;br /&gt;
  @{&amp;quot;Windows&amp;quot; LINK Window}&lt;br /&gt;
  @{&amp;quot;Gadgets&amp;quot; LINK Gadget}&lt;br /&gt;
  @{&amp;quot;Menus&amp;quot; LINK Menu}&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Intro &amp;quot;Introduction&amp;quot;&lt;br /&gt;
  What is a user interface? This sweeping phrase covers all&lt;br /&gt;
  aspects of communication between the user and the computer.  It&lt;br /&gt;
  includes the innermost mechanisms of the computer and rises to&lt;br /&gt;
  the height of defining a philosophy to guide the interaction&lt;br /&gt;
  between human and machine.  Intuition is, above all else, a&lt;br /&gt;
  philosophy turned into software.  See the Amiga ROM Kernel&lt;br /&gt;
  Reference Manual: @{&amp;quot;Libraries&amp;quot; LINK Libraries_Manual/Intro} for more information.&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Screen &amp;quot;Screens&amp;quot;&lt;br /&gt;
  Intuition screens are the basis of any display Intuition can&lt;br /&gt;
  make.  Screens determine the fundamental characteristics of the&lt;br /&gt;
  display such as the resolution and palette and they set up the&lt;br /&gt;
  environment for multiple, overlapping @{&amp;quot;windows&amp;quot; LINK Window} that makes it&lt;br /&gt;
  possible for each application to have its own separate visual&lt;br /&gt;
  context.&lt;br /&gt;
&lt;br /&gt;
  @{&amp;quot;Picture of a Workbench Screen&amp;quot; SYSTEM sys:utilities/Display sys:Workbench.pic}&lt;br /&gt;
&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Window &amp;quot;Windows&amp;quot;&lt;br /&gt;
  Windows are rectangular display areas that open on @{&amp;quot;screens&amp;quot; LINK screen}.  The&lt;br /&gt;
  window acts as a virtual terminal allowing a program to interact&lt;br /&gt;
  with the user as if it had the entire display all to itself.&lt;br /&gt;
  Windows are moveable and can be positioned anywhere within the&lt;br /&gt;
  screen on which they exist.  Windows may also have a title and&lt;br /&gt;
  borders containing various @{&amp;quot;gadgets&amp;quot; LINK Gadget} for controlling the window.&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Gadget &amp;quot;Gadgets&amp;quot;&lt;br /&gt;
  Gadgets are software controls symbolized by an image that the&lt;br /&gt;
  user can operate with the mouse or keyboard.  They are the&lt;br /&gt;
  Amiga&#039;s equivalent of buttons, knobs and dials.&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Menu &amp;quot;Menus&amp;quot;&lt;br /&gt;
  Menus are command and option lists associated with an&lt;br /&gt;
  application @{&amp;quot;window&amp;quot; LINK Window} that the user can bring into view at any&lt;br /&gt;
  time.  These lists provide the user with a simple way to access&lt;br /&gt;
  features of the application without having to remember or enter&lt;br /&gt;
  complex character-based command strings.&lt;br /&gt;
  @ENDNODE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although this is a small sample and only a few basic commands are used, it is a good start to making your own AmigaGuide database.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
To make it easier to create a bug-free database, below is a list of common mistakes made when editing an AmigaGuide database.&lt;br /&gt;
&lt;br /&gt;
As with any type of programming, errors are bound to crop up.  One of the most common mistakes is spelling errors.  Always double check your spelling of commands.  Also, make sure all commands that should begin in the first column do so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom:  AmigaGuide displays a database as a text file.  For example, instead of a button, AmigaGuide displays the link point command that was supposed to display the button.&lt;br /&gt;
*Cure: AmigaGuide does not think the file is an AmigaGuide database. Check that the first line of the file is the @DATABASE command and that it starts in the first column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: When displaying a database node, AmigaGuide displays nothing in its window.&lt;br /&gt;
*Cure: Either the @ENDNODE command is not present in the node or the @ENDCODE command does not start in the first column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide does not display a button or its label.&lt;br /&gt;
*Cure: The &amp;lt;label&amp;gt; parameter in the link point is missing or not enclosed in quotes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: When the user selects a button, AmigaGuide flashes the screen and displays the error message &amp;quot;Couldn&#039;t locate &amp;lt;node&amp;gt;&amp;quot;.&lt;br /&gt;
*Cure: AmigaGuide cannot locate the node specified in the button&#039;s link point command.  If the link point command points to a node in another database, the database must be in the AmigaGuide path or the node must contain the full path name to the database.  The link point command also require a NODE name as the last parameter in the path separated by a slant (/).  If the file is only text and not an AmigaGuide database, its path name should end with &#039;&#039;&#039;/MAIN&#039;&#039;&#039;.  If a node or file has any spaces in its name, the path name must be enclosed within quotes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide flashes the screen when a button is selected but displays no error message.&lt;br /&gt;
*Cure: AmigaGuide does not recognize the &amp;lt;action command&amp;gt; parameter in the link point, or AmigaGuide cannot locate the specified node (see the cure above).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide does not fully display a button.&lt;br /&gt;
*Cure: Check that all of the link points end with a closing brace (}). Note that there is a bug in AmigaGuide that can crash the system if a link point does not end with a closing brace.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide will not load a database and displays a &amp;quot;Can&#039;t find Node&amp;quot; requester.&lt;br /&gt;
*Cure: All databases must contain at least one node.  If the file is short, all the text can be in one node called &#039;&#039;&#039;MAIN&#039;&#039;&#039;.  If you do not wish to make the file a database at all, remove the @DATABASE command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide does not allow the the user to browse the database to its end.  It either stops browsing before reaching the last node, or it gets caught in an endless loop, cycling through a number of nodes.&lt;br /&gt;
*Cure: At least two nodes within a single database have the same name. Every node must have a different name unless they are in separate databases.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4802</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4802"/>
		<updated>2013-01-29T22:47:41Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Summary of Defined Packet Numbers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following text was copied from an AmigaMail issue which coincided with the release of OS 2.0.  The packet IDs may have changed and will be updated here to reflect new/changed packet IDs/actions as of OS 4.1.&lt;br /&gt;
&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a listing of all the DOS packets defined by Commodore with the release of OS 2.0. Packets 0-1999 are reserved for use by Commodore.  Unless otherwise noted, packets 2050-2999 are reserved for use by third party developers (see chart below).  The remaining packets are reserved for future expansion (Note: packets 2008, 2009, 4097, and 4098 are in use by Commodore).&lt;br /&gt;
&lt;br /&gt;
        Decimal Hex     Action #define&lt;br /&gt;
        ======= ======= ================&lt;br /&gt;
        0       0x0000  ACTION_NIL&lt;br /&gt;
        1               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2       0x0002  ACTION_GET_BLOCK&lt;br /&gt;
        3               &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        4       0x0004  ACTION_SET_MAP&lt;br /&gt;
        5       0x0005  ACTION_DIE&lt;br /&gt;
        6       0x0006  ACTION_EVENT&lt;br /&gt;
        7       0x0007  ACTION_CURRENT_VOLUME&lt;br /&gt;
        8       0x0008  ACTION_LOCATE_OBJECT&lt;br /&gt;
        9       0x0009  ACTION_RENAME_DISK&lt;br /&gt;
        10-14           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        15      0x000F  ACTION_FREE_LOCK&lt;br /&gt;
        16      0x0010  ACTION_DELETE_OBJECT&lt;br /&gt;
        17      0x0011  ACTION_RENAME_OBJECT&lt;br /&gt;
        18      0x0012  ACTION_MORE_CACHE&lt;br /&gt;
        19      0x0013  ACTION_COPY_DIR&lt;br /&gt;
        20      0x0014  ACTION_WAIT_CHAR&lt;br /&gt;
        21      0x0015  ACTION_SET_PROTECT&lt;br /&gt;
        22      0x0016  ACTION_CREATE_DIR&lt;br /&gt;
        23      0x0017  ACTION_EXAMINE_OBJECT&lt;br /&gt;
        24      0x0018  ACTION_EXAMINE_NEXT&lt;br /&gt;
        25      0x0019  ACTION_DISK_INFO&lt;br /&gt;
        26      0x001A  ACTION_INFO&lt;br /&gt;
        27      0x001B  ACTION_FLUSH&lt;br /&gt;
        28      0x001C  ACTION_SET_COMMENT&lt;br /&gt;
        29      0x001D  ACTION_PARENT&lt;br /&gt;
        30      0x001E  ACTION_TIMER&lt;br /&gt;
        31      0x001F  ACTION_INHIBIT&lt;br /&gt;
        32      0x0020  ACTION_DISK_TYPE&lt;br /&gt;
        33      0x0021  ACTION_DISK_CHANGE&lt;br /&gt;
        34      0x0022  ACTION_SET_DATE&lt;br /&gt;
        35-39           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        40      0x0028  ACTION_SAME_LOCK&lt;br /&gt;
        41-81           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        82      0x0052  ACTION_READ&lt;br /&gt;
        83-86           &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        87      0x0057  ACTION_WRITE&lt;br /&gt;
        88-993          &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        994     0x03E2  ACTION_SCREEN_MODE&lt;br /&gt;
        995     0x03E3  ACTION_CHANGE_SIGNAL&lt;br /&gt;
        996-1000        &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1001    0x03E9  ACTION_READ_RETURN&lt;br /&gt;
        1002    0x03EA  ACTION_WRITE_RETURN&lt;br /&gt;
        1003            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1004    0x03EC  ACTION_FINDUPDATE&lt;br /&gt;
        1005    0x03ED  ACTION_FINDINPUT&lt;br /&gt;
        1006    0x03EE  ACTION_FINDOUTPUT&lt;br /&gt;
        1007    0x03EF  ACTION_END&lt;br /&gt;
        1008    0x03F0  ACTION_SEEK&lt;br /&gt;
        1009-1019       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1020    0x03FC  ACTION_FORMAT&lt;br /&gt;
        1021    0x03FD  ACTION_MAKE_LINK&lt;br /&gt;
        1022    0x03FE  ACTION_SET_FILE_SIZE&lt;br /&gt;
        1023    0x03FF  ACTION_WRITE_PROTECT&lt;br /&gt;
        1024    0x0400  ACTION_READ_LINK&lt;br /&gt;
        1025            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1026    0x0402  ACTION_FH_FROM_LOCK&lt;br /&gt;
        1027    0x0403  ACTION_IS_FILESYSTEM&lt;br /&gt;
        1028    0x0404  ACTION_CHANGE_MODE&lt;br /&gt;
        1029            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1030    0x0406  ACTION_COPY_DIR_FH&lt;br /&gt;
        1031    0x0407  ACTION_PARENT_FH&lt;br /&gt;
        1032            &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        1033    0x0409  ACTION_EXAMINE_ALL&lt;br /&gt;
        1034    0x040A  ACTION_EXAMINE_FH&lt;br /&gt;
        1035-2007       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2008    0x07D8  ACTION_LOCK_RECORD&lt;br /&gt;
        2009    0x07D9  ACTION_FREE_RECORD&lt;br /&gt;
        2010-2049       &amp;lt;Reserved by Commodore&amp;gt;&lt;br /&gt;
        2050-2999       &amp;lt;Reserved for 3rd Party Handlers&amp;gt;&lt;br /&gt;
        4097    0x1001  ACTION_ADD_NOTIFY&lt;br /&gt;
        4098    0x1002  ACTION_REMOVE_NOTIFY&lt;br /&gt;
        4099-           &amp;lt;Reserved by Commodore for Future Expansion&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4801</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4801"/>
		<updated>2013-01-29T22:37:53Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Basic Input/Output */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 Packet Mnemonic          ID      Function Syntax&lt;br /&gt;
 ======================== ======= ==========================&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4800</id>
		<title>AmigaDOS Packets</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaDOS_Packets&amp;diff=4800"/>
		<updated>2013-01-29T22:23:01Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: /* Basic Input/Output */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:DOS]]{{WIP}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
Packet passing handles all communication performed by AmigaDOS between&lt;br /&gt;
processes. The function diagram below shows how packets fit in with the&lt;br /&gt;
other components of the Amiga operating system.&lt;br /&gt;
&lt;br /&gt;
    +--------------+&lt;br /&gt;
    | User Process +-----------------------+&lt;br /&gt;
    +-------+------+                       |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
     Function Calls                        |&lt;br /&gt;
            |                              |&lt;br /&gt;
           \|/                             |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
  | AmigaDOS Open(), |                     |&lt;br /&gt;
  |   Close(), etc.  |                     |&lt;br /&gt;
  +---------+--------+                     |&lt;br /&gt;
            |                              |&lt;br /&gt;
            |                              |&lt;br /&gt;
       +-Packets---+--------+     +-----Packets--------+&lt;br /&gt;
       |           |        |     |        |           |&lt;br /&gt;
      \|/         \|/      \|/   \|/      \|/         \|/&lt;br /&gt;
  +----+----+ +----+----+ +-+--+--+-+ +----+----+ +----+----+&lt;br /&gt;
  | FFS/OFS | | FFS/OFS | | FFS/OFS | |   CON:  | |   CON:  |&lt;br /&gt;
  |   DH0:  | |   DF0:  | |   DF1:  | | Window1 | | Window2 |&lt;br /&gt;
  | Handler | | Handler | | Handler | | Handler | | Handler |&lt;br /&gt;
  | Process | | Process | | Process | | Process | | Process |&lt;br /&gt;
  +----+----+ +-------+-+ +----+----+ +----+----+ +----+----+&lt;br /&gt;
       |              |        |           |           |&lt;br /&gt;
      \|/            \|/      \|/         \|/         \|/&lt;br /&gt;
  +----+--------+  +--+--------+----+ +----+-----------+----+&lt;br /&gt;
  |Hddisk.device|  |Trackdisk.device| |    Console.device   |&lt;br /&gt;
  +-------------+  +----------------+ +---------------------+&lt;br /&gt;
&lt;br /&gt;
A StandardPacket (defined in &amp;lt;dos/dosextens.h&amp;gt;) is used to send packet&lt;br /&gt;
commands to a process&#039;s MsgPort. The StandardPacket structure contains an&lt;br /&gt;
Exec Message structure and an AmigaDOS DOSPacket structure:&lt;br /&gt;
&lt;br /&gt;
    struct StandardPacket&lt;br /&gt;
    {   struct Message   sp_Msg;&lt;br /&gt;
        struct DOSPacket sp_Pkt;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
This structure must be longword-aligned, and initialized to link the&lt;br /&gt;
Message and DOSPacket sections to each other:&lt;br /&gt;
&lt;br /&gt;
    packet-&amp;gt;sp_Msg.mn_Node.ln_Name = (char *) &amp;amp;(packet-&amp;gt;sp_Pkt);&lt;br /&gt;
    packet-&amp;gt;sp_Pkt.dp_Link         = &amp;amp;(packet-&amp;gt;sp_Msg);&lt;br /&gt;
&lt;br /&gt;
Packets must also be initialized with a ReplyPort which can be created&lt;br /&gt;
with the amiga.lib function CreatePort():&lt;br /&gt;
&lt;br /&gt;
    if (replyport = (struct MsgPort *) CreatePort(NULL, 0))&lt;br /&gt;
        packet-&amp;gt;sp_Pkt.dp_Port = replyport;&lt;br /&gt;
&lt;br /&gt;
The DOSPacket portion of the StandardPacket structure is used to pass the&lt;br /&gt;
packet type and arguments, and to receive the results of the packet. The&lt;br /&gt;
argument types, number of arguments, and results vary for different packet&lt;br /&gt;
types and are documented with each packet description. A DOSPacket must be&lt;br /&gt;
longword-aligned and has the following general structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Link&lt;br /&gt;
| Pointer back to Exec message structure&lt;br /&gt;
|-&lt;br /&gt;
| struct Message*&lt;br /&gt;
| dp_Port&lt;br /&gt;
| Reply port for the packet. Must be filled in each send&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Type&lt;br /&gt;
| Packet type&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res1&lt;br /&gt;
| For filesystem calls this is the result that would have been returned by the function; eg. Write(&amp;quot;W&amp;quot;) returns actual length written.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Res2&lt;br /&gt;
| For filesystem calls this is what would have been returned by IoErr()&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg1&lt;br /&gt;
| Argument 1 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg2&lt;br /&gt;
| Argument 2 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg3&lt;br /&gt;
| Argument 3 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg4&lt;br /&gt;
| Argument 4 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg5&lt;br /&gt;
| Argument 5 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg6&lt;br /&gt;
| Argument 6 (depends on packet type)&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| dp_Arg7&lt;br /&gt;
| Argument 7 (depends on packet type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The format of a specific packet depends on its type; but in all cases it&lt;br /&gt;
contains a back-pointer to the Message structure, the MsgPort for the&lt;br /&gt;
reply, and two result fields. When AmigaDOS sends a packet, the reply port&lt;br /&gt;
is overwritten with the process ID of the sender so that the packet can be&lt;br /&gt;
returned. Thus, when sending a packet to an AmigaDOS handler process, you&lt;br /&gt;
must fill in the reply MsgPort each time; otherwise when the packet&lt;br /&gt;
returns, AmigaDOS has overwritten the original port. AmigaDOS maintains&lt;br /&gt;
all other fields except the result fields.&lt;br /&gt;
&lt;br /&gt;
All AmigaDOS packets are sent to the message port created as part of a&lt;br /&gt;
process; this message port is initialized so that arriving messages cause&lt;br /&gt;
signal bit 8 to be set. An AmigaDOS process that is waiting for a message&lt;br /&gt;
waits for signal 8 to be set. When the process wakes up because this event&lt;br /&gt;
has occurred, GetMsg() takes the message from the message port and&lt;br /&gt;
extracts the packet address. If the process is an AmigaDOS handler&lt;br /&gt;
process, then the packet contains a value in the PktType field that&lt;br /&gt;
indicates an action to be performed, such as reading some data. The&lt;br /&gt;
argument fields contain specific information such as the size of the&lt;br /&gt;
buffer where the characters go.&lt;br /&gt;
&lt;br /&gt;
When the handler process has completed the work required to satisfy this&lt;br /&gt;
request, the packet returns to the sender, using the same message&lt;br /&gt;
structure. Both the message structure and the packet structure must be&lt;br /&gt;
allocated by the client and not deallocated before the reply has been&lt;br /&gt;
received. Normally AmigaDOS is called by the client to send the packet,&lt;br /&gt;
such as when a call to Read() is made. However, there are cases where&lt;br /&gt;
asynchronous I/O is required, and in this case the client may send packets&lt;br /&gt;
to the handler process as required. The packet and message structures must&lt;br /&gt;
be allocated, and the process ID field filled in with the message port&lt;br /&gt;
where this packet must return. A call to PutMsg() then sends the message&lt;br /&gt;
to the destination. Note that many packets may be sent out, returning to&lt;br /&gt;
either the same or different message ports.&lt;br /&gt;
&lt;br /&gt;
= Packet Types =&lt;br /&gt;
&lt;br /&gt;
Packets sent to a filesystem or handler can be divided into several basic&lt;br /&gt;
categories:&lt;br /&gt;
&lt;br /&gt;
; Basic Input/Output.&lt;br /&gt;
: These actions deal with transferring data to and from objects controlled by the handler.&lt;br /&gt;
; File/Directory Manipulation/Information.&lt;br /&gt;
: These actions are used to gain access to and manipulate the high-level structures of the filesystem.&lt;br /&gt;
; Volume Manipulation/Information.&lt;br /&gt;
: These actions allow access to the specific volume controlled by the filesystem.&lt;br /&gt;
; Handler Maintenance and Control.&lt;br /&gt;
: These actions allow control over the handler/filesystem itself, independent of the actual volume or structure underneath.&lt;br /&gt;
; Handler Internal.&lt;br /&gt;
: These actions are never sent to the handler directly. Instead they are generally responses to I/O requests made by the handler. The handler makes these responses look like packets to simplify processing.&lt;br /&gt;
; Obsolete Packets. &lt;br /&gt;
: These packets are no longer valid for use by handlers and filesystems.&lt;br /&gt;
; Console Only Packets.&lt;br /&gt;
: These packets are specific to console handlers. Filesystems can ignore these packets.&lt;br /&gt;
&lt;br /&gt;
Each packet type documented in this section is listed with its action&lt;br /&gt;
name, its corresponding number, any AmigaDOS routines that use this&lt;br /&gt;
packet, and the list of parameters that the packet uses. The C variable&lt;br /&gt;
types for the packet parameters are one of the following types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| BPTR&lt;br /&gt;
| This is a BCPL pointer (the address of the given object shifted right by 2).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; This means that the object must be aligned on a longword boundary.&lt;br /&gt;
|-&lt;br /&gt;
| LOCK&lt;br /&gt;
| This is a BPTR to a FileLock structure returned by a previous ACTION_LOCATE_OBJECT. A lock of 0 is legal, indicating the root of the volume for the handler.&lt;br /&gt;
|-&lt;br /&gt;
| BSTR&lt;br /&gt;
| This is a BPTR to a string where the first byte indicates the number of characters in the string. A byte of this length is unsigned but because the information is stored in a byte, the strings are limited to 255 characters in length.&lt;br /&gt;
|-&lt;br /&gt;
| BOOL&lt;br /&gt;
| A 32-bit boolean value either containing DOSTRUE (-1) or DOSFALSE (0).&amp;lt;br/&amp;gt;&#039;&#039;Note:&#039;&#039; Equality comparisons with DOSTRUE should be avoided.&lt;br /&gt;
|-&lt;br /&gt;
| CODE&lt;br /&gt;
| A 32-bit error code as defined in the &amp;lt;dos/dos.h&amp;gt; include file. Handlers should not return error codes besides those defined in &amp;lt;dos/dos.h&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| ARG1&lt;br /&gt;
| The FileHandle-&amp;gt;fh_Arg1 field.&lt;br /&gt;
|-&lt;br /&gt;
| LONG&lt;br /&gt;
| A 32-bit integer value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Basic Input/Output ==&lt;br /&gt;
&lt;br /&gt;
The Basic Input/Output actions are supported by both handlers and file systems.  In this way, the application can get a stream level access to both devices and files.  One difference that arises between the two is that a handler will not necessarily support an ACTION_SEEK while it is generally expected for a file system to do so.&lt;br /&gt;
&lt;br /&gt;
These actions work based on a FileHandle which is filled in by one of the three forms of opens:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDINPUT&#039;&#039;&#039;         1005    Open(..., MODE_OLDFILE) &lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDOUTPUT&#039;&#039;&#039;        1006    Open(..., MODE_NEWFILE)&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FINDUPDATE&#039;&#039;&#039;        1004    Open(..., MODE_READWRITE)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to fill in&lt;br /&gt;
 ARG2:   LOCK    Lock on directory that ARG3 is relative to&lt;br /&gt;
 ARG3:   BSTR    Name of file to be opened (relative to ARG1)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
All three actions use the lock (ARG2) as a base directory location from which to open the file.  If this lock is NULL, then the file name (ARG3) is relative to the root of the current volume.  Because of this, file names are not limited to a single file name but instead can include a volume name (followed by a colon) and multiple slashes allowing the file system to fully resolve the name.  This eliminates the need for AmigaDOS or the application to parse names before sending them to the file system.  Note that the lock in ARG2 must be associated with the file system in question.  It is illegal to use a lock from another file system.&lt;br /&gt;
&lt;br /&gt;
The calling program owns the file handle (ARG1).  The program must initialize the file handle before trying to open anything  (in the case of a call to Open(), AmigaDOS allocates the file handle automatically and then frees it in Close() ).  All fields must be zero except the fh_Pos and fh_End fields which should be set to -1. The Open() function fills in the fh_Type field with a pointer to the MsgPort of the handler process.  Lastly, the handler must initialize fh_Arg1 with something that allows the handler to uniquely locate the object being opened (normally a file).  This value is implementation specific.  This field is passed to the READ/WRITE/SEEK/ END/TRUNCATE operations and not the file handle itself.&lt;br /&gt;
&lt;br /&gt;
FINDINPUT and FINDUPDATE are similar in that they only succeed if the file already exists.  FINDINPUT will open with a shared lock while FINDUPDATE will open it with a shared lock but if the file doesn&#039;t exist, FINDUPDATE will create the file.  FINDOUTPUT will always open the file (deleting any existing one) with an exclusive lock.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_READ&#039;&#039;&#039;              &#039;R&#039;     Read(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   APTR    Buffer to put data into&lt;br /&gt;
 ARG3:   LONG    Number of bytes to read&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes read.&lt;br /&gt;
        0 indicates EOF.&lt;br /&gt;
       -1 indicates ERROR&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is -1&lt;br /&gt;
&lt;br /&gt;
This action extracts data from the file  (or input channel) at the current position.  If fewer bytes remain in the file than requested, only those bytes remaining will be returned with the number of bytes stored in RES1.  The handler indicates an error is indicated by placing a -1 in RES1 and the error code in RES2.  If the read fails, the current file position remains unchanged.  Note that a handler may return a smaller number of bytes than requested, even if not at the end of a file.  This happens with interactive type file handles which may return one line at a time as the user hits return, for example the console handler, CON:.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_WRITE&#039;&#039;&#039;             &#039;W&#039;     Write(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened file handle&lt;br /&gt;
 ARG2:   APTR    Buffer to write to the file handle&lt;br /&gt;
 ARG3:   LONG    Number of bytes to write&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Number of bytes written.&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 not the same as ARG3&lt;br /&gt;
&lt;br /&gt;
This action copies data into the file (or output channel) at the current position.  The file is automatically extended if the write passes the end of the file.  The handler indicates failure by returning a byte count in RES1 that differs from the number of bytes requested in ARG3.  In the case of a failure, the handler does not update the current file position (although the file may have been extended and some data overwritten) so that an application can safely retry the operation.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SEEK&#039;&#039;&#039;              1008    Seek(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 ARG2:   LONG    New Position&lt;br /&gt;
 ARG3:   LONG    Mode:   OFFSET_BEGINNING,OFFSET_END, or  OFFSET_CURRENT&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    Old Position.   -1 indicates an error&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 = -1&lt;br /&gt;
&lt;br /&gt;
This packet sets the current file position.  The new position (ARG2) is relative to either the beginning of the file (OFFSET_BEGINNING), the end of the file (OFFSET_END), or the current file position (OFFSET_CURRENT), depending on the mode set in ARG3.  Note that ARG2&lt;br /&gt;
can be negative.  The handler returns the previous file position in RES1.  Any attempt to seek past the end of the file will result in an error and will leave the current file position in an unknown location. &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_END&#039;&#039;&#039;               1007    Close(...)&lt;br /&gt;
 ARG1:   ARG1    fh_Arg1 field of the opened FileHandle&lt;br /&gt;
 &lt;br /&gt;
 RES1:   LONG    DOSTRUE&lt;br /&gt;
&lt;br /&gt;
This packet closes an open file handle.  This function generally returns a DOSTRUE as there is little the application can do to recover from a file closing failure.  If an error is returned under 2.0, DOS will not deallocate the file handle.  Under 1.3, it does not check the result.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_LOCK_RECORD&#039;&#039;&#039;       2008    LockRecord(fh,pos,len,mod,tim)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to lock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length (in bytes) of record to be locked&lt;br /&gt;
 ARG4:   LONG    Mode&lt;br /&gt;
                  0 = Exclusive&lt;br /&gt;
                  1 = Immediate Exclusive (timeout is ignored)&lt;br /&gt;
                  2 = Shared&lt;br /&gt;
                  3 = Immediate Shared (timeout is ignored)&lt;br /&gt;
 ARG5:   LONG    Timeout period in AmigaDOS ticks (0 is legal)&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function locks an area of a file in either a sharable (indicating read-only) or exclusive (indicating read/write) mode. Several sharable record locks from different file handles can exist simultaneously on a particular file area but only one file handle can have exclusive record locks on a particular area at a time.  The exclusivity of an exclusive file lock only applies to record locks from other file handles, not to record locks within the file handle.  One file handle can have any number of overlapping exclusive record locks.  In the event of overlapping lock ranges, the entire range must be lockable before the request can succeed.  The timeout period (ARG5) is the number of AmigaDOS ticks (1/50 second) to wait for success before failing the operation.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_FREE_RECORD&#039;&#039;&#039;       2009    UnLockRecord(file,pos,len)&lt;br /&gt;
 ARG1:   BPTR    FileHandle to unlock record in&lt;br /&gt;
 ARG2:   LONG    Start position (in bytes) of record in the file&lt;br /&gt;
 ARG3:   LONG    Length of record (in bytes) to be unlocked&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function unlocks any previous record lock.  If the given range does not represent one that is currently locked in the file, ACTION_FREE_RECORD returns an error.  In the event of multiple locks on a given area, only one lock is freed.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;ACTION_SET_FILE_SIZE&#039;&#039;&#039;     1022    SetFileSize(file,off,mode)&lt;br /&gt;
 ARG1:   BPTR    FileHandle of opened file to modify&lt;br /&gt;
 ARG2:   LONG    New end of file location based on mode&lt;br /&gt;
 ARG3:   LONG    Mode.  One of OFFSET_CURRENT, OFFSET_BEGIN, or OFFSET_END&lt;br /&gt;
 &lt;br /&gt;
 RES1:   BOOL    Success/Failure (DOSTRUE/DOSFALSE)&lt;br /&gt;
 RES2:   CODE    Failure code if RES1 is DOSFALSE&lt;br /&gt;
&lt;br /&gt;
This function is used to change the physical size of an opened file. ARG2, the new end-of-file position, is relative to either the current file position (OFFSET_CURRENT), the beginning of the file (OFFSET_BEGIN), or the end of the file (OFFSET_END), depending on the mode set in ARG3.  The current file position will not change unless the current file position is past the new end-of-file position.  In this case, the new file position will move to the new end of the file.  If there are other open file handles on this file, ACTION_SET_FILE_SIZE sets the end-of-file for these alternate file handles to either their respective current file position or to the new end-of-file position of the file handle in ARG1, whichever makes the file appear longer.&lt;br /&gt;
&lt;br /&gt;
== Directory/File Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
== Volume Manipulation/Information ==&lt;br /&gt;
&lt;br /&gt;
== Handler Maintenance and Control ==&lt;br /&gt;
&lt;br /&gt;
== Handler Internal ==&lt;br /&gt;
&lt;br /&gt;
== Obsolete Packets ==&lt;br /&gt;
&lt;br /&gt;
== Console Only Packets ==&lt;br /&gt;
&lt;br /&gt;
== Summary of Defined Packet Numbers ==&lt;br /&gt;
&lt;br /&gt;
= Using Packets Directly =&lt;br /&gt;
&lt;br /&gt;
AmigaDOS contains many features that can only be accessed by sending a&lt;br /&gt;
packet directly to a process. For example, the ACTION_DISK_INFO packet may&lt;br /&gt;
be used to find the Intuition window pointer of a CON: or RAW: window.&lt;br /&gt;
This is useful for redirecting system requesters so that they appear where&lt;br /&gt;
the user can see them (see &amp;quot;Redirecting System Requesters&amp;quot; above). The Window&lt;br /&gt;
pointer will be returned in the ID_VolumeNode field, and a pointer to the&lt;br /&gt;
console&#039;s I/O request will be returned in the ID_InUse field. Note that&lt;br /&gt;
auxilary consoles (AUX:) can return a NULL Window pointer, and also may&lt;br /&gt;
have no ConUnit (io_Unit) associated with their I/O request block. Be&lt;br /&gt;
careful to check for these possibilities when you use this packet. If your&lt;br /&gt;
application runs in a CLI window, a user may be running you in an auxilary&lt;br /&gt;
(AUX:) CLI.&lt;br /&gt;
&lt;br /&gt;
Another example is the ACTION_SCREENMODE_MODE packet which can be sent&lt;br /&gt;
to the handler process of a CON: window to put the console into raw or&lt;br /&gt;
cooked mode.&lt;br /&gt;
&lt;br /&gt;
By default, CON: provides mapped keyboard input which is filtered,&lt;br /&gt;
buffered, and automatically echoed. Many of the special key escape&lt;br /&gt;
sequences (such as those generated by the function, cursor, and help keys)&lt;br /&gt;
are filtered out; all strokes are buffered and held back from the reader&lt;br /&gt;
until the user hits the RETURN key; and the nonfiltered keypresses (such&lt;br /&gt;
as alphanumeric keys and backspace) are automatically echoed to the CON:&lt;br /&gt;
window. This &amp;quot;cooked&amp;quot; mode is perfect for general line input from a user&lt;br /&gt;
because it provides automatic line editing features (same as in the Shell&lt;br /&gt;
command line).&lt;br /&gt;
&lt;br /&gt;
Sometimes, however, an application needs to get individual keys&lt;br /&gt;
immediately from a CON: window, or control its own echoing, or receive the&lt;br /&gt;
escape strings that the keymap generates for special keys such as the Help&lt;br /&gt;
key or cursor keys.&lt;br /&gt;
&lt;br /&gt;
In this case, an ACTION_SCREEN_MODE packet with the argument DOSTRUE&lt;br /&gt;
(-1) may be sent to the MsgPort of a CON: window to put the CON: into&lt;br /&gt;
&amp;quot;raw&amp;quot; mode. In raw mode, a CON: behaves much like a RAW: window. Keyboard&lt;br /&gt;
console input is not automatically filtered, buffered, or echoed. When&lt;br /&gt;
reading a CON: which has been set to &amp;quot;raw&amp;quot; mode, each keypress can be read&lt;br /&gt;
immediately as the ASCII value or string to which the key is mapped by the&lt;br /&gt;
keymap.&lt;br /&gt;
&lt;br /&gt;
For some applications, it may be convenient to toggle a CON: window&lt;br /&gt;
between cooked and raw modes, to use cooked mode for use line input, and&lt;br /&gt;
raw mode when keypresses should cause immediate actions.&lt;br /&gt;
&lt;br /&gt;
ACTION_SCREEN_MODE with the argument DOSFALSE (0L) will place a CON:&lt;br /&gt;
window in cooked mode. Note that the ACTION_SCREEN_MODE packet may also be&lt;br /&gt;
used on auxilary (AUX:) consoles.&lt;br /&gt;
&lt;br /&gt;
The handler MsgPort of most named AmigaDOS devices (like DF0:) can be&lt;br /&gt;
found with the DeviceProc() function. Note that DeviceProc() cannot be&lt;br /&gt;
used to find a CON: or RAW: handler because there may be many handlers for&lt;br /&gt;
each of these. The handler MsgPort (ProcessID) of a CON: or RAW: window is&lt;br /&gt;
in its FileHandle structure (fh_Type). The MsgPort of a CLI process&#039;s &amp;quot;*&amp;quot;&lt;br /&gt;
window is process-&amp;gt;pr_ConsoleTask.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to find the MsgPort of a handler process (in all cases make&lt;br /&gt;
sure that port is non-NULL before using it):&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of a unique named handler process such as &amp;quot;DF0:&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    port = (struct MsgPort *) DeviceProc(&amp;quot;DF1:&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of the handler process for an open file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fh = Open(&amp;quot;CON:0/40/640/140/Test&amp;quot;, MODE_NEWFILE);&lt;br /&gt;
    if ((fh) &amp;amp;&amp;amp; (fh-&amp;gt;Type))&lt;br /&gt;
    {   /* if Open() succeeded and fh_Type is non-NULL */&lt;br /&gt;
        port = (struct MsgPort *)&lt;br /&gt;
               (((struct FileHandle *) (fh &amp;lt;&amp;lt; 2))-&amp;gt;fh_Type);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finding the MsgPort of your process&#039;s console handler:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    struct Task* task = FindTask(NULL);&lt;br /&gt;
    if (task-&amp;gt;tc_Node.ln_Type == NT_PROCESS)&lt;br /&gt;
    {   /* port may be NULL - check before using! */&lt;br /&gt;
        port = ((struct Process *) task)-&amp;gt;pr_ConsoleTask;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Packets are sent by initializing a longword-aligned StandardPacket&lt;br /&gt;
structure and sending the packet to the MsgPort of a handler process.&lt;br /&gt;
&lt;br /&gt;
The dos.library provides new simple functions for sending and&lt;br /&gt;
replying to packets:&lt;br /&gt;
&lt;br /&gt;
    SendPkt() - asynchronously send your initialized packet&lt;br /&gt;
    WaitPkt() - wait for asynchronous packet to complete&lt;br /&gt;
    ReplyPkt() - reply a packet which has been sent to you&lt;br /&gt;
    DoPkt() - creates and sends a packet, and waits for completion&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=File:Amigaguide.png&amp;diff=4798</id>
		<title>File:Amigaguide.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=File:Amigaguide.png&amp;diff=4798"/>
		<updated>2013-01-29T20:37:30Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: uploaded a new version of &amp;amp;quot;File:Amigaguide.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=Developing_Network_Applications&amp;diff=4797</id>
		<title>Developing Network Applications</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=Developing_Network_Applications&amp;diff=4797"/>
		<updated>2013-01-29T18:54:59Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;adapted from the original AmigaMail article by Dale Larson&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
When you run a wire between two or more computers, you have a network. Big Deal.  When your applications use that wire however, you have a revolution. Although some of the following software is only internal or experimental, these are things I can do now with my Amiga, with software that I have now:&lt;br /&gt;
&lt;br /&gt;
* From my Amiga, I can transparently access filesystems on Suns, on the local Vax system (cbmvax), and on other Amigas.&lt;br /&gt;
&lt;br /&gt;
* Whenever I print, I send my files to a network printer.&lt;br /&gt;
&lt;br /&gt;
* I continuously receive mail on my Amiga--from as far as Seattle, Sydney and Denmark, and near as a desk next to mine.&lt;br /&gt;
&lt;br /&gt;
* Every night when I go home, my Amigas at work (and several others) are used to do distributed graphics rendering.  The&lt;br /&gt;
process is started over the network and all data is sent over the network.  A picture that would have taken a week can be finished overnight.&lt;br /&gt;
&lt;br /&gt;
In the scheme of what is possible, this is only the tip of the iceberg.&lt;br /&gt;
&lt;br /&gt;
* In a high school environment, a network could allow students to interactively participate in computer simulations.  It could allow them to collaborate electronically.  It could allow teachers to electronically monitor and assist students.  It could save schools money because peripherals such as printers, hard-drives and CD-ROMs could be easily shared.  Even the computational power of one expensive machine could be shared by the students.&lt;br /&gt;
&lt;br /&gt;
* A small office can use a network for an email-like facility for phone messages and other notes.  Another application might replace the intercom. Form letters can be kept in a central database accessed by a word processor.  A distributed appointment calendar could allow a secretary to add a new appointment even as the boss is looking at what his afternoon schedule is.  A distributed database application would allow access to such things as a central client database, outstanding orders and the present inventory.&lt;br /&gt;
&lt;br /&gt;
* Imagine multi-player games that use the computational power of each machine connected by a high speed Local Area Network (LAN).&lt;br /&gt;
&lt;br /&gt;
* In a software development environment, several programmers can work on the same project, updating the same sources.  Debugging information could be sent over the network, or a debugger on one machine could control the programs on others (For example, there is a version of Wack that runs over a network).&lt;br /&gt;
&lt;br /&gt;
* Multimedia applications might do any number of exciting things with the network.  A few of the applications which have been experimented with on other machines are: real-time audio and video conferencing, interactive demos for groups, and shared electronic blackboards.&lt;br /&gt;
&lt;br /&gt;
In much the same way as all applications are candidates for a GUI interface, all applications are candidates for becoming network applications.  The GUI has only changed the ways in which people interact with their computers.  Networks will change the ways in which people interact with each other.&lt;br /&gt;
&lt;br /&gt;
This article introduces some of the principles of writing network programs using the AS225&#039;s Berkeley Socket interface.  Even more so than in most of software development, networking seems simple in theory, but, in reality, gets complicated in a hurry.  To develop network software for AS225, you will need to obtain the Network Developer&#039;s kit from CATS.  It has all the necessary include files and Autodocs to develop for the AS225&#039;s socket.library.  Also, you should plan read at least some of the material in the &amp;quot;References&amp;quot; section of this article.&lt;br /&gt;
&lt;br /&gt;
== Protocol Layers and the BSD Sockets Interface ==&lt;br /&gt;
&lt;br /&gt;
Network applications should always be written to the Application Programmer&#039;s Interface (API) of a particular protocol, not to the network hardware.  Network standards usually include several protocols layered one on top of another. These groups are often referred to as protocol stacks. At the lowest level, one of the protocols must interface to some network hardware.  Each layer adds some abstraction to using the network on a lower level.  This serves to make it easier to program network software as the developer doesn&#039;t have to deal with networking details that are well below the level of the software under development.&lt;br /&gt;
&lt;br /&gt;
The International Standards Organization (ISO) has created a reference model on which to base new network layerings.  The ISO 7-Layer Reference Model of Open Systems Interconnection looks like this:&lt;br /&gt;
&lt;br /&gt;
                 ------------------------------------&lt;br /&gt;
                | 7  Application                     |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 6  Presentation                    |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 5  Session                         |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 4  Transport                       |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 3  Network                         |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 2  Data Link (Hardware Interface)  |&lt;br /&gt;
                |------------------------------------|&lt;br /&gt;
                | 1  Physical Hardware Connection    |&lt;br /&gt;
                 ------------------------------------&lt;br /&gt;
                 Figure: ISO-7 Layer Reference Model&lt;br /&gt;
&lt;br /&gt;
The only protocol stack for the Amiga which is currently available from Commodore is TCP/IP.  Our AS225 software package includes the standard TCP/IP protocols and several standard Internet applications.  It has the same API as most Unix machines running TCP/IP using the Berkeley Sockets interface.&lt;br /&gt;
&lt;br /&gt;
Unix was designed to have a common method of accessing both files and devices. Before a Unix application can perform any I/O operations on a file, it has to open() it.  The Unix open call returns an integer called a file descriptor that corresponds to the open file.  The application uses this file descriptor to manipulate the file.&lt;br /&gt;
&lt;br /&gt;
This method of I/O is not quite general enough for networking.  Instead, there is the Berkeley Sockets interface.  A socket is an entity used to send and receive data across a network.  A socket can be &amp;quot;plugged in&amp;quot; or bound directly to the socket of some other application on another machine somewhere on the network.  Like the Unix file system, applications access their sockets using a file descriptor, although it is typically referred to as a socket descriptor.&lt;br /&gt;
&lt;br /&gt;
Thousands of network applications have been written to the socket interface. AS225 has been shipping since December, 1990, and everything needed to write network applications for AS225 is included on the 1991 DevCon disks and on the Network Developer&#039;s Disk.&lt;br /&gt;
&lt;br /&gt;
On the Amiga, layers 1 and 2 should always be the network hardware and SANA-II Network Device Driver (SANA-II defines the lowest level software interface to networking hardware).  In AS225, layer 3 is the IP and ICMP protocols of the TCP/IP protocol stack.  These protocols aren&#039;t used directly by application developers.  Essentially, they handle machine to machine communication.  The transport layer uses the network layer (and the layers below it) to provide communication between individual processes on different machines.  Most current network applications use transport protocols.  The transport protocols in TCP/IP are TCP and UDP.&lt;br /&gt;
&lt;br /&gt;
The TCP transport protocol is a connection-oriented, stream protocol. Basically, the socket of one application connects to the socket of another application and they communicate across the network in data streams.  The two applications can be running on arbitrary machines on a network.  The big plus of using TCP is that it is a reliable protocol.  If the data is put in one end of a TCP stream, it either gets to the other end intact, or not at all (which causes an error at the sender&#039;s end).  This makes it easier to program applications because the application programmer does not have to worry about packet corruption.&lt;br /&gt;
&lt;br /&gt;
UDP is a connectionless, datagram protocol.  An application using UDP sends datagrams to some other application on the network.  A datagram is a fixed-length message.  Because the sockets of UDP applications are not connected, a datagram sent from a socket can be sent to an arbitrary UDP socket.  Unlike TCP, UDP is not a reliable protocol, so an application that uses UDP has to account for errors that can occur during transmission.&lt;br /&gt;
&lt;br /&gt;
The details of all the various protocols and how they behave are quite complex and are beyond the scope of this article.  This article deals with the difference between connection-oriented stream protocols (sockets which are obtained as type SOCK_STREAM) and connectionless datagram protocols (type SOCK_DGRAM).&lt;br /&gt;
&lt;br /&gt;
The Amiga Shared Socket Library (socket.library) is Commodore&#039;s implementation of the standard functions for manipulating, sending data to, and receiving data from sockets.  Other network APIs for TCP/IP have been written for other platforms (most notably TLI on Unix SVR4 systems). Programs written using sockets on one machine can communicate just fine with programs written using another API (i.e., TLI) on another machine. Sockets are not specific to TCP/IP.  They can be used with different &amp;quot;domains&amp;quot;.  TCP/IP is one domain, another network protocol is another domain and local Inter-Process Communication (IPC) is yet another.  Our socket library currently supports only TCP/IP.&lt;br /&gt;
&lt;br /&gt;
Layers 5 and 6 of the OSI model, the presentation and session layers, do not exist in TCP/IP, or most other protocol stacks.  So with TCP/IP on the Amiga, the protocol stack looks like this:&lt;br /&gt;
&lt;br /&gt;
                 -------------------------------------------&lt;br /&gt;
                | Application                               |&lt;br /&gt;
                |-------------------------------------------|&lt;br /&gt;
                | Transport (TCP, UDP)                      |&lt;br /&gt;
                |-------------------------------------------|&lt;br /&gt;
                | Network   (IP, ICMP)                      |&lt;br /&gt;
                |-------------------------------------------|&lt;br /&gt;
                | Data Link (SANA-II Network Device Driver) |&lt;br /&gt;
                |-------------------------------------------|&lt;br /&gt;
                | Hardware  (ethernet, arcnet, ...)         |&lt;br /&gt;
                 -------------------------------------------&lt;br /&gt;
                       Figure: TCP/IP Protocol Stack&lt;br /&gt;
&lt;br /&gt;
In spite of the fact that protocols come in a stack, your application will only come into direct contact with a protocol at the top of the stack.  In the case of TCP/IP, this is the transport layer.  In theory, you are not required to know protocols below the one used for your application.  In practice, higher-level protocols are often described in terms of additions to lower-level protocols.&lt;br /&gt;
&lt;br /&gt;
== Network Applications ==&lt;br /&gt;
&lt;br /&gt;
Most network applications are built around a client/server model.  In the client/server model, a server application runs on one machine somewhere on a network.  That server waits for a request for a particular service it provides. These requests come from client applications that are running on other machines on the network.  A service can be as simple as echoing back text sent to the server or as complex as providing a remote login facility.  For example, the ftp (File Transfer Program) application copies files between networked machines.  Ftp actually consists of two programs, a client and a server.  The server waits around for a client to request some service, like listing a directory or transferring a file.&lt;br /&gt;
&lt;br /&gt;
On most networks, each machine is capable of running both client and server programs simultaneously, but on some networks a machine is either a client or a server and may only run programs of that type.  The focus of this article is peer-to-peer networks (the former), not client-server networks (the latter).&lt;br /&gt;
&lt;br /&gt;
=== Application Protocols ===&lt;br /&gt;
&lt;br /&gt;
Every networked program must agree on how to send data across the network and on what meaning to attach to that data.  Therefore, the application itself has a protocol.  This is the application layer of the ISO reference model and TCP/IP protocol stack.  The application-specific protocol can include such things as what transport protocol will be used, what initialization takes place, how any security is implemented, what format data will be in, etc.&lt;br /&gt;
&lt;br /&gt;
For standard Internet applications (ftp for example), the application protocols are specified in detail in one or more reference documents called Requests for Comments, or RFCs.  RFCs are the specifications for Internet protocols and standard applications.  Even if you aren&#039;t implementing a standard Internet application, the RFCs offer insight into the complexities of application protocols and how they should be specified.  See the &amp;quot;References&amp;quot; section of this article for more information on RFCs and standard Internet applications.&lt;br /&gt;
&lt;br /&gt;
Normally application protocols are general enough that network applications can be ported to any machine which supports the network protocol.  Neither the client nor the server knows (or cares) what type of machine is at the other end.  Sometimes only one half of the application (client or server) is available for a given machine.  For example, the currently released version of AS225 includes an NFS (Network File System) client program, but no NFS server program.  To use NFS with AS225 requires access to any machine with an NFS server--it does not require any particular type of machine.&lt;br /&gt;
&lt;br /&gt;
=== Kinds of Servers ===&lt;br /&gt;
&lt;br /&gt;
There are two kinds of servers.  Those which process one request at a time are called &amp;quot;iterative servers&amp;quot;.  Those which simultaneously service multiple requests (often by spawning a process to handle each request) are called &amp;quot;concurrent servers&amp;quot;.  Iterative servers are generally easier to write, but are only suitable for services which can be handled quickly and/or will not be accessed by multiple clients.  Applications which use connectionless protocols (UDP) frequently have iterative servers, while applications with connection-oriented protocols (TCP) usually have concurrent servers.&lt;br /&gt;
&lt;br /&gt;
== Addressing ==&lt;br /&gt;
&lt;br /&gt;
All data on the network is sent to and from network addresses.  There are many different types of network addresses, at least one type for each layer of the protocol stack.  For example, the Network layer of the TCP/IP protocol stack uses the IP and ICMP protocols which use 32-bit internet addresses (which are usually represented in &amp;quot;dotted decimal notation&amp;quot; e.g., 192.9.210.4) to talk to a specific machine at a specific internet-style address.  When applications communicate with each other, they usually use a transport layer protocol, therefore the data is sent from one transport address to another.  A transport address generally corresponds to a specific program running on a specific machine somewhere on a network.&lt;br /&gt;
&lt;br /&gt;
A transport address consists of three parts: a protocol, a host address, and a process association.  In AS225, the protocol in a transport address is either TCP or UDP.  The host address is dependent upon the protocol, but in AS225, the host address is always the internet address of the host. The process association is also protocol dependent, and in AS225, the process association is a port number.  TCP/IP port numbers are 16-bit integers that are used by the transport protocols on each host to direct network traffic to a specific process running on the machine at that internet address.&lt;br /&gt;
&lt;br /&gt;
The set of port numbers is unique to each protocol.  For example, port number 42 for UDP might belong to a different process than that which belongs to port number 42 for TCP.  Without port numbers, multiple network programs could not run simultaneously.&lt;br /&gt;
&lt;br /&gt;
Transport protocols are analogous in some ways to Amiga Exec devices.  In such an analogy, there is a TCP device and a UDP device.  Each device has about 65,000 units and none of the units can be opened in shared mode.&lt;br /&gt;
&lt;br /&gt;
Once a socket is created, it has to be bound to a transport address.  An application binds an address to a socket in one of two ways.  The binding can be made explicitly by the program to a specific transport address (using the bind() call).  Servers normally use this type of binding.  In this case, the server uses a preset, &amp;quot;well-known&amp;quot; port number in its transport address.  The port number is well-known because all of the server&#039;s possible clients know what that particular server&#039;s port number is.   Because these clients know the server&#039;s port number, the clients can construct a transport address for that particular service on any machine that runs that server.  For example, the default, well-known port number for ftp is 21.  If a client wants to use ftp to transfer files from a machine at the internet address 192.9.210.4, it can use ftp&#039;s port number, the machine&#039;s internet address, and the protocol (ftp uses TCP) to find the ftp server at 192.9.210.4.  As long as there is an ftp server running at 192.9.210.4, the client should have no problem finding the server. This type of socket is analogous to a public message port.&lt;br /&gt;
&lt;br /&gt;
The other way to bind a socket to a transport address is to let the socket library arbitrarily choose a port number for the application.  Normally client applications bind this way because a client does not need a well-known address. The client supplies the server with its transport address when it sets up communication with the server.  This type of socket is analogous to a private [[Exec]] message port.&lt;br /&gt;
&lt;br /&gt;
=== Finding Servers ===&lt;br /&gt;
&lt;br /&gt;
A client &amp;quot;finds&amp;quot; its server by the server&#039;s transport address.  As was mentioned eariler, the transport address consists of a protocol, a host address, and a port number.  For the TCP/IP protocol stack, the protocol is either TCP or UDP.&lt;br /&gt;
&lt;br /&gt;
The next thing the client needs to build after the transport address is an internet address for the server&#039;s machine.  Normally the client obtains that address from the user.  The address can be in one of two forms, an internet address (in dotted decimal notation), or a host name which is an ASCII string that corresponds to the host&#039;s internet address.  If the client gets a host name, it asks the socket.library what internet address corresponds to the host name.&lt;br /&gt;
&lt;br /&gt;
When a server starts, it opens a socket and &#039;&#039;&#039;bind()&#039;&#039;&#039;s that socket using the server&#039;s well-known port number.  There are two ways for the server&#039;s well-known port to become well-known:&lt;br /&gt;
&lt;br /&gt;
# A server&#039;s well-known port number can be hard-coded into both the client and server.  This is recommended for prototyping new programs, but is a Very Bad Thing for programs which will be distributed.  The port number is arbitrary, but must not be one of the reserved ports (see the next section) and must not conflict with a port number already in use.&lt;br /&gt;
&lt;br /&gt;
# Port numbers can be configurable.  All distributed network applications should use configurable port numbers.  In programs written for AS225, you should use the inet:db/services file to configure a port number.  The function &#039;&#039;&#039;getservbyname()&#039;&#039;&#039; accepts a protocol (UDP or TCP) and the name of a well-known server and returns the port number of that service.  This requires you to configure your application by adding an entry to the inet:db/services file on every machine which will use the application.  Many standard Internet applications and Unix remote services are already in the inet:db/services file that comes with AS225.  If your application isn&#039;t already included, your installation scripts should add the entry for your application to inet:db/services.  Offer a default value, but let your user actually pick the number since your port number must not conflict with another (pre-existing) port number.&lt;br /&gt;
&lt;br /&gt;
=== Reserved Ports ===&lt;br /&gt;
&lt;br /&gt;
Port numbers 1-255 are reserved for standard Internet applications (like ftp) and port numbers 256-1023 are reserved for standard Unix remote services (which are often available for machines other than Unix).  You should never choose any of these port numbers for your application unless it is an implementation of a standard for which the port number is reserved.  For more information on port numbering and reserved ports, see the &amp;quot;References&amp;quot; section at the end of this article.&lt;br /&gt;
&lt;br /&gt;
== Skeleton for Applications Using TCP ==&lt;br /&gt;
&lt;br /&gt;
Aside from the special quirks of the socket.library (which is discussed in the &amp;quot;Shared Socket Library&amp;quot; section below), the basic outline of the core of most client/server model applications written with TCP starts with the server:&lt;br /&gt;
&lt;br /&gt;
First, create a socket:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int socket(int family, int type, int protocol)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where family specifies the protocol family (which for the TCP/IP protocol stack is AF_INET from &amp;lt;sys/socket.h&amp;gt;), type specifies the abstract type of communication (either SOCK_STREAM for TCP or SOCK_DGRAM for UDP), and protocol is not generally used in the TCP/IP protocol stack and should be set to zero. If &#039;&#039;&#039;socket()&#039;&#039;&#039; fails, it returns a -1, otherwise it returns a socket descriptor.&lt;br /&gt;
&lt;br /&gt;
Next, get the well-known port number of the server&#039;s service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct servent *getservbyname(char *family, char *service)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where family is one of two strings, &amp;quot;tcp&amp;quot; or &amp;quot;udp&amp;quot;.  The service argument is the name of the service that this server provides.  The function returns a NULL if there was an error.  Otherwise, it returns pointer to a servent structure (from &amp;lt;netdb.h&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct  servent {&lt;br /&gt;
        char   *s_name;      /* official service name */&lt;br /&gt;
        char   **s_aliases;     /* alias list */&lt;br /&gt;
        int    s_port;       /* port # */&lt;br /&gt;
        char   *s_proto;     /* protocol to use */&lt;br /&gt;
    };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, build a sockaddr_in (from &amp;lt;netinet/in.h&amp;gt;) structure using the port number from the s_port field of the servent structure returned by &#039;&#039;&#039;getservbyname()&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct in_addr {&lt;br /&gt;
        u_long s_addr;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    struct sockaddr_in {&lt;br /&gt;
        short     sin_family;        /* address family.  Make this&lt;br /&gt;
                                        AF_INET for TCP/IP */&lt;br /&gt;
        u_short   sin_port;          /* the port number (the value from&lt;br /&gt;
                                        servent.s_port)    */&lt;br /&gt;
        struct    in_addr sin_addr;  /* internet address. For TCP/IP, make&lt;br /&gt;
                                        sin_addr.s_addr INADDR_ANY.  Bind&lt;br /&gt;
                                        will know what to do with this. */&lt;br /&gt;
        char      sin_zero[8];       /* unused by TCP/IP */&lt;br /&gt;
    };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sockaddr_in structure is a TCP/IP specific version of the sockaddr structure. Now give the sockaddr_in to &#039;&#039;&#039;bind()&#039;&#039;&#039; in order to attach a specific address&lt;br /&gt;
to the socket:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int bind(int servsocket, struct sockaddr *name, int namelength)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where, servsocket is the socket descriptor of the socket that needs a specific address, name is a pointer to the sockaddr structure (or, for TCP/IP purposes, a sockaddr_in structure) that describes the address, and namelength is the length of the sockaddr structure.&lt;br /&gt;
&lt;br /&gt;
Once the socket is bound to an address, the server calls &#039;&#039;&#039;listen()&#039;&#039;&#039; to indicate that it is waiting to receive connections.&lt;br /&gt;
&lt;br /&gt;
The server is ready to start its main processing loop.  The &#039;&#039;&#039;accept()&#039;&#039;&#039;&lt;br /&gt;
function waits for and accepts a new connection at a socket:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int accept(int servsocket, struct sockaddr *name, int namelength)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where, servsocket is the socket (descriptor) on which the server is waiting for connections, name points to a buffer where &#039;&#039;&#039;accept()&#039;&#039;&#039; copies a sockaddr structure describing the client that is trying to connect to the server, and namelength is the length of the name buffer.&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;accept()&#039;&#039;&#039; fails, it returns a negative value, otherwise &#039;&#039;&#039;accept()&#039;&#039;&#039; returns a socket descriptor of a new socket that is connected to the client&#039;s socket.&lt;br /&gt;
&lt;br /&gt;
The server can communicate with the client using the new socket while it continues to listen to its original socket for new connections.  The server may serve one client at a time (an iterative server), or give the new socket (the one returned by &#039;&#039;&#039;accept()&#039;&#039;&#039;) to a new process so it can handle talking to the client (a concurrent server).&lt;br /&gt;
&lt;br /&gt;
Setting up the client is similar to setting up the server.  You have to create a socket, find the service&#039;s well-known port number, and initialize a sockaddr_in structure that refers to the server.  Creating the socket and finding the service&#039;s port number are identical to the method described above.&lt;br /&gt;
&lt;br /&gt;
To initialize the sockaddr_in structure, fill in the sin_family (AF_INET) and sin_port (service&#039;s well-known port number) fields as in the server. To fill in the sin_addr field, the client needs to find the internet address of the server&#039;s machine.  The client has to find this from either from an ASCII string of the IP address or the host name (either of which the client will probably get from the user).  The &#039;&#039;&#039;inet_addr()&#039;&#039;&#039; function accepts an ASCII string of a numeric IP address and returns the internet address to put in the sockaddr_in&#039;s sin_addr.s_addr field.  If the client only has the host name, it has to call &#039;&#039;&#039;gethostbyname()&#039;&#039;&#039; to find out the server&#039;s machine address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct hostent *gethostbyname(char *hostname)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The parameter hostname is an ASCII string naming the host.  This function figures out the address of the host (usually by looking it up in the inet:db/hosts file).  This function returns a pointer to a hostent structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    struct  hostent {&lt;br /&gt;
        char   *h_name;       /* official name of host */&lt;br /&gt;
        char   **h_aliases;   /* alias list */&lt;br /&gt;
        int    h_addrtype;    /* host address type */&lt;br /&gt;
        int    h_length;      /* length of address */&lt;br /&gt;
        char   **h_addr_list; /* list of addresses from name server */&lt;br /&gt;
    #define  h_addr  h_addr_list[0]  /* address, for backward&lt;br /&gt;
                                        compatibility */&lt;br /&gt;
    };&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The #defined field, h_addr, contains a pointer to an in_addr structure, which contains the actual host address.  Copy this value into the sockaddr_in.sin_addr.s_addr field.&lt;br /&gt;
&lt;br /&gt;
Now the client needs to establish a connection between itself and the server. It does this with the &#039;&#039;&#039;connect()&#039;&#039;&#039; function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int connect(int clientsocket, struct sockaddr *servname,&lt;br /&gt;
                int namelength)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where, clientsocket is the socket the client created earlier, servname points to the sockaddr_in structure the client just built, and namelength is the length of that sockaddr_in structure.&lt;br /&gt;
&lt;br /&gt;
The server and client communicate using the &#039;&#039;&#039;send()&#039;&#039;&#039; and &#039;&#039;&#039;recv()&#039;&#039;&#039; functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int send(int socket, char *buf, int buflength, int flags)&lt;br /&gt;
    int recv(int socket, char *buf, int buflength, int flags)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where, socket is the socket to send to/receive from, buf is a buffer that&lt;br /&gt;
contains the data to transmit/is a place for &#039;&#039;&#039;recv()&#039;&#039;&#039; to put the data it&lt;br /&gt;
receives, buflength is the length of buf, and flags is beyond the scope of&lt;br /&gt;
this article.  For the moment, you can set it to zero.&lt;br /&gt;
&lt;br /&gt;
The data is a continuous stream, with any meaning assigned by the application protocol (not to be confused with the network protocol).  The data is always received either intact or not at all.  The data almost always gets there unless there is a serious network or host machine problem.  When the communications are finished, both sides &#039;&#039;&#039;s_close()&#039;&#039;&#039; the sockets which were connected.&lt;br /&gt;
&lt;br /&gt;
== Skeleton for Applications Using UDP ==&lt;br /&gt;
&lt;br /&gt;
The basic outline of most client/server model applications written with UDP look something like this:&lt;br /&gt;
&lt;br /&gt;
Server gets a socket with socket(), gets a port number with getservbyname(), builds a sockaddr_in structure describing the server, and gives that structure to bind() in order to attach a specific address to the socket.  It then loops, waiting to recvfrom() any incoming datagrams and responding to any requests in those datagrams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int recvfrom(int socket, char *buf, int buflength, int flags,&lt;br /&gt;
                 struct sockaddr *clientname, int namelength)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The recvfrom() function is similar to the recv() function except it has two extra parameters.  clientname is a buffer for a sockaddr_in structure. When recvfrom() receives a datagram from some application on the network, it fills in clientname with the transport address of that application. The size of the structure is namelength.&lt;br /&gt;
&lt;br /&gt;
The client gets a server hostname from the user, gets a socket(), gets the server&#039;s port number with getservbyname(), builds a sockaddr_in structure describing the server, and sendto()s a datagram to the server&#039;s well-known address:&lt;br /&gt;
&lt;br /&gt;
int sendto(int socket, char *buf, int buflength, int flags, struct sockaddr *servername, int namelength) The client either waits for the server to send back a datagram to the client&#039;s socket, or give up because the server took too much time to reply.  The client does this by calling select().  This function puts the client to sleep until either a particular set of sockets is ready for reading, writing, or exception processing, or after a timeout period has passed without any activity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    int select(int numsocks, fd_set *readsocks, fd_set *writesocks,&lt;br /&gt;
               fd_set *exceptsocks, struct timeval *timeout)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numsocks parameter is 1 plus the number of sockets select() is waiting on. The readsocks, writesocks, and exceptsocks parameters are each a bitmask which tells select() which socket (or sockets) to wait for activity on.  The fd_set structure (defined in &amp;lt;sys/types.h&amp;gt;), is basically a handle to one of these bitmasks.  Programs cannot directly manipulate the bits in these masks. Instead, there are functions to do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    FD_ZERO(struct fd_set *mymask)                /* clear all bits in&lt;br /&gt;
                                                     mymask */&lt;br /&gt;
    FD_SET(int mysocket, struct fd_set *mymask)   /* turn on the bit for&lt;br /&gt;
                                                     mysocket in mymask */&lt;br /&gt;
    FD_CLR(int mysocket, struct fd_set *mymask)   /* turn off the bit for&lt;br /&gt;
                                                     mysocket in mymask */&lt;br /&gt;
    FD_ISSET(int mysocket, struct fd_set *mymask) /* test if mysocket&#039;s bit&lt;br /&gt;
                                                     in mymask is set */&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the purposes of this article, the only relevant mask is readsocks, because the client is only waiting to read from a socket.  Since the client isn&#039;t interested in the other masks, it makes writesocks and exceptsocks NULL.&lt;br /&gt;
&lt;br /&gt;
The last parameter, timeout, sets the maximum amount of time that select() should wait for activity on the sockets it is watching.&lt;br /&gt;
&lt;br /&gt;
When select() returns, its return value is either -1 if it failed, 0 if there was a timeout, or a positive number, which is the number of sockets that became ready.  When select returns, it sets the bits in the bitmasks according to which socket (or sockets) became ready.&lt;br /&gt;
&lt;br /&gt;
When select() returns, if a socket became ready, the client calls recvfrom() to get the datagram the server sent back.  On timeout, the client might try to re-send the datagram since it may have been lost or corrupted.  Datagrams can be also be received in an order different from that in which they were sent and can be received in duplicate.&lt;br /&gt;
&lt;br /&gt;
== Which protocol is right for my application? ==&lt;br /&gt;
&lt;br /&gt;
Generally, if your application requires moving bulk data to far away places, you should be using TCP.  For many other applications, TCP is also appropriate just because its reliability makes it easy to use.  TCP is so easy to use because it provides so much functionality.  The price paid for ease of use is performance.&lt;br /&gt;
&lt;br /&gt;
TCP does a good job of moving bulk data from one side of the planet to another. For data which will only be sent across one physical network (one LAN), or for data sent in small pieces, TCP doesn&#039;t perform so well.  A much more specific set of functionality can always provide better performance than the most general set can. For performance-critical applications which don&#039;t move bulk data, UDP is usually the protocol of choice.  Unfortunately, since UDP doesn&#039;t provide reliability, the application protocol must.  This means a much more complicated application protocol.  It isn&#039;t nearly as bad as it sounds, though, and Stevens (1990) offers two examples.&lt;br /&gt;
&lt;br /&gt;
== The Shared Socket Library ==&lt;br /&gt;
&lt;br /&gt;
The primary goal of the Shared Socket Library is to provide a network API which is as compatible with standard Unix as possible.  This makes porting many applications much easier, but it also creates many little quirks that cannot be &amp;quot;fixed&amp;quot;.  The justification behind this is: faithfully emulating Unix&#039;s quirks is better than creating new ones, since at least you can then write more portable software and only need to remember one set of quirks.  Remember this when you wish that some function returned *void rather than *foo, etc.  Expect to get a few spurious compiler warnings from your nice ANSI &#039;C&#039; compiler.&lt;br /&gt;
&lt;br /&gt;
Many functions in socket.library are only needed by those developers porting standard Unix remote services and probably should not be used by most Amiga applications.  For example, all the functions dealing with user and group IDs belong in this category.&lt;br /&gt;
&lt;br /&gt;
To use the socket.library functions, the first thing you have to do, of course, is open it.  This library is a little unconventional because it returns a different library base for each OpenLibrary() call.  The Shared Socket Library uses different library bases to keep track of some global data for each process that opens it.  If you start a new process with a new context, the new process must open and initialize socket.library. Tasks should not access the socket.library, only processes should.&lt;br /&gt;
&lt;br /&gt;
Before using any other function in the socket.library, you must call its function setup_sockets() to initialize the library:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;    ULONG retval = setup_sockets( UWORD max_sockets, int *errnop );&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where max_sockets is the maximum number of sockets that can be open at once and errnop points to errno, a global integer that provides details about error conditions.  This global value is used extensively by the standard socket functions.  The standard Amiga C startup code (c.o) creates a global variable labelled &amp;quot;errno&amp;quot; which you can use as the global pointer.&lt;br /&gt;
&lt;br /&gt;
The setup_sockets() call must be matched with the cleanup_sockets() call. This takes care of deallocating system resources that setup_sockets() allocates.&lt;br /&gt;
&lt;br /&gt;
The socket.library assumes that all ints are 32-bit values.  If you are using a compiler which doesn&#039;t use 32-bit ints, you must make sure that all ints are converted to longs by your code.&lt;br /&gt;
&lt;br /&gt;
There are a couple of important differences between the AS225 socket.library and the standard Unix implementation.  When writing softwarefor AS225, you cannot use the read(), write(), close(), and ioctl() functions on sockets. These functions come from Unix and apply both to files and sockets.  To avoid confusion, socket.library does not contain these functions.  Use the socket.library functions recv(), send(), s_close(), and s_ioctl() instead.&lt;br /&gt;
&lt;br /&gt;
The standard Unix implementation has a series of get*() functions.  These functions return a pointer to a static buffer.  The buffer returned by a call to getX*() is cleared on the next invocation of getX*().  For example, the buffer pointed to by the return of gethostent() is cleared by another call to gethostent(), gethostbyaddr() or gethostbyname(), but not by a call to getprotoent(), etc.  None of the get*ent(), set*ent() or end*ent() functions should normally be used except for porting existing programs.&lt;br /&gt;
&lt;br /&gt;
The Shared Socket Library contains a function called selectwait().  This function combines the select() function with the exec.library Wait() function so that an Amiga networked application can wait on both Amiga events and network events at the same time.&lt;br /&gt;
&lt;br /&gt;
This article, the examples from the Network Developer&#039;s disk,  and the include files and the Autodocs should be enough to get you started. Writing network applications can be very complex and difficult, but is well worth the effort. This article only introduces you to writing network applications for the Amiga with AS225, and has left a lot unsaid about the socket interface and about networking in general.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
	<entry>
		<id>https://wiki.amigaos.net/w/index.php?title=AmigaGuide_101&amp;diff=4796</id>
		<title>AmigaGuide 101</title>
		<link rel="alternate" type="text/html" href="https://wiki.amigaos.net/w/index.php?title=AmigaGuide_101&amp;diff=4796"/>
		<updated>2013-01-29T18:53:17Z</updated>

		<summary type="html">&lt;p&gt;Eldee Stephens: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;adapted from the original AmigaMail article by Jerry Hartzler&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Compared to other platforms, Amiga-based utilities that display on-line documentation are relatively weak.  Until 1991, Amiga users had to rely on basic text viewing utilities like More, which lack the navigational capabilities of hypertext programs.  In a hypertext environment, when the user wants more information on a subject, the user simply clicks on a word and the hypertext utility automatically cross references the subject.  No type of hypertext-like utility was available on the Amiga--that is, until AmigaGuide came along.&lt;br /&gt;
&lt;br /&gt;
AmigaGuide can display plain ASCII text files and AmigaGuide databases.  An AmigaGuide database is a single file that consists of a set of documents called nodes.  If you were to convert a book into an AmigaGuide database, a convenient way to organize the database is to make each chapter of the book into a node.  Each node may contain references to other nodes (chapters) or databases (other books), using a link.  When a user selects a link--which usually appears in the form of a button within the text--AmigaGuide dereferences the link and displays its node.  This makes it easier for the user to find the information he is looking for because the user no longer needs to search through a document.  AmigaGuide already knows where the information is.&lt;br /&gt;
&lt;br /&gt;
Buttons within AmigaGuide can do other actions as well, such as execute Shell or ARexx commands.  An ARexx port is also built into AmigaGuide providing users the means to support and control the utility.  Therefore, like a book, an AmigaGuide database can display illustrations.  It can go a step beyond by playing sounds and music, and by being truly interactive with the user, able to ask questions and evaluate responses.&lt;br /&gt;
&lt;br /&gt;
This article was written to familiarize you with AmigaGuide and the format of its databases.&lt;br /&gt;
&lt;br /&gt;
== Setting up AmigaGuide ==&lt;br /&gt;
&lt;br /&gt;
AmigaGuide consists of the AmigaGuide utility and an Exec library called amigaguide.library.  AmigaGuide should be placed in the SYS:Utilities drawer and amigaguide.library placed in the Libs: drawer.  As of Release 3, the OS comes with a utility called MultiView that understands and displays AmigaGuide databases. MultiView requires amigaguide.datatype and datatypes.library in order to display AmigaGuide databases.&lt;br /&gt;
&lt;br /&gt;
AmigaGuide can run from the Workbench or the Shell.  To run from Workbench, the default tool of an AmigaGuide database or text icon should be set to &#039;&#039;&#039;AmigaGuide&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
From the Shell, use the following command template:&lt;br /&gt;
&lt;br /&gt;
    AmigaGuide &amp;lt;my_DataBase&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;my_DataBase&amp;gt; is the name of the AmigaGuide database or text file to display.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
    1&amp;gt; AmigaGuide Autodocs&lt;br /&gt;
&lt;br /&gt;
attempts to open the Autodocs database.  In its search for a database, AmigaGuide will first look in the current directory and then through the AmigaGuide path for the database.&lt;br /&gt;
&lt;br /&gt;
The AmigaGuide path is a global environment variable.  AmigaGuide stores its environment variables in the ENV:AmigaGuide directory assigned in RAM:.&lt;br /&gt;
&lt;br /&gt;
The variable named path contains the list of directory names that AmigaGuide will search through when it attempts to open a database. Directory names are separated by a space.  The path variable is set and stored in the ENV:AmigaGuide directory through the use of the AmigaDOS SetEnv command (Note that as of Release 3, if the AmigaGuide directory does not exist, SetEnv will not create it).&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
    1&amp;gt; SetEnv AmigaGuide/Path &amp;quot;Workbench:Autodocs Workbench:Includes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Of course all variables set in RAM: disappear once the computer is turned off.  To prevent this, copy the file ENV:AmigaGuide/Path to the ENVARC:AmigaGuide directory.  The system copies the ENVARC: directory to ENV: upon start-up.&lt;br /&gt;
&lt;br /&gt;
The MultiView utility uses the  amigaguide.datatype which uses this the environment variable as its path.&lt;br /&gt;
&lt;br /&gt;
== The AmigaGuide Window ==&lt;br /&gt;
&lt;br /&gt;
AmigaGuide displays text within an Intuition window.  The window contains scroll bars, buttons and pull-down menus making it easy to browse, search and print text.&lt;br /&gt;
&lt;br /&gt;
[[File:Amigaguide.png]]&lt;br /&gt;
&lt;br /&gt;
Along the top edge of the AmigaGuide window is a row of six navigation buttons:&lt;br /&gt;
&lt;br /&gt;
* Contents: This button displays the Table Of Contents for the current database or node.  See the @NODE and @TOC commands below.&lt;br /&gt;
&lt;br /&gt;
* Index: This button displays the Index for the current database.  See the @INDEX command below.&lt;br /&gt;
&lt;br /&gt;
* Help: By default, this button displays the database named help.guide in the s: directory.  Under 3.0, the database is named amigaguide.guide in the Help:&amp;lt;country&amp;gt;/sys directory.  This database contains help in using AmigaGuide.&lt;br /&gt;
&lt;br /&gt;
* Retrace: This button goes back to the previous node.&lt;br /&gt;
&lt;br /&gt;
* Browse: These buttons step through the nodes in sequential order (the order they appear in the database).&lt;br /&gt;
&lt;br /&gt;
== AmigaGuide Databases ==&lt;br /&gt;
&lt;br /&gt;
Creating an AmigaGuide database is quite simple.  An AmigaGuide database is basically an ASCII text file, embedded with commands to tell AmigaGuide what to do.  Let&#039;s take a look at the commands used in AmigaGuide and then make up a simple database.&lt;br /&gt;
&lt;br /&gt;
There are three types of AmigaGuide commands.  Database commands break up a document into nodes.  Node commands set attributes within a node.  Action commands are only found within a special node command called a &#039;&#039;&#039;link point&#039;&#039;&#039;.  As the name implies, action commands perform some action.&lt;br /&gt;
&lt;br /&gt;
=== Database Commands ===&lt;br /&gt;
&lt;br /&gt;
Database commands should not be used within the nodes themselves. They must start in the first column of a line.  If a line in an AmigaGuide database begins with an at (@) sign, then AmigaGuide interprets the line as a command.  Although the AmigaGuide commands appear here in upper-case, AmigaGuide commands are not case sensitive.&lt;br /&gt;
&lt;br /&gt;
* @DATABASE &amp;lt;name&amp;gt; - This command identifies a file as an AmigaGuide database.  It must be the first line of the database.&lt;br /&gt;
&lt;br /&gt;
* @NODE &amp;lt;name&amp;gt; &amp;lt;title&amp;gt; - This command indicates the start of a node. The first node of a database should be named MAIN.  MAIN is typically the master table of contents for the database (see the @TOC node command in the next section).  When AmigaGuide displays the node, it displays &amp;lt;title&amp;gt; in the window&#039;s title bar.  If there are any spaces in the &amp;lt;title&amp;gt;, it must be in quotes.  A node name cannot contain spaces, tabs, colons (&#039;:&#039;) or slants (&#039;/&#039;).&lt;br /&gt;
&lt;br /&gt;
* @DNODE &amp;lt;name&amp;gt; - This command indicates the start of a dynamic node. Dynamic nodes are beyond the scope of this introductory article and therefore are not discussed here.&lt;br /&gt;
&lt;br /&gt;
* @INDEX &amp;lt;node name&amp;gt; - This command tells AmigaGuide which node to use as the index for the database.  When the user hits the &#039;&#039;&#039;Index&#039;&#039;&#039; button at the top of the AmigaGuide window, AmigaGuide will display the node specified by this command.  The node can be in another database.  If the node is in another database, the node name is the file name of the database followed by a slant (`/`), followed by the name of the node in the other database.  For example, to access the MAIN node in another database called other_database, the link point looks like this:&lt;br /&gt;
&lt;br /&gt;
    @{&amp;quot;my label&amp;quot; LINK other_database/MAIN}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The name of the other database can contain a full path to the other database.  If it doesn&#039;t, AmigaGuide will search the AmigaGuide path for the other database.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* @REMARK &amp;lt;remark&amp;gt; - This commands lets you add programmer remarks to a database.  AmigaGuide ignores the remarks.&lt;br /&gt;
&lt;br /&gt;
=== Node Commands ===&lt;br /&gt;
&lt;br /&gt;
These commands are only valid within a @NODE.  They must start in the&lt;br /&gt;
first column of a line unless otherwise noted.&lt;br /&gt;
&lt;br /&gt;
* @ENDNODE &amp;lt;name&amp;gt; - This command ends a node.&lt;br /&gt;
&lt;br /&gt;
* @TITLE &amp;lt;title&amp;gt; - AmigaGuide displays &amp;lt;title&amp;gt; in the node&#039;s window title bar.  It must start at the beginning of a line.  This command isn&#039;t necessary if you use the &amp;lt;title&amp;gt; option in @NODE.&lt;br /&gt;
&lt;br /&gt;
* @TOC &amp;lt;node name&amp;gt; - This command tells AmigaGuide which node to display when the user hits the Contents button while displaying this node.  If a node does not have a @TOC command, the table of contents defaults to MAIN.  The &amp;lt;node name&amp;gt; can be in another database.  See the @INDEX command in the [[#Database Commands|Database Commands]] section for more information on the format of &amp;lt;node name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* @PREV &amp;lt;node name&amp;gt; - The Browse buttons can be reprogrammed so as not to step through the nodes in sequential order.  For example, if this command appears in a @NODE, AmigaGuide  will display the &amp;lt;node name&amp;gt; node when the user selects the &#039;&#039;&#039;&amp;lt; Browse&#039;&#039;&#039; button while in the current node.  The &amp;lt;node name&amp;gt; can be in another database.  See the @INDEX command in the [[#Database Commands|Database Commands]] section for more information on the format of &amp;lt;node name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* @NEXT &amp;lt;node name&amp;gt; - Similar to @PREV but will display the &amp;lt;node name&amp;gt; node when the user selects &#039;&#039;&#039;Browse &amp;gt;&#039;&#039;&#039; button while in the current node.  The &amp;lt;node name&amp;gt; can be in another database.  See the @INDEX command in the [[#Database Commands|Database Commands]] section for more information on the format of &amp;lt;node name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* @{&amp;quot;&amp;lt;label&amp;gt;&amp;quot; &amp;lt;action command&amp;gt;} - This command is referred to as a link point.  AmigaGuide makes the string &amp;lt;label&amp;gt; into a button.  The &amp;lt;label&amp;gt; must be enclosed by quotes.  When the user hits that button, AmigaGuide carries out &amp;lt;action command&amp;gt; (see the next section of this article for a description of action commands).  A link point does not have to start in the first column, it can appear anywhere on a line.&lt;br /&gt;
&lt;br /&gt;
=== Action Commands ===&lt;br /&gt;
&lt;br /&gt;
These commands are for use with the link point command described in the [[#Node Commands|Node Commands]] section of this article.&lt;br /&gt;
&lt;br /&gt;
* LINK &amp;lt;node name&amp;gt; &amp;lt;line#&amp;gt; - This command loads and displays the &amp;lt;node name&amp;gt; node at the line number specified in &amp;lt;line #&amp;gt;.  The &amp;lt;line #&amp;gt; parameter is optional and it defaults to zero.  The node can be in another database.  The &amp;lt;node name&amp;gt; can be in another database.  See the @INDEX command in the [[#Database Commands|Database Commands]] section for more information on the format of &amp;lt;node name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The &amp;lt;line #&amp;gt; parameter is optional and it defaults to zero.  The default line number is line zero.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* RX &amp;lt;ARexx command&amp;gt; - This commands executes the ARexx macro named in &amp;lt;ARexx command&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* RXS &amp;lt;command&amp;gt; - This commands executes the ARexx string file named in &amp;lt;command&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* SYSTEM &amp;lt;command&amp;gt; - This commands executes the AmigaDOS command named in &amp;lt;command&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* QUIT - When AmigaGuide encounters this command is shuts down the current database.&lt;br /&gt;
&lt;br /&gt;
== A Working Database ==&lt;br /&gt;
&lt;br /&gt;
As an example, Let&#039;s make the text file below into a simple AmigaGuide database.  The simple database will consists of a single node.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt; What is a user interface? This sweeping phrase covers all&lt;br /&gt;
  aspects of communication between the user and the computer. It&lt;br /&gt;
  includes the innermost mechanisms of the computer and rises to&lt;br /&gt;
  the height of defining a philosophy to guide the interaction&lt;br /&gt;
  between human and machine.  Intuition is, above all else, a&lt;br /&gt;
  philosophy turned into software.  See the Amiga ROM Kernel&lt;br /&gt;
  Reference Manual: Libraries for more information.&lt;br /&gt;
&lt;br /&gt;
  Intuition screens are the basis of any display Intuition can&lt;br /&gt;
  make. Screens determine the fundamental characteristics of the&lt;br /&gt;
  display such as the resolution and palette and they set up the&lt;br /&gt;
  environment for multiple, overlapping windows that makes it&lt;br /&gt;
  possible for each application to have its own separate visual&lt;br /&gt;
  context.&lt;br /&gt;
&lt;br /&gt;
  Windows are rectangular display areas that open on screens.&lt;br /&gt;
  The window acts as a virtual terminal allowing a program to&lt;br /&gt;
  interact with the user as if it had the entire display all to&lt;br /&gt;
  itself. Windows are moveable and can be positioned anywhere&lt;br /&gt;
  within the screen on which they exist.  Windows may also have a&lt;br /&gt;
  title and borders containing various gadgets for controlling&lt;br /&gt;
  the window.&lt;br /&gt;
&lt;br /&gt;
  Gadgets are software controls symbolized by an image that the&lt;br /&gt;
  user can operate with the mouse or keyboard.  They are the&lt;br /&gt;
  Amiga&#039;s equivalent of buttons, knobs and dials.&lt;br /&gt;
&lt;br /&gt;
  Menus are command and option lists associated with an&lt;br /&gt;
  application window that the user can bring into view at any&lt;br /&gt;
  time.  These lists provide the user with a simple way to access&lt;br /&gt;
  features of the application without having to remember or enter&lt;br /&gt;
  complex character-based command strings.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If AmigaGuide displayed the file above, it would appear without any buttons linking it to text files or databases.  To mark this file as an AmigaGuide database, add the @DATABASE command.  As mentioned earlier, it must start on the first line in the first column of the file.&lt;br /&gt;
&lt;br /&gt;
Since there will be no index for this database, the next command can be a @NODE.  For AmigaGuide to open a database, it must contain a node.  Since this will be the first node in the database, it should be named MAIN.&lt;br /&gt;
&lt;br /&gt;
At the bottom of the file, on a separate line, add the @ENDNODE command.  This tells AmigaGuide that the current node ends here.  All nodes must contain an @ENDNODE command.&lt;br /&gt;
&lt;br /&gt;
This is what we have so far:&lt;br /&gt;
&lt;br /&gt;
    @DATABASE&lt;br /&gt;
    @NODE MAIN&lt;br /&gt;
    What is a user interface? This sweeping phrase covers all&lt;br /&gt;
            .&lt;br /&gt;
            .&lt;br /&gt;
            .&lt;br /&gt;
    complex character-based command strings.&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
The file is now an AmigaGuide database.  However, since the database has only one node and has no link points, the database will still appear as plain text.  Also, AmigaGuide will ghost all of the navigation buttons.  The database can be broken into smaller nodes if desired.  Normally such a short file would not need to be broken up, but it makes a good example.&lt;br /&gt;
&lt;br /&gt;
One important issue to consider while designing an AmigaGuide database is how to lay it out.  Some thought should go into the break-up of a document into manageable nodes, and how these nodes relate--and eventually link--to one another.  Each node should consist of information dealing with one topic and should contain links to other related nodes.&lt;br /&gt;
&lt;br /&gt;
Notice that the example text is about Intuition, but each paragraph discusses a different topic of Intuition.  The first paragraph is an overview followed by four paragraphs: one each on screens, windows, gadgets and menus.  This organization makes it convenient to make each paragraph a node with a table of contents in the beginning: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;    Intuition Table of Contents&lt;br /&gt;
&lt;br /&gt;
    Introduction&lt;br /&gt;
    Screens&lt;br /&gt;
    Windows&lt;br /&gt;
    Gadgets&lt;br /&gt;
    Menus&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since the Table of Contents node is first, it is the MAIN node. The other paragraphs follow the MAIN node, each in their own separate node.  So as not to confuse AmigaGuide, each node within a database must have a different name.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;    @DATABASE&lt;br /&gt;
    @NODE MAIN &amp;quot;Intuition Table of Contents&amp;quot;&lt;br /&gt;
    Introduction&lt;br /&gt;
    Screens&lt;br /&gt;
    Windows&lt;br /&gt;
    Gadgets&lt;br /&gt;
    Menus&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Intro &amp;quot;Introduction&amp;quot;&lt;br /&gt;
    What is a user interface? This sweeping phrase...&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Screen &amp;quot;Screens&amp;quot;&lt;br /&gt;
    Intuition screens are the basis of any display...&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Window &amp;quot;Windows&amp;quot;&lt;br /&gt;
    Windows are rectangular display areas that open...&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Gadget &amp;quot;Gadgets&amp;quot;&lt;br /&gt;
    Gadgets are software controls symbolized by an...&lt;br /&gt;
    @ENDNODE&lt;br /&gt;
&lt;br /&gt;
    @NODE Menu &amp;quot;Menus&amp;quot;&lt;br /&gt;
    Menus are command and option lists associated...&lt;br /&gt;
    @ENDNODE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When AmigaGuide loads the database above, AmigaGuide displays the MAIN node with the title string Intuition Table of Contents in the window&#039;s title bar.  As the user clicks the Browse buttons at the top of the AmigaGuide window, AmigaGuide steps through each node in the database, displaying each paragraph.  Notice that each node in the database uses the window title parameter.  As the Browse buttons step through the database displaying the different nodes in sequence, the AmigaGuide window title changes to match the title from the current node.&lt;br /&gt;
&lt;br /&gt;
An important limitation of the database above is the only way to access the different nodes is using the ``Browse&#039;&#039; button to step through them in the order they appear in the database.  The database still has no buttons within the nodes to link to other nodes.&lt;br /&gt;
&lt;br /&gt;
== Using Link Points ==&lt;br /&gt;
&lt;br /&gt;
The link point command is probably the most commonly used command in a database.  With it you can make a word in one node reference another node.  For example, in the Table of Contents node from the previous example, you can make each entry from the table into a button that references its respective node.&lt;br /&gt;
&lt;br /&gt;
The template for a link point is:&lt;br /&gt;
&lt;br /&gt;
    @{&amp;lt;label&amp;gt; &amp;lt;action command&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
The label parameter is the word or phrase in a database that is made into a button, and the action command is the action AmigaGuide takes when the user clicks the button.  For our example, we want each topic in the table of contents to be a label and the action command for each to be a LINK command.  The LINK command loads and displays another node.&lt;br /&gt;
&lt;br /&gt;
    @{&amp;lt;label&amp;gt; LINK &amp;lt;name&amp;gt; &amp;lt;line#&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
For example, if you change the word Introduction from the Table of Contents node into a link point it would look like this:&lt;br /&gt;
&lt;br /&gt;
    @{&amp;quot;Introduction&amp;quot; LINK Intro}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;label&amp;gt; string must be in quotes.  If you load the database into AmigaGuide after making the change above, the word Introduction would appear as a button on the Table of Contents screen.  If the user clicks on the Introduction button, AmigaGuide displays the node named Intro.&lt;br /&gt;
&lt;br /&gt;
Unlike other AmigaGuide commands, link points do not need to start in the first column.  This makes it easy to indent a button from the left edge of the window and also to embed a button within a block of text.&lt;br /&gt;
&lt;br /&gt;
Link points can also link to nodes in other databases.  As an example, consider the following excerpt from the Intro node:&lt;br /&gt;
&lt;br /&gt;
  philosophy turned into software.  See the Amiga ROM Kernel Reference&lt;br /&gt;
  Manual: Libraries for more information.&lt;br /&gt;
&lt;br /&gt;
If an AmigaGuide database of Amiga ROM Kernel Reference Manual: Libraries was readily available,  it would be convenient if the word &#039;&#039;Libraries&#039;&#039; from the excerpt was a button, linking the word &#039;&#039;Libraries&#039;&#039; directly to the Libraries manual database.  If the Libraries manual database was named Libraries_Manual and it was in the current AmigaGuide path, to make the word Libraries from the Intro node into a link point that opens the Libraries_Manual database, change the excerpt above to the following:&lt;br /&gt;
&lt;br /&gt;
  philosophy turned into software.  See the Amiga ROM Kernel&lt;br /&gt;
  Reference Manual: @{&amp;quot;Libraries&amp;quot; LINK Libraries_Manual/Intro} for more information.&lt;br /&gt;
&lt;br /&gt;
In the example above, when the user selects the Libraries button, AmigaGuide will try to display the MAIN node from the database called Libraries_Manual.  AmigaGuide will first look for Libraries_Manual in the directory where the example database resides.  If it&#039;s not there, AmigaGuide searches through its path for the database.  Alternately, you can supply a full path name to Libraries_Manual.&lt;br /&gt;
&lt;br /&gt;
A link point can also be used to display a picture.  For example, to display an ILBM image of a Workbench screen from the Screen node, use the SYSTEM action command:&lt;br /&gt;
&lt;br /&gt;
    @{&amp;quot;Picture of a Workbench Screen&amp;quot; SYSTEM sys:utilities/Display sys:Workbench.pic}&lt;br /&gt;
&lt;br /&gt;
From the command above, when the user click the &#039;&#039;Picture of a Workbench Screen&#039;&#039; button, SYSTEM executes the Display utility. Display shows the ILBM file sys:Workbench.pic.  Because Display is merely a shell command, you can substitute your own ILBM viewer for Display.&lt;br /&gt;
&lt;br /&gt;
Below is the finished database with a few more interactive link points.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;  @DATABASE&lt;br /&gt;
  @NODE MAIN &amp;quot;Intuition Table of Contents&amp;quot;&lt;br /&gt;
  @{&amp;quot;Introduction&amp;quot; LINK Intro}&lt;br /&gt;
  @{&amp;quot;Screens&amp;quot; LINK Screen}&lt;br /&gt;
  @{&amp;quot;Windows&amp;quot; LINK Window}&lt;br /&gt;
  @{&amp;quot;Gadgets&amp;quot; LINK Gadget}&lt;br /&gt;
  @{&amp;quot;Menus&amp;quot; LINK Menu}&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Intro &amp;quot;Introduction&amp;quot;&lt;br /&gt;
  What is a user interface? This sweeping phrase covers all&lt;br /&gt;
  aspects of communication between the user and the computer.  It&lt;br /&gt;
  includes the innermost mechanisms of the computer and rises to&lt;br /&gt;
  the height of defining a philosophy to guide the interaction&lt;br /&gt;
  between human and machine.  Intuition is, above all else, a&lt;br /&gt;
  philosophy turned into software.  See the Amiga ROM Kernel&lt;br /&gt;
  Reference Manual: @{&amp;quot;Libraries&amp;quot; LINK Libraries_Manual/Intro} for more information.&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Screen &amp;quot;Screens&amp;quot;&lt;br /&gt;
  Intuition screens are the basis of any display Intuition can&lt;br /&gt;
  make.  Screens determine the fundamental characteristics of the&lt;br /&gt;
  display such as the resolution and palette and they set up the&lt;br /&gt;
  environment for multiple, overlapping @{&amp;quot;windows&amp;quot; LINK Window} that makes it&lt;br /&gt;
  possible for each application to have its own separate visual&lt;br /&gt;
  context.&lt;br /&gt;
&lt;br /&gt;
  @{&amp;quot;Picture of a Workbench Screen&amp;quot; SYSTEM sys:utilities/Display sys:Workbench.pic}&lt;br /&gt;
&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Window &amp;quot;Windows&amp;quot;&lt;br /&gt;
  Windows are rectangular display areas that open on @{&amp;quot;screens&amp;quot; LINK screen}.  The&lt;br /&gt;
  window acts as a virtual terminal allowing a program to interact&lt;br /&gt;
  with the user as if it had the entire display all to itself.&lt;br /&gt;
  Windows are moveable and can be positioned anywhere within the&lt;br /&gt;
  screen on which they exist.  Windows may also have a title and&lt;br /&gt;
  borders containing various @{&amp;quot;gadgets&amp;quot; LINK Gadget} for controlling the window.&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Gadget &amp;quot;Gadgets&amp;quot;&lt;br /&gt;
  Gadgets are software controls symbolized by an image that the&lt;br /&gt;
  user can operate with the mouse or keyboard.  They are the&lt;br /&gt;
  Amiga&#039;s equivalent of buttons, knobs and dials.&lt;br /&gt;
  @ENDNODE&lt;br /&gt;
&lt;br /&gt;
  @NODE Menu &amp;quot;Menus&amp;quot;&lt;br /&gt;
  Menus are command and option lists associated with an&lt;br /&gt;
  application @{&amp;quot;window&amp;quot; LINK Window} that the user can bring into view at any&lt;br /&gt;
  time.  These lists provide the user with a simple way to access&lt;br /&gt;
  features of the application without having to remember or enter&lt;br /&gt;
  complex character-based command strings.&lt;br /&gt;
  @ENDNODE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although this is a small sample and only a few basic commands are used, it is a good start to making your own AmigaGuide database.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
To make it easier to create a bug-free database, below is a list of common mistakes made when editing an AmigaGuide database.&lt;br /&gt;
&lt;br /&gt;
As with any type of programming, errors are bound to crop up.  One of the most common mistakes is spelling errors.  Always double check your spelling of commands.  Also, make sure all commands that should begin in the first column do so.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom:  AmigaGuide displays a database as a text file.  For example, instead of a button, AmigaGuide displays the link point command that was supposed to display the button.&lt;br /&gt;
*Cure: AmigaGuide does not think the file is an AmigaGuide database. Check that the first line of the file is the @DATABASE command and that it starts in the first column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: When displaying a database node, AmigaGuide displays nothing in its window.&lt;br /&gt;
*Cure: Either the @ENDNODE command is not present in the node or the @ENDCODE command does not start in the first column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide does not display a button or its label.&lt;br /&gt;
*Cure: The &amp;lt;label&amp;gt; parameter in the link point is missing or not enclosed in quotes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: When the user selects a button, AmigaGuide flashes the screen and displays the error message &amp;quot;Couldn&#039;t locate &amp;lt;node&amp;gt;&amp;quot;.&lt;br /&gt;
*Cure: AmigaGuide cannot locate the node specified in the button&#039;s link point command.  If the link point command points to a node in another database, the database must be in the AmigaGuide path or the node must contain the full path name to the database.  The link point command also require a NODE name as the last parameter in the path separated by a slant (/).  If the file is only text and not an AmigaGuide database, its path name should end with &#039;&#039;&#039;/MAIN&#039;&#039;&#039;.  If a node or file has any spaces in its name, the path name must be enclosed within quotes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide flashes the screen when a button is selected but displays no error message.&lt;br /&gt;
*Cure: AmigaGuide does not recognize the &amp;lt;action command&amp;gt; parameter in the link point, or AmigaGuide cannot locate the specified node (see the cure above).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide does not fully display a button.&lt;br /&gt;
*Cure: Check that all of the link points end with a closing brace (}). Note that there is a bug in AmigaGuide that can crash the system if a link point does not end with a closing brace.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide will not load a database and displays a &amp;quot;Can&#039;t find Node&amp;quot; requester.&lt;br /&gt;
*Cure: All databases must contain at least one node.  If the file is short, all the text can be in one node called &#039;&#039;&#039;MAIN&#039;&#039;&#039;.  If you do not wish to make the file a database at all, remove the @DATABASE command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Symptom: AmigaGuide does not allow the the user to browse the database to its end.  It either stops browsing before reaching the last node, or it gets caught in an endless loop, cycling through a number of nodes.&lt;br /&gt;
*Cure: At least two nodes within a single database have the same name. Every node must have a different name unless they are in separate databases.&lt;/div&gt;</summary>
		<author><name>Eldee Stephens</name></author>
	</entry>
</feed>