benilla-re systems structs docs

OsTcp

struct · os · 1580 bytes

Meaning
Holds the OsTcp object: the network thread's events, the resolve request count, lock, id counter and list
Confidence
verified, proof one
Finding
net/dial#resolver-hand-off

Finding: Resolver hand-off in net: dial

The thread adds each entry, under the OsTcp object's lock (an event at +0x618 used as a mutex), to the list at request +0x24: capacity, count +0x28, data +0x2c, step. At the list's end it stores 1 at +0x20, the flag, and sets the event at the object's +0x544. A request missing from the object's list, or a hostent whose first address pointer is null, ends the thread before the flag. The OsTcp thread 0x43ae20, named OsTcp_Base, takes requests off the list's head while the head's flag is set and, on that thread, calls each one's callback through 0x43b810 with the data pointer, the count and the argument, then frees its host copy, thread handle and list.

The derivation is in the doc.

Fields 7

offsetsizetypenamemeaningconfidencefinding
0x05444void *m_wakeEventHolds the event that wakes the OsTcp_Base threadverified, proof twonet/dial#resolver-hand-off
0x06144int32_tm_requestCountCounts the resolve requests started and not yet handed to their callbacksverified, proof twonet/dial#resolver-hand-off
0x06184void *m_lockHolds the event used as the mutex over the request listverified, proof twonet/dial#resolver-hand-off
0x061c4uint32_tm_lastIdHolds the last request id givenverified, proof twonet/dial#resolver-hand-off
0x06204int32_tm_requestLinkOffsetHolds the offset of the link inside a request, 0verified, proof onenet/dial#resolver-hand-off
0x06244ResolveRequest *m_requestsTailHolds the last request of the list, or the list head's own link while it is emptyverified, proof onenet/dial#resolver-hand-off
0x06284ResolveRequest *m_requestsHolds the first request of the list; an odd value ends itverified, proof twonet/dial#resolver-hand-off

Globals of this type