diff options
author | Hans Nilsson <[email protected]> | 2015-06-09 16:31:01 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-06-09 16:31:01 +0200 |
commit | 5ad46d56c097ef17b77ef4532b7eb264e005fde1 (patch) | |
tree | 4a5a37332e4829acddfbf085d39fa1748108d4b2 /lib/ssh/doc/src | |
parent | bbd68fb2f45ec2089d6f1bbffd2601bf776aa267 (diff) | |
download | otp-5ad46d56c097ef17b77ef4532b7eb264e005fde1.tar.gz otp-5ad46d56c097ef17b77ef4532b7eb264e005fde1.tar.bz2 otp-5ad46d56c097ef17b77ef4532b7eb264e005fde1.zip |
ssh: Option unexpectedfun for ssh:daemon and ssh:connect
This option has a fun as value. The fun will be called when an
unexpected message arrives. The fun returns either 'skip' or 'report'
to guide the connection_handler what to do.
One usage is to filter out messages that are not wanted in the error
logger as info reports. An example of such a message is the 'etimedout'
tcp error message that will be received if a connection has keep_alive
and the peer is restarted.
Diffstat (limited to 'lib/ssh/doc/src')
-rw-r--r-- | lib/ssh/doc/src/ssh.xml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml index 5402d91e03..b39ca0852c 100644 --- a/lib/ssh/doc/src/ssh.xml +++ b/lib/ssh/doc/src/ssh.xml @@ -180,6 +180,14 @@ <p>Provides a fun to implement your own logging when a server disconnects the client.</p> </item> + <tag><c><![CDATA[{unexpectedfun, fun(Message:term(), Peer) -> report | skip }]]></c></tag> + <item> + <p>Provides a fun to implement your own logging or other action when an unexpected message arrives. + If the fun returns <c>report</c> the usual info report is issued but if <c>skip</c> is returned no + report is generated.</p> + <p><c>Peer</c> is in the format of <c>{Host,Port}</c>.</p> + </item> + <tag><c><![CDATA[{public_key_alg, 'ssh-rsa' | 'ssh-dss'}]]></c></tag> <item> <note> @@ -532,6 +540,14 @@ kex is implicit but public_key is set explicitly.</p> <p>Provides a fun to implement your own logging when a user disconnects from the server.</p> </item> + <tag><c><![CDATA[{unexpectedfun, fun(Message:term(), Peer) -> report | skip }]]></c></tag> + <item> + <p>Provides a fun to implement your own logging or other action when an unexpected message arrives. + If the fun returns <c>report</c> the usual info report is issued but if <c>skip</c> is returned no + report is generated.</p> + <p><c>Peer</c> is in the format of <c>{Host,Port}</c>.</p> + </item> + <tag><c><![CDATA[{ssh_msg_debug_fun, fun(ConnectionRef::ssh_connection_ref(), AlwaysDisplay::boolean(), Msg::binary(), LanguageTag::binary()) -> _}]]></c></tag> <item> <p>Provide a fun to implement your own logging of the SSH message SSH_MSG_DEBUG. The last three parameters are from the message, see RFC4253, section 11.3. The <c>ConnectionRef</c> is the reference to the connection on which the message arrived. The return value from the fun is not checked.</p> |