diff options
author | Luigi Rizzo <rizzo@iet.unipi.it> | 2014-01-23 17:24:03 +0100 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-01-23 08:41:05 -0800 |
commit | 50aa0364d0740b2158f48d40a5be04d47354a1e9 (patch) | |
tree | 1e0dd36f13969fd939ff81d5566fab4754714f55 /lib/pcap-file.c | |
parent | b681f93ff7352c3d18d38efb38721083d553bf05 (diff) | |
download | openvswitch-50aa0364d0740b2158f48d40a5be04d47354a1e9.tar.gz |
lib/pcap-file: add 'ovs_' prefix to pcap functions
This is done to avoid collisions and confusions with libpcap symbols,
like pcap_read()
Signed-off-by: Luigi Rizzo <rizzo@iet.unipi.it>
Signed-off-by: Daniele Di Proietto <daniele.di.proietto@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/pcap-file.c')
-rw-r--r-- | lib/pcap-file.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/pcap-file.c b/lib/pcap-file.c index 4e3e7db92..fdff33ca0 100644 --- a/lib/pcap-file.c +++ b/lib/pcap-file.c @@ -53,7 +53,7 @@ struct pcaprec_hdr { BUILD_ASSERT_DECL(sizeof(struct pcaprec_hdr) == 16); FILE * -pcap_open(const char *file_name, const char *mode) +ovs_pcap_open(const char *file_name, const char *mode) { struct stat s; FILE *file; @@ -75,7 +75,7 @@ pcap_open(const char *file_name, const char *mode) switch (mode[0]) { case 'r': - error = pcap_read_header(file); + error = ovs_pcap_read_header(file); if (error) { errno = error; fclose(file); @@ -84,12 +84,12 @@ pcap_open(const char *file_name, const char *mode) break; case 'w': - pcap_write_header(file); + ovs_pcap_write_header(file); break; case 'a': if (!fstat(fileno(file), &s) && !s.st_size) { - pcap_write_header(file); + ovs_pcap_write_header(file); } break; @@ -100,7 +100,7 @@ pcap_open(const char *file_name, const char *mode) } int -pcap_read_header(FILE *file) +ovs_pcap_read_header(FILE *file) { struct pcap_hdr ph; if (fread(&ph, sizeof ph, 1, file) != 1) { @@ -117,7 +117,7 @@ pcap_read_header(FILE *file) } void -pcap_write_header(FILE *file) +ovs_pcap_write_header(FILE *file) { /* The pcap reader is responsible for figuring out endianness based on the * magic number, so the lack of htonX calls here is intentional. */ @@ -133,7 +133,7 @@ pcap_write_header(FILE *file) } int -pcap_read(FILE *file, struct ofpbuf **bufp, long long int *when) +ovs_pcap_read(FILE *file, struct ofpbuf **bufp, long long int *when) { struct pcaprec_hdr prh; struct ofpbuf *buf; @@ -190,7 +190,7 @@ pcap_read(FILE *file, struct ofpbuf **bufp, long long int *when) } void -pcap_write(FILE *file, struct ofpbuf *buf) +ovs_pcap_write(FILE *file, struct ofpbuf *buf) { struct pcaprec_hdr prh; struct timeval tv; |