From 02aecc1278d52fa1c2266e0a16fd3551e922f560 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Mon, 16 Nov 2009 22:36:31 +0100 Subject: Improved pcap dumping support --- examples/sample.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/sample.c b/examples/sample.c index 9233662..639605e 100644 --- a/examples/sample.c +++ b/examples/sample.c @@ -40,6 +40,12 @@ char *user; char *cmds[MAXCMD]; struct termios terminal; +#ifdef WITH_PCAP +/* this header file won't be necessary in the future */ +#include +char *pcap_file=NULL; +#endif + static int auth_callback(const char *prompt, char *buf, size_t len, int echo, int verify, void *userdata) { char *answer = NULL; @@ -86,19 +92,27 @@ static void usage(){ " -l user : log in as user\n" " -p port : connect to port\n" " -d : use DSS to verify host public key\n" - " -r : use RSA to verify host public key\n", + " -r : use RSA to verify host public key\n" +#ifdef WITH_PCAP + " -P file : create a pcap debugging file\n" +#endif + , ssh_version(0)); exit(0); } static int opts(int argc, char **argv){ int i; - // for(i=0;i