Commit a252c277 authored by David Lawrence's avatar David Lawrence
Browse files

include isc/net.h, do not include sys/socket.h, netinet/in.h or arpa/inet.h,

and/or use type in_port_t instead of unsigned int for ports
parent 64828244
......@@ -20,6 +20,7 @@
#include <isc/types.h>
#include <isc/rwlock.h>
#include <isc/net.h>
#include <dns/types.h>
......@@ -49,7 +50,7 @@ EXTERN isc_socketmgr_t * ns_g_socketmgr INIT(NULL);
EXTERN ns_interfacemgr_t * ns_g_interfacemgr INIT(NULL);
EXTERN ns_clientmgr_t * ns_g_clientmgr INIT(NULL);
EXTERN char * ns_g_version INIT(VERSION);
EXTERN unsigned int ns_g_port INIT(5544);
EXTERN in_port_t ns_g_port INIT(5544);
EXTERN dns_viewlist_t ns_g_viewlist;
EXTERN isc_rwlock_t ns_g_viewlock;
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: xfrin.c,v 1.9 1999/09/28 13:51:18 gson Exp $ */
/* $Id: xfrin.c,v 1.10 1999/10/02 02:54:12 tale Exp $ */
#include <config.h>
......@@ -32,6 +32,7 @@
#include <isc/mem.h>
#include <isc/result.h>
#include <isc/timer.h>
#include <isc/net.h>
#include <dns/types.h>
#include <dns/result.h>
......@@ -178,7 +179,7 @@ xfrin_create(isc_mem_t *mctx,
dns_rdataclass_t rdclass,
dns_rdatatype_t reqtype,
char *addrstr, /* XXX */
unsigned int port,
in_port_t port,
dns_tsig_key_t *tsigkey,
xfrin_ctx_t **xfrp);
......@@ -617,7 +618,7 @@ xfrin_create(isc_mem_t *mctx,
dns_rdataclass_t rdclass,
dns_rdatatype_t reqtype,
char *addrstr, /* XXX */
unsigned int port,
in_port_t port,
dns_tsig_key_t *tsigkey,
xfrin_ctx_t **xfrp)
{
......
......@@ -22,10 +22,13 @@
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <isc/app.h>
#include <isc/assertions.h>
#include <isc/error.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/task.h>
#include <isc/thread.h>
#include <isc/result.h>
......@@ -40,13 +43,6 @@
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "printmsg.h"
isc_mem_t *mctx;
......
......@@ -22,11 +22,14 @@
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <isc/app.h>
#include <isc/assertions.h>
#include <isc/error.h>
#include <isc/mem.h>
#include <isc/mutex.h>
#include <isc/net.h>
#include <isc/task.h>
#include <isc/thread.h>
#include <isc/result.h>
......@@ -41,13 +44,6 @@
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "printmsg.h"
typedef struct {
......
......@@ -156,7 +156,7 @@ hex_dump(isc_buffer_t *b)
}
static void
get_address(char *hostname, unsigned int port, isc_sockaddr_t *sockaddr) {
get_address(char *hostname, in_port_t port, isc_sockaddr_t *sockaddr) {
struct in_addr in4;
struct in6_addr in6;
struct hostent *he;
......@@ -217,7 +217,7 @@ send_done(isc_task_t *task, isc_event_t *event) {
int
main(int argc, char *argv[]) {
char *server;
unsigned int port;
in_port_t port;
isc_boolean_t vc, have_name, have_type, edns0;
dns_name_t *name;
static unsigned char *namedata[512];
......
......@@ -18,9 +18,6 @@
#include <config.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <limits.h>
#include <syslog.h>
......
......@@ -18,9 +18,9 @@
#include <config.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <isc/assertions.h>
#include <isc/net.h>
#include <dns/confctl.h>
#include <dns/confcommon.h>
......
......@@ -17,7 +17,7 @@
*/
#if !defined(lint) && !defined(SABER)
static char rcsid[] = "$Id: confparser.y,v 1.5 1999/09/17 14:21:43 brister Exp $";
static char rcsid[] = "$Id: confparser.y,v 1.6 1999/10/02 02:54:14 tale Exp $";
#endif /* not lint */
#include <config.h>
......@@ -29,9 +29,6 @@ static char rcsid[] = "$Id: confparser.y,v 1.5 1999/09/17 14:21:43 brister Exp $
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <syslog.h>
......@@ -42,7 +39,7 @@ static char rcsid[] = "$Id: confparser.y,v 1.5 1999/09/17 14:21:43 brister Exp $
#include <isc/symtab.h>
#include <isc/error.h>
#include <isc/once.h>
#include <isc/net.h>
#include <dns/confparser.h>
#include <dns/confctx.h>
......
......@@ -18,10 +18,9 @@
#include <config.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <isc/assertions.h>
#include <isc/net.h>
#include <dns/confserv.h>
#include <dns/confcommon.h>
......
......@@ -18,11 +18,9 @@
#include <config.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <isc/assertions.h>
#include <isc/net.h>
#include <dns/confzone.h>
#include <dns/confcommon.h>
......
......@@ -56,7 +56,6 @@
#include <config.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <stdio.h>
......
......@@ -58,9 +58,9 @@
#include <config.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <dns/confip.h>
......
......@@ -54,11 +54,11 @@
#include <config.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <isc/region.h>
#include <isc/list.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <dns/confcommon.h>
......
......@@ -52,9 +52,9 @@
#include <config.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <dns/types.h>
#include <dns/confcommon.h>
......
......@@ -124,7 +124,7 @@ struct dns_c_slave_zone
isc_boolean_t maint_ixfr_base;
isc_int32_t max_ixfr_log;
dns_c_pubkey_t *pubkey;
isc_int32_t master_port;
in_port_t master_port;
dns_c_iplist_t *master_ips;
isc_sockaddr_t transfer_source;
isc_int32_t max_trans_time_in;
......@@ -142,7 +142,7 @@ struct dns_c_stub_zone
dns_c_ipmatchlist_t *allow_transfer; /* should be here??? */
isc_boolean_t dialup;
dns_c_pubkey_t *pubkey;
isc_int32_t master_port;
in_port_t master_port;
dns_c_iplist_t *master_ips;
isc_sockaddr_t transfer_source;
isc_int32_t max_trans_time_in;
......@@ -249,7 +249,7 @@ isc_result_t dns_c_zone_setpubkey(dns_c_zone_t *zone,
dns_c_pubkey_t *pubkey,
isc_boolean_t deepcopy);
isc_result_t dns_c_zone_setmasterport(dns_c_zone_t *zone,
isc_int32_t port);
in_port_t port);
isc_result_t dns_c_zone_setmasterips(dns_c_zone_t *zone,
dns_c_iplist_t *newval,
isc_boolean_t deepcopy);
......@@ -293,7 +293,7 @@ isc_result_t dns_c_zone_getixfrtmp(dns_c_zone_t *zone,
isc_result_t dns_c_zone_getpubkey(dns_c_zone_t *zone,
dns_c_pubkey_t **retval);
isc_result_t dns_c_zone_getmasterport(dns_c_zone_t *zone,
isc_int32_t *retval);
in_port_t *retval);
isc_result_t dns_c_zone_getmasterips(dns_c_zone_t *zone,
dns_c_iplist_t **retval);
isc_result_t dns_c_zone_gettransfersource(dns_c_zone_t *zone,
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: xfrin.c,v 1.9 1999/09/28 13:51:18 gson Exp $ */
/* $Id: xfrin.c,v 1.10 1999/10/02 02:54:12 tale Exp $ */
#include <config.h>
......@@ -32,6 +32,7 @@
#include <isc/mem.h>
#include <isc/result.h>
#include <isc/timer.h>
#include <isc/net.h>
#include <dns/types.h>
#include <dns/result.h>
......@@ -178,7 +179,7 @@ xfrin_create(isc_mem_t *mctx,
dns_rdataclass_t rdclass,
dns_rdatatype_t reqtype,
char *addrstr, /* XXX */
unsigned int port,
in_port_t port,
dns_tsig_key_t *tsigkey,
xfrin_ctx_t **xfrp);
......@@ -617,7 +618,7 @@ xfrin_create(isc_mem_t *mctx,
dns_rdataclass_t rdclass,
dns_rdatatype_t reqtype,
char *addrstr, /* XXX */
unsigned int port,
in_port_t port,
dns_tsig_key_t *tsigkey,
xfrin_ctx_t **xfrp)
{
......
......@@ -42,15 +42,15 @@ isc_sockaddr_hash(isc_sockaddr_t *sockaddr, isc_boolean_t address_only);
void
isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, struct in_addr *ina,
unsigned int port);
in_port_t port);
void
isc_sockaddr_fromin6(isc_sockaddr_t *sockaddr, struct in6_addr *ina6,
unsigned int port);
in_port_t port);
void
isc_sockaddr_v6fromin(isc_sockaddr_t *sockaddr, struct in_addr *ina,
unsigned int port);
in_port_t port);
int
isc_sockaddr_pf(isc_sockaddr_t *sockaddr);
......
......@@ -147,7 +147,7 @@ isc_sockaddr_hash(isc_sockaddr_t *sockaddr, isc_boolean_t address_only) {
void
isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, struct in_addr *ina,
unsigned int port)
in_port_t port)
{
memset(sockaddr, 0, sizeof *sockaddr);
sockaddr->type.sin.sin_family = AF_INET;
......@@ -162,7 +162,7 @@ isc_sockaddr_fromin(isc_sockaddr_t *sockaddr, struct in_addr *ina,
void
isc_sockaddr_fromin6(isc_sockaddr_t *sockaddr, struct in6_addr *ina6,
unsigned int port)
in_port_t port)
{
memset(sockaddr, 0, sizeof *sockaddr);
sockaddr->type.sin6.sin6_family = AF_INET6;
......@@ -177,7 +177,7 @@ isc_sockaddr_fromin6(isc_sockaddr_t *sockaddr, struct in6_addr *ina6,
void
isc_sockaddr_v6fromin(isc_sockaddr_t *sockaddr, struct in_addr *ina,
unsigned int port)
in_port_t port)
{
memset(sockaddr, 0, sizeof *sockaddr);
sockaddr->type.sin6.sin6_family = AF_INET6;
......
......@@ -18,14 +18,10 @@
#include <config.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
#endif
#include <net/if.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -36,10 +32,13 @@
#include <isc/assertions.h>
#include <isc/error.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/result.h>
#include <isc/types.h>
#include <isc/interfaceiter.h>
#include <net/if.h> /* Must follow <isc/net.h>. */
/* Common utility functions */
/*
......
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