From 5ad46d56c097ef17b77ef4532b7eb264e005fde1 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Tue, 9 Jun 2015 16:31:01 +0200 Subject: 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. --- lib/ssh/doc/src/ssh.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/ssh/doc/src') 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 @@

Provides a fun to implement your own logging when a server disconnects the client.

+ report | skip }]]> + +

Provides a fun to implement your own logging or other action when an unexpected message arrives. + If the fun returns report the usual info report is issued but if skip is returned no + report is generated.

+

Peer is in the format of {Host,Port}.

+
+ @@ -532,6 +540,14 @@ kex is implicit but public_key is set explicitly.

Provides a fun to implement your own logging when a user disconnects from the server.

+ report | skip }]]> + +

Provides a fun to implement your own logging or other action when an unexpected message arrives. + If the fun returns report the usual info report is issued but if skip is returned no + report is generated.

+

Peer is in the format of {Host,Port}.

+
+ _}]]>

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 ConnectionRef is the reference to the connection on which the message arrived. The return value from the fun is not checked.

-- cgit v1.2.3