Commit 5bba7216 authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

added isc_sockaddr_anyofpf()

parent 95e47f45
379. [func] New library function isc_sockaddr_anyofpf().
378. [func] named and lwresd will log the command line arguments 378. [func] named and lwresd will log the command line arguments
they were started with in the "starting ..." message. they were started with in the "starting ..." message.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: sockaddr.h,v 1.32 2000/08/01 01:30:45 tale Exp $ */ /* $Id: sockaddr.h,v 1.33 2000/08/09 18:55:54 gson Exp $ */
#ifndef ISC_SOCKADDR_H #ifndef ISC_SOCKADDR_H
#define ISC_SOCKADDR_H 1 #define ISC_SOCKADDR_H 1
...@@ -57,6 +57,9 @@ isc_sockaddr_any(isc_sockaddr_t *sockaddr); ...@@ -57,6 +57,9 @@ isc_sockaddr_any(isc_sockaddr_t *sockaddr);
void void
isc_sockaddr_any6(isc_sockaddr_t *sockaddr); isc_sockaddr_any6(isc_sockaddr_t *sockaddr);
void
isc_sockaddr_anyofpf(isc_sockaddr_t *sockaddr, int family);
void void
isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina, isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina,
in_port_t port); in_port_t port);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: sockaddr.c,v 1.44 2000/08/01 01:29:48 tale Exp $ */ /* $Id: sockaddr.c,v 1.45 2000/08/09 18:55:53 gson Exp $ */
#include <config.h> #include <config.h>
...@@ -264,6 +264,20 @@ isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina, ...@@ -264,6 +264,20 @@ isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina,
ISC_LINK_INIT(sockaddr, link); ISC_LINK_INIT(sockaddr, link);
} }
void
isc_sockaddr_anyofpf(isc_sockaddr_t *sockaddr, int pf) {
switch (pf) {
case AF_INET:
isc_sockaddr_any(sockaddr);
break;
case AF_INET6:
isc_sockaddr_any6(sockaddr);
break;
default:
INSIST(0);
}
}
void void
isc_sockaddr_fromin6(isc_sockaddr_t *sockaddr, const struct in6_addr *ina6, isc_sockaddr_fromin6(isc_sockaddr_t *sockaddr, const struct in6_addr *ina6,
in_port_t port) in_port_t port)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment