about summary refs log tree commit diff
path: root/src/network/lookup.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-02-07 14:01:34 -0500
committerRich Felker <dalias@aerifal.cx>2015-02-07 14:01:34 -0500
commitc63c98a6067030a25a42703db1209ccbcc74803a (patch)
tree7ffaee240a0cf9286d851a1681d974878b2cf091 /src/network/lookup.h
parente63833cd43a778f639e4fdf5d86cd5c526cc5db2 (diff)
downloadmusl-c63c98a6067030a25a42703db1209ccbcc74803a.tar.gz
musl-c63c98a6067030a25a42703db1209ccbcc74803a.tar.xz
musl-c63c98a6067030a25a42703db1209ccbcc74803a.zip
make getaddrinfo support SOCK_RAW and other socket types
all socket types are accepted at this point, but that may be changed
at a later time if the behavior is not meaningful for other types. as
before, omitting type (a value of 0) gives both UDP and TCP results,
and SOCK_DGRAM or SOCK_STREAM restricts to UDP or TCP, respectively.
for other socket types, the service name argument is required to be a
null pointer, and the protocol number provided by the caller is used.
Diffstat (limited to 'src/network/lookup.h')
-rw-r--r--src/network/lookup.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/lookup.h b/src/network/lookup.h
index 4e45d869..69419115 100644
--- a/src/network/lookup.h
+++ b/src/network/lookup.h
@@ -12,7 +12,7 @@ struct address {
 
 struct service {
 	uint16_t port;
-	char proto;
+	unsigned char proto, socktype;
 };
 
 /* The limit of 48 results is a non-sharp bound on the number of addresses
@@ -21,7 +21,7 @@ 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);