Source Code Guide: Difference between revisions

From Ouroboros
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
{|class="wikitable" style="margin:auto"
{|class="wikitable" style="margin:auto"
|+ Ouroboros index of commonly used variable names
|+ Ouroboros index of commonly used variable names
! name !! Long name !! Description
! type !! name !! Description
|-
| du
| data unit
| packet, but stems from RINA that took the OSI SDU (service data unit) and PDU (protocol data unit) - will be renamed
|-
|-
| struct shm_du_buff *
| sdb
| sdb
|  
| shared memory (shm) data unit (du) buffer. The ouroboros 'flavored' [https://ftp.gnumonks.org/pub/doc/skb-doc.html skb]. The term 'data unit' stems from the OSI SDU (service data unit) and PDU (protocol data unit), which were adopted by RINA. An sdb is a (fixed size) buffer that contains the actual packet data and room for packet headers (and packet tails such as CRC), in addition to some metadata for managing the buffer (head and tail offset to the start of the packet, total size of the buffer, ...).  
| the ouroboros 'flavored' skb, see [https://ftp.gnumonks.org/pub/doc/skb-doc.html e.g.]
|-
|-
| int
| fd
| fd
| flow descriptor
| flow descriptor. It's the flow analogue to a file descriptor.
|
|-
|-
| shm
| struct shm_rbuff *
| shared memory
| tx_rb, rx_rb, rb
| see e.g. /dev/shm in Linux
| ring buffer. These ring buffers are (small) ring buffers, used to efficiently move packets through the local pipeline. They are used tpo pass an index that points to an ''sdb'' in the rdrbuff, and are the entry and exit structures with which the application (either a user application or an IPCP) interacts with the end-to-end [[Flow | flow]].
|-
|-
| rbuff
| struct shm_rdrbuff *
| ring buffer
| rdrb
| rbuff are small ring buffers, they are used to move packets through the local pipeline. Instead of passing packets, it passes the index in the rdrbuff to the next process
| random deletion ring buffer, This is the block of memory in which Ouroboros stores actual packet data (and metadata) in a (ring buffer) of ''sdb''s. Basically a quick-and-dirty memory allocator.
|-
| rdrbuff
| random deletion ring buffer
| it's our quick and dirty packet buffer. It contains actual packet data
|-
|-
| size_t
| idx
| idx
| index
| This ''idx'' is an index in the packet buffer (rdrbuff) and used to calculate the location of the packet in reference the base pointer at which the rdrbuff is mapped into each process' memory space.
| index in the packet buffer (rdrbuff) is used to calculate the location of the packet in reference to this base pointer
|}
|-
| shm_du_buff
|
| packet (metadata?) with head and tail (todo: have a look at the code)

Revision as of 17:44, 16 June 2022

Work in progress, collects names used throughout the source code and gives some added meaning

Ouroboros index of commonly used variable names
type name Description
struct shm_du_buff * sdb shared memory (shm) data unit (du) buffer. The ouroboros 'flavored' skb. The term 'data unit' stems from the OSI SDU (service data unit) and PDU (protocol data unit), which were adopted by RINA. An sdb is a (fixed size) buffer that contains the actual packet data and room for packet headers (and packet tails such as CRC), in addition to some metadata for managing the buffer (head and tail offset to the start of the packet, total size of the buffer, ...).
int fd flow descriptor. It's the flow analogue to a file descriptor.
struct shm_rbuff * tx_rb, rx_rb, rb ring buffer. These ring buffers are (small) ring buffers, used to efficiently move packets through the local pipeline. They are used tpo pass an index that points to an sdb in the rdrbuff, and are the entry and exit structures with which the application (either a user application or an IPCP) interacts with the end-to-end flow.
struct shm_rdrbuff * rdrb random deletion ring buffer, This is the block of memory in which Ouroboros stores actual packet data (and metadata) in a (ring buffer) of sdbs. Basically a quick-and-dirty memory allocator.
size_t idx This idx is an index in the packet buffer (rdrbuff) and used to calculate the location of the packet in reference the base pointer at which the rdrbuff is mapped into each process' memory space.