fad-null.c revision 146768
1221SN/A/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ 23691Sksrini/* 3221SN/A * Copyright (c) 1994, 1995, 1996, 1997, 1998 4221SN/A * The Regents of the University of California. All rights reserved. 5221SN/A * 6221SN/A * Redistribution and use in source and binary forms, with or without 73014SN/A * modification, are permitted provided that the following conditions 8221SN/A * are met: 9221SN/A * 1. Redistributions of source code must retain the above copyright 10221SN/A * notice, this list of conditions and the following disclaimer. 11221SN/A * 2. Redistributions in binary form must reproduce the above copyright 12221SN/A * notice, this list of conditions and the following disclaimer in the 13221SN/A * documentation and/or other materials provided with the distribution. 14221SN/A * 3. All advertising materials mentioning features or use of this software 15221SN/A * must display the following acknowledgement: 16221SN/A * This product includes software developed by the Computer Systems 17221SN/A * Engineering Group at Lawrence Berkeley Laboratory. 18221SN/A * 4. Neither the name of the University nor of the Laboratory may be used 19553SN/A * to endorse or promote products derived from this software without 20553SN/A * specific prior written permission. 21553SN/A * 22221SN/A * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23221SN/A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24221SN/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25221SN/A * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26221SN/A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27221SN/A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28221SN/A * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29221SN/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30221SN/A * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31221SN/A * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32221SN/A * SUCH DAMAGE. 33221SN/A */ 34221SN/A 35221SN/A#ifndef lint 36221SN/Astatic const char rcsid[] _U_ = 37221SN/A "@(#) $Header: /tcpdump/master/libpcap/fad-null.c,v 1.2 2003/11/15 23:23:58 guy Exp $ (LBL)"; 38221SN/A#endif 39221SN/A 40221SN/A#ifdef HAVE_CONFIG_H 41221SN/A#include "config.h" 42221SN/A#endif 43221SN/A 44221SN/A#include <pcap.h> 45221SN/A 46221SN/A/* 47221SN/A * Get a list of all interfaces that are up and that we can open. 48221SN/A * Returns -1 on error, 0 otherwise. 49221SN/A * The list, as returned through "alldevsp", may be null if no interfaces 50221SN/A * were up and could be opened. 51221SN/A * 52221SN/A * This is the implementation used on platforms that have no support for 53221SN/A * packet capture. 54221SN/A */ 55221SN/Aint 56221SN/Apcap_findalldevs(pcap_if_t **alldevsp, char *errbuf) 57221SN/A{ 58221SN/A /* 59221SN/A * Succeed, but don't return any interfaces; we return only those 60221SN/A * we can open, and we can't open any if there's no support 61221SN/A * for packet capture. 62221SN/A */ 63221SN/A *alldevsp = NULL; 64221SN/A return (0); 65221SN/A} 66221SN/A