tag | line | file | source code |
trh | 20 | net/802/tr.c | static void tr_source_route(struct trh_hdr *trh,struct device *dev); |
trh | 21 | net/802/tr.c | static void tr_add_rif_info(struct trh_hdr *trh); |
trh | 45 | net/802/tr.c | struct trh_hdr *trh=(struct trh_hdr *)skb_push(skb,dev->hard_header_len); |
trh | 46 | net/802/tr.c | struct trllc *trllc=(struct trllc *)(trh+1); |
trh | 48 | net/802/tr.c | trh->ac=AC; |
trh | 49 | net/802/tr.c | trh->fc=LLC_FRAME; |
trh | 52 | net/802/tr.c | memcpy(trh->saddr,saddr,dev->addr_len); |
trh | 54 | net/802/tr.c | memset(trh->saddr,0,dev->addr_len); /* Adapter fills in address */ |
trh | 63 | net/802/tr.c | memcpy(trh->daddr,daddr,dev->addr_len); |
trh | 64 | net/802/tr.c | tr_source_route(trh,dev); |
trh | 74 | net/802/tr.c | struct trh_hdr *trh=(struct trh_hdr *)buff; |
trh | 82 | net/802/tr.c | if(arp_find(trh->daddr, dest, dev, dev->pa_addr, skb)) { |
trh | 86 | net/802/tr.c | tr_source_route(trh,dev); |
trh | 93 | net/802/tr.c | struct trh_hdr *trh=(struct trh_hdr *)skb->data; |
trh | 100 | net/802/tr.c | if(trh->saddr[0] & TR_RII) |
trh | 101 | net/802/tr.c | tr_add_rif_info(trh); |
trh | 103 | net/802/tr.c | if(*trh->daddr & 1) |
trh | 105 | net/802/tr.c | if(!memcmp(trh->daddr,dev->broadcast,TR_ALEN)) |
trh | 113 | net/802/tr.c | if(memcmp(trh->daddr, dev->dev_addr, TR_ALEN)) |
trh | 122 | net/802/tr.c | static void tr_source_route(struct trh_hdr *trh,struct device *dev) { |
trh | 129 | net/802/tr.c | if(!memcmp(&(trh->daddr[0]),&(dev->broadcast[0]),TR_ALEN)) { |
trh | 130 | net/802/tr.c | trh->rcf=htons((((sizeof(trh->rcf)) << 8) & TR_RCF_LEN_MASK) |
trh | 132 | net/802/tr.c | trh->saddr[0]|=TR_RII; |
trh | 135 | net/802/tr.c | for(i=0,hash=0;i<TR_ALEN;hash+=trh->daddr[i++]); |
trh | 137 | net/802/tr.c | for(entry=rif_table[hash];entry && memcmp(&(entry->addr[0]),&(trh->daddr[0]),TR_ALEN);entry=entry->next); |
trh | 141 | net/802/tr.c | printk("source routing for %02X %02X %02X %02X %02X %02X\n",trh->daddr[0], |
trh | 142 | net/802/tr.c | trh->daddr[1],trh->daddr[2],trh->daddr[3],trh->daddr[4],trh->daddr[5]); |
trh | 145 | net/802/tr.c | trh->rcf=entry->rcf; |
trh | 146 | net/802/tr.c | memcpy(&trh->rseg[0],&entry->rseg[0],8*sizeof(unsigned short)); |
trh | 147 | net/802/tr.c | trh->rcf^=htons(TR_RCF_DIR_BIT); |
trh | 148 | net/802/tr.c | trh->rcf&=htons(0x1fff); /* Issam Chehab <ichehab@madge1.demon.co.uk> */ |
trh | 150 | net/802/tr.c | trh->saddr[0]|=TR_RII; |
trh | 155 | net/802/tr.c | trh->rcf=htons((((sizeof(trh->rcf)) << 8) & TR_RCF_LEN_MASK) |
trh | 157 | net/802/tr.c | trh->saddr[0]|=TR_RII; |
trh | 163 | net/802/tr.c | static void tr_add_rif_info(struct trh_hdr *trh) { |
trh | 170 | net/802/tr.c | trh->saddr[0]&=0x7f; |
trh | 171 | net/802/tr.c | for(i=0,hash=0;i<TR_ALEN;hash+=trh->saddr[i++]); |
trh | 176 | net/802/tr.c | for(entry=rif_table[hash];entry && memcmp(&(entry->addr[0]),&(trh->saddr[0]),TR_ALEN);entry=entry->next); |
trh | 181 | net/802/tr.c | trh->saddr[0],trh->saddr[1],trh->saddr[2], |
trh | 182 | net/802/tr.c | trh->saddr[3],trh->saddr[4],trh->saddr[5], |
trh | 183 | net/802/tr.c | trh->rcf); |
trh | 190 | net/802/tr.c | entry->rcf=trh->rcf; |
trh | 191 | net/802/tr.c | memcpy(&(entry->rseg[0]),&(trh->rseg[0]),8*sizeof(unsigned short)); |
trh | 192 | net/802/tr.c | memcpy(&(entry->addr[0]),&(trh->saddr[0]),TR_ALEN); |
trh | 199 | net/802/tr.c | if ( entry->rcf != trh->rcf ) { |
trh | 200 | net/802/tr.c | if (!(trh->rcf & htons(TR_RCF_BROADCAST_MASK))) { |
trh | 203 | net/802/tr.c | trh->saddr[0],trh->saddr[1],trh->saddr[2], |
trh | 204 | net/802/tr.c | trh->saddr[3],trh->saddr[4],trh->saddr[5], |
trh | 205 | net/802/tr.c | trh->rcf); |
trh | 207 | net/802/tr.c | entry->rcf = trh->rcf; |
trh | 208 | net/802/tr.c | memcpy(&(entry->rseg[0]),&(trh->rseg[0]),8*sizeof(unsigned short)); |