added isc_sockaddr_anyofpf()
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,3 +1,5 @@
|
||||
379. [func] New library function isc_sockaddr_anyofpf().
|
||||
|
||||
378. [func] named and lwresd will log the command line arguments
|
||||
they were started with in the "starting ..." message.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* 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
|
||||
#define ISC_SOCKADDR_H 1
|
||||
@@ -57,6 +57,9 @@ isc_sockaddr_any(isc_sockaddr_t *sockaddr);
|
||||
void
|
||||
isc_sockaddr_any6(isc_sockaddr_t *sockaddr);
|
||||
|
||||
void
|
||||
isc_sockaddr_anyofpf(isc_sockaddr_t *sockaddr, int family);
|
||||
|
||||
void
|
||||
isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina,
|
||||
in_port_t port);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* 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>
|
||||
|
||||
@@ -264,6 +264,20 @@ isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, const struct in_addr *ina,
|
||||
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
|
||||
isc_sockaddr_fromin6(isc_sockaddr_t *sockaddr, const struct in6_addr *ina6,
|
||||
in_port_t port)
|
||||
|
||||
Reference in New Issue
Block a user