From 67ffc483c80d29334c6c7739bcf1be756f374dfb Mon Sep 17 00:00:00 2001
From: Anders Svensson
Date: Tue, 20 Nov 2012 13:11:19 +0100
Subject: Add content to diameter_codec(3) and diameter_make(3)
---
lib/diameter/doc/src/diameter_transport.xml | 82 ++++++++++++++++++-----------
1 file changed, 52 insertions(+), 30 deletions(-)
(limited to 'lib/diameter/doc/src/diameter_transport.xml')
diff --git a/lib/diameter/doc/src/diameter_transport.xml b/lib/diameter/doc/src/diameter_transport.xml
index 0507af63a8..55b531155f 100644
--- a/lib/diameter/doc/src/diameter_transport.xml
+++ b/lib/diameter/doc/src/diameter_transport.xml
@@ -1,5 +1,8 @@
message()'>
+ inet:ip_address()'>
%also;
@@ -50,16 +53,49 @@ diameter starts a transport process and a message interface with which
the transport process communicates with the process that starts it (aka its
parent).
-
+
+DATA TYPES
+
+
+
+
+
+message() = binary() | &codec_packet;
+-
+
+A Diameter message as passed over the transport interface.
+
+
+For an inbound message from a transport process, a &codec_packet; must
+contain the received message in its bin field.
+In the case of an inbound request, any value set in the
+transport_data field will passed back to the transport module
+in the corresponding answer message, unless the sender supplies
+another value.
+
+
+For an outbound message to a transport process, a &codec_packet; has a
+value other than undefined in its transport_data field
+and has the binary() to send in its bin field.
+
+
+
+
+
+
+
+
Mod:start({Type, Ref}, Svc, Config)
- -> {ok, Pid} | {ok, Pid, LAddrs} | {error, Reason}
+ -> {ok, Pid}
+ | {ok, Pid, LAddrs}
+ | {error, Reason}
Start a transport process.
Type = connect | accept
@@ -67,7 +103,7 @@ parent).
Svc = #diameter_service{}
Config = term()
Pid = pid()
-LAddrs = [inet:ip_address()]
+LAddrs = [&ip_address;]
Reason = term()
@@ -79,8 +115,8 @@ A transport process maintains a connection with a single remote peer.
Type indicates whether the transport process in question
-is being started for a connecting (connect) or listening
-(accept) transport.
+is being started for a connecting (Type=connect) or listening
+(Type=accept) transport.
In the latter case, transport processes are started as required to
accept connections from multiple peers.
@@ -90,13 +126,12 @@ that has lead to starting of a transport process.
Svc contains the capabilities passed to &mod_start_service; and
-&mod_add_transport;,
-values passed to the latter overriding those passed to the former.
+&mod_add_transport;, values passed to the latter overriding those
+passed to the former.
Config is as passed in transport_config tuple in the
-&mod_transport_opt;
-list passed to &mod_add_transport;.
+&mod_transport_opt; list passed to &mod_add_transport;.
The start function should use the Host-IP-Address list and/or
@@ -114,13 +149,13 @@ it dies.
It should not link to the parent.
It should exit if its transport connection with its peer is lost.
-
+
MESSAGES
@@ -130,19 +165,15 @@ All messages sent over the transport interface are of the
form {diameter, term()}.
-A transport process can expect the following messages from
-diameter.
+A transport process can expect messages of the following types from
+its parent.
-{diameter, {send, Packet}}
+{diameter, {send, &message;}}
-
-An outbound Diameter message.
-Packet can be either binary() (the message to be sent)
-or a #diameter_packet{} record whose transport_data
-field contains a value other than undefined and whose bin field
-contains the binary to send.
+An outbound Diameter message.
{diameter, {close, Pid}}
@@ -185,7 +216,7 @@ TLS.
-A transport process should send the following messages
+A transport process should send messages of the following types
to its parent.
@@ -208,19 +239,10 @@ Not sent if the transport process has Type=accept.
endpoint to which the transport has connected.
-{diameter, {recv, Packet}}
+{diameter, {recv, &message;}}
-
-An inbound Diameter message.
-Packet can be either binary() (the received message)
-or a #diameter_packet{} record
-whose bin field contains the received binary().
-Any value (other than undefined) set in
-the transport_data field will be passed back with a
-corresponding answer message in the case that the inbound message is a
-request unless the sender sets another value.
-How transport_data is used/interpreted is up to the
-transport module.
+An inbound Diameter message.
{diameter, {tls, Ref}}
--
cgit v1.2.3