[dna] Pseudocode for Simple DNA (Providing text to resolve issue #10)

Suresh Krishnan <suresh.krishnan@ericsson.com> Wed, 24 September 2008 20:29 UTC

Return-Path: <dna-bounces@ietf.org>
X-Original-To: dna-archive@lists.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 F1D183A67F1; Wed, 24 Sep 2008 13:29:11 -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 4E5853A67F1 for <dna@core3.amsl.com>; Wed, 24 Sep 2008 13:29:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.432
X-Spam-Level:
X-Spam-Status: No, score=-6.432 tagged_above=-999 required=5 tests=[AWL=0.167, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 MD1drrQkgAUH for <dna@core3.amsl.com>; Wed, 24 Sep 2008 13:29:09 -0700 (PDT)
Received: from imr2.ericy.com (imr2.ericy.com [198.24.6.3]) by core3.amsl.com (Postfix) with ESMTP id 4C2443A67EC for <dna@ietf.org>; Wed, 24 Sep 2008 13:29:09 -0700 (PDT)
Received: from eusrcmw751.eamcs.ericsson.se (eusrcmw751.exu.ericsson.se [138.85.77.51]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id m8OKS8U7004485; Wed, 24 Sep 2008 15:28:12 -0500
Received: from eusrcmw750.eamcs.ericsson.se ([138.85.77.50]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Wed, 24 Sep 2008 15:28:08 -0500
Received: from [142.133.10.113] ([142.133.10.113]) by eusrcmw750.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Wed, 24 Sep 2008 15:28:07 -0500
Message-ID: <48DAA2F7.1000502@ericsson.com>
Date: Wed, 24 Sep 2008 16:28:39 -0400
From: Suresh Krishnan <suresh.krishnan@ericsson.com>
User-Agent: Thunderbird 2.0.0.16 (X11/20080724)
MIME-Version: 1.0
To: dna@ietf.org, JinHyeock Choi <jinchoe@gmail.com>, JinHyeock Choi <jinchoe@samsung.com>
X-OriginalArrivalTime: 24 Sep 2008 20:28:07.0923 (UTC) FILETIME=[0E2EBC30:01C91E84]
Subject: [dna] Pseudocode for Simple DNA (Providing text to resolve issue #10)
X-BeenThere: dna@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
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-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: dna-bounces@ietf.org
Errors-To: dna-bounces@ietf.org

Hi Folks,

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


6.  Pseudocode for Simple DNA

        /* 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 */
        }


If you have any issues with this text, please respond to this mail on list.

Thanks
Suresh


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