Subject: [Netconf] Delimiter usage for Notifications RFC 5277, RFC 6242

From: Rohit R Ranade <[email-masked]>
Date: Fri, 6 Feb 2015 08:29:28 +0000

Hi All,

I have a scenario where many notifications get generated in my device. When the client subscribes for these notifications, I do not want to send him 1 notification per message.
I want to maybe club the notifications and separate each notification using the RFC 4742 specified "]]>]]>" delimiter. I do not want to move towards Chunked Framing mechanism of RFC 6242.

An example about what I am saying is like this: Multiple notifications in one message.

<?xml version="1.0" encoding="UTF-8"?>
<notification xmls="urn:ietf:params:xml:ns:netconf:notification:1.0" >
  <eventTime>2014-08-27T01:21:18</eventTime>
  <event xmls=" SomeURI">
    <f1>abc</f1>
    <reportingEntity>
      <f2>2</f2>
      <f3>2</f3>
    </reportingEntity>
  </event>
</notification>]]>]]>
<?xml version="1.0" encoding="UTF-8"?>
<notification xmls="urn:ietf:params:xml:ns:netconf:notification:1.0" >
  <eventTime>2014-08-27T01:21:18</eventTime>
  <event xmls=" SomeURI">
    <f1>abc</f1>
    <reportingEntity>
      <f2>3</f2>
      <f3>4</f3>
    </reportingEntity>
  </event>
</notification>]]>]]>

(1) RFC 4742 and 6242 does not mention that the message ends once the delimiter is encountered and Client needs to ignore the data following the delimiter.
(2) It also does not clearly mention that a message can have multiple XML documents separated by delimiter.

The only information which points towards (2) i.e  clubbing XML documents is as below:

This is done to remove network congestion due to excessive notification packets. Kindly provide a conclusion whether to club multiple XML documents or not.

With Regards,
Rohit

---

From: Martin Bjorklund <[email-masked]>
Date: Fri, 06 Feb 2015 09:42:30 +0100 (CET)

Rohit R Ranade <[email-masked]> wrote:
> Hi All,
> 
> I have a scenario where many notifications get generated in my
> device. When the client subscribes for these notifications, I do not
> want to send him 1 notification per message.

When you write "message" above, what do you mean?

1 notification = 1 NETCONF message = 1 XML document

After every such NETCONF message, you MUST send the "]]>]]>" delimiter
(if you follow 4742).

> I want to maybe club the notifications

I don't know what "club the notifications" mean.

/martin

---

From: Rohit R Ranade <[email-masked]>
Date: Fri, 6 Feb 2015 09:00:24 +0000

Hi,

By one message, I mean one SSH message.

=====> SSH message start

=====> SSH message End

Clubbing of notifications refers to putting multiple notification messages in one SSH message. 
In RFC 6242, section 4.3 "Conceptually,
   the SSH Transport layer passes any data found in between the ]]>]]>
   characters to the Messages layer.
"

Does this mean that multiple delimiters can be found in a single SSH message and NETCONF need to treat data between each ]]>]]> as a separate XML document and parse the same ?

With Regards,
Rohit

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Fri, 6 Feb 2015 10:07:41 +0100

> By one message, I mean one SSH message.

SSH ships data usually in SSH_MSG_CHANNEL_DATA messages, see RFC
4254. It is up to implementations how they map NETCONF messages into
SSH_MSG_CHANNEL_DATA - the mapping can be pretty arbitrary (e.g.,
there is no requirement that NETCONF messages boundaries match
SSH_MSG_CHANNEL_DATA message boundaries).

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: Martin Bjorklund <[email-masked]>
Date: Fri, 06 Feb 2015 10:28:54 +0100 (CET)

> By one message, I mean one SSH message.

Ok, this is fine.  You don't have to send one NETCONF message in one
SSH message.  The NETCONF message might be huge and not even fit into
one SSH packet, and it is perfectly fine to have multiple NETCONF
messages in one SSH packet.  (if you have that kind of control of the
SSH packets...)

> Does this mean that multiple delimiters can be found in a single SSH
> message and NETCONF need to treat data between each ]]>]]> as a
> separate XML document and parse the same ?

Yes.

/martin