dns.mitm: implement mitm for the new c-ares resolver and update serializer code

This commit is contained in:
hexkyz
2026-10-06 02:25:38 +01:00
parent c8b7316581
commit f5cd912604
11 changed files with 769 additions and 24 deletions

View File

@@ -158,7 +158,40 @@ namespace ams::socket {
char *ai_canonname;
AddrInfo *ai_next;
};
/* NOTE: We are using the c-ares structs under ams::socket. */
/* Should we include c-ares instead somewhere? */
struct ares_addrinfo_node {
int ai_ttl;
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
socklen_t ai_addrlen;
struct sockaddr *ai_addr;
struct ares_addrinfo_node *ai_next;
};
struct ares_addrinfo_cname {
int ttl;
char *alias;
char *name;
struct ares_addrinfo_cname *next;
};
struct ares_addrinfo {
struct ares_addrinfo_cname *cnames;
struct ares_addrinfo_node *nodes;
char *name;
};
struct ares_addrinfo_hints {
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
};
struct TimeVal {
long tv_sec;
long tv_usec;