vx32

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

commit cbe18969643799a96835e4eb726bd2a96a5c8de6
parent 7de61994a9fdd6f692ac0e47e2e61e195c470538
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Thu, 10 Jun 2010 19:50:07 +0200

tap device working?

Diffstat:
src/9vx/a/devcons.c | 1+
src/9vx/a/devether.c | 14++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/9vx/a/devcons.c b/src/9vx/a/devcons.c @@ -784,6 +784,7 @@ consread(Chan *c, void *buf, long n, vlong off) while(!qcanread(lineq)){ if(qread(kbdq, &ch, 1) == 0) continue; + //XXX TODO: startup blocks here send = 0; if(ch == 0){ /* flush output on rawoff -> rawon */ diff --git a/src/9vx/a/devether.c b/src/9vx/a/devether.c @@ -163,9 +163,11 @@ etheriq(Ether* ether, Block* bp, int fromwire) /* is it for me? */ tome = memcmp(pkt->d, ether->ea, sizeof(pkt->d)) == 0; fromme = memcmp(pkt->s, ether->ea, sizeof(pkt->s)) == 0; -iprint("XXX PACK: %2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux -> %2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux\n", -pkt->s[0], pkt->s[1], pkt->s[2],pkt->s[3], pkt->s[4], pkt->s[5], -pkt->d[0], pkt->d[1], pkt->d[2],pkt->d[3], pkt->d[4], pkt->d[5]); +// if(tome||fromme) +// iprint("XXX PACK: %2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux -> %2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux%s%s\n", +// pkt->s[0], pkt->s[1], pkt->s[2],pkt->s[3], pkt->s[4], pkt->s[5], +// pkt->d[0], pkt->d[1], pkt->d[2],pkt->d[3], pkt->d[4], pkt->d[5], +// (tome ? " <<--" : ""), (fromme ? " -->>" : "")); /* * Multiplex the packet to all the connections which want it. * If the packet is not to be used subsequently (fromwire != 0), @@ -174,7 +176,7 @@ pkt->d[0], pkt->d[1], pkt->d[2],pkt->d[3], pkt->d[4], pkt->d[5]); */ for(fp = ether->ni.f; fp < ep; fp++){ if((f = *fp) != nil) - if(f->type == type || f->type < 0) +// XXX if(f->type == type || f->type < 0) if(tome || multi || f->prom){ /* Don't want to hear bridged packets */ if(f->bridge && !fromwire && !fromme) @@ -446,8 +448,8 @@ etherprobe(int cardno, int ctlrno) memmove(ether->ni.addr, ether->ea, Eaddrlen); memset(ether->ni.bcast, 0xFF, Eaddrlen); -iprint("XXX EADDR: %2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux\n", -ether->ea[0], ether->ea[1], ether->ea[2],ether->ea[3], ether->ea[4], ether->ea[5]); +// iprint("XXX EADDR: %2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux:%2.2ux\n", +// ether->ea[0], ether->ea[1], ether->ea[2],ether->ea[3], ether->ea[4], ether->ea[5]); return ether; }