Re: [dna] #10: Add pseudo code

"dna issue tracker" <trac@tools.ietf.org> Wed, 24 September 2008 20:26 UTC

Return-Path: <dna-bounces@ietf.org>
X-Original-To: dna-archive@ietf.org
Delivered-To: ietfarch-dna-archive@core3.amsl.com
Received: from [127.0.0.1] (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 4B19B3A6874; Wed, 24 Sep 2008 13:26:10 -0700 (PDT)
X-Original-To: dna@core3.amsl.com
Delivered-To: dna@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 36A4C3A67F1 for <dna@core3.amsl.com>; Wed, 24 Sep 2008 13:26:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.599
X-Spam-Level:
X-Spam-Status: No, score=-106.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aIN2HKnak+st for <dna@core3.amsl.com>; Wed, 24 Sep 2008 13:26:08 -0700 (PDT)
Received: from merlot.tools.ietf.org (merlot.tools.ietf.org [194.146.105.14]) by core3.amsl.com (Postfix) with ESMTP id 10D123A6874 for <dna@ietf.org>; Wed, 24 Sep 2008 13:26:08 -0700 (PDT)
Received: from localhost ([127.0.0.1]:42950 helo=merlot.tools.ietf.org) by merlot.tools.ietf.org with esmtp (Exim 4.69) (envelope-from <trac@tools.ietf.org>) id 1Kiavt-00065T-I2; Wed, 24 Sep 2008 22:25:57 +0200
MIME-Version: 1.0
From: dna issue tracker <trac@tools.ietf.org>
X-Trac-Version: 0.11.1
Precedence: bulk
Auto-Submitted: auto-generated
X-Mailer: Trac 0.11.1, by Edgewall Software
To: suresh.krishnan@ericsson.com
X-Trac-Project: dna
Date: Wed, 24 Sep 2008 20:25:57 -0000
X-URL: http://tools.ietf.org/dna/
X-Trac-Ticket-URL: http://rsync.tools.ietf.org/wg/dna/trac/ticket/10#comment:1
Message-ID: <075.d588590953377415dc8fb2d78b64b97d@tools.ietf.org>
References: <066.1ae55db6e4107a50e89039d1534276b2@tools.ietf.org>
X-Trac-Ticket-ID: 10
In-Reply-To: <066.1ae55db6e4107a50e89039d1534276b2@tools.ietf.org>
X-SA-Exim-Connect-IP: 127.0.0.1
X-SA-Exim-Rcpt-To: suresh.krishnan@ericsson.com, dna@ietf.org
X-SA-Exim-Mail-From: trac@tools.ietf.org
X-SA-Exim-Scanned: No (on merlot.tools.ietf.org); SAEximRunCond expanded to false
Cc: dna@ietf.org
Subject: Re: [dna] #10: Add pseudo code
X-BeenThere: dna@ietf.org
X-Mailman-Version: 2.1.9
Reply-To: dna@ietf.org
List-Id: DNA working group mailing list <dna.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/dna>, <mailto:dna-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/pipermail/dna>
List-Post: <mailto:dna@ietf.org>
List-Help: <mailto:dna-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dna>, <mailto:dna-request@ietf.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: dna-bounces@ietf.org
Errors-To: dna-bounces@ietf.org

#10: Add pseudo code
------------------------------------------+---------------------------------
 Reporter:  suresh.krishnan@ericsson.com  |        Owner:  Suresh Krishnan
     Type:  defect                        |       Status:  new            
 Priority:  major                         |    Milestone:                 
Component:  simple                        |      Version:                 
 Severity:  Active WG Document            |   Resolution:                 
 Keywords:                                |  
------------------------------------------+---------------------------------

Comment(by suresh.krishnan@ericsson.com):

 I propose to add the following text to a new section called
 "Pseudocode for Simple DNA" to resolve this issue. The pseudocode is
 written in an imaginary language and any resemblance to real programming
 languages is unintentional.


        /* Link up indication received on INTERFACE */
        /* Start Simple DNA process */

        /* Mark All Addresses as deprecated */
        Configured_Address_List=Get_Address_List(INTERFACE);
        foreach Configured_Address in Configured_Address_List
        {
          if (Get_Address_State(Configured_Address)!=AS_TENTATIVE)
          {
            Set_Address_State(Configured_Address,AS_DEPRECATED);
          }
        }

        /* Mark all routers' NC entries as STALE to speed up */
        /* acquisition of new router if link change has occurred */
        foreach Router_Address in DEFAULT_ROUTER_LIST
        {
          NCEntry=Get_Neighbor_Cache_Entry(Router_Address);
          Set_Neighbor_Cache_Entry_State(NCEntry,NCS_STALE);
        }

        /* Thread A : Send Router Solicitation */
        RS_Target_Address=FF02::2;
        RS_Source_Address=Get_Any_Link_Local_Address(INTERFACE);
        Send_Router_Solicitation(RS_Source_Address,RS_Target_Address);

        /* Thread B : Send Neighbor Solicitation(s) */
        Previously_Known_Router_List=Get_Router_List_from_SDAT();
        NS_Source_Address=Get_Any_Link_Local_Address(INTERFACE);

        foreach Router_Address in Previously_Known_Router_List
        {
          if (Get_Any_Valid_Address_from_SDAT(Router_Address))
          {
            Send_Neighbor_Solicitation(NS_Source_Address,Router_Address);
          }
        }

        /* Thread C : Response collection */

        /* Received Router Advertisement processing */
        /* Only for RAs received as response to DNA RSs */

        L3_Source=Get_L3_Source(RECEIVED_MESSAGE);
        L2_Source=Get_L2_Source(RECEIVED_MESSAGE);
        SDAT_Entry_List=Get_Entries_from_SDAT_L2L3(L3_Source,L2_Source));
        foreach SDAT_Entry in SDAT_Entry_List
        {
          if (Exists_PIO(RECEIVED_MESSAGE,Get_Prefix(SDAT_Entry)))
          {
            /* Address is operable. Configure on Interface */
            /* Rejoin solicited-node multicast group for address */
          }
          else
          {
            /* If address is configured on interface, remove it */
            /* This could be because of a NA arriving before RA */
          }
        }

        /* Mark router as reachable */
        NCEntry=Get_Neighbor_Cache_Entry(L3_Source);
        if (NCEntry is not NULL)
        {
          Set_Neighbor_Cache_Entry_State(NCEntry,NCS_REACHABLE);
        }
        else
        {
          Create_Neighbor_Cache_Entry(L3_Source,NCS_REACHABLE);
        }

        /* Ignore further NAs from this router */
        Add_Router_to_NA_Ignore_List(L3_Source);


        /* Received Neighbor Advertisement processing */
        /* Only for NAs received as response to DNA NSs */

        L3_Source=Get_L3_Source(RECEIVED_MESSAGE);
        L2_Source=Get_L2_Source(RECEIVED_MESSAGE);

        if (Is_Router_on_NA_Ignore_List(L3_Source)) {
          /* Ignore message and wait for next message */
          continue;
        }

        SDAT_Entry_List=Get_Entries_from_SDAT_L2L3(L3_Source,L2_Source));

        foreach SDAT_Entry in SDAT_Entry_List
        {
            /* Address is operable. Configure on Interface */
        }

-- 
Ticket URL: <http://rsync.tools.ietf.org/wg/dna/trac/ticket/10#comment:1>
dna <http://tools.ietf.org/dna/>

_______________________________________________
dna mailing list
dna@ietf.org
https://www.ietf.org/mailman/listinfo/dna