summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-30 08:35:33 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-30 13:41:08 +0100
commit52dd549eb64ea9b79bd4cbeba0fa4183aad7bb4c (patch)
tree5c63489597bc668c6ab41bbd9a7ecd8192e3d5bb
parentb21f344079920194f94bbee7f44d8a6582e4d1a2 (diff)
downloadsamba-52dd549eb64ea9b79bd4cbeba0fa4183aad7bb4c.tar.gz
samba-52dd549eb64ea9b79bd4cbeba0fa4183aad7bb4c.tar.bz2
samba-52dd549eb64ea9b79bd4cbeba0fa4183aad7bb4c.zip
s4:libcli/raw: remove unused functions
metze
-rw-r--r--source4/libcli/raw/clisocket.c71
-rw-r--r--source4/libcli/raw/libcliraw.h5
2 files changed, 0 insertions, 76 deletions
diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c
index d0867b2023..6a305fe223 100644
--- a/source4/libcli/raw/clisocket.c
+++ b/source4/libcli/raw/clisocket.c
@@ -428,74 +428,3 @@ _PUBLIC_ void smbcli_sock_dead(struct smbcli_socket *sock)
sock->sock = NULL;
}
-/****************************************************************************
- Set socket options on a open connection.
-****************************************************************************/
-void smbcli_sock_set_options(struct smbcli_socket *sock, const char *options)
-{
- socket_set_option(sock->sock, options, NULL);
-}
-
-/****************************************************************************
-resolve a hostname and connect
-****************************************************************************/
-_PUBLIC_ struct smbcli_socket *smbcli_sock_connect_byname(const char *host, const char **ports,
- TALLOC_CTX *mem_ctx,
- struct resolve_context *resolve_ctx,
- struct tevent_context *event_ctx,
- const char *socket_options)
-{
- int name_type = NBT_NAME_SERVER;
- const char *address;
- NTSTATUS status;
- struct nbt_name nbt_name;
- char *name, *p;
- TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
- struct smbcli_socket *result;
-
- if (event_ctx == NULL) {
- DEBUG(0, ("Invalid NULL event context passed in as parameter\n"));
- return NULL;
- }
-
- if (tmp_ctx == NULL) {
- DEBUG(0, ("talloc_new failed\n"));
- return NULL;
- }
-
- name = talloc_strdup(tmp_ctx, host);
- if (name == NULL) {
- DEBUG(0, ("talloc_strdup failed\n"));
- talloc_free(tmp_ctx);
- return NULL;
- }
-
- /* allow hostnames of the form NAME#xx and do a netbios lookup */
- if ((p = strchr(name, '#'))) {
- name_type = strtol(p+1, NULL, 16);
- *p = 0;
- }
-
- make_nbt_name(&nbt_name, host, name_type);
-
- status = resolve_name_ex(resolve_ctx, 0, 0, &nbt_name, tmp_ctx, &address, event_ctx);
- if (!NT_STATUS_IS_OK(status)) {
- talloc_free(tmp_ctx);
- return NULL;
- }
-
- status = smbcli_sock_connect(mem_ctx, address, ports, name, resolve_ctx,
- event_ctx,
- socket_options, &result);
-
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(9, ("smbcli_sock_connect failed: %s\n",
- nt_errstr(status)));
- talloc_free(tmp_ctx);
- return NULL;
- }
-
- talloc_free(tmp_ctx);
-
- return result;
-}
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index 1009f4353a..b3d32273b2 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -379,11 +379,6 @@ NTSTATUS smb_raw_trans(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx,
struct smb_trans2 *parms);
-struct smbcli_socket *smbcli_sock_connect_byname(const char *host, const char **ports,
- TALLOC_CTX *mem_ctx,
- struct resolve_context *resolve_ctx,
- struct tevent_context *event_ctx,
- const char *socket_options);
void smbcli_sock_dead(struct smbcli_socket *sock);
#endif /* __LIBCLI_RAW__H__ */