Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
a252c277
Commit
a252c277
authored
Oct 02, 1999
by
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
Changes
19
Hide whitespace changes
Inline
Side-by-side
bin/named/include/named/globals.h
View file @
a252c277
...
...
@@ -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
in
t
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
;
...
...
bin/named/xfrin.c
View file @
a252c277
...
...
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: xfrin.c,v 1.
9
1999/
09/28 13
:5
1
:1
8 gson
Exp $ */
/* $Id: xfrin.c,v 1.
10
1999/
10/02 02
:5
4
:1
2 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
in
t
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
in
t
port
,
in_port_
t
port
,
dns_tsig_key_t
*
tsigkey
,
xfrin_ctx_t
**
xfrp
)
{
...
...
bin/tests/dispatch_tcp_test.c
View file @
a252c277
...
...
@@ -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
;
...
...
bin/tests/dispatch_test.c
View file @
a252c277
...
...
@@ -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
{
...
...
bin/tests/sdig.c
View file @
a252c277
...
...
@@ -156,7 +156,7 @@ hex_dump(isc_buffer_t *b)
}
static
void
get_address
(
char
*
hostname
,
unsigned
in
t
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
in
t
port
;
in_port_
t
port
;
isc_boolean_t
vc
,
have_name
,
have_type
,
edns0
;
dns_name_t
*
name
;
static
unsigned
char
*
namedata
[
512
];
...
...
lib/dns/config/confcommon.c
View file @
a252c277
...
...
@@ -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>
...
...
lib/dns/config/confctl.c
View file @
a252c277
...
...
@@ -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>
...
...
lib/dns/config/confparser.y
View file @
a252c277
...
...
@@ -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>
...
...
lib/dns/config/confserv.c
View file @
a252c277
...
...
@@ -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>
...
...
lib/dns/config/confview.c
View file @
a252c277
...
...
@@ -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>
...
...
lib/dns/include/dns/confcommon.h
View file @
a252c277
...
...
@@ -56,7 +56,6 @@
#include
<config.h>
#include
<sys/types.h>
#include
<netinet/in.h>
#include
<arpa/nameser.h>
#include
<stdio.h>
...
...
lib/dns/include/dns/confctl.h
View file @
a252c277
...
...
@@ -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>
...
...
lib/dns/include/dns/confip.h
View file @
a252c277
...
...
@@ -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>
...
...
lib/dns/include/dns/confserv.h
View file @
a252c277
...
...
@@ -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>
...
...
lib/dns/include/dns/confzone.h
View file @
a252c277
...
...
@@ -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
;
i
sc_int32
_t
master_port
;
i
n_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
;
i
sc_int32
_t
master_port
;
i
n_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
,
i
sc_int32
_t
port
);
i
n_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
,
i
sc_int32
_t
*
retval
);
i
n_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
,
...
...
lib/dns/xfrin.c
View file @
a252c277
...
...
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: xfrin.c,v 1.
9
1999/
09/28 13
:5
1
:1
8 gson
Exp $ */
/* $Id: xfrin.c,v 1.
10
1999/
10/02 02
:5
4
:1
2 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
in
t
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
in
t
port
,
in_port_
t
port
,
dns_tsig_key_t
*
tsigkey
,
xfrin_ctx_t
**
xfrp
)
{
...
...
lib/isc/include/isc/sockaddr.h
View file @
a252c277
...
...
@@ -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
in
t
port
);
in_port_
t
port
);
void
isc_sockaddr_fromin6
(
isc_sockaddr_t
*
sockaddr
,
struct
in6_addr
*
ina6
,
unsigned
in
t
port
);
in_port_
t
port
);
void
isc_sockaddr_v6fromin
(
isc_sockaddr_t
*
sockaddr
,
struct
in_addr
*
ina
,
unsigned
in
t
port
);
in_port_
t
port
);
int
isc_sockaddr_pf
(
isc_sockaddr_t
*
sockaddr
);
...
...
lib/isc/sockaddr.c
View file @
a252c277
...
...
@@ -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
in
t
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
in
t
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
in
t
port
)
in_port_
t
port
)
{
memset
(
sockaddr
,
0
,
sizeof
*
sockaddr
);
sockaddr
->
type
.
sin6
.
sin6_family
=
AF_INET6
;
...
...
lib/isc/unix/interfaceiter.c
View file @
a252c277
...
...
@@ -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 */
/*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment