lokinet/docs/code_structure.org

118 lines
3.2 KiB
Org Mode
Raw Normal View History

2020-03-26 12:35:24 +00:00
* lokinet components
** basic data structures
*** AlignedBuffer
*** RouterContact
**** self signed router descriptor
*** Crypto key types
2020-03-26 13:02:31 +00:00
2020-03-26 12:35:24 +00:00
** network / threading / sync utilities
*** threadpool
*** logic (single thread threadpool)
** configuration
*** ini parser
*** llarp::Configuration
** cryptography
*** llarp::Crypto interface
**** libsodium / sntrup implementation
*** llarp::CryptoManager
**** crypto implementation signleton manager
** nodedb
*** llarp_nodedb
**** holds many RouterContacts loaded from disk in memory
**** uses a filesystem skiplist for on disk storage
**** stores in a std::unordered_map addressable via public identity key
** event loop
*** llarp_event_loop
**** udp socket read/write
**** network interface packet read/write
**** stream connection (outbound stream)
**** stream acceptor (inbound stream)
** link layer message transport:
*** ILinkSession
**** the interface for an entity that is single session with relay
**** responsible for delivery recieval of link layer messages in full
*** ILinkLayer
**** bound to an address / interface
**** has a direction, inbound / outbound
**** distinctly identified by the union of interface and direction
**** Holds many ILinkSessions bound on the distinctly idenitfied direction/interface
2020-03-26 13:02:31 +00:00
2020-03-26 12:35:24 +00:00
** link layer messages
*** link layer message parser
**** parses buffers as bencoded dicts
*** link layer message handler
**** handles each type of link layer message
2020-03-26 13:02:31 +00:00
2020-03-26 12:35:24 +00:00
** IHopHandler
*** llarp::PathHopConfig
**** txid, rxid, shared secret at hop
*** llarp::path::Path
**** a built path or a path being built
**** owns a std::vector<PathHopConfig> for each hop's info
*** TransitHop
**** a single hop on a built path
**** has txid, rxid, shared secret, hash of shared secret
** pathset
*** path::Builder
**** builds and maintains a set of paths for a common use
2020-03-26 13:02:31 +00:00
2020-03-26 12:35:24 +00:00
** routing layer message router
*** routing::IMessageHandler
**** interface for routing layer message processing
**** transit hops implement this if they are an endpoint
**** path::Path implement this always
2020-03-26 13:02:31 +00:00
2020-03-26 12:35:24 +00:00
** dht "layer" / rc gossiper
2020-03-26 13:02:31 +00:00
*** TODO rewrite/refactor
2020-03-26 12:35:24 +00:00
** hidden service data structures
*** IntroSet
**** decrypted plaintext hidden service descriptor
*** EncryptedIntroSet
**** public encrpyted / signed version of IntroSet
2020-03-26 13:02:31 +00:00
2020-03-26 12:35:24 +00:00
** service endpoint / outbound context connectivitybackend
*** service::Endpoint
**** backend for sending/recieving packets over the hidden service protocol layer
**** kitchen sink
*** service::SendContext
**** interface type for sending to a resource on the network
*** service::OutboundContext
**** implements SendContext extends path::Builder and path::PathSet
**** for maintaining a pathset that aligns on an introset's intros
2020-03-26 13:02:31 +00:00
~
2020-03-26 12:35:24 +00:00
** snode / exit connectivity backend
2020-03-26 13:02:31 +00:00
*** exit::BaseSession
**** extends path::Builder
**** obtains an exit/snode session from the router they are aligning to
*** exit::Endpoint
**** snode/exit side of an exit::Session
2020-03-26 12:35:24 +00:00
** snapp / exit / mobile / null frontend handlers
2020-03-26 13:02:31 +00:00
*** handlers::TunEndpoint
**** extends service::Endpoint
**** provides tun interface frontend for hidden service backend
*** handlers::ExitEndpoint
**** provides tun interface frontend for exit/snode backend
2020-03-26 12:35:24 +00:00
2020-03-26 13:02:31 +00:00
** outbound message dispatcher
*** TODO tom please document these
2020-03-26 12:35:24 +00:00