void set_pcap(ssh_session session){ if(!pcap_file) return; pcap=ssh_pcap_file_new(); if(ssh_pcap_file_open(pcap,pcap_file) == SSH_ERROR){ printf("Error opening pcap file\n"); ssh_pcap_file_free(pcap); pcap=NULL; return; } ssh_set_pcap_file(session,pcap); }
void cleanup_pcap(){ ssh_pcap_file_free(pcap); pcap=NULL; }
static void cleanup_pcap(void) { ssh_pcap_file_free(pcap); pcap=NULL; }