ResolveRequest
struct · os · 52 bytes
- Meaning
- Holds a host resolve request: link, host text, id, thread, callback, done flag and address 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 13
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 4 | ResolveRequest * | m_prev | Holds the previous link: the list head's link for the first request, else the request before it | verified, proof one | net/dial#resolver-hand-off |
0x0004 | 4 | ResolveRequest * | m_next | Holds the next request of the list; an odd value ends it | verified, proof one | net/dial#resolver-hand-off |
0x0008 | 4 | char * | m_host | Holds the copy of the host text the request owns | verified, proof two | net/dial#resolver-hand-off |
0x000c | 4 | char * | m_remaining | Holds the text not yet cut into pieces, null once the last piece is taken | verified, proof one | net/dial#resolver-hand-off |
0x0010 | 4 | uint32_t | m_id | Holds the request id | verified, proof two | net/dial#resolver-hand-off |
0x0014 | 4 | void * | m_thread | Holds the handle of the resolver thread | verified, proof two | net/dial#resolver-hand-off |
0x0018 | 4 | void * | m_callback | Holds the function called with the finished list | verified, proof two | net/dial#resolver-hand-off |
0x001c | 4 | void * | m_user | Holds the argument passed to the callback | verified, proof two | net/dial#resolver-hand-off |
0x0020 | 4 | uint32_t | m_done | Holds 1 once the thread has ended the list | verified, proof two | net/dial#resolver-hand-off |
0x0024 | 4 | uint32_t | m_capacity | Holds the capacity of the address list in entries | verified, proof two | net/dial#resolver-hand-off |
0x0028 | 4 | uint32_t | m_count | Holds the count of entries in the address list | verified, proof two | net/dial#resolver-hand-off |
0x002c | 4 | void * | m_entries | Holds the address list, 16-byte socket addresses | verified, proof two | net/dial#resolver-hand-off |
0x0030 | 4 | uint32_t | m_step | Holds the step by which the address list grows | verified, proof two | net/dial#resolver-hand-off |