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
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0544 | 4 | void * | m_wakeEvent | Holds the event that wakes the OsTcp_Base thread | verified, proof two | net/dial#resolver-hand-off |
0x0614 | 4 | int32_t | m_requestCount | Counts the resolve requests started and not yet handed to their callbacks | verified, proof two | net/dial#resolver-hand-off |
0x0618 | 4 | void * | m_lock | Holds the event used as the mutex over the request list | verified, proof two | net/dial#resolver-hand-off |
0x061c | 4 | uint32_t | m_lastId | Holds the last request id given | verified, proof two | net/dial#resolver-hand-off |
0x0620 | 4 | int32_t | m_requestLinkOffset | Holds the offset of the link inside a request, 0 | verified, proof one | net/dial#resolver-hand-off |
0x0624 | 4 | ResolveRequest * | m_requestsTail | Holds the last request of the list, or the list head's own link while it is empty | verified, proof one | net/dial#resolver-hand-off |
0x0628 | 4 | ResolveRequest * | m_requests | Holds the first request of the list; an odd value ends it | verified, proof two | net/dial#resolver-hand-off |
Globals of this type
0x885400s_osTcp