summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-01 22:48:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:11 -0500
commit284349482f5293a9a23d0f72d7c2aab46b55843b (patch)
tree6f96931afb18ea841983a2895b62c97fed9f77b7 /source4/libcli/raw
parent9f14afa12c11d02a49f4f310c3f8d834ce8a835d (diff)
downloadsamba-284349482f5293a9a23d0f72d7c2aab46b55843b.tar.gz
samba-284349482f5293a9a23d0f72d7c2aab46b55843b.tar.bz2
samba-284349482f5293a9a23d0f72d7c2aab46b55843b.zip
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 2e25c71853f8996f73755277e448e7d670810349)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/clisocket.c6
-rw-r--r--source4/libcli/raw/libcliraw.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c
index c641f8bf12..349b4b9a9c 100644
--- a/source4/libcli/raw/clisocket.c
+++ b/source4/libcli/raw/clisocket.c
@@ -49,7 +49,7 @@ struct smbcli_socket *smbcli_sock_init(TALLOC_CTX *mem_ctx)
connect a smbcli_socket context to an IP/port pair
if port is 0 then choose 445 then 139
*/
-BOOL smbcli_sock_connect(struct smbcli_socket *sock, struct in_addr *ip, int port)
+BOOL smbcli_sock_connect(struct smbcli_socket *sock, struct ipv4_addr *ip, int port)
{
NTSTATUS status;
@@ -71,7 +71,7 @@ BOOL smbcli_sock_connect(struct smbcli_socket *sock, struct in_addr *ip, int por
}
talloc_steal(sock, sock->sock);
- status = socket_connect(sock->sock, NULL, 0, inet_ntoa(*ip), port, 0);
+ status = socket_connect(sock->sock, NULL, 0, sys_inet_ntoa(*ip), port, 0);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(sock->sock);
sock->sock = NULL;
@@ -159,7 +159,7 @@ resolve a hostname and connect
BOOL smbcli_sock_connect_byname(struct smbcli_socket *sock, const char *host, int port)
{
int name_type = 0x20;
- struct in_addr ip;
+ struct ipv4_addr ip;
char *name, *p;
BOOL ret;
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index 48abc82a68..9bbdd8a222 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -60,7 +60,7 @@ struct smbcli_negotiate {
/* this is the context for a SMB socket associated with the socket itself */
struct smbcli_socket {
- struct in_addr dest_ip;
+ struct ipv4_addr dest_ip;
/* dest hostname (which may or may not be a DNS name) */
char *hostname;