summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c10
-rw-r--r--source3/libsmb/proto.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index ca6201e6bb..cc5ff49254 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -366,6 +366,16 @@ void cli_sockopt(struct cli_state *cli, const char *options)
set_socket_options(cli->conn.fd, options);
}
+const struct sockaddr_storage *cli_state_local_sockaddr(struct cli_state *cli)
+{
+ return &cli->src_ss;
+}
+
+const struct sockaddr_storage *cli_state_remote_sockaddr(struct cli_state *cli)
+{
+ return &cli->dest_ss;
+}
+
uint16_t cli_state_get_vc_num(struct cli_state *cli)
{
return cli->smb1.vc_num;
diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h
index 08d651f08c..623687cf11 100644
--- a/source3/libsmb/proto.h
+++ b/source3/libsmb/proto.h
@@ -167,6 +167,8 @@ bool cli_state_encryption_on(struct cli_state *cli);
void cli_nt_pipes_close(struct cli_state *cli);
void cli_shutdown(struct cli_state *cli);
void cli_sockopt(struct cli_state *cli, const char *options);
+const struct sockaddr_storage *cli_state_local_sockaddr(struct cli_state *cli);
+const struct sockaddr_storage *cli_state_remote_sockaddr(struct cli_state *cli);
uint16_t cli_state_get_vc_num(struct cli_state *cli);
uint16 cli_setpid(struct cli_state *cli, uint16 pid);
uint16_t cli_getpid(struct cli_state *cli);