00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __REMOTE_EXT_H__
00035 #define __REMOTE_EXT_H__
00036
00037
00038 #ifndef HAVE_REMOTE
00039 #error Please do not include this file directly. Just define HAVE_REMOTE and then include pcap.h
00040 #endif
00041
00042
00043 #if _MSC_VER > 1000
00044 #pragma once
00045 #endif
00046
00047 #ifdef __cplusplus
00048 extern "C" {
00049 #endif
00050
00064
00079 #define PCAP_BUF_SIZE 1024
00080
00081
00093 #define PCAP_SRC_FILE 2
00094
00101 #define PCAP_SRC_IFLOCAL 3
00102
00109 #define PCAP_SRC_IFREMOTE 4
00110
00164 #define PCAP_SRC_FILE_STRING "file://"
00165
00177 #define PCAP_SRC_IF_STRING "rpcap://"
00178
00203 #define PCAP_OPENFLAG_PROMISCUOUS 1
00204
00217 #define PCAP_OPENFLAG_DATATX_UDP 2
00218
00219
00228 #define PCAP_OPENFLAG_NOCAPTURE_RPCAP 4
00229
00237 #define PCAP_OPENFLAG_NOCAPTURE_LOCAL 8
00238
00248 #define PCAP_OPENFLAG_MAX_RESPONSIVENESS 16
00249
00265 #define PCAP_SAMP_NOSAMP 0
00266
00275 #define PCAP_SAMP_1_EVERY_N 1
00276
00285 #define PCAP_SAMP_FIRST_AFTER_N_MS 2
00286
00304 #define RPCAP_RMTAUTH_NULL 0
00305
00315 #define RPCAP_RMTAUTH_PWD 1
00316
00338 struct pcap_rmtauth
00339 {
00349 int type;
00357 char *username;
00365 char *password;
00366 };
00367
00368
00380 struct pcap_samp
00381 {
00386 int method;
00387
00392 int value;
00393 };
00394
00395
00396
00397
00399 #define RPCAP_HOSTLIST_SIZE 1024
00400
00401
00405
00406
00407
00408
00409
00410
00416
00417 pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf);
00418 int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf);
00419 int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf);
00420 int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf);
00421 struct pcap_samp *pcap_setsampling(pcap_t *p);
00422
00423
00424
00425
00426
00427
00430
00431 SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf);
00432 int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf);
00433 int pcap_remoteact_close(const char *host, char *errbuf);
00434 void pcap_remoteact_cleanup();
00435
00436
00437
00438 #ifdef __cplusplus
00439 }
00440 #endif
00441
00442
00443 #endif
00444