Project

General

Profile

Task #4787

Consolidate src/tlv/**lsa** into src/**lsa**

Added by Ashlesh Gawande about 1 year ago. Updated 10 days ago.

Status:
Code review
Priority:
Normal
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

Seems like duplicated functionality. Also then we can use wireEncode for LSAs instead of creating a string manually to represent the LSA.

History

#1

Updated by Ashlesh Gawande about 1 year ago

  • Assignee set to Saurab Dulal
#2

Updated by Ashlesh Gawande 10 days ago

  • Status changed from New to Code review
  • Assignee changed from Saurab Dulal to Ashlesh Gawande
  • % Done changed from 0 to 100

https://gerrit.named-data.net/c/NLSR/+/5935

Major changes:
tlv/lsa classes are removed. wireEncode/wireDecode functions from it are moved to lsa/lsa where they are modified as followed:

  • Lsa (Used to be LsaInfo)
    • Use ndn::tlv::Name instead of ndn::tlv::nlsr::OriginRouter, OriginRouter is removed from tlvs
    • Use expiration timepoint as string instead of expiration period as was the case in LsaInfo
      • Clients are expected to subtracted from current time if they want to show time period
      • Nlsrc is modified to do so
  • Adjacent: Include status as AdjacencyStatus as well as number of interest timed out as AdjacencyInterestTimedOutNo

If these changes are acceptable then I can update the wiki pages. This will be a breaking change.

Serialize/Deserialize functions are removed from Lsa classes and replaced with the newly moved wireEncode/wireDecode.
Lsdb and Dataset publisher are now using these to send LSAs on the wire.

All the other changes are to either facilitate the above or cleaning up the code as seen during the move.
The change deletes ~3000 lines of code including tests (~1000 added, ~4000 deleted).
This improves clean compilation by 2 seconds without tests and 6 seconds with tests on my machine.

Also available in: Atom PDF