benilla-re systems structs docs

DBCACHECALLBACK

struct · dbcache · 32 bytes

Meaning
Holds a callback kept for a pending record: its list link, function, caller id and data
Confidence
verified, proof two
Finding
dbcache/callbacks#callback-order

Finding: Callback order in dbcache: callbacks

A lookup links the callback it keeps at the head of its key's list, and a response runs the list from the tail along the previous links: callbacks run in the order they were kept. 0x55ba30 allocates a 0x20-byte DBCACHECALLBACK, links it with 0x56d0e0(node, 2, 0) and fills in the function (+8), the caller's id (+0x10) and the data (+0x18). For a key whose node exists with no record, a set dedupe flag keeps no second callback with the same function and data. A response calls function(key, &id, data, status) with status 1 after decoding and 0 for a refusal, then frees the list. All 26 link sites of the thirteen caches use mode 2 and no reference.

The derivation is in the doc.

Fields 5

offsetsizetypenamemeaningconfidencefinding
0x00004void *m_nextLinkPoints at the next link, toward the tail, 0 while the callback is unlinkedverified, proof twodbcache/callbacks#callback-order
0x00044void *m_prevPoints at the previous member, or at the list terminator with bit 0 set at the headverified, proof twodbcache/callbacks#callback-order
0x00084void *m_functionHolds the function a response calls with the key, the id, the data and the statusverified, proof twodbcache/callbacks#callback-order
0x00108uint64_tm_idHolds the id the caller passed, whose address the function gets in edxverified, proof twodbcache/callbacks#callback-order
0x00184uint32_tm_dataHolds the data the caller passed, the function's first stack argumentverified, proof twodbcache/callbacks#callback-order