vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit 0916a877d6a3987677fcc99301d03732bc4feb86
parent a67aa934d03346d382256746228fe41c1b73149c
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Sat, 12 Jun 2010 10:30:39 +0200

snaplen must be bigger than 1514 (why? I dont know)

Diffstat:
src/9vx/etherve.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/9vx/etherve.c b/src/9vx/etherve.c @@ -63,7 +63,7 @@ setup(void) return veerror("cannot find network device"); // if ((pd = pcap_open_live(netdev, 1514, 1, 1, errbuf)) == nil) - if ((pd = pcap_open_live(netdev, 1514, 1, 1000, errbuf)) == nil) + if ((pd = pcap_open_live(netdev, 65000, 1, 1, errbuf)) == nil) // XXX return nil; if (macaddr && (eafrom(macaddr, ea) == -1)) @@ -86,13 +86,13 @@ vepkt(Ctlr *c) struct pcap_pkthdr hdr; Block *b; - b = allocb(1514); + b = allocb(65000); while ((b->rp = pcap_next(c->pd, &hdr)) == nil) ; if (hdr.caplen) { b->wp = b->rp+hdr.caplen; - iprint("Got packet len %d\n", hdr.caplen); + iprint("Got packet (ts=%d) len %d / %d\n", hdr.ts.tv_sec , hdr.caplen, hdr.len); return b; }