Main Page Modules Data Structures File List Data Fields Globals Related Pages

# remote-ext.h

Go to the documentation of this file.

    00001 /*
    00002  * Copyright (c) 2002 - 2003
    00003  * NetGroup, Politecnico di Torino (Italy)
    00004  * All rights reserved.
    00005  *
    00006  * Redistribution and use in source and binary forms, with or without
    00007  * modification, are permitted provided that the following conditions
    00008  * are met:
    00009  *
    00010  * 1. Redistributions of source code must retain the above copyright
    00011  * notice, this list of conditions and the following disclaimer.
    00012  * 2. Redistributions in binary form must reproduce the above copyright
    00013  * notice, this list of conditions and the following disclaimer in the
    00014  * documentation and/or other materials provided with the distribution.
    00015  * 3. Neither the name of the Politecnico di Torino nor the names of its
    00016  * contributors may be used to endorse or promote products derived from
    00017  * this software without specific prior written permission.
    00018  *
    00019  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    00020  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    00021  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    00022  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    00023  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    00024  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    00025  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    00026  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    00027  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    00028  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    00029  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00030  *
    00031  */
    00032
    00033
    00034 #ifndef __REMOTE_EXT_H__
    00035 #define __REMOTE_EXT_H__
    00036
    00037
    00038
    00039 // Definition for Microsoft Visual Studio
    00040 #if _MSC_VER > 1000
    00041 #pragma once
    00042 #endif
    00043
    00044
    00058 // All this stuff is public
    00073 #define PCAP_BUF_SIZE 1024
    00074
    00075
    00076
    00083 #define PCAP_SRC_FILE 2
    00084
    00091 #define PCAP_SRC_IFLOCAL 3
    00092
    00099 #define PCAP_SRC_IFREMOTE 4
    00100
    00101
    00102
    00103
    00113 #define PCAP_SRC_FILE_KEY "file://"
    00114
    00126 #define PCAP_SRC_IF_KEY "rpcap://"
    00127
    00128
    00129
    00130
    00131
    00132
    00133 // Definitions needed by the new pcap_open()
    00134
    00136 #define PCAP_OPENFLAG_PROMISCUOUS       1
    00137
    00138 #define PCAP_OPENFLAG_SERVEROPEN_DP     2
    00139
    00140 #define PCAP_OPENFLAG_UDP_DP            4
    00141
    00142
    00143
    00144
    00145
    00160 struct pcap_rmtauth
    00161 {
    00176     int type;
    00184     char *username;
    00192     char *password;
    00193 };
    00194
    00195
    00196
    00204 #define RPCAP_RMTAUTH_NULL 0
    00205
    00215 #define RPCAP_RMTAUTH_PWD 1
    00216
    00218 #define RPCAP_HOSTLIST_SIZE 1024
    00219
    00220  // end of public documentation
    00224
    00225
    00226 // Exported functions
    00227 pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf);
    00228 int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf);
    00229 int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf);
    00230 int pcap_findalldevs_ex(char *host, char *port, SOCKET sockctrl, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf);
    00231 int pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf);
    00232 int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf);
    00233 int pcap_remoteact_close(const char *host, char *errbuf);
    00234 void pcap_remoteact_cleanup();
    00235
    00236
    00237 #endif
    00238

documentation. Copyright (c) 2002-2003 Politecnico di Torino. All rights reserved.