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
48 extern "C" {
49 #endif
50 
64 // All this stuff is public
79 #define PCAP_BUF_SIZE 1024
80 
81 
93 #define PCAP_SRC_FILE 2
94 
101 #define PCAP_SRC_IFLOCAL 3
102 
109 #define PCAP_SRC_IFREMOTE 4
110 
164 #define PCAP_SRC_FILE_STRING "file://"
165 
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
305 
315 #define RPCAP_RMTAUTH_PWD 1
316 
339 {
349  int type;
357  char *username;
365  char *password;
366 };
367 
368 
380 struct pcap_samp
381 {
386  int method;
387 
392  int value;
393 };
394 
395 
396 
397 
399 #define RPCAP_HOSTLIST_SIZE 1024
400 
401  // end of public documentation
405 
406 
407 // Exported functions
408 
409 
410 
416 //\{
417 pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf);
418 int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf);
419 int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf);
420 int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf);
421 struct pcap_samp *pcap_setsampling(pcap_t *p);
422 
423 //\}
424 // End of new winpcap functions
425 
426 
427 
430 //\{
431 SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf);
432 int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf);
433 int 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 
pcap_rmtauth::password
char * password
Zero-terminated string containing the password that has to be used on the remote machine for authenti...
Definition: remote-ext.h:365
pcap_remoteact_list
int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf)
pcap_t
struct pcap pcap_t
Definition: pcap/pcap.h:87
pcap_samp::method
int method
Definition: remote-ext.h:386
pcap_remoteact_close
int pcap_remoteact_close(const char *host, char *errbuf)
pcap_rmtauth::username
char * username
Zero-terminated string containing the username that has to be used on the remote machine for authenti...
Definition: remote-ext.h:357
pcap_open
pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
pcap_samp
This structure defines the information related to sampling.
Definition: remote-ext.h:380
pcap_parsesrcstr
int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf)
errbuf
static char errbuf[PCAP_ERRBUF_SIZE]
Definition: macosx/nicdrv.c:68
pcap_remoteact_cleanup
void pcap_remoteact_cleanup()
pcap_rmtauth::type
int type
Type of the authentication required.
Definition: remote-ext.h:349
pcap_createsrcstr
int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
pcap_if
Definition: pcap/pcap.h:223
pcap_remoteact_accept
SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
pcap_samp::value
int value
Definition: remote-ext.h:392
pcap_findalldevs_ex
int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
pcap_rmtauth
This structure keeps the information needed to autheticate the user on a remote machine.
Definition: remote-ext.h:338
pcap_setsampling
struct pcap_samp * pcap_setsampling(pcap_t *p)


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49