we need to specify a NETMAP_API version or the ioctl() will fail.

This commit is contained in:
Luigi Rizzo 2012-04-06 14:26:05 +00:00
parent 9431cc1696
commit 87a9e4379e

View File

@ -232,6 +232,7 @@ netmap_open(struct my_ring *me, int ringid)
bzero(&req, sizeof(req));
strncpy(req.nr_name, me->nmr.nr_name, sizeof(req.nr_name));
req.nr_ringid = ringid;
req.nr_version = NETMAP_API;
err = ioctl(fd, NIOCGINFO, &req);
if (err) {
D("cannot get info on %s", me->nmr.nr_name);