[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Message-id and Session-id



Dear all:

  I am confused by an example in the prop-04 document, so I want to ask a few questions.
1. when does the message-id increasing? 
2. how does the session-id create?
  
  Formerly I think that a Session is composed by several messages which are sent from a special client. The session and the messages is identified by session-ID and message-ID respectively.

  In the prop-04,the message-id is defined as "an arbitrary string chosen by the sender of the RPC that will commonly encode a monotonically increasing integer." 

  In followed example, (in 7.5), the first message acquired a lock successfully, I supposed 
the message is identified by "101" , and the message is part of the session 150 of clientA.
  then clientB try to acquire a lock through message "101" in its session 454, of course failed.
  
  BUT, why can it use the same message-id with clientA?  does it mean the message-id only
increasing in the session which it belonged?

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
         <lock>
           <target>
             <running/>
           </target>
         </lock>
</rpc> 

<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
         <ok/> <!-- lock succeeded -->
       </rpc-reply>

       <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
         <lock>
           <target>
             <running/>
           </target>
         </lock>
       </rpc>

       <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
         <rpc-error> <!-- lock failed -->
           <error-type>protocol</error-type>
           <error-tag>LOCK_DENIED</error-tag>
           <error-severity>error</error-severity>
           <session-id>150</session-id>
           <error-message>Lock failed, lock is already held</error-message>
           <error-info>
             <session-id>454</session-id> <!-- lock is held by NETCONF session 454 -->
           </error-info>
         </rpc-error>
       </rpc-reply>


Best Regards

Wang

--------------------------------------------------
Han Wang   PostGraduate

Research Center of Network Technology
Nanjing University of Posts and Telecommunications
---------------------------------------------------


--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>