search for: pf_packet

Displaying 14 results from an estimated 14 matches for "pf_packet".

Did you mean: af_packet
2007 Apr 18
0
[Bridge] PF_PACKET socket
...I bind the user space socket to guarantee that it will receive the ETH_P_802_2 frames received/posted by eth0. It looks to me like: if the socket is created and then bound to eth0 it will never see any frames of type ETH_P_802_2 when a bridge is place. Is this correct? What should happen when the PF_PACKET socket is bound to br0? Should I expect to see 802.2 packets from the bridge? Will all the packets pass by undetected? Will the bridge only pass the packets up if an IP address is assigned to br0? Another question, again w/o ebtables.... Is there a way with PF_PACKET to intercept a certain proto...
2003 May 29
0
PF_PACKET example
Hi everyone, Can anybody help me to find some example about PF_PACKET and Raw Socket programming to receive at one MAC address and send the same packets to the second MAC address? I appreciate your help and I’m looking forward to receive a reply. Regards, Al-Gharribeh _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http:/...
2007 Apr 18
2
[Bridge] Bridge and PACKET-socket
Ahoy, I've encountered some confusing semantics with using PACKET(7) sockets on bridge-enslaved interfaces. Specifically, if my socket accepts all types of frame (bind() to ETH_P_ALL) then it gets all packets; but if it accepts any specific type (e.g. ETH_P_IP), then it receives no packets at all. That is how it's coded in net/core/dev.c's netif_receive_skb(). First ETH_P_ALL
2007 Apr 18
2
[Bridge] tg3 bridge problems
Hello, I've got a very strange problem. Lately I've been setting up my linux servers for network (layer2) redundancy with a bridge interface containing two ethernet interfaces connecting to two switches. So far I didn't have any problems with it, but now a very strange thing happens with a new server I'm installing. The server is an ibm x346 having two onboard BCM5721 cards, the
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...if /* !_WIN32 */ +typedef struct RAWState { + VLANClientState *vc; + int fd; + uint8_t buf[4096]; + int promisc; +} RAWState; + +static int net_raw_fd_init(Monitor *mon, const char *ifname, int promisc) +{ + 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"...
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...if /* !_WIN32 */ +typedef struct RAWState { + VLANClientState *vc; + int fd; + uint8_t buf[4096]; + int promisc; +} RAWState; + +static int net_raw_fd_init(Monitor *mon, const char *ifname, int promisc) +{ + 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"...
2010 Mar 13
1
klibc build trouble
as the next klibc release 1.5.16 looks like shaping up, I have a trouble to build that for Debian. currently I build depent on linux-libc-dev, I don't know what against I can build latest klibc, see klibc fails to build due too: make -C linux/ ARCH=x86_64 INSTALL_HDR_PATH=debian/tmp/usr/lib/klibc/ headers_install make[3]: *** No rule to make target `headers_install'. Stop. make[2]: ***
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...*vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->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...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...*vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->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...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...*vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->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...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...*vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->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...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...*vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->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...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...*vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->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...
2010 Mar 02
17
[PATCH 00/16] External building, update for 2.6.33 and multiple root devices.
The following patchset implements 3 seperate series of changes. External Building ================= Patches 1 through 8 enable to use of klibc's build system while leaving the src tree pristine (and potentially read only). Specifically: - srctree=<Sources for klibc> - objtree=<Ouput directory for klibc> - KLIBCKERNELSRC=<Kernel sources> - KLIBCKERNELOBJ=<Kernel