libssh: pcap.h Source File

libssh 0.9.6 The SSH library

pcap.h
1 /*
2 * This file is part of the SSH Library
3 *
4 * Copyright (c) 2009 by Aris Adamantiadis
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #ifndef PCAP_H_
22 #define PCAP_H_
23
24 #include "config.h"
25 #include "libssh/libssh.h"
26
27 #ifdef WITH_PCAP
28 typedef struct ssh_pcap_context_struct* ssh_pcap_context;
29
30 int ssh_pcap_file_write_packet(ssh_pcap_file pcap, ssh_buffer packet, uint32_t original_len);
31
32 ssh_pcap_context ssh_pcap_context_new(ssh_session session);
33 void ssh_pcap_context_free(ssh_pcap_context ctx);
34
35 enum ssh_pcap_direction{
36 SSH_PCAP_DIR_IN,
37 SSH_PCAP_DIR_OUT
38 };
39 void ssh_pcap_context_set_file(ssh_pcap_context, ssh_pcap_file);
40 int ssh_pcap_context_write(ssh_pcap_context,enum ssh_pcap_direction direction, void *data,
41 uint32_t len, uint32_t origlen);
42
43
44 #endif /* WITH_PCAP */
45 #endif /* PCAP_H_ */
ssh_buffer_struct
Definition: buffer.c:47
ssh_session_struct
Definition: session.h:109