1127664Sbms/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ 2127664Sbms/* 3127664Sbms * Copyright (c) 1994, 1995, 1996, 1997, 1998 4127664Sbms * The Regents of the University of California. All rights reserved. 5127664Sbms * 6127664Sbms * Redistribution and use in source and binary forms, with or without 7127664Sbms * modification, are permitted provided that the following conditions 8127664Sbms * are met: 9127664Sbms * 1. Redistributions of source code must retain the above copyright 10127664Sbms * notice, this list of conditions and the following disclaimer. 11127664Sbms * 2. Redistributions in binary form must reproduce the above copyright 12127664Sbms * notice, this list of conditions and the following disclaimer in the 13127664Sbms * documentation and/or other materials provided with the distribution. 14127664Sbms * 3. All advertising materials mentioning features or use of this software 15127664Sbms * must display the following acknowledgement: 16127664Sbms * This product includes software developed by the Computer Systems 17127664Sbms * Engineering Group at Lawrence Berkeley Laboratory. 18127664Sbms * 4. Neither the name of the University nor of the Laboratory may be used 19127664Sbms * to endorse or promote products derived from this software without 20127664Sbms * specific prior written permission. 21127664Sbms * 22127664Sbms * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23127664Sbms * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24127664Sbms * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25127664Sbms * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26127664Sbms * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27127664Sbms * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28127664Sbms * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29127664Sbms * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30127664Sbms * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31127664Sbms * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32127664Sbms * SUCH DAMAGE. 33127664Sbms */ 34127664Sbms 35127664Sbms#ifndef lint 36127664Sbmsstatic const char rcsid[] _U_ = 37214518Srpaulo "@(#) $Header: /tcpdump/master/libpcap/fad-null.c,v 1.2 2003-11-15 23:23:58 guy Exp $ (LBL)"; 38127664Sbms#endif 39127664Sbms 40127664Sbms#ifdef HAVE_CONFIG_H 41127664Sbms#include "config.h" 42127664Sbms#endif 43127664Sbms 44127664Sbms#include <pcap.h> 45127664Sbms 46127664Sbms/* 47127664Sbms * Get a list of all interfaces that are up and that we can open. 48127664Sbms * Returns -1 on error, 0 otherwise. 49127664Sbms * The list, as returned through "alldevsp", may be null if no interfaces 50127664Sbms * were up and could be opened. 51127664Sbms * 52127664Sbms * This is the implementation used on platforms that have no support for 53127664Sbms * packet capture. 54127664Sbms */ 55127664Sbmsint 56127664Sbmspcap_findalldevs(pcap_if_t **alldevsp, char *errbuf) 57127664Sbms{ 58127664Sbms /* 59127664Sbms * Succeed, but don't return any interfaces; we return only those 60127664Sbms * we can open, and we can't open any if there's no support 61127664Sbms * for packet capture. 62127664Sbms */ 63127664Sbms *alldevsp = NULL; 64127664Sbms return (0); 65127664Sbms} 66