WinPcap 4.1.3
remote-ext.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2002 - 2003
3 * NetGroup, Politecnico di Torino (Italy)
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the Politecnico di Torino nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 */
32
33
34#ifndef __REMOTE_EXT_H__
35#define __REMOTE_EXT_H__
36
37
38#ifndef HAVE_REMOTE
39#error Please do not include this file directly. Just define HAVE_REMOTE and then include pcap.h
40#endif
41
42// Definition for Microsoft Visual Studio
43#if _MSC_VER > 1000
44#pragma once
45#endif
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
64// All this stuff is public
79#define PCAP_BUF_SIZE 1024
80
81
93#define PCAP_SRC_FILE 2
101#define PCAP_SRC_IFLOCAL 3
109#define PCAP_SRC_IFREMOTE 4
110
164#define PCAP_SRC_FILE_STRING "file://"
177#define PCAP_SRC_IF_STRING "rpcap://"
178
203#define PCAP_OPENFLAG_PROMISCUOUS 1
204
217#define PCAP_OPENFLAG_DATATX_UDP 2
218
219
228#define PCAP_OPENFLAG_NOCAPTURE_RPCAP 4
229
237#define PCAP_OPENFLAG_NOCAPTURE_LOCAL 8
238
248#define PCAP_OPENFLAG_MAX_RESPONSIVENESS 16
249
265#define PCAP_SAMP_NOSAMP 0
266
275#define PCAP_SAMP_1_EVERY_N 1
276
285#define PCAP_SAMP_FIRST_AFTER_N_MS 2
286
304#define RPCAP_RMTAUTH_NULL 0
315#define RPCAP_RMTAUTH_PWD 1
316
339{
349 int type;
357 char *username;
365 char *password;
366};
367
368
381{
387
392 int value;
393};
394
395
396
397
399#define RPCAP_HOSTLIST_SIZE 1024
400
401
404 // end of public documentation
405
406
407// Exported functions
408
409
410
416//\{
417pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf);
418int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf);
419int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf);
420int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf);
422
423//\}
424// End of new winpcap functions
425
426
427
430//\{
431SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf);
432int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf);
433int pcap_remoteact_close(const char *host, char *errbuf);
435//\}
436// End of remote capture functions
437
438#ifdef __cplusplus
439}
440#endif
441
442
443#endif
444
struct pcap pcap_t
Descriptor of an open capture instance. This structure is opaque to the user, that handles its conten...
Definition incs/pcap.h:70
int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf)
pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
int pcap_remoteact_close(const char *host, char *errbuf)
void pcap_remoteact_cleanup()
int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf)
int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
struct pcap_samp * pcap_setsampling(pcap_t *p)
Item in a list of interfaces, used by pcap_findalldevs().
Definition incs/pcap.h:148
This structure keeps the information needed to autheticate the user on a remote machine.
Definition remote-ext.h:339
char * password
Zero-terminated string containing the password that has to be used on the remote machine for authenti...
Definition remote-ext.h:365
char * username
Zero-terminated string containing the username that has to be used on the remote machine for authenti...
Definition remote-ext.h:357
int type
Type of the authentication required.
Definition remote-ext.h:349
This structure defines the information related to sampling.
Definition remote-ext.h:381

documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 CACE Technologies. Copyright (c) 2010-2013 Riverbed Technology. All rights reserved.