s4:libcli/raw: remove unused functions
authorStefan Metzmacher <metze@samba.org>
Wed, 30 Nov 2011 07:35:33 +0000 (08:35 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 30 Nov 2011 12:41:08 +0000 (13:41 +0100)
metze

source4/libcli/raw/clisocket.c
source4/libcli/raw/libcliraw.h

index d0867b2023561525d077f152babbe5a39c9029e5..6a305fe223b4c7cb643f8e3cb6bf85af61440998 100644 (file)
@@ -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;
-}
index 1009f4353a4726f30c72e9656f2d9df608b4f435..b3d32273b2202d87637a6632d011ada97611a6f1 100644 (file)
@@ -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__ */