aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2015-09-01 17:32:34 +0200
committerIngela Anderton Andin <[email protected]>2015-09-08 11:20:03 +0200
commit474dfaf674ac8746367ff856534ef0b63afc6307 (patch)
treebf679f2886090c9f8162a7f9fec73c3e9582e662 /lib/inets
parent4e81ae08256cd663d77bdad270a111996b7ebbe1 (diff)
downloadotp-474dfaf674ac8746367ff856534ef0b63afc6307.tar.gz
otp-474dfaf674ac8746367ff856534ef0b63afc6307.tar.bz2
otp-474dfaf674ac8746367ff856534ef0b63afc6307.zip
inets: Align with alphabetical order and clean local anchor handling
Functions in the same module can be referenced as #Function-Arity, no need to make special markers for them.
Diffstat (limited to 'lib/inets')
-rw-r--r--lib/inets/doc/src/httpc.xml255
-rw-r--r--lib/inets/doc/src/httpd.xml41
-rw-r--r--lib/inets/doc/src/httpd_util.xml109
-rw-r--r--lib/inets/doc/src/inets.xml22
-rw-r--r--lib/inets/doc/src/mod_auth.xml220
-rw-r--r--lib/inets/doc/src/mod_security.xml50
-rw-r--r--lib/inets/doc/src/tftp.xml300
7 files changed, 420 insertions, 577 deletions
diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml
index 70400d1ca7..9a24226e78 100644
--- a/lib/inets/doc/src/httpc.xml
+++ b/lib/inets/doc/src/httpc.xml
@@ -146,11 +146,112 @@
<p>The client can be stopped using <c>inets:stop(httpc, Pid)</c> or
<c>inets:stop(httpc, Profile)</c>.</p>
-
- <marker id="request1"></marker>
</section>
<funcs>
+
+ <func>
+ <name>cancel_request(RequestId) -></name>
+ <name>cancel_request(RequestId, Profile) -> ok</name>
+ <fsummary>Cancels an asynchronous HTTP request.</fsummary>
+ <type>
+ <v>RequestId = request_id() - A unique identifier as returned
+ by request/4</v>
+ <v>Profile = profile() | pid()</v>
+ <d>When started <c>stand_alone</c>.</d>
+ </type>
+ <desc>
+ <p>Cancels an asynchronous HTTP request. Notice that this does not guarantee
+ that the request response is not delivered. Because it is asynchronous,
+ the request can already have been completed when the cancellation arrives.
+ </p>
+ </desc>
+ </func>
+
+ <func>
+ <name>cookie_header(Url) -> </name>
+ <name>cookie_header(Url, Profile | Opts) -> header() | {error, Reason}</name>
+ <name>cookie_header(Url, Opts, Profile) -> header() | {error, Reason}</name>
+ <fsummary>Returns the cookie header that would have been sent when
+ making a request to URL using the profile <c>Profile</c>.</fsummary>
+ <type>
+ <v>Url = url()</v>
+ <v>Opts = [cookie_header_opt()]</v>
+ <v>Profile = profile() | pid()</v>
+ <d>When started <c>stand_alone</c>.</d>
+ <v>cookie_header_opt() = {ipv6_host_with_brackets, boolean()}</v>
+ </type>
+ <desc>
+ <p>Returns the cookie header that would have been sent
+ when making a request to <c>Url</c> using profile <c>Profile</c>.
+ If no profile is specified, the default profile is used.</p>
+ <p>Option <c>ipv6_host_with_bracket</c> deals with how to
+ parse IPv6 addresses. For details,
+ see argument <c>Options</c> of
+ <seealso marker="#request-4">request/4,5</seealso>.</p>
+ </desc>
+ </func>
+
+ <func>
+ <name>get_options(OptionItems) -> {ok, Values} | {error, Reason}</name>
+ <name>get_options(OptionItems, Profile) -> {ok, Values} | {error, Reason}</name>
+ <fsummary>Gets the currently used options.</fsummary>
+ <type>
+ <v>OptionItems = all | [option_item()]</v>
+ <v>option_item() = proxy |
+ https_proxy
+ max_sessions |
+ keep_alive_timeout |
+ max_keep_alive_length |
+ pipeline_timeout |
+ max_pipeline_length |
+ cookies |
+ ipfamily |
+ ip |
+ port |
+ socket_opts |
+ verbose</v>
+ <v>Profile = profile() | pid(</v>
+ <d>When started <c>stand_alone</c>.</d>
+ <v>Values = [{option_item(), term()}]</v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p>Retrieves the options currently used by the client.</p>
+ </desc>
+ </func>
+
+ <func>
+ <name>info() -> list()</name>
+ <name>info(Profile) -> list()</name>
+ <fsummary>Produces a list of miscellaneous information.</fsummary>
+ <type>
+ <v>Profile = profile() | pid()</v>
+ <d>When started <c>stand_alone</c>.</d>
+ </type>
+ <desc>
+ <p>Produces a list of miscellaneous information.
+ Intended for debugging.
+ If no profile is specified, the default profile is used.</p>
+ </desc>
+ </func>
+
+
+ <func>
+ <name>reset_cookies() -> void()</name>
+ <name>reset_cookies(Profile) -> void()</name>
+ <fsummary>Resets the cookie database.</fsummary>
+ <type>
+ <v>Profile = profile() | pid()</v>
+ <d>When started <c>stand_alone</c>.</d>
+ </type>
+ <desc>
+ <p>Resets (clears) the cookie database for the specified
+ <c>Profile</c>. If no profile is specified the default profile
+ is used.</p>
+ </desc>
+ </func>
+
<func>
<name>request(Url) -> </name>
<name>request(Url, Profile) -> {ok, Result} | {error, Reason}</name>
@@ -166,8 +267,6 @@
</type>
<desc>
<p>Equivalent to <c>httpc:request(get, {Url, []}, [], [])</c>.</p>
-
- <marker id="request2"></marker>
</desc>
</func>
@@ -353,7 +452,7 @@
<p>Socket options to be used for this and subsequent
requests.</p>
<p>Overrides any value set by function
- <seealso marker="#set_options">set_options</seealso>.</p>
+ <seealso marker="#set_options-1">set_options</seealso>.</p>
<p>The validity of the options is <em>not</em>
checked in any way.</p>
<p>Notice that this can change the socket behavior
@@ -361,7 +460,7 @@
for an already existing one, and therefore an already connected
request handler.</p>
<p>By default the socket options set by function
- <seealso marker="#set_options">set_options/1,2</seealso>
+ <seealso marker="#set_options-1">set_options/[1,2]</seealso>
are used when establishing a connection.</p>
</item>
@@ -418,31 +517,10 @@
</item>
</taglist>
-
- <marker id="cancel_request"></marker>
- </desc>
- </func>
-
- <func>
- <name>cancel_request(RequestId) -></name>
- <name>cancel_request(RequestId, Profile) -> ok</name>
- <fsummary>Cancels an asynchronous HTTP request.</fsummary>
- <type>
- <v>RequestId = request_id() - A unique identifier as returned
- by request/4</v>
- <v>Profile = profile() | pid()</v>
- <d>When started <c>stand_alone</c>.</d>
- </type>
- <desc>
- <p>Cancels an asynchronous HTTP request. Notice that this does not guarantee
- that the request response is not delivered. Because it is asynchronous,
- the request can already have been completed when the cancellation arrives.
- </p>
-
- <marker id="set_options"></marker>
</desc>
</func>
+
<func>
<name>set_options(Options) -> </name>
<name>set_options(Options, Profile) -> ok | {error, Reason}</name>
@@ -554,56 +632,7 @@
<marker id="get_options"></marker>
</desc>
</func>
-
- <func>
- <name>get_options(OptionItems) -> {ok, Values} | {error, Reason}</name>
- <name>get_options(OptionItems, Profile) -> {ok, Values} | {error, Reason}</name>
- <fsummary>Gets the currently used options.</fsummary>
- <type>
- <v>OptionItems = all | [option_item()]</v>
- <v>option_item() = proxy |
- https_proxy
- max_sessions |
- keep_alive_timeout |
- max_keep_alive_length |
- pipeline_timeout |
- max_pipeline_length |
- cookies |
- ipfamily |
- ip |
- port |
- socket_opts |
- verbose</v>
- <v>Profile = profile() | pid(</v>
- <d>When started <c>stand_alone</c>.</d>
- <v>Values = [{option_item(), term()}]</v>
- <v>Reason = term()</v>
- </type>
- <desc>
- <p>Retrieves the options currently used by the client.</p>
-
- <marker id="stream_next"></marker>
- </desc>
- </func>
-
- <func>
- <name>stream_next(Pid) -> ok</name>
- <fsummary>Triggers the next message to be streamed, that is,
- the same behavior as active ones for sockets.
- </fsummary>
- <type>
- <v>Pid = pid()</v>
- <d>As received in the <c>stream_start message</c></d>
- </type>
- <desc>
- <p>Triggers the next message to be streamed, that is,
- the same behavior as active ones for sockets.</p>
-
- <marker id="verify_cookies"></marker>
- <marker id="store_cookies"></marker>
- </desc>
- </func>
-
+
<func>
<name>store_cookies(SetCookieHeaders, Url) -> </name>
<name>store_cookies(SetCookieHeaders, Url, Profile) -> ok | {error, Reason}</name>
@@ -620,56 +649,27 @@
in the client profile cookie database.
Call this function if option <c>cookies</c> is set to <c>verify</c>.
If no profile is specified, the default profile is used.</p>
-
- <marker id="cookie_header"></marker>
- </desc>
- </func>
-
- <func>
- <name>cookie_header(Url) -> </name>
- <name>cookie_header(Url, Profile | Opts) -> header() | {error, Reason}</name>
- <name>cookie_header(Url, Opts, Profile) -> header() | {error, Reason}</name>
- <fsummary>Returns the cookie header that would have been sent when
- making a request to URL using the profile <c>Profile</c>.</fsummary>
- <type>
- <v>Url = url()</v>
- <v>Opts = [cookie_header_opt()]</v>
- <v>Profile = profile() | pid()</v>
- <d>When started <c>stand_alone</c>.</d>
- <v>cookie_header_opt() = {ipv6_host_with_brackets, boolean()}</v>
- </type>
- <desc>
- <p>Returns the cookie header that would have been sent
- when making a request to <c>Url</c> using profile <c>Profile</c>.
- If no profile is specified, the default profile is used.</p>
- <p>Option <c>ipv6_host_with_bracket</c> deals with how to
- parse IPv6 addresses. For details,
- see argument <c>Options</c> of
- <seealso marker="#request2">request/4,5</seealso>.</p>
-
- <marker id="reset_cookies"></marker>
</desc>
</func>
-
<func>
- <name>reset_cookies() -> void()</name>
- <name>reset_cookies(Profile) -> void()</name>
- <fsummary>Resets the cookie database.</fsummary>
+ <name>stream_next(Pid) -> ok</name>
+ <fsummary>Triggers the next message to be streamed, that is,
+ the same behavior as active ones for sockets.
+ </fsummary>
<type>
- <v>Profile = profile() | pid()</v>
- <d>When started <c>stand_alone</c>.</d>
+ <v>Pid = pid()</v>
+ <d>As received in the <c>stream_start message</c></d>
</type>
<desc>
- <p>Resets (clears) the cookie database for the specified
- <c>Profile</c>. If no profile is specified the default profile
- is used.</p>
+ <p>Triggers the next message to be streamed, that is,
+ the same behavior as active ones for sockets.</p>
- <marker id="which_cookies"></marker>
+ <marker id="verify_cookies"></marker>
+ <marker id="store_cookies"></marker>
</desc>
</func>
-
-
+
<func>
<name>which_cookies() -> cookies()</name>
<name>which_cookies(Profile) -> cookies()</name>
@@ -686,8 +686,6 @@
<p>Produces a list of the entire cookie database.
Intended for debugging/testing purposes.
If no profile is specified, the default profile is used.</p>
-
- <marker id="which_sessions"></marker>
</desc>
</func>
@@ -707,25 +705,10 @@
<p>Produces a slightly processed dump of the session
database. It is intended for debugging.
If no profile is specified, the default profile is used.</p>
-
- <marker id="info"></marker>
</desc>
</func>
- <func>
- <name>info() -> list()</name>
- <name>info(Profile) -> list()</name>
- <fsummary>Produces a list of miscellaneous information.</fsummary>
- <type>
- <v>Profile = profile() | pid()</v>
- <d>When started <c>stand_alone</c>.</d>
- </type>
- <desc>
- <p>Produces a list of miscellaneous information.
- Intended for debugging.
- If no profile is specified, the default profile is used.</p>
- </desc>
- </func>
+
</funcs>
<section>
diff --git a/lib/inets/doc/src/httpd.xml b/lib/inets/doc/src/httpd.xml
index 470359d0b2..b6d3c5d39b 100644
--- a/lib/inets/doc/src/httpd.xml
+++ b/lib/inets/doc/src/httpd.xml
@@ -927,7 +927,6 @@ text/plain asc txt</pre>
<funcs>
<func>
- <marker id="info1"></marker>
<name>info(Pid) -></name>
<name>info(Pid, Properties) -> [{Option, Value}]</name>
<fsummary>Fetches information about the HTTP server.</fsummary>
@@ -953,8 +952,6 @@ text/plain asc txt</pre>
</func>
<func>
- <marker id="info2"></marker>
-
<name>info(Address, Port) -> </name>
<name>info(Address, Port, Profile) -> </name>
<name>info(Address, Port, Profile, Properties) -> [{Option, Value}] </name>
@@ -983,7 +980,6 @@ text/plain asc txt</pre>
</func>
<func>
- <marker id="reload_config"></marker>
<name>reload_config(Config, Mode) -> ok | {error, Reason}</name>
<fsummary>Reloads the HTTP server configuration without
restarting the server.</fsummary>
@@ -1108,7 +1104,6 @@ text/plain asc txt</pre>
</section>
<funcs>
<func>
- <marker id="module_do"></marker>
<name>Module:do(ModData)-> {proceed, OldData} | {proceed, NewData} | {break, NewData} | done</name>
<fsummary>Called for each request to the web server.</fsummary>
<type>
@@ -1164,7 +1159,6 @@ text/plain asc txt</pre>
</func>
<func>
- <marker id="module_load"></marker>
<name>Module:load(Line, AccIn)-> eof | ok | {ok, AccOut} | {ok, AccOut, {Option, Value}} | {ok, AccOut, [{Option, Value}]} | {error, Reason}</name>
<fsummary>Converts a line in an Apache-like config
file to an <c>{Option, Value}</c> tuple.</fsummary>
@@ -1186,9 +1180,23 @@ text/plain asc txt</pre>
</p>
</desc>
</func>
-
+
+ <func>
+ <name>Module:remove(ConfigDB) -> ok | {error, Reason} </name>
+ <fsummary>Callback function that is called when the web server is closed.</fsummary>
+ <type>
+ <v>ConfigDB = ets_table()</v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p>When <c>httpd</c> is shut down, it tries to execute
+ <c>remove/1</c> in each Erlang web server callback module. The
+ programmer can use this function to clean up resources
+ created in the store function.</p>
+ </desc>
+ </func>
+
<func>
- <marker id="module_store"></marker>
<name>Module:store({Option, Value}, Config)-> {ok, {Option, NewValue}} | {error, Reason}</name>
<fsummary>Checks the validity of the configuration options.</fsummary>
<type>
@@ -1210,22 +1218,6 @@ text/plain asc txt</pre>
implemented by this particular callback module.</p>
</desc>
</func>
-
- <func>
- <marker id="module_remove"></marker>
- <name>Module:remove(ConfigDB) -> ok | {error, Reason} </name>
- <fsummary>Callback function that is called when the web server is closed.</fsummary>
- <type>
- <v>ConfigDB = ets_table()</v>
- <v>Reason = term()</v>
- </type>
- <desc>
- <p>When <c>httpd</c> is shut down, it tries to execute
- <c>remove/1</c> in each Erlang web server callback module. The
- programmer can use this function to clean up resources
- created in the store function.</p>
- </desc>
- </func>
</funcs>
<section>
@@ -1233,7 +1225,6 @@ text/plain asc txt</pre>
</section>
<funcs>
<func>
- <marker id="parse_query"></marker>
<name>parse_query(QueryString) -> [{Key,Value}]</name>
<fsummary>Parses incoming data to <c>erl</c> and <c>eval</c> scripts.</fsummary>
<type>
diff --git a/lib/inets/doc/src/httpd_util.xml b/lib/inets/doc/src/httpd_util.xml
index 439a01877f..0f498ba2fc 100644
--- a/lib/inets/doc/src/httpd_util.xml
+++ b/lib/inets/doc/src/httpd_util.xml
@@ -53,8 +53,6 @@
the Erlang date format. <c>DateString</c> must be in one of the
three date formats defined in
<url href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</url>.</p>
-
- <marker id="create_etag"></marker>
</desc>
</func>
@@ -69,25 +67,9 @@
<p><c>create_etag/1</c> calculates the Etag for a file from its
size and time for last modification. <c>FileInfo</c> is a record defined
in <c>kernel/include/file.hrl</c>.</p>
-
- <marker id="decode_hex"></marker>
- </desc>
- </func>
-
- <func>
- <name>decode_hex(HexValue) -> DecValue</name>
- <fsummary>Converts a hexadecimal value into its decimal equivalent.</fsummary>
- <type>
- <v>HexValue = DecValue = string()</v>
- </type>
- <desc>
- <p>Converts the hexadecimal value <c>HexValue</c> into its
- decimal equivalent (<c>DecValue</c>).</p>
-
- <marker id="day"></marker>
</desc>
</func>
-
+
<func>
<name>day(NthDayOfWeek) -> DayOfWeek</name>
<fsummary>Converts the day of the week
@@ -97,63 +79,37 @@
<v>DayOfWeek = string()</v>
</type>
<desc>
- <marker id="day"></marker>
<p><c>day/1</c> converts the day of the week
(<c>NthDayOfWeek</c>) from an integer (1-7) to an abbreviated
string, that is:</p>
<p>1 = "Mon", 2 = "Tue", ..., 7 = "Sat".</p>
-
- <marker id="flatlength"></marker>
</desc>
</func>
<func>
- <name>flatlength(NestedList) -> Size</name>
- <fsummary>Computes the size of a possibly nested list.</fsummary>
+ <name>decode_hex(HexValue) -> DecValue</name>
+ <fsummary>Converts a hexadecimal value into its decimal equivalent.</fsummary>
<type>
- <v>NestedList = list()</v>
- <v>Size = integer()</v>
+ <v>HexValue = DecValue = string()</v>
</type>
<desc>
- <marker id="flatlength"></marker>
- <p><c>flatlength/1</c> computes the size of the possibly nested
- list <c>NestedList</c>, which can contain binaries.</p>
-
- <marker id="hexlist_to_integer"></marker>
+ <p>Converts the hexadecimal value <c>HexValue</c> into its
+ decimal equivalent (<c>DecValue</c>).</p>
</desc>
</func>
-
-<!--
+
<func>
- <name>header(StatusCode,PersistentConn)</name>
- <name>header(StatusCode,Date)</name>
- <name>header(StatusCode,MimeType,Date)</name>
- <name>header(StatusCode,MimeType,PersistentConn,Date) -> HTTPHeader</name>
- <fsummary>Generates an HTTP 1.1 header.</fsummary>
+ <name>flatlength(NestedList) -> Size</name>
+ <fsummary>Computes the size of a possibly nested list.</fsummary>
<type>
- <v>StatusCode = integer()</v>
- <v>Date = rfc1123_date()</v>
- <v>MimeType = string()</v>
- <v>PersistentConn = true | false</v>
+ <v>NestedList = list()</v>
+ <v>Size = integer()</v>
</type>
<desc>
- <marker id="header"></marker>
- <p><c>header</c> returns an HTTP 1.1 header string.
- <c>StatusCode</c> is one of the status codes defined in
- <url href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</url>
- and the <c>Date</c> string is RFC 1123
- compliant (see <seealso marker="#rfc1123_date">rfc1123_date/0</seealso>).
- </p>
- <p>Notice that the two versions of <c>header/n</c> that does not
- have a <c>PersistentConn</c> argument is only for
- backward compatibility and must not be used in new Erlang
- web server API modules supporting persistent
- connections.</p>
-
- <marker id="hexlist_to_integer"></marker>
+ <p><c>flatlength/1</c> computes the size of the possibly nested
+ list <c>NestedList</c>, which can contain binaries.</p>
</desc>
</func>
--->
<func>
<name>hexlist_to_integer(HexString) -> Number</name>
@@ -165,8 +121,6 @@
<desc>
<p><c>hexlist_to_integer</c> converts the hexadecimal value of
<c>HexString</c> to an integer.</p>
-
- <marker id="integer_to_hexlist"></marker>
</desc>
</func>
@@ -178,11 +132,8 @@
<v>HexString = string()</v>
</type>
<desc>
- <marker id="integer_to_hexlist"></marker>
<p><c>integer_to_hexlist/1</c> returns a string representing
<c>Number</c> in a hexadecimal form.</p>
-
- <marker id="lookup"></marker>
</desc>
</func>
@@ -205,8 +156,6 @@
returned. <c>lookup/2</c> returns <c>undefined</c> and
<c>lookup/3</c> returns <c>Undefined</c> if no <c>Value</c>
is found.</p>
-
- <marker id="lookup_mime"></marker>
</desc>
</func>
@@ -221,14 +170,11 @@
<v>Undefined = term()</v>
</type>
<desc>
- <marker id="lookup_mime"></marker>
<p><c>lookup_mime</c> returns the MIME type associated with a
specific file suffix as specified in the file <c>mime.types</c>
(located in the
<path unix="$SERVER_ROOT/conf/mime.types" windows="%SERVER_ROOT%\conf\mime.types">
config directory</path>).</p>
-
- <marker id="lookup_mime_default"></marker>
</desc>
</func>
@@ -244,7 +190,6 @@
<v>Undefined = term()</v>
</type>
<desc>
- <marker id="lookup_mime_default"></marker>
<p><c>lookup_mime_default</c> returns the MIME type associated
with a specific file suffix as specified in the
<c>mime.types</c> file (located in the
@@ -252,8 +197,6 @@
config directory</path>).
If no appropriate association is found, the value of <c>DefaultType</c> is
returned.</p>
-
- <marker id="message"></marker>
</desc>
</func>
@@ -267,7 +210,6 @@
<v>Message = string()</v>
</type>
<desc>
- <marker id="message"></marker>
<p><c>message/3</c> returns an informative HTTP 1.1 status
string in HTML. Each <c>StatusCode</c> requires a specific
<c>PhraseArgs</c>:
@@ -290,8 +232,6 @@
<item><p><c>string()</c>: A string describing why the service
was unavailable.</p></item>
</taglist>
-
- <marker id="month"></marker>
</desc>
</func>
@@ -303,12 +243,9 @@
<v>Month = string()</v>
</type>
<desc>
- <marker id="month"></marker>
<p><c>month/1</c> converts the month <c>NthMonth</c> as an
integer (1-12) to an abbreviated string, that is: </p>
<p>1 = "Jan", 2 = "Feb", ..., 12 = "Dec".</p>
-
- <marker id="multi_lookup"></marker>
</desc>
</func>
@@ -324,8 +261,6 @@
<p><c>multi_lookup</c> extracts all <c>{Key,Value}</c> tuples
from an <c>ETSTable</c> and returns <em>all</em> <c>Values</c>
associated with <c>Key</c> in a list.</p>
-
- <marker id="reason phrase"></marker>
</desc>
</func>
@@ -341,7 +276,6 @@
HTTP 1.1 <c>StatusCode</c>, for example, 200 is "OK" and 201
is "Created". For more information, see
<url href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</url>.</p>
- <marker id="rfc1123_date"></marker>
</desc>
</func>
@@ -354,12 +288,9 @@
<v>RFC1123Date = string()</v>
</type>
<desc>
- <marker id="rfc1123_date"></marker>
<p><c>rfc1123_date/0</c> returns the current date in RFC 1123
format. <c>rfc_date/1</c> converts the date in the Erlang format
to the RFC 1123 date format.</p>
-
- <marker id="split"></marker>
</desc>
</func>
@@ -373,14 +304,11 @@
<v>N = integer</v>
</type>
<desc>
- <marker id="split"></marker>
<p><c>split/3</c> splits <c>String</c> in <c>N</c> chunks
using <c>RegExp</c>. <c>split/3</c> is equivalent to
<c>regexp:split/2</c> with the exception that <c>N</c>
defines the maximum number of fields in
<c>FieldList</c>.</p>
-
- <marker id="split_script_path"></marker>
</desc>
</func>
@@ -394,13 +322,10 @@
<v>Path = QueryString = PathInfo = string()</v>
</type>
<desc>
- <marker id="split_script_path"></marker>
<p><c>split_script_path/1</c> is equivalent to
<c>split_path/1</c> with one exception. If the longest
possible path is not a regular, accessible, and executable
file, then <c>not_a_script</c> is returned.</p>
-
- <marker id="split_path"></marker>
</desc>
</func>
@@ -412,7 +337,6 @@
<v>RequestLine = Path = QueryStringOrPathInfo = string()</v>
</type>
<desc>
- <marker id="split_path"></marker>
<p><c>split_path/1</c> splits <c>RequestLine</c> in a file
reference (<c>Path</c>), and a <c>QueryString</c> or a
<c>PathInfo</c> string as specified in
@@ -428,8 +352,6 @@
<c>Path</c>, isolated with a <c>/</c>, is regarded as
<c>PathInfo</c>. The resulting <c>Path</c> is decoded using
<c>decode_hex/1</c> before delivery.</p>
-
- <marker id="strip"></marker>
</desc>
</func>
@@ -441,12 +363,9 @@
<v>String = Stripped = string()</v>
</type>
<desc>
- <marker id="strip"></marker>
<p><c>strip/1</c> removes any leading or trailing linear white
space from the string. Linear white space is to be read as
horizontal tab or space.</p>
-
- <marker id="suffix"></marker>
</desc>
</func>
@@ -457,7 +376,6 @@
<v>FileName = Suffix = string()</v>
</type>
<desc>
- <marker id="suffix"></marker>
<p><c>suffix/1</c> is equivalent to
<c>filename:extension/1</c> with the exception that
<c>Suffix</c> is returned without a leading dot (<c>.</c>).</p>
@@ -466,7 +384,6 @@
</funcs>
<section>
- <marker id="see_also"></marker>
<title>SEE ALSO</title>
<p><seealso marker="httpd">httpd(3)</seealso></p>
</section>
diff --git a/lib/inets/doc/src/inets.xml b/lib/inets/doc/src/inets.xml
index 2bb5427465..5d071c9a48 100644
--- a/lib/inets/doc/src/inets.xml
+++ b/lib/inets/doc/src/inets.xml
@@ -120,17 +120,6 @@
</func>
<func>
- <name>stop() -> ok </name>
- <fsummary>Stops the <c>Inets</c> application.</fsummary>
- <desc>
- <p>Stops the <c>Inets</c> application. See also
- <seealso marker="kernel:application">application(3)</seealso>.</p>
-
- <marker id="start2"></marker>
- </desc>
- </func>
-
- <func>
<name>start(Service, ServiceConfig) -> {ok, Pid} | {error, Reason}</name>
<name>start(Service, ServiceConfig, How) -> {ok, Pid} | {error, Reason}</name>
<fsummary>Dynamically starts an <c>Inets</c>
@@ -166,6 +155,17 @@
</desc>
</func>
+ <func>
+ <name>stop() -> ok </name>
+ <fsummary>Stops the <c>Inets</c> application.</fsummary>
+ <desc>
+ <p>Stops the <c>Inets</c> application. See also
+ <seealso marker="kernel:application">application(3)</seealso>.</p>
+
+ <marker id="start2"></marker>
+ </desc>
+ </func>
+
<func>
<name>stop(Service, Reference) -> ok | {error, Reason} </name>
<fsummary>Stops a started service of the <c>Inets</c> application or takes
diff --git a/lib/inets/doc/src/mod_auth.xml b/lib/inets/doc/src/mod_auth.xml
index 8bef025be8..2da2be37ed 100644
--- a/lib/inets/doc/src/mod_auth.xml
+++ b/lib/inets/doc/src/mod_auth.xml
@@ -34,11 +34,36 @@
<description>
<p>This module provides for basic user authentication using
textual files, <c>Dets</c> databases, or <c>Mnesia</c> databases.</p>
-
- <marker id="add_user"></marker>
</description>
<funcs>
+ <func>
+ <name>add_group_member(GroupName, UserName, Options) -> true | {error, Reason}</name>
+ <name>add_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason}</name>
+ <name>add_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason}</name>
+ <fsummary>Adds a user to a group.</fsummary>
+ <type>
+ <v>GroupName = string()</v>
+ <v>UserName = string()</v>
+ <v>Options = [Option]</v>
+ <v>Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}</v>
+ <v>Port = integer()</v>
+ <v>Address = {A,B,C,D} | string() | undefined</v>
+ <v>Dir = string()</v>
+ <v>AuthPassword = string()</v>
+ <v>Reason = term()</v>
+ </type>
+ <desc>
+ <p><c>add_group_member/3, add_group_member/4</c>, and
+ <c>add_group_member/5</c> each
+ adds a user to a group. If the group does not exist, it
+ is created and the user is added to the group. Upon successful
+ operation, this function returns <c>true</c>.
+ When <c>add_group_members/3</c>
+ is called, options <c>Port</c> and <c>Dir</c> are mandatory.</p>
+ </desc>
+ </func>
+
<func>
<name>add_user(UserName, Options) -> true| {error, Reason}</name>
<name>add_user(UserName, Password, UserData, Port, Dir) -> true | {error, Reason}</name>
@@ -57,53 +82,45 @@
<v>Reason = term()</v>
</type>
<desc>
- <marker id="user_api"></marker>
- <marker id="add_user"></marker>
<p><c>add_user/2, add_user/5</c>, and <c>add_user/6</c> each adds a
user to the user database. If the operation is successful,
this function returns <c>true</c>. If an error occurs,
<c>{error,Reason}</c> is returned.
When <c>add_user/2</c> is called, options <c>Password</c>,
<c>UserData</c>, <c>Port</c>, and <c>Dir</c> are mandatory.</p>
-
- <marker id="delete_user"></marker>
</desc>
</func>
- <func>
- <name>delete_user(UserName,Options) -> true | {error, Reason}</name>
- <name>delete_user(UserName, Port, Dir) -> true | {error, Reason}</name>
- <name>delete_user(UserName, Address, Port, Dir) -> true | {error, Reason}</name>
- <fsummary>Deletes a user from the user database.</fsummary>
+ <func>
+ <name>delete_group(GroupName, Options) -> true | {error,Reason} &lt;name>delete_group(GroupName, Port, Dir) -> true | {error, Reason}</name>
+ <name>delete_group(GroupName, Address, Port, Dir) -> true | {error, Reason}</name>
+ <fsummary>Deletes a group.</fsummary>
<type>
- <v>UserName = string()</v>
<v>Options = [Option]</v>
<v>Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}</v>
<v>Port = integer()</v>
<v>Address = {A,B,C,D} | string() | undefined</v>
<v>Dir = string()</v>
+ <v>GroupName = string()</v>
<v>AuthPassword = string()</v>
<v>Reason = term()</v>
</type>
<desc>
- <marker id="delete_user"></marker>
- <p><c>delete_user/2, delete_user/3</c>, and <c>delete_user/4</c>
- each deletes a user from the user database.
- If the operation is successful, this function returns <c>true</c>.
- If an error occurs, <c>{error,Reason}</c> is returned.
- When <c>delete_user/2</c> is called, options <c>Port</c> and <c>Dir</c>
- are mandatory.</p>
-
- <marker id="get_user"></marker>
+ <p><c>delete_group/2, delete_group/3</c>, and <c>delete_group/4</c>
+ each deletes the group specified and returns <c>true</c>.
+ If there is an error, <c>{error, Reason}</c> is returned.
+ When <c>delete_group/2</c> is called, option
+ <c>Port</c> and <c>Dir</c> are mandatory.</p>
</desc>
</func>
- <func>
- <name>get_user(UserName,Options) -> {ok, #httpd_user} |{error, Reason}</name>
- <name>get_user(UserName, Port, Dir) -> {ok, #httpd_user} | {error, Reason}</name>
- <name>get_user(UserName, Address, Port, Dir) -> {ok, #httpd_user} | {error, Reason}</name>
- <fsummary>Returns a user from the user database.</fsummary>
+ <func>
+ <name>delete_group_member(GroupName, UserName, Options) -> true | {error, Reason}</name>
+ <name>delete_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason}</name>
+ <name>delete_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason}</name>
+ <fsummary>Removes a user from a group.</fsummary>
<type>
+ <v>GroupName = string()</v>
<v>UserName = string()</v>
<v>Options = [Option]</v>
<v>Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}</v>
@@ -114,51 +131,46 @@
<v>Reason = term()</v>
</type>
<desc>
- <marker id="get_user"></marker>
- <p><c>get_user/2, get_user/3</c>, and <c>get_user/4</c> each
- returns an <c>httpd_user</c> record containing the userdata for a
- specific user. If the user cannot be found, <c>{error, Reason}</c>
- is returned. When <c>get_user/2</c> is called, options <c>Port</c> and <c>Dir</c>
- are mandatory.</p>
-
- <marker id="list_users"></marker>
+ <p><c>delete_group_member/3, delete_group_member/4</c>, and
+ <c>delete_group_member/5</c> each deletes a user from a group.
+ If the group or the user does not exist,
+ this function returns an error, otherwise <c>true</c>.
+ When <c>delete_group_member/3</c> is called, the options <c>Port</c>
+ and <c>Dir</c> are mandatory.</p>
</desc>
</func>
-
+
<func>
- <name>list_users(Options) -> {ok, Users} | {error, Reason}</name>
- <name>list_users(Port, Dir) -> {ok, Users} | {error, Reason}</name>
- <name>list_users(Address, Port, Dir) -> {ok, Users} | {error, Reason}</name>
- <fsummary>Lists users in the user database.</fsummary>
+ <name>delete_user(UserName,Options) -> true | {error, Reason}</name>
+ <name>delete_user(UserName, Port, Dir) -> true | {error, Reason}</name>
+ <name>delete_user(UserName, Address, Port, Dir) -> true | {error, Reason}</name>
+ <fsummary>Deletes a user from the user database.</fsummary>
<type>
+ <v>UserName = string()</v>
<v>Options = [Option]</v>
<v>Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}</v>
<v>Port = integer()</v>
<v>Address = {A,B,C,D} | string() | undefined</v>
<v>Dir = string()</v>
- <v>Users = list()</v>
<v>AuthPassword = string()</v>
- <v>Reason = atom()</v>
+ <v>Reason = term()</v>
</type>
<desc>
- <marker id="list_users"></marker>
- <p><c>list_users/1, list_users/2</c>, and <c>list_users/3</c>
- each returns a list
- of users in the user database for a specific <c>Port/Dir</c>.
- When <c>list_users/1</c> is called, options <c>Port</c> and <c>Dir</c>
+ <p><c>delete_user/2, delete_user/3</c>, and <c>delete_user/4</c>
+ each deletes a user from the user database.
+ If the operation is successful, this function returns <c>true</c>.
+ If an error occurs, <c>{error,Reason}</c> is returned.
+ When <c>delete_user/2</c> is called, options <c>Port</c> and <c>Dir</c>
are mandatory.</p>
-
- <marker id="add_group_member"></marker>
</desc>
</func>
<func>
- <name>add_group_member(GroupName, UserName, Options) -> true | {error, Reason}</name>
- <name>add_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason}</name>
- <name>add_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason}</name>
- <fsummary>Adds a user to a group.</fsummary>
+ <name>get_user(UserName,Options) -> {ok, #httpd_user} |{error, Reason}</name>
+ <name>get_user(UserName, Port, Dir) -> {ok, #httpd_user} | {error, Reason}</name>
+ <name>get_user(UserName, Address, Port, Dir) -> {ok, #httpd_user} | {error, Reason}</name>
+ <fsummary>Returns a user from the user database.</fsummary>
<type>
- <v>GroupName = string()</v>
<v>UserName = string()</v>
<v>Options = [Option]</v>
<v>Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}</v>
@@ -169,48 +181,38 @@
<v>Reason = term()</v>
</type>
<desc>
- <marker id="add_group_member"></marker>
- <p><c>add_group_member/3, add_group_member/4</c>, and
- <c>add_group_member/5</c> each
- adds a user to a group. If the group does not exist, it
- is created and the user is added to the group. Upon successful
- operation, this function returns <c>true</c>.
- When <c>add_group_members/3</c>
- is called, options <c>Port</c> and <c>Dir</c> are mandatory.</p>
-
- <marker id="delete_group_member"></marker>
+ <p><c>get_user/2, get_user/3</c>, and <c>get_user/4</c> each
+ returns an <c>httpd_user</c> record containing the userdata for a
+ specific user. If the user cannot be found, <c>{error, Reason}</c>
+ is returned. When <c>get_user/2</c> is called, options <c>Port</c> and <c>Dir</c>
+ are mandatory.</p>
</desc>
</func>
- <func>
- <name>delete_group_member(GroupName, UserName, Options) -> true | {error, Reason}</name>
- <name>delete_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason}</name>
- <name>delete_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason}</name>
- <fsummary>Removes a user from a group.</fsummary>
+ <func>
+ <name>list_groups(Options) -> {ok, Groups} | {error, Reason}</name>
+ <name>list_groups(Port, Dir) -> {ok, Groups} | {error, Reason}</name>
+ <name>list_groups(Address, Port, Dir) -> {ok, Groups} | {error, Reason}</name>
+ <fsummary>Lists all the groups.</fsummary>
<type>
- <v>GroupName = string()</v>
- <v>UserName = string()</v>
<v>Options = [Option]</v>
<v>Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}</v>
<v>Port = integer()</v>
<v>Address = {A,B,C,D} | string() | undefined</v>
<v>Dir = string()</v>
+ <v>Groups = list()</v>
<v>AuthPassword = string()</v>
<v>Reason = term()</v>
</type>
<desc>
- <marker id="delete_group_member"></marker>
- <p><c>delete_group_member/3, delete_group_member/4</c>, and
- <c>delete_group_member/5</c> each deletes a user from a group.
- If the group or the user does not exist,
- this function returns an error, otherwise <c>true</c>.
- When <c>delete_group_member/3</c> is called, the options <c>Port</c>
+ <p><c>list_groups/1, list_groups/2</c>, and <c>list_groups/3</c>
+ each lists all the groups available.
+ If there is an error, <c>{error, Reason}</c> is returned.
+ When <c>list_groups/1</c> is called, options <c>Port</c>
and <c>Dir</c> are mandatory.</p>
-
- <marker id="list_group_members"></marker>
</desc>
</func>
-
+
<func>
<name>list_group_members(GroupName, Options) -> {ok, Users} | {error, Reason}</name>
<name>list_group_members(GroupName, Port, Dir) -> {ok, Users} | {error, Reason}</name>
@@ -228,71 +230,39 @@
<v>Reason = term()</v>
</type>
<desc>
- <marker id="list_group_members"></marker>
<p><c>list_group_members/2, list_group_members/3</c>, and
<c>list_group_members/4</c> each
lists the members of a specified group. If the group does not
exist or there is an error, <c>{error, Reason}</c> is returned.
When <c>list_group_members/2</c> is called, options <c>Port</c>
and <c>Dir</c> are mandatory.</p>
-
- <marker id="list_groups"></marker>
- </desc>
- </func>
-
- <func>
- <name>list_groups(Options) -> {ok, Groups} | {error, Reason}</name>
- <name>list_groups(Port, Dir) -> {ok, Groups} | {error, Reason}</name>
- <name>list_groups(Address, Port, Dir) -> {ok, Groups} | {error, Reason}</name>
- <fsummary>Lists all the groups.</fsummary>
- <type>
- <v>Options = [Option]</v>
- <v>Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}</v>
- <v>Port = integer()</v>
- <v>Address = {A,B,C,D} | string() | undefined</v>
- <v>Dir = string()</v>
- <v>Groups = list()</v>
- <v>AuthPassword = string()</v>
- <v>Reason = term()</v>
- </type>
- <desc>
- <marker id="list_groups"></marker>
- <p><c>list_groups/1, list_groups/2</c>, and <c>list_groups/3</c>
- each lists all the groups available.
- If there is an error, <c>{error, Reason}</c> is returned.
- When <c>list_groups/1</c> is called, options <c>Port</c>
- and <c>Dir</c> are mandatory.</p>
-
- <marker id="delete_group"></marker>
</desc>
</func>
- <func>
- <name>delete_group(GroupName, Options) -> true | {error,Reason} &lt;name>delete_group(GroupName, Port, Dir) -> true | {error, Reason}</name>
- <name>delete_group(GroupName, Address, Port, Dir) -> true | {error, Reason}</name>
- <fsummary>Deletes a group.</fsummary>
+ <func>
+ <name>list_users(Options) -> {ok, Users} | {error, Reason}</name>
+ <name>list_users(Port, Dir) -> {ok, Users} | {error, Reason}</name>
+ <name>list_users(Address, Port, Dir) -> {ok, Users} | {error, Reason}</name>
+ <fsummary>Lists users in the user database.</fsummary>
<type>
<v>Options = [Option]</v>
<v>Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}</v>
<v>Port = integer()</v>
<v>Address = {A,B,C,D} | string() | undefined</v>
<v>Dir = string()</v>
- <v>GroupName = string()</v>
+ <v>Users = list()</v>
<v>AuthPassword = string()</v>
- <v>Reason = term()</v>
+ <v>Reason = atom()</v>
</type>
<desc>
- <marker id="delete_group"></marker>
- <p><c>delete_group/2, delete_group/3</c>, and <c>delete_group/4</c>
- each deletes the group specified and returns <c>true</c>.
- If there is an error, <c>{error, Reason}</c> is returned.
- When <c>delete_group/2</c> is called, option
- <c>Port</c> and <c>Dir</c> are mandatory.</p>
-
- <marker id="update_password"></marker>
+ <p><c>list_users/1, list_users/2</c>, and <c>list_users/3</c>
+ each returns a list
+ of users in the user database for a specific <c>Port/Dir</c>.
+ When <c>list_users/1</c> is called, options <c>Port</c> and <c>Dir</c>
+ are mandatory.</p>
</desc>
</func>
-
+
<func>
<name>update_password(Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason}</name>
<name>update_password(Address,Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason}</name>
@@ -307,7 +277,6 @@
<v>Reason = term()</v>
</type>
<desc>
- <marker id="update_password"></marker>
<p><c>update_password/5</c> and <c>update_password/6</c> each
updates <c>AuthAccessPassword</c> for the specified directory.
If <c>NewPassword</c> is equal to "NoPassword", no password is required to
@@ -319,7 +288,6 @@
</funcs>
<section>
- <marker id="see_also"></marker>
<title>SEE ALSO</title>
<p><seealso marker="httpd">httpd(3)</seealso>,
<seealso marker="mod_alias">mod_alias(3)</seealso></p>
diff --git a/lib/inets/doc/src/mod_security.xml b/lib/inets/doc/src/mod_security.xml
index 7aae98e1cf..9dc32b971b 100644
--- a/lib/inets/doc/src/mod_security.xml
+++ b/lib/inets/doc/src/mod_security.xml
@@ -35,6 +35,26 @@
<p>Security Audit and Trailing Functionality</p>
</description>
<funcs>
+
+ <func>
+ <name>block_user(User, Port, Dir, Seconds) -> true | {error, Reason}</name>
+ <name>block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason}</name>
+ <fsummary>Blocks a user from access to a directory for a certain amount of time.</fsummary>
+ <type>
+ <v>User = string()</v>
+ <v>Port = integer()</v>
+ <v>Address = {A,B,C,D} | string() | undefined</v>
+ <v>Dir = string()</v>
+ <v>Seconds = integer() | infinity</v>
+ <v>Reason = no_such_directory</v>
+ </type>
+ <desc>
+ <p><c>block_user/4</c> and <c>block_user/5</c> each blocks the user
+ <c>User</c> from directory <c>Dir</c> for a specified
+ amount of time.</p>
+ </desc>
+ </func>
+
<func>
<name>list_auth_users(Port) -> Users | []</name>
<name>list_auth_users(Address, Port) -> Users | []</name>
@@ -50,7 +70,6 @@
<v>Users = list() = [string()]</v>
</type>
<desc>
- <marker id="list_auth_users"></marker>
<p><c>list_auth_users/1</c>, <c>list_auth_users/2</c>, and
<c>list_auth_users/3</c> each returns a list of users that are
currently authenticated. Authentications are stored for
@@ -71,31 +90,12 @@
<v>Users = list() = [string()]</v>
</type>
<desc>
- <marker id="list_blocked_users"></marker>
<p><c>list_blocked_users/1</c>, <c>list_blocked_users/2</c>, and
<c>list_blocked_users/3</c> each returns a list of users that are
currently blocked from access.</p>
</desc>
</func>
- <func>
- <name>block_user(User, Port, Dir, Seconds) -> true | {error, Reason}</name>
- <name>block_user(User, Address, Port, Dir, Seconds) -> true | {error, Reason}</name>
- <fsummary>Blocks a user from access to a directory for a certain amount of time.</fsummary>
- <type>
- <v>User = string()</v>
- <v>Port = integer()</v>
- <v>Address = {A,B,C,D} | string() | undefined</v>
- <v>Dir = string()</v>
- <v>Seconds = integer() | infinity</v>
- <v>Reason = no_such_directory</v>
- </type>
- <desc>
- <marker id="block_user"></marker>
- <p><c>block_user/4</c> and <c>block_user/5</c> each blocks the user
- <c>User</c> from directory <c>Dir</c> for a specified
- amount of time.</p>
- </desc>
- </func>
+
<func>
<name>unblock_user(User, Port) -> true | {error, Reason}</name>
<name>unblock_user(User, Address, Port) -> true | {error, Reason}</name>
@@ -110,7 +110,6 @@
<v>Reason = term()</v>
</type>
<desc>
- <marker id="unblock_user"></marker>
<p><c>unblock_user/2</c>, <c>unblock_user/3</c>, and
<c>unblock_user/4</c> each removes the user <c>User</c> from
the list of blocked users for <c>Port</c> (and <c>Dir</c>).</p>
@@ -123,16 +122,15 @@
<title>SecurityCallbackModule</title>
<p>The <c>SecurityCallbackModule</c> is a user-written module that can receive
events from the <c>mod_security</c> Erlang web server API module.
- This module only exports the functions
- <seealso marker="#callback_module_event">event/4,5</seealso>,
+ This module only exports the functions event/[4,5]
which are described here.
</p>
</section>
<funcs>
<func>
- <name>event(What, Port, Dir, Data) -> ignored</name>
- <name>event(What, Address, Port, Dir, Data) -> ignored</name>
+ <name>Module:event(What, Port, Dir, Data) -> ignored</name>
+ <name>Module:event(What, Address, Port, Dir, Data) -> ignored</name>
<fsummary>Called whenever an event occurs in <c>mod_security</c>.</fsummary>
<type>
<v>What = atom()</v>
diff --git a/lib/inets/doc/src/tftp.xml b/lib/inets/doc/src/tftp.xml
index 78f77f5b91..00d9d53376 100644
--- a/lib/inets/doc/src/tftp.xml
+++ b/lib/inets/doc/src/tftp.xml
@@ -221,88 +221,57 @@
</section>
<funcs>
+ <marker id="change_config_daemons"></marker>
<func>
- <name>start(Options) -> {ok, Pid} | {error, Reason}</name>
- <fsummary>Starts a daemon process.</fsummary>
+ <name>change_config(daemons, Options) -> [{Pid, Result}]</name>
+ <fsummary>Changes configuration for all daemons.
+ </fsummary>
<type>
<v>Options = [option()]</v>
<v>Pid = pid()</v>
+ <v>Result = ok | {error, Reason}</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>Starts a daemon process listening for UDP packets on a
- port. When it receives a request for read or write, it spawns
- a temporary server process handling the actual transfer
- of the (virtual) file.</p>
+ <p>Changes configuration for all TFTP daemon processes. </p>
- <marker id="read_file"></marker>
+ <marker id="change_config_servers"></marker>
</desc>
</func>
<func>
- <name>read_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason}</name>
- <fsummary>Reads a (virtual) file from a TFTP server.</fsummary>
+ <name>change_config(servers, Options) -> [{Pid, Result}]</name>
+ <fsummary>Changes configuration for all servers.
+ </fsummary>
<type>
- <v>RemoteFilename = string()</v>
- <v>LocalFilename = binary | string()</v>
<v>Options = [option()]</v>
- <v>LastCallbackState = term()</v>
+ <v>Pid = pid()</v>
+ <v>Result = ok | {error, Reason}</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>Reads a (virtual) file <c>RemoteFilename</c> from a TFTP
- server.</p>
- <p>If <c>LocalFilename</c> is the atom <c>binary</c>,
- <c>tftp_binary</c> is used as callback module. It concatenates
- all transferred blocks and returns them as one single binary
- in <c>LastCallbackState</c>.</p>
- <p>If <c>LocalFilename</c> is a string and there are no
- registered callback modules, <c>tftp_file</c> is used as
- callback module. It writes each transferred block to the file
- named <c>LocalFilename</c> and returns the number of
- transferred bytes in <c>LastCallbackState</c>.</p>
- <p>If <c>LocalFilename</c> is a string and there are registered
- callback modules, <c>LocalFilename</c> is tested against
- the regexps of these and the callback module corresponding to
- the first match is used, or an error tuple is returned if no
- matching regexp is found.</p>
- </desc>
+ <p>Changes configuration for all TFTP server processes.</p>
- <marker id="write_file"></marker>
+ <marker id="change_config_pid"></marker>
+ </desc>
</func>
<func>
- <name>write_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason}</name>
- <fsummary>Writes a (virtual) file to a TFTP server.</fsummary>
+ <name>change_config(Pid, Options) -> Result</name>
+ <fsummary>Changes configuration for a TFTP daemon, server,
+ or client process.</fsummary>
<type>
- <v>RemoteFilename = string()</v>
- <v>LocalFilename = binary() | string()</v>
+ <v>Pid = pid()</v>
<v>Options = [option()]</v>
- <v>LastCallbackState = term()</v>
+ <v>Result = ok | {error, Reason}</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>Writes a (virtual) file <c>RemoteFilename</c> to a TFTP
- server.</p>
- <p>If <c>LocalFilename</c> is a binary, <c>tftp_binary</c> is
- used as callback module. The binary is transferred block by
- block and the number of transferred bytes is returned in
- <c>LastCallbackState</c>.</p>
- <p>If <c>LocalFilename</c> is a string and there are no
- registered callback modules, <c>tftp_file</c> is used as
- callback module. It reads the file named <c>LocalFilename</c>
- block by block and returns the number of transferred bytes
- in <c>LastCallbackState</c>.</p>
- <p>If <c>LocalFilename</c> is a string and there are registered
- callback modules, <c>LocalFilename</c> is tested against
- the regexps of these and the callback module corresponding to
- the first match is used, or an error tuple is returned if no
- matching regexp is found.</p>
-
+ <p>Changes configuration for a TFTP daemon, server, or client process.</p>
<marker id="info_daemons"></marker>
</desc>
</func>
-
+
<func>
<name>info(daemons) -> [{Pid, Options}]</name>
<fsummary>Returns information about all daemons.</fsummary>
@@ -342,72 +311,89 @@
</type>
<desc>
<p>Returns information about a TFTP daemon, server, or client process.</p>
-
- <marker id="change_config_daemons"></marker>
</desc>
</func>
-
- <func>
- <name>change_config(daemons, Options) -> [{Pid, Result}]</name>
- <fsummary>Changes configuration for all daemons.
- </fsummary>
+
+ <func>
+ <name>read_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason}</name>
+ <fsummary>Reads a (virtual) file from a TFTP server.</fsummary>
<type>
+ <v>RemoteFilename = string()</v>
+ <v>LocalFilename = binary | string()</v>
<v>Options = [option()]</v>
- <v>Pid = pid()</v>
- <v>Result = ok | {error, Reason}</v>
+ <v>LastCallbackState = term()</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>Changes configuration for all TFTP daemon processes. </p>
-
- <marker id="change_config_servers"></marker>
+ <p>Reads a (virtual) file <c>RemoteFilename</c> from a TFTP
+ server.</p>
+ <p>If <c>LocalFilename</c> is the atom <c>binary</c>,
+ <c>tftp_binary</c> is used as callback module. It concatenates
+ all transferred blocks and returns them as one single binary
+ in <c>LastCallbackState</c>.</p>
+ <p>If <c>LocalFilename</c> is a string and there are no
+ registered callback modules, <c>tftp_file</c> is used as
+ callback module. It writes each transferred block to the file
+ named <c>LocalFilename</c> and returns the number of
+ transferred bytes in <c>LastCallbackState</c>.</p>
+ <p>If <c>LocalFilename</c> is a string and there are registered
+ callback modules, <c>LocalFilename</c> is tested against
+ the regexps of these and the callback module corresponding to
+ the first match is used, or an error tuple is returned if no
+ matching regexp is found.</p>
</desc>
+
+ <marker id="write_file"></marker>
</func>
-
+
<func>
- <name>change_config(servers, Options) -> [{Pid, Result}]</name>
- <fsummary>Changes configuration for all servers.
- </fsummary>
+ <name>start(Options) -> {ok, Pid} | {error, Reason}</name>
+ <fsummary>Starts a daemon process.</fsummary>
<type>
<v>Options = [option()]</v>
<v>Pid = pid()</v>
- <v>Result = ok | {error, Reason}</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>Changes configuration for all TFTP server processes.</p>
+ <p>Starts a daemon process listening for UDP packets on a
+ port. When it receives a request for read or write, it spawns
+ a temporary server process handling the actual transfer
+ of the (virtual) file.</p>
- <marker id="change_config_pid"></marker>
+ <marker id="read_file"></marker>
</desc>
</func>
<func>
- <name>change_config(Pid, Options) -> Result</name>
- <fsummary>Changes configuration for a TFTP daemon, server,
- or client process.</fsummary>
+ <name>write_file(RemoteFilename, LocalFilename, Options) -> {ok, LastCallbackState} | {error, Reason}</name>
+ <fsummary>Writes a (virtual) file to a TFTP server.</fsummary>
<type>
- <v>Pid = pid()</v>
+ <v>RemoteFilename = string()</v>
+ <v>LocalFilename = binary() | string()</v>
<v>Options = [option()]</v>
- <v>Result = ok | {error, Reason}</v>
- <v>Reason = term()</v>
- </type>
- <desc>
- <p>Changes configuration for a TFTP daemon, server, or client process.</p>
-
- <marker id="start2"></marker>
- </desc>
- </func>
-
- <func>
- <name>start() -> ok | {error, Reason}</name>
- <fsummary>Starts the <c>Inets</c> application.</fsummary>
- <type>
+ <v>LastCallbackState = term()</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>Starts the <c>Inets</c> application.</p>
+ <p>Writes a (virtual) file <c>RemoteFilename</c> to a TFTP
+ server.</p>
+ <p>If <c>LocalFilename</c> is a binary, <c>tftp_binary</c> is
+ used as callback module. The binary is transferred block by
+ block and the number of transferred bytes is returned in
+ <c>LastCallbackState</c>.</p>
+ <p>If <c>LocalFilename</c> is a string and there are no
+ registered callback modules, <c>tftp_file</c> is used as
+ callback module. It reads the file named <c>LocalFilename</c>
+ block by block and returns the number of transferred bytes
+ in <c>LastCallbackState</c>.</p>
+ <p>If <c>LocalFilename</c> is a string and there are registered
+ callback modules, <c>LocalFilename</c> is tested against
+ the regexps of these and the callback module corresponding to
+ the first match is used, or an error tuple is returned if no
+ matching regexp is found.</p>
</desc>
</func>
+
</funcs>
<section>
@@ -467,43 +453,32 @@
</section>
<funcs>
- <func>
- <name>prepare(Peer, Access, Filename, Mode, SuggestedOptions, InitialState) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}}</name>
- <fsummary>Prepares to open a file on the client side.</fsummary>
+ <func>
+ <name>Module:abort(Code, Text, State) -> ok</name>
+ <fsummary>Aborts the file transfer.</fsummary>
<type>
- <v>Peer = {PeerType, PeerHost, PeerPort}</v>
- <v>PeerType = inet | inet6</v>
- <v>PeerHost = ip_address()</v>
- <v>PeerPort = integer()</v>
- <v>Access = read | write</v>
- <v>Filename = string()</v>
- <v>Mode = string()</v>
- <v>SuggestedOptions = AcceptedOptions = [{Key, Value}]</v>
- <v>&nbsp;Key = Value = string()</v>
- <v>InitialState = [] | [{root_dir, string()}]</v>
- <v>NewState = term()</v>
<v>Code = undef | enoent | eacces | enospc</v>
<v>&nbsp;&nbsp;| badop | eexist | baduser | badopt</v>
<v>&nbsp;&nbsp;| int()</v>
<v>Text = string()</v>
+ <v>State = term()</v>
</type>
<desc>
- <p>Prepares to open a file on the client side.</p>
- <p>No new options can be added, but those present in
- <c>SuggestedOptions</c> can be omitted or replaced with new
- values in <c>AcceptedOptions</c>.</p>
- <p>This is followed by a call to <c>open/4</c> before any
- read/write access is performed. <c>AcceptedOptions</c> is
- sent to the server, which replies with the options that it
- accepts. These are then forwarded to <c>open/4</c> as
- <c>SuggestedOptions</c>.</p>
-
- <marker id="open"></marker>
+ <p>Invoked when the file transfer is aborted.</p>
+ <p>The callback function is expected to clean
+ up its used resources after the aborted file
+ transfer, such as closing open file
+ descriptors and so on. The function is not
+ invoked if any of the other callback
+ functions returns an error, as it is
+ expected that they already have cleaned up
+ the necessary resources. However, it is
+ invoked if the functions fail (crash).</p>
</desc>
</func>
-
- <func>
- <name>open(Peer, Access, Filename, Mode, SuggestedOptions, State) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}}</name>
+
+ <func>
+ <name>Module:open(Peer, Access, Filename, Mode, SuggestedOptions, State) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}}</name>
<fsummary>Opens a file for read or write access.</fsummary>
<type>
<v>Peer = {PeerType, PeerHost, PeerPort}</v>
@@ -536,9 +511,44 @@
<marker id="read"></marker>
</desc>
</func>
+
+ <func>
+ <name>Module:prepare(Peer, Access, Filename, Mode, SuggestedOptions, InitialState) -> {ok, AcceptedOptions, NewState} | {error, {Code, Text}}</name>
+ <fsummary>Prepares to open a file on the client side.</fsummary>
+ <type>
+ <v>Peer = {PeerType, PeerHost, PeerPort}</v>
+ <v>PeerType = inet | inet6</v>
+ <v>PeerHost = ip_address()</v>
+ <v>PeerPort = integer()</v>
+ <v>Access = read | write</v>
+ <v>Filename = string()</v>
+ <v>Mode = string()</v>
+ <v>SuggestedOptions = AcceptedOptions = [{Key, Value}]</v>
+ <v>&nbsp;Key = Value = string()</v>
+ <v>InitialState = [] | [{root_dir, string()}]</v>
+ <v>NewState = term()</v>
+ <v>Code = undef | enoent | eacces | enospc</v>
+ <v>&nbsp;&nbsp;| badop | eexist | baduser | badopt</v>
+ <v>&nbsp;&nbsp;| int()</v>
+ <v>Text = string()</v>
+ </type>
+ <desc>
+ <p>Prepares to open a file on the client side.</p>
+ <p>No new options can be added, but those present in
+ <c>SuggestedOptions</c> can be omitted or replaced with new
+ values in <c>AcceptedOptions</c>.</p>
+ <p>This is followed by a call to <c>open/4</c> before any
+ read/write access is performed. <c>AcceptedOptions</c> is
+ sent to the server, which replies with the options that it
+ accepts. These are then forwarded to <c>open/4</c> as
+ <c>SuggestedOptions</c>.</p>
+
+ <marker id="open"></marker>
+ </desc>
+ </func>
<func>
- <name>read(State) -> {more, Bin, NewState} | {last, Bin, FileSize} | {error, {Code, Text}}</name>
+ <name>Module:read(State) -> {more, Bin, NewState} | {last, Bin, FileSize} | {error, {Code, Text}}</name>
<fsummary>Reads a chunk from the file.</fsummary>
<type>
<v>State = NewState = term()</v>
@@ -565,7 +575,7 @@
</func>
<func>
- <name>write(Bin, State) -> {more, NewState} | {last, FileSize} | {error, {Code, Text}}</name>
+ <name>Module:write(Bin, State) -> {more, NewState} | {last, FileSize} | {error, {Code, Text}}</name>
<fsummary>Writes a chunk to the file.</fsummary>
<type>
<v>Bin = binary()</v>
@@ -590,30 +600,6 @@
<marker id="abort"></marker>
</desc>
</func>
-
- <func>
- <name>abort(Code, Text, State) -> ok</name>
- <fsummary>Aborts the file transfer.</fsummary>
- <type>
- <v>Code = undef | enoent | eacces | enospc</v>
- <v>&nbsp;&nbsp;| badop | eexist | baduser | badopt</v>
- <v>&nbsp;&nbsp;| int()</v>
- <v>Text = string()</v>
- <v>State = term()</v>
- </type>
- <desc>
- <p>Invoked when the file transfer is aborted.</p>
- <p>The callback function is expected to clean
- up its used resources after the aborted file
- transfer, such as closing open file
- descriptors and so on. The function is not
- invoked if any of the other callback
- functions returns an error, as it is
- expected that they already have cleaned up
- the necessary resources. However, it is
- invoked if the functions fail (crash).</p>
- </desc>
- </func>
</funcs>
<section>
@@ -628,7 +614,7 @@
<funcs>
<func>
- <name>error_msg(Format, Data) -> ok | exit(Reason)</name>
+ <name>Logger:error_msg(Format, Data) -> ok | exit(Reason)</name>
<fsummary>Logs an error message.</fsummary>
<type>
<v>Format = string()</v>
@@ -644,32 +630,32 @@
</func>
<func>
- <name>warning_msg(Format, Data) -> ok | exit(Reason)</name>
- <fsummary>Logs a warning message.</fsummary>
+ <name>Logger:info_msg(Format, Data) -> ok | exit(Reason)</name>
+ <fsummary>Logs an info message.</fsummary>
<type>
<v>Format = string()</v>
<v>Data = [term()]</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>Logs a warning message.
- See <c>error_logger:warning_msg/2</c> for details.</p>
-
- <marker id="info_msg"></marker>
+ <p>Logs an info message.
+ See <c>error_logger:info_msg/2</c> for details.</p>
</desc>
</func>
-
+
<func>
- <name>info_msg(Format, Data) -> ok | exit(Reason)</name>
- <fsummary>Logs an info message.</fsummary>
+ <name>Logger:warning_msg(Format, Data) -> ok | exit(Reason)</name>
+ <fsummary>Logs a warning message.</fsummary>
<type>
<v>Format = string()</v>
<v>Data = [term()]</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>Logs an info message.
- See <c>error_logger:info_msg/2</c> for details.</p>
+ <p>Logs a warning message.
+ See <c>error_logger:warning_msg/2</c> for details.</p>
+
+ <marker id="info_msg"></marker>
</desc>
</func>
</funcs>