aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-11-16 22:36:31 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2009-11-16 22:36:31 +0100
commit02aecc1278d52fa1c2266e0a16fd3551e922f560 (patch)
treeb1629eb06f9c90593b8facfe99fc8e8c7362b1bb /include
parent3e90a11599d3427662ed6edb6d20b7660aba4ad8 (diff)
downloadlibssh-02aecc1278d52fa1c2266e0a16fd3551e922f560.tar.gz
libssh-02aecc1278d52fa1c2266e0a16fd3551e922f560.tar.xz
libssh-02aecc1278d52fa1c2266e0a16fd3551e922f560.zip
Improved pcap dumping support
Diffstat (limited to 'include')
-rw-r--r--include/libssh/pcap.h5
-rw-r--r--include/libssh/session.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/include/libssh/pcap.h b/include/libssh/pcap.h
index c0ef73fe..558ce563 100644
--- a/include/libssh/pcap.h
+++ b/include/libssh/pcap.h
@@ -2,6 +2,7 @@
#define PCAP_H_
#include "config.h"
+#include "libssh/libssh.h"
#ifdef WITH_PCAP
typedef struct ssh_pcap_context_struct* ssh_pcap_context;
@@ -10,7 +11,7 @@ typedef struct ssh_pcap_file_struct* ssh_pcap_file;
ssh_pcap_file ssh_pcap_file_new(void);
int ssh_pcap_file_open(ssh_pcap_file pcap, const char *filename);
int ssh_pcap_file_close(ssh_pcap_file pcap);
-void ssh_pcap_free(ssh_pcap_file pcap);
+void ssh_pcap_file_free(ssh_pcap_file pcap);
/* to be removed from here after tests */
int ssh_pcap_file_write_packet(ssh_pcap_file pcap, ssh_buffer packet, u_int32_t original_len);
@@ -25,6 +26,8 @@ void ssh_pcap_context_set_file(ssh_pcap_context, ssh_pcap_file);
int ssh_pcap_context_write(ssh_pcap_context,enum ssh_pcap_direction direction, void *data,
u_int32_t len, u_int32_t origlen);
+void ssh_set_pcap_context(ssh_session session, ssh_pcap_context pcap);
+
#endif /* WITH_PCAP */
#endif /* PCAP_H_ */
/* vim: set ts=2 sw=2 et cindent: */
diff --git a/include/libssh/session.h b/include/libssh/session.h
index c59ba5fb..f490b1e4 100644
--- a/include/libssh/session.h
+++ b/include/libssh/session.h
@@ -23,6 +23,7 @@
#define SESSION_H_
#include "libssh/priv.h"
#include "libssh/packet.h"
+#include "libssh/pcap.h"
typedef struct ssh_kbdint_struct* ssh_kbdint;
@@ -96,6 +97,9 @@ struct ssh_session_struct {
ssh_callbacks callbacks; /* Callbacks to user functions */
/* options */
+#ifdef WITH_PCAP
+ ssh_pcap_context pcap_ctx; /* pcap debugging context */
+#endif
char *username;
char *host;
char *bindaddr; /* TODO: check if needed */