Skip to content

Commit

Permalink
Merge pull request appneta#94 from appneta/Bug_#78_FreeBSD_compile
Browse files Browse the repository at this point in the history
Allow non-versioned NetMap API support as seen in FreeBSD 8.4 - appneta#78
  • Loading branch information
fklassen committed Jul 21, 2014
2 parents 6abd143 + 42482f1 commit fe1bf86
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
06/21/2014 Version 4.0.5beta1
- Support for Vale Switch (#91)
- Fix max replay rate for all loops except first when omitting --mbps (#85)
- Support for PF_RING DNA version of libpcap (#82)
- Fix build for FreeBSD version 8.4 (#78)

06/19/2014 Version 4.0.5-beta1
- Second loop iteration at full speed (#85)
Expand Down
2 changes: 1 addition & 1 deletion src/common/flows.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static inline flow_entry_type_t hash_put_data(flow_hash_table_t *fht, const uint
const flow_entry_data_t *hash_entry, const struct timeval *tv, const int expiry)
{
uint32_t hash_value = key & (fht->num_buckets - 1);
flow_hash_entry_t *he = NULL;
flow_hash_entry_t *he;
flow_entry_type_t res = FLOW_ENTRY_INVALID;

for (he = fht->buckets[hash_value]; he; he = he->next) {
Expand Down
1 change: 0 additions & 1 deletion src/common/sendpacket.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ static sendpacket_t *sendpacket_open_netmap(const char *device, char *errbuf);
#include <sys/utsname.h>
#include <net/if.h>
#include <netinet/in.h>
#include <linux/if_ether.h>
#include <net/if_arp.h>
#include <netpacket/packet.h>

Expand Down
12 changes: 11 additions & 1 deletion src/common/sendpacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,21 @@
#include "config.h"
#include "defines.h"

#include <sys/socket.h>

#ifdef __NetBSD__
#include <net/if_ether.h>
#else
#include <netinet/if_ether.h>
#endif

#if defined HAVE_NETMAP
#include <net/if.h>
#include <net/netmap.h>
#include <net/netmap_user.h>
#ifndef NETMAP_API
#define NETMAP_API 0
#endif
#endif

#ifdef HAVE_PF_PACKET
Expand Down Expand Up @@ -84,7 +95,6 @@ union sendpacket_handle {
};

#define SENDPACKET_ERRBUF_SIZE 1024
#define NETMAP_BACKOFF (1 << 4) /* 16 - must be power of 2 */

struct sendpacket_s {
tcpr_dir_t cache_dir;
Expand Down

0 comments on commit fe1bf86

Please sign in to comment.