summaryrefslogtreecommitdiff
path: root/fad-null.c
diff options
context:
space:
mode:
authorRui Paulo <rpaulo@FreeBSD.org>2009-03-20 13:44:43 +0000
committerRui Paulo <rpaulo@FreeBSD.org>2009-03-20 13:44:43 +0000
commit3430dc7c1fc255ec21a9b5e9c189ec01d930c6bd (patch)
treeb8e8721c09f593e90db0d033af066542e6167439 /fad-null.c
parentef96d74f8a1717b564e0f74fa857002d9c713455 (diff)
downloadsrc-test2-3430dc7c1fc255ec21a9b5e9c189ec01d930c6bd.tar.gz
src-test2-3430dc7c1fc255ec21a9b5e9c189ec01d930c6bd.zip
Flatten vendor/libpcap and remove keyword expansion.
Notes
Notes: svn path=/vendor/libpcap/dist/; revision=190153
Diffstat (limited to 'fad-null.c')
-rw-r--r--fad-null.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/fad-null.c b/fad-null.c
new file mode 100644
index 000000000000..676ff71e44fd
--- /dev/null
+++ b/fad-null.c
@@ -0,0 +1,65 @@
+/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */
+/*
+ * Copyright (c) 1994, 1995, 1996, 1997, 1998
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the Computer Systems
+ * Engineering Group at Lawrence Berkeley Laboratory.
+ * 4. Neither the name of the University nor of the Laboratory may be used
+ * to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/libpcap/fad-null.c,v 1.2 2003/11/15 23:23:58 guy Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <pcap.h>
+
+/*
+ * Get a list of all interfaces that are up and that we can open.
+ * Returns -1 on error, 0 otherwise.
+ * The list, as returned through "alldevsp", may be null if no interfaces
+ * were up and could be opened.
+ *
+ * This is the implementation used on platforms that have no support for
+ * packet capture.
+ */
+int
+pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
+{
+ /*
+ * Succeed, but don't return any interfaces; we return only those
+ * we can open, and we can't open any if there's no support
+ * for packet capture.
+ */
+ *alldevsp = NULL;
+ return (0);
+}