Displaying 12 results from an estimated 12 matches for "siocgifindex".
2007 Apr 18
1
[Bridge] physical interface on a bridge
...9.90
1 00:14:22:b0:cd:e0 yes 0.00
133 00:16:c7:f5:8f:e2 no 0.48
Port 133 is the 901'th interface (0x385) I added to bridge test0. What does=
133 point to? The ifindex of this physical interface is 912 (0x390) (retr=
ieved with SIOCGIFINDEX).
Secondly,
I seem to be unable to add more than around 1024 interfaces to a single bri=
dge. Is there a way to increase this limit?
I am using linux kernel 2.6
Thanks a million,
Joergen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-foundatio...
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...c)
+{
+ int fd, ret;
+ struct ifreq req;
+ struct sockaddr_ll lladdr;
+
+ fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ if (fd < 0)
+ fprintf(stderr, "packet socket failed\n");
+
+ memset(&req, 0, sizeof(req));
+ strncpy(req.ifr_name, ifname, IFNAMSIZ-1);
+ ret = ioctl(fd, SIOCGIFINDEX, &req);
+ if (ret < 0)
+ fprintf(stderr, "SIOCGIFINDEX failed\n");
+
+ memset(&lladdr, 0, sizeof(lladdr));
+ lladdr.sll_family = AF_PACKET;
+ lladdr.sll_protocol = htons(ETH_P_ALL);
+ lladdr.sll_ifindex = req.ifr_ifindex;
+ ret = bind(fd, (const struct sockaddr *)&lladd...
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...c)
+{
+ int fd, ret;
+ struct ifreq req;
+ struct sockaddr_ll lladdr;
+
+ fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ if (fd < 0)
+ fprintf(stderr, "packet socket failed\n");
+
+ memset(&req, 0, sizeof(req));
+ strncpy(req.ifr_name, ifname, IFNAMSIZ-1);
+ ret = ioctl(fd, SIOCGIFINDEX, &req);
+ if (ret < 0)
+ fprintf(stderr, "SIOCGIFINDEX failed\n");
+
+ memset(&lladdr, 0, sizeof(lladdr));
+ lladdr.sll_family = AF_PACKET;
+ lladdr.sll_protocol = htons(ETH_P_ALL);
+ lladdr.sll_ifindex = req.ifr_ifindex;
+ ret = bind(fd, (const struct sockaddr *)&lladd...
2007 Aug 13
2
Policy routing question
Hi,
I have a testing multihome setup, with the default gateway being one of
the links and using policy routing to honor requests for a specific
link. Everything works as expected when I request a specific IP to bind
to. But if I request a specific interface things fall apart in ways that
I can not explain:
default gw (WORKS)
----------
rabbit@Thesaurus:~$ ping -c 1 yahoo.com
PING yahoo.com
2003 May 23
7
CBQ DEVICE BW?
Hi,
The CBQ config file shud be some thing like this.
DEVICE=eth0,10Mbit,1Mbit
RATE=50Kbit
WEIGHT=5Kbit
Shall i hardcode the DEVICE BW as 10/100 Mbit
or
Shall i use any other tool like ethtool for getting this.
ethtool gives Speed: 10Mbps
If so, how about, if i use some other Interfaces other than eth0,
like ppp0 or some other?
C''d anybody can give a suggestion over this?
thanks
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...;vqs;
+ r = vhost_dev_init(&net->dev, dev);
+ if (r < 0)
+ return r;
+
+ net->sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ if (net->sock < 0)
+ return -errno;
+
+ memset(&req, 0, sizeof(req));
+ strncpy(req.ifr_name, ifname, IFNAMSIZ-1);
+ r = ioctl(net->sock, SIOCGIFINDEX, &req);
+ if (r < 0)
+ return -errno;
+
+ memset(&lladdr, 0, sizeof(lladdr));
+ lladdr.sll_family = AF_PACKET;
+ lladdr.sll_protocol = htons(ETH_P_ALL);
+ lladdr.sll_ifindex = req.ifr_ifindex;
+ r = bind(net->sock, (const struct sockaddr *)&lladdr, sizeof(lladdr));
+ if (r <...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...;vqs;
+ r = vhost_dev_init(&net->dev, dev);
+ if (r < 0)
+ return r;
+
+ net->sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ if (net->sock < 0)
+ return -errno;
+
+ memset(&req, 0, sizeof(req));
+ strncpy(req.ifr_name, ifname, IFNAMSIZ-1);
+ r = ioctl(net->sock, SIOCGIFINDEX, &req);
+ if (r < 0)
+ return -errno;
+
+ memset(&lladdr, 0, sizeof(lladdr));
+ lladdr.sll_family = AF_PACKET;
+ lladdr.sll_protocol = htons(ETH_P_ALL);
+ lladdr.sll_ifindex = req.ifr_ifindex;
+ r = bind(net->sock, (const struct sockaddr *)&lladdr, sizeof(lladdr));
+ if (r <...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...;vqs;
+ r = vhost_dev_init(&net->dev, dev);
+ if (r < 0)
+ return r;
+
+ net->sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ if (net->sock < 0)
+ return -errno;
+
+ memset(&req, 0, sizeof(req));
+ strncpy(req.ifr_name, ifname, IFNAMSIZ-1);
+ r = ioctl(net->sock, SIOCGIFINDEX, &req);
+ if (r < 0)
+ return -errno;
+
+ memset(&lladdr, 0, sizeof(lladdr));
+ lladdr.sll_family = AF_PACKET;
+ lladdr.sll_protocol = htons(ETH_P_ALL);
+ lladdr.sll_ifindex = req.ifr_ifindex;
+ r = bind(net->sock, (const struct sockaddr *)&lladdr, sizeof(lladdr));
+ if (r <...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...;vqs;
+ r = vhost_dev_init(&net->dev, dev);
+ if (r < 0)
+ return r;
+
+ net->sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ if (net->sock < 0)
+ return -errno;
+
+ memset(&req, 0, sizeof(req));
+ strncpy(req.ifr_name, ifname, IFNAMSIZ-1);
+ r = ioctl(net->sock, SIOCGIFINDEX, &req);
+ if (r < 0)
+ return -errno;
+
+ memset(&lladdr, 0, sizeof(lladdr));
+ lladdr.sll_family = AF_PACKET;
+ lladdr.sll_protocol = htons(ETH_P_ALL);
+ lladdr.sll_ifindex = req.ifr_ifindex;
+ r = bind(net->sock, (const struct sockaddr *)&lladdr, sizeof(lladdr));
+ if (r <...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...;vqs;
+ r = vhost_dev_init(&net->dev, dev);
+ if (r < 0)
+ return r;
+
+ net->sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ if (net->sock < 0)
+ return -errno;
+
+ memset(&req, 0, sizeof(req));
+ strncpy(req.ifr_name, ifname, IFNAMSIZ-1);
+ r = ioctl(net->sock, SIOCGIFINDEX, &req);
+ if (r < 0)
+ return -errno;
+
+ memset(&lladdr, 0, sizeof(lladdr));
+ lladdr.sll_family = AF_PACKET;
+ lladdr.sll_protocol = htons(ETH_P_ALL);
+ lladdr.sll_ifindex = req.ifr_ifindex;
+ r = bind(net->sock, (const struct sockaddr *)&lladdr, sizeof(lladdr));
+ if (r <...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...;vqs;
+ r = vhost_dev_init(&net->dev, dev);
+ if (r < 0)
+ return r;
+
+ net->sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+ if (net->sock < 0)
+ return -errno;
+
+ memset(&req, 0, sizeof(req));
+ strncpy(req.ifr_name, ifname, IFNAMSIZ-1);
+ r = ioctl(net->sock, SIOCGIFINDEX, &req);
+ if (r < 0)
+ return -errno;
+
+ memset(&lladdr, 0, sizeof(lladdr));
+ lladdr.sll_family = AF_PACKET;
+ lladdr.sll_protocol = htons(ETH_P_ALL);
+ lladdr.sll_ifindex = req.ifr_ifindex;
+ r = bind(net->sock, (const struct sockaddr *)&lladdr, sizeof(lladdr));
+ if (r <...
2009 Apr 27
3
[Bridge] Ubuntu: network bridging between wireless and wired connection fails
Hi everybody,
First of all, let me say that I searched a lot on the internet. I
spent several hours sitting after my notebook, but I can't configure
my network bridge in Ubuntu. I'm really desperate, so I hope somebody
can point me out what I'm doing
Hardware:
-----------------------------------------------------------
$ lspci | grep controller
06:05.0 Network controller: Intel