Comments (3)
@Z-J-X it's for multiple-queue. no problem from my using experience. what's your use-case ?
ifr.ifr_flags = IFF_NO_PI | IFF_MULTI_QUEUE;
from libviface.
@sequoiar I wrote a demo program,like this:
#include <viface/viface.hpp>
#include <iostream>
#include <iomanip>
#include <unistd.h>
#include <algorithm>
using namespace std;
int main()
{
viface::VIface iface("viface%d");
// Configure interface
iface.setIPv4Netmask("255.255.255.0");
iface.setIPv4("192.168.100.11");
// Bring-up interface
iface.up();
std::set<string> stats_set = iface.listStats();
while (1)
{
auto data = iface.receive();
if (data.size() == 0)
{
sleep(1);
continue;
}
std::cout << "receive:" << std::dec << data.size() << std::endl;
for (int a : data)
{
std::cout << std::setiosflags(std::ios::uppercase) << std::hex << std::setw(2) << std::setfill('0') << a << " ";
}
std::cout << std::endl;
}
}
The results may be different on different machines
ping 192.168.100.1 receive
ping 192.168.100.2 not receive
ping 192.168.100.3 receive
Tcpdump shows that the data has reached the Tun / tap device
i use ping to test this program, I found that half of the data could not be received. Then I looked at the source code and found that Tun / tap would be opened twice, I think the data not received will be received by another FD. Therefore, I modified the source code to test, read the data of two FD, and everything is normal.
ps: After modifying the source code, I only carried out the reading test.
you can see issue#6,They have the same problems as me
from libviface.
Can confirm that applying this fix solves the issue with missing pings and many other IP packets.
from libviface.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libviface.