lib: Rename lib/pcap.h to avoid inclusion conflicts.
authorStephane A. Sezer <sas@cd80.net>
Fri, 15 Mar 2013 09:19:31 +0000 (02:19 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 15 Mar 2013 15:18:11 +0000 (08:18 -0700)
lib/pcap.h has a name that conflicts with /usr/include/pcap.h. When one
wants to include pcap.h from libpcap (i.e.: the one from /usr/include), one
may end up with pcap.h from openvswitch.

This change renames this header to pcap-file.h and updates all
references to this file.

This change was tested with `make distcheck`.

Signed-off-by: Stephane A. Sezer <sas@cd80.net>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
lib/automake.mk
lib/ofp-print.c
lib/pcap-file.c [moved from lib/pcap.c with 99% similarity]
lib/pcap-file.h [moved from lib/pcap.h with 92% similarity]
tests/test-flows.c

diff --git a/AUTHORS b/AUTHORS
index 9613142..bd0f499 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -71,6 +71,7 @@ Sanjay Sane             ssane@nicira.com
 Shan Wei                davidshan@tencent.com
 Shih-Hao Li             shli@nicira.com
 Simon Horman            horms@verge.net.au
+Stephane A. Sezer       sas@cd80.net
 SUGYO Kazushi           sugyo.org@gmail.com
 Tadaaki Nagao           nagao@stratosphere.co.jp
 Tetsuo NAKAGAWA         nakagawa@mxc.nes.nec.co.jp
index ce3edc3..1d58604 100644 (file)
@@ -130,8 +130,8 @@ lib_libopenvswitch_a_SOURCES = \
        lib/ovsdb-types.h \
        lib/packets.c \
        lib/packets.h \
-       lib/pcap.c \
-       lib/pcap.h \
+       lib/pcap-file.c \
+       lib/pcap-file.h \
        lib/poll-loop.c \
        lib/poll-loop.h \
        lib/process.c \
index f7872cb..95d9b73 100644 (file)
@@ -44,7 +44,6 @@
 #include "openflow/openflow.h"
 #include "openflow/nicira-ext.h"
 #include "packets.h"
-#include "pcap.h"
 #include "type-props.h"
 #include "unaligned.h"
 #include "util.h"
similarity index 99%
rename from lib/pcap.c
rename to lib/pcap-file.c
index 1033ba9..d137be8 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include <config.h>
-#include "pcap.h"
+#include "pcap-file.h"
 #include <errno.h>
 #include <inttypes.h>
 #include <string.h>
similarity index 92%
rename from lib/pcap.h
rename to lib/pcap-file.h
index 43a4306..46625c3 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef PCAP_H
-#define PCAP_H 1
+#ifndef PCAP_FILE_H
+#define PCAP_FILE_H 1
 
 #include <stdio.h>
 
@@ -27,4 +27,4 @@ void pcap_write_header(FILE *);
 int pcap_read(FILE *, struct ofpbuf **);
 void pcap_write(FILE *, struct ofpbuf *);
 
-#endif /* dhcp.h */
+#endif /* pcap-file.h */
index b4dedee..c77372f 100644 (file)
@@ -25,7 +25,7 @@
 #include "ofpbuf.h"
 #include "ofp-print.h"
 #include "ofp-util.h"
-#include "pcap.h"
+#include "pcap-file.h"
 #include "util.h"
 #include "vlog.h"