Open yeliauk opened 3 years ago
@LiMeiqing
wireshark/tcpdump is unable to capture DPDK port, f-stack.conf support packet capture, something like below:
# Packet capture path, this will hurt performance [pcap] enable=1 savepath=/tmp snaplen=98 #savelen=1000
@LiMeiqing
wireshark/tcpdump is unable to capture DPDK port, f-stack.conf support packet capture, something like below:
Packet capture path, this will hurt performance
[pcap] enable=1 savepath=/tmp snaplen=98
savelen=1000
Thank you!! I will have a try.
@vincentmli I tried it. But I still can't capture package. So I wonder if there is something wrong with my code, so that the message can't be sent out.
try 'dpdk pdump tool'
I wrote a server and a client based on F-Stack.The server could not receive the information sent by the client.
But the return value of the ff_sendto function on the client side is normal. When I use Wireshark software to grab packets on the client, I find that I can't grab them.
How to solve this problem?
Any suggestion will be appreciated!!
server (UDP) :
include
include
include
include
include
include <sys/types.h>
include <sys/socket.h>
include <arpa/inet.h>
include
include
include "ff_config.h"
include "ff_api.h"
define MAX_EVENTS 512
/ kevent set / struct kevent kevSet; / events / struct kevent events[MAX_EVENTS]; / kq / int kq; int sockfd;
ifdef INET6
int sockfd6;
endif
char html[] = "hello,client!";
int len;
int loop(void *arg) { struct sockaddr_in client; bzero(&client, sizeof(client));
ifdef INET6
else
endif
}
int main(int argc, char * argv[]) { ff_init(argc, argv);
}
client (UDP) :
include
include
include
include
include
include <sys/types.h>
include <sys/socket.h>
include <arpa/inet.h>
include
include
include <sys/ioctl.h>
include "ff_config.h"
include "ff_api.h"
define MAX_EVENTS 512
/ kevent set / struct kevent kevSet; / events / struct kevent events[MAX_EVENTS]; / kq / int kq; int sockfd;
struct sockaddr_in server_sock;
char html[255];
int loop(void *arg) { unsigned nevents = ff_kevent(kq, NULL, 0, events, MAX_EVENTS, NULL); unsigned i;
}
int main(int argc, char * argv[]) { ff_init(argc, argv);
}