#include "lib/param/param.h"
#include "client.h"
#include "libsmb/proto.h"
+#include "libsmb/smbsock_connect.h"
#include "clifuse.h"
static struct cli_state *connect_one(struct cli_credentials *creds,
#include "librpc/gen_ndr/ndr_svcctl_c.h"
#include "rpc_client/cli_pipe.h"
#include "libcli/smb/smbXcli_base.h"
+#include "libsmb/smbsock_connect.h"
#include "libcli/util/werror.h"
#include "lib/async_req/async_sock.h"
#include "lib/cmdline/cmdline.h"
#include "../libcli/security/security.h"
#include "system/select.h"
#include "libsmb/libsmb.h"
+#include "libsmb/smbsock_connect.h"
#include "libsmb/clirap.h"
#include "trans2.h"
#include "libsmb/nmblib.h"
#include "system/passwd.h"
#include "system/kerberos.h"
#include "libsmb/libsmb.h"
+#include "libsmb/smbsock_connect.h"
#include "lib/param/param.h"
#include "lib/krb5_wrap/krb5_samba.h"
struct AvahiPoll *tevent_avahi_poll(TALLOC_CTX *mem_ctx,
struct tevent_context *ev);
-/* The following definitions come from libsmb/smbsock_connect.c */
-
-struct smb_transports smbsock_transports_from_port(uint16_t port);
-
-struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- const struct sockaddr_storage *addr,
- const struct smb_transports *transports,
- const char *called_name,
- int called_type,
- const char *calling_name,
- int calling_type)
- NONNULL(2) NONNULL(3) NONNULL(4);
-
-NTSTATUS smbsock_connect_recv(struct tevent_req *req, int *sock,
- uint16_t *ret_port);
-NTSTATUS smbsock_connect(const struct sockaddr_storage *addr,
- const struct smb_transports *transports,
- const char *called_name, int called_type,
- const char *calling_name, int calling_type,
- int *pfd, uint16_t *ret_port, int sec_timeout)
- NONNULL(1) NONNULL(2) NONNULL(7);
-
-struct tevent_req *smbsock_any_connect_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- const struct sockaddr_storage *addrs,
- const char **called_names,
- int *called_types,
- const char **calling_names,
- int *calling_types,
- size_t num_addrs,
- const struct smb_transports *transports)
- NONNULL(2) NONNULL(3) NONNULL(9);
-NTSTATUS smbsock_any_connect_recv(struct tevent_req *req, int *pfd,
- size_t *chosen_index, uint16_t *chosen_port);
-NTSTATUS smbsock_any_connect(const struct sockaddr_storage *addrs,
- const char **called_names,
- int *called_types,
- const char **calling_names,
- int *calling_types,
- size_t num_addrs,
- const struct smb_transports *transports,
- int sec_timeout,
- int *pfd, size_t *chosen_index,
- uint16_t *chosen_port)
- NONNULL(1) NONNULL(7) NONNULL(9);
-
/* The following definitions come from lib/util_wellknown.c */
bool sid_check_is_wellknown_domain(const struct dom_sid *sid, const char **name);
#include "../lib/util/tevent_ntstatus.h"
#include "async_smb.h"
#include "libsmb/nmblib.h"
+#include "libsmb/smbsock_connect.h"
#include "librpc/ndr/libndr.h"
#include "../libcli/smb/smbXcli_base.h"
#include "../libcli/smb/smb_seal.h"
#include "libcli/security/security.h"
#include "libsmb/nmblib.h"
#include "../libcli/smb/smbXcli_base.h"
+#include "libsmb/smbsock_connect.h"
/*
* Check a server for being alive and well.
#include "async_smb.h"
#include "../libcli/smb/read_smb.h"
#include "libsmb/nmblib.h"
+#include "libsmb/smbsock_connect.h"
struct cli_session_request_state {
struct tevent_context *ev;
--- /dev/null
+/*
+ * Unix SMB/CIFS implementation.
+ *
+ * Copyright (C) Stefan Metzmacher 2025
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _LIBSMB_SMBSOCK_CONNECT_H_
+#define _LIBSMB_SMBSOCK_CONNECT_H_
+
+/* The following definitions come from libsmb/smbsock_connect.c */
+
+struct smb_transports smbsock_transports_from_port(uint16_t port);
+
+struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const struct sockaddr_storage *addr,
+ const struct smb_transports *transports,
+ const char *called_name,
+ int called_type,
+ const char *calling_name,
+ int calling_type)
+ NONNULL(2) NONNULL(3) NONNULL(4);
+NTSTATUS smbsock_connect_recv(struct tevent_req *req, int *sock,
+ uint16_t *ret_port);
+NTSTATUS smbsock_connect(const struct sockaddr_storage *addr,
+ const struct smb_transports *transports,
+ const char *called_name, int called_type,
+ const char *calling_name, int calling_type,
+ int *pfd, uint16_t *ret_port, int sec_timeout)
+ NONNULL(1) NONNULL(2) NONNULL(7);
+
+struct tevent_req *smbsock_any_connect_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ const struct sockaddr_storage *addrs,
+ const char **called_names,
+ int *called_types,
+ const char **calling_names,
+ int *calling_types,
+ size_t num_addrs,
+ const struct smb_transports *transports)
+ NONNULL(2) NONNULL(3) NONNULL(9);
+NTSTATUS smbsock_any_connect_recv(struct tevent_req *req, int *pfd,
+ size_t *chosen_index, uint16_t *chosen_port);
+NTSTATUS smbsock_any_connect(const struct sockaddr_storage *addrs,
+ const char **called_names,
+ int *called_types,
+ const char **calling_names,
+ int *calling_types,
+ size_t num_addrs,
+ const struct smb_transports *transports,
+ int sec_timeout,
+ int *pfd, size_t *chosen_index,
+ uint16_t *chosen_port)
+ NONNULL(1) NONNULL(7) NONNULL(9);
+
+#endif /* _LIBSMB_SMBSOCK_CONNECT_H_ */
#include "../libcli/security/security.h"
#include "passdb.h"
#include "libsmb/libsmb.h"
+#include "libsmb/smbsock_connect.h"
#include "auth/gensec/gensec.h"
#include "../libcli/smb/smbXcli_base.h"
#include "messages.h"
*/
#include "includes.h"
+#include "libsmb/smbsock_connect.h"
#include "torture/proto.h"
bool run_smb_any_connect(int dummy)
#include "secrets.h"
#include "../libcli/security/security.h"
#include "libsmb/libsmb.h"
+#include "libsmb/smbsock_connect.h"
#include "lib/param/param.h"
#include "auth/gensec/gensec.h"
#include "libcli/auth/netlogon_creds_cli.h"
#include "lib/util/string_wrappers.h"
#include "lib/global_contexts.h"
#include "librpc/gen_ndr/ndr_winbind_c.h"
+#include "libsmb/smbsock_connect.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND