1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-29 15:42:04 +03:00

r3443: the next stage in the include files re-organisation.

I have created the include/system/ directory, which will contain the
wrappers for the system includes for logical subsystems. So far I have
created include/system/kerberos.h and include/system/network.h, which
contain all the system includes for kerberos code and networking code.
These are the included in subsystems that need kerberos or networking
respectively.

Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C
file, instead each C module includes the include/system/XXX.h file for
the logical system support it needs, and the details are kept isolated
in include/system/

This patch also creates a "struct ipv4_addr" which replaces "struct
in_addr" in our code. That avoids every C file needing to import all
the system networking headers.
(This used to be commit 2e25c71853)
This commit is contained in:
Andrew Tridgell
2004-11-01 22:48:25 +00:00
committed by Gerald (Jerry) Carter
parent 9f14afa12c
commit 284349482f
46 changed files with 420 additions and 291 deletions

View File

@ -34,11 +34,11 @@ static void ldapsrv_terminate_connection(struct ldapsrv_connection *ldap_conn, c
*/
static void add_socket(struct server_service *service,
const struct model_ops *model_ops,
struct in_addr *ifip)
struct ipv4_addr *ifip)
{
struct server_socket *srv_sock;
uint16_t port = 389;
char *ip_str = talloc_strdup(service, inet_ntoa(*ifip));
char *ip_str = talloc_strdup(service, sys_inet_ntoa(*ifip));
srv_sock = service_setup_socket(service, model_ops, "ipv4", ip_str, &port);
@ -99,7 +99,7 @@ static void ldapsrv_init(struct server_service *service,
socket per interface and bind to only these.
*/
for(i = 0; i < num_interfaces; i++) {
struct in_addr *ifip = iface_n_ip(i);
struct ipv4_addr *ifip = iface_n_ip(i);
if (ifip == NULL) {
DEBUG(0,("ldapsrv_init: interface %d has NULL "
@ -110,7 +110,7 @@ static void ldapsrv_init(struct server_service *service,
add_socket(service, model_ops, ifip);
}
} else {
struct in_addr ifip;
struct ipv4_addr ifip;
/* Just bind to lp_socket_address() (usually 0.0.0.0) */
ifip = interpret_addr2(lp_socket_address());