diff --git a/src/Renci.SshNet/NetConfClient.cs b/src/Renci.SshNet/NetConfClient.cs index e9ebace45..e4b66ad92 100644 --- a/src/Renci.SshNet/NetConfClient.cs +++ b/src/Renci.SshNet/NetConfClient.cs @@ -208,6 +208,13 @@ public XmlDocument ClientCapabilities /// /// Sends the receive RPC. /// + /// + /// + /// var rpcXmlTemplate = "{0}"' + /// rpc.LoadXml(String.Format(rpcXmlTemplate, "")); + /// var rpcResponse = client.SendReceiveRpc(rpc); + /// + /// /// The RPC. /// /// Reply message to RPC request. @@ -226,6 +233,12 @@ public XmlDocument SendReceiveRpc(XmlDocument rpc) /// /// Sends the receive RPC. /// + /// + /// + /// var rpcXmlTemplate = "{0}"' + /// var rpcResponse = client.SendReceiveRpc(String.Format(rpcXmlTemplate, "")); + /// + /// /// The XML. /// /// Reply message to RPC request. diff --git a/src/Renci.SshNet/Netconf/NetConfSession.cs b/src/Renci.SshNet/Netconf/NetConfSession.cs index b6da47799..d844a3162 100644 --- a/src/Renci.SshNet/Netconf/NetConfSession.cs +++ b/src/Renci.SshNet/Netconf/NetConfSession.cs @@ -152,6 +152,10 @@ protected override void OnDataReceived(byte[] data) const string xpath = "/nc:hello/nc:capabilities/nc:capability[text()='urn:ietf:params:netconf:base:1.1']"; + // Per RFC6242 section 4.1, If the :base:1.1 capability is advertised by both + // peers, the chunked transfer mechanism is used for the remainder of the NETCONF + // session. Otherwise, the old end-of-message based mechanism(see Section 4.3) is used. + // This will currently evaluate to false since we (the client) do not advertise 1.1 capability. // Despite some code existing for the 1.1 framing protocol, it is thought to be incorrect or // incomplete. The NETCONF code is practically untested at the time of writing.