X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fnetwork%2Flookup.h;h=0468edbc61c569d260fa2709ae719256523844b4;hb=7c82870d4543f0eeb0e3a2638b083ff97b41a0fb;hp=4e45d869908e9ef4cb72a67ecd9c48cfda8da841;hpb=3c42605a603485df60ed42792c3d3113a4c47a90;p=musl diff --git a/src/network/lookup.h b/src/network/lookup.h index 4e45d869..0468edbc 100644 --- a/src/network/lookup.h +++ b/src/network/lookup.h @@ -2,6 +2,7 @@ #define LOOKUP_H #include +#include struct address { int family; @@ -12,7 +13,15 @@ struct address { struct service { uint16_t port; - char proto; + unsigned char proto, socktype; +}; + +#define MAXNS 3 + +struct resolvconf { + struct address ns[MAXNS]; + unsigned nns, attempts, ndots; + unsigned timeout; }; /* The limit of 48 results is a non-sharp bound on the number of addresses @@ -21,8 +30,10 @@ struct service { #define MAXADDRS 48 #define MAXSERVS 2 -int __lookup_serv(struct service buf[static MAXSERVS], const char *name, int proto, int flags); +int __lookup_serv(struct service buf[static MAXSERVS], const char *name, int proto, int socktype, int flags); int __lookup_name(struct address buf[static MAXADDRS], char canon[static 256], const char *name, int family, int flags); int __lookup_ipliteral(struct address buf[static 1], const char *name, int family); +int __get_resolv_conf(struct resolvconf *, char *, size_t); + #endif