1*8b26181fSAndroid Build Coastguard Worker /*
2*8b26181fSAndroid Build Coastguard Worker * Copyright (c) 1994, 1995, 1996
3*8b26181fSAndroid Build Coastguard Worker * The Regents of the University of California. All rights reserved.
4*8b26181fSAndroid Build Coastguard Worker *
5*8b26181fSAndroid Build Coastguard Worker * Redistribution and use in source and binary forms, with or without
6*8b26181fSAndroid Build Coastguard Worker * modification, are permitted provided that: (1) source code distributions
7*8b26181fSAndroid Build Coastguard Worker * retain the above copyright notice and this paragraph in its entirety, (2)
8*8b26181fSAndroid Build Coastguard Worker * distributions including binary code include the above copyright notice and
9*8b26181fSAndroid Build Coastguard Worker * this paragraph in its entirety in the documentation or other materials
10*8b26181fSAndroid Build Coastguard Worker * provided with the distribution, and (3) all advertising materials mentioning
11*8b26181fSAndroid Build Coastguard Worker * features or use of this software display the following acknowledgement:
12*8b26181fSAndroid Build Coastguard Worker * ``This product includes software developed by the University of California,
13*8b26181fSAndroid Build Coastguard Worker * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14*8b26181fSAndroid Build Coastguard Worker * the University nor the names of its contributors may be used to endorse
15*8b26181fSAndroid Build Coastguard Worker * or promote products derived from this software without specific prior
16*8b26181fSAndroid Build Coastguard Worker * written permission.
17*8b26181fSAndroid Build Coastguard Worker * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18*8b26181fSAndroid Build Coastguard Worker * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19*8b26181fSAndroid Build Coastguard Worker * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20*8b26181fSAndroid Build Coastguard Worker */
21*8b26181fSAndroid Build Coastguard Worker
22*8b26181fSAndroid Build Coastguard Worker #ifdef HAVE_CONFIG_H
23*8b26181fSAndroid Build Coastguard Worker #include <config.h>
24*8b26181fSAndroid Build Coastguard Worker #endif
25*8b26181fSAndroid Build Coastguard Worker
26*8b26181fSAndroid Build Coastguard Worker #include <string.h>
27*8b26181fSAndroid Build Coastguard Worker
28*8b26181fSAndroid Build Coastguard Worker #include "pcap-int.h"
29*8b26181fSAndroid Build Coastguard Worker
30*8b26181fSAndroid Build Coastguard Worker static char nosup[] = "live packet capture not supported on this system";
31*8b26181fSAndroid Build Coastguard Worker
32*8b26181fSAndroid Build Coastguard Worker pcap_t *
pcap_create_interface(const char * device _U_,char * ebuf)33*8b26181fSAndroid Build Coastguard Worker pcap_create_interface(const char *device _U_, char *ebuf)
34*8b26181fSAndroid Build Coastguard Worker {
35*8b26181fSAndroid Build Coastguard Worker (void)pcap_strlcpy(ebuf, nosup, PCAP_ERRBUF_SIZE);
36*8b26181fSAndroid Build Coastguard Worker return (NULL);
37*8b26181fSAndroid Build Coastguard Worker }
38*8b26181fSAndroid Build Coastguard Worker
39*8b26181fSAndroid Build Coastguard Worker int
pcap_platform_finddevs(pcap_if_list_t * devlistp _U_,char * errbuf _U_)40*8b26181fSAndroid Build Coastguard Worker pcap_platform_finddevs(pcap_if_list_t *devlistp _U_, char *errbuf _U_)
41*8b26181fSAndroid Build Coastguard Worker {
42*8b26181fSAndroid Build Coastguard Worker /*
43*8b26181fSAndroid Build Coastguard Worker * There are no interfaces on which we can capture.
44*8b26181fSAndroid Build Coastguard Worker */
45*8b26181fSAndroid Build Coastguard Worker return (0);
46*8b26181fSAndroid Build Coastguard Worker }
47*8b26181fSAndroid Build Coastguard Worker
48*8b26181fSAndroid Build Coastguard Worker #ifdef _WIN32
49*8b26181fSAndroid Build Coastguard Worker int
pcap_lookupnet(const char * device _U_,bpf_u_int32 * netp _U_,bpf_u_int32 * maskp _U_,char * errbuf)50*8b26181fSAndroid Build Coastguard Worker pcap_lookupnet(const char *device _U_, bpf_u_int32 *netp _U_,
51*8b26181fSAndroid Build Coastguard Worker bpf_u_int32 *maskp _U_, char *errbuf)
52*8b26181fSAndroid Build Coastguard Worker {
53*8b26181fSAndroid Build Coastguard Worker (void)pcap_strlcpy(errbuf, nosup, PCAP_ERRBUF_SIZE);
54*8b26181fSAndroid Build Coastguard Worker return (-1);
55*8b26181fSAndroid Build Coastguard Worker }
56*8b26181fSAndroid Build Coastguard Worker #endif
57*8b26181fSAndroid Build Coastguard Worker
58*8b26181fSAndroid Build Coastguard Worker /*
59*8b26181fSAndroid Build Coastguard Worker * Libpcap version string.
60*8b26181fSAndroid Build Coastguard Worker */
61*8b26181fSAndroid Build Coastguard Worker const char *
pcap_lib_version(void)62*8b26181fSAndroid Build Coastguard Worker pcap_lib_version(void)
63*8b26181fSAndroid Build Coastguard Worker {
64*8b26181fSAndroid Build Coastguard Worker return (PCAP_VERSION_STRING);
65*8b26181fSAndroid Build Coastguard Worker }
66