aboutsummaryrefslogtreecommitdiff
path: root/pcap-rdmasniff.c
diff options
context:
space:
mode:
authorJoseph Mingrone <jrm@FreeBSD.org>2024-09-05 19:46:35 +0000
committerJoseph Mingrone <jrm@FreeBSD.org>2024-09-05 19:46:35 +0000
commit025be3f592b920ff0a3e602e5aa8b60a34e5e617 (patch)
tree4f33277584e4a38c8bad5c2788584a00cf830ea4 /pcap-rdmasniff.c
parent6b96668d5b49eea57b7551349eca70928cc199ce (diff)
Diffstat (limited to 'pcap-rdmasniff.c')
-rw-r--r--pcap-rdmasniff.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/pcap-rdmasniff.c b/pcap-rdmasniff.c
index d63ca898877b..fd6d6fa6108c 100644
--- a/pcap-rdmasniff.c
+++ b/pcap-rdmasniff.c
@@ -28,9 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
#include "pcap-int.h"
#include "pcap-rdmasniff.h"
@@ -89,7 +87,7 @@ rdmasniff_cleanup(pcap_t *handle)
ibv_close_device(priv->context);
free(priv->oneshot_buffer);
- pcap_cleanup_live_common(handle);
+ pcapint_cleanup_live_common(handle);
}
static void
@@ -172,7 +170,7 @@ rdmasniff_read(pcap_t *handle, int max_packets, pcap_handler callback, u_char *u
pktd = (u_char *) handle->buffer + wc.wr_id * RDMASNIFF_RECEIVE_SIZE;
if (handle->fcode.bf_insns == NULL ||
- pcap_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) {
+ pcapint_filter(handle->fcode.bf_insns, pktd, pkth.len, pkth.caplen)) {
callback(user, &pkth, pktd);
++priv->packets_recv;
++count;
@@ -323,11 +321,11 @@ rdmasniff_activate(pcap_t *handle)
handle->read_op = rdmasniff_read;
handle->stats_op = rdmasniff_stats;
handle->cleanup_op = rdmasniff_cleanup;
- handle->setfilter_op = install_bpf_program;
+ handle->setfilter_op = pcapint_install_bpf_program;
handle->setdirection_op = NULL;
handle->set_datalink_op = NULL;
- handle->getnonblock_op = pcap_getnonblock_fd;
- handle->setnonblock_op = pcap_setnonblock_fd;
+ handle->getnonblock_op = pcapint_getnonblock_fd;
+ handle->setnonblock_op = pcapint_setnonblock_fd;
handle->oneshot_callback = rdmasniff_oneshot;
handle->selectable_fd = priv->channel->fd;
@@ -444,7 +442,7 @@ rdmasniff_findalldevs(pcap_if_list_t *devlistp, char *err_str)
* XXX - do the notions of "up", "running", or
* "connected" apply here?
*/
- if (!add_dev(devlistp, dev_list[i]->name, 0, "RDMA sniffer", err_str)) {
+ if (!pcapint_add_dev(devlistp, dev_list[i]->name, 0, "RDMA sniffer", err_str)) {
ret = -1;
break;
}