From c63c98a6067030a25a42703db1209ccbcc74803a Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 7 Feb 2015 14:01:34 -0500 Subject: 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. --- src/network/lookup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network/lookup.h') 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); -- cgit v1.2.1