Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
Network packet capture support functions . More...
Functions | |
int | net_capture_setup (const char *remote_addr, const char *my_local_addr, const char *peer_addr, const struct device **dev) |
Setup network packet capturing support. | |
static int | net_capture_cleanup (const struct device *dev) |
Cleanup network packet capturing support. | |
static int | net_capture_enable (const struct device *dev, struct net_if *iface) |
Enable network packet capturing support. | |
static bool | net_capture_is_enabled (const struct device *dev) |
Is network packet capture enabled or disabled. | |
static int | net_capture_disable (const struct device *dev) |
Disable network packet capturing support. | |
Network packet capture support functions .
|
inlinestatic |
#include <zephyr/net/capture.h>
Cleanup network packet capturing support.
This should be called after the capturing is done and resources can be released.
dev | Network capture device. User must allocate using the net_capture_setup() function. |
|
inlinestatic |
#include <zephyr/net/capture.h>
Disable network packet capturing support.
dev | Network capture device |
#include <zephyr/net/capture.h>
Enable network packet capturing support.
This creates tunnel network interface where all the captured packets are pushed. The captured network packets are placed in UDP packets that are sent to tunnel peer.
dev | Network capture device |
iface | Network interface we are starting to capture packets. |
#include <zephyr/net/capture.h>
Is network packet capture enabled or disabled.
dev | Network capture device. If set to NULL, then the default capture device is used. |
int net_capture_setup | ( | const char * | remote_addr, |
const char * | my_local_addr, | ||
const char * | peer_addr, | ||
const struct device ** | dev ) |
#include <zephyr/net/capture.h>
Setup network packet capturing support.
remote_addr | The value tells the tunnel remote/outer endpoint IP address. The IP address can be either IPv4 or IPv6 address. This address is used to select the network interface where the tunnel is created. |
my_local_addr | The local/inner IP address of the tunnel. Can contain also port number which is used as UDP source port. |
peer_addr | The peer/inner IP address of the tunnel. Can contain also port number which is used as UDP destination port. |
dev | Network capture device. This is returned to the caller. |