Subject: [dna] #10: Add pseudo code

From: "dna issue tracker" <[email-masked]>
Date: Fri, 29 Aug 2008 18:54:20 -0000

#10: Add pseudo code
------------------------------------------+---------------------------------
 Reporter:  [email-masked]  |       Owner:  Suresh Krishnan
     Type:  defect                        |      Status:  new            
 Priority:  major                         |   Milestone:                 
Component:  simple                        |     Version:                 
 Severity:  Active WG Document            |    Keywords:                 
------------------------------------------+---------------------------------
 It would be helpful to have some pseudo code describing the simple dna
 process.

 Submitter: Jin Hyeock Choi

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

_______________________________________________
dna mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/dna

---

From: "dna issue tracker" <[email-masked]>
Date: Wed, 24 Sep 2008 20:25:57 -0000

#10: Add pseudo code
 Severity:  Active WG Document            |   Resolution:                 
 Keywords:                                |  

Comment(by [email-masked]):

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

---

From: "dna issue tracker" <[email-masked]>
Date: Wed, 24 Sep 2008 20:25:57 -0000

#10: Add pseudo code