struct rif_cache_s *entry; 
struct rif_cache *entry; 
static void tr_add_rif_info(struct trh_hdr *trh, struct net_device *dev){	unsigned int hash, rii_p = 0;	struct rif_cache_s *entry;	spin_lock_bh(&rif_lock);		/*	 *	Firstly see if the entry exists	 */       	if(trh->saddr[0] & TR_RII)	{		trh->saddr[0]&=0x7f;		if (((ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8) > 2)		{			rii_p = 1;	        }	}	hash = rif_hash(trh->saddr);	for(entry=rif_table[hash];entry && memcmp(&(entry->addr[0]),&(trh->saddr[0]),TR_ALEN);entry=entry->next);	if(entry==NULL) 	{#if TR_SR_DEBUGprintk("adding rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X rcf:%04X\n",		trh->saddr[0],trh->saddr[1],trh->saddr[2],       		trh->saddr[3],trh->saddr[4],trh->saddr[5],		ntohs(trh->rcf));#endif		/*		 *	Allocate our new entry. A failure to allocate loses		 *	use the information. This is harmless.		 *		 *	FIXME: We ought to keep some kind of cache size		 *	limiting and adjust the timers to suit.		 */		entry=kmalloc(sizeof(struct rif_cache_s),GFP_ATOMIC);		if(!entry) 		{			printk(KERN_DEBUG "tr.c: Couldn't malloc rif cache entry !\n");			spin_unlock_bh(&rif_lock);			return;		}		memcpy(&(entry->addr[0]),&(trh->saddr[0]),TR_ALEN);		entry->iface = dev->ifindex;		entry->next=rif_table[hash];		entry->last_used=jiffies;		rif_table[hash]=entry;		if (rii_p)		{			entry->rcf = trh->rcf & htons((unsigned short)~TR_RCF_BROADCAST_MASK);			memcpy(&(entry->rseg[0]),&(trh->rseg[0]),8*sizeof(unsigned short));			entry->local_ring = 0;			trh->saddr[0]|=TR_RII; /* put the routing indicator back for tcpdump */		}		else		{			entry->local_ring = 1;		}	} 		else	/* Y. Tahara added */	{ 		/*		 *	Update existing entries		 */		if (!entry->local_ring) 		    if (entry->rcf != (trh->rcf & htons((unsigned short)~TR_RCF_BROADCAST_MASK)) &&			 !(trh->rcf & htons(TR_RCF_BROADCAST_MASK)))		    {#if TR_SR_DEBUGprintk("updating rif_entry: addr:%02X:%02X:%02X:%02X:%02X:%02X rcf:%04X\n",		trh->saddr[0],trh->saddr[1],trh->saddr[2],		trh->saddr[3],trh->saddr[4],trh->saddr[5],		ntohs(trh->rcf));#endif			    entry->rcf = trh->rcf & htons((unsigned short)~TR_RCF_BROADCAST_MASK);        		    memcpy(&(entry->rseg[0]),&(trh->rseg[0]),8*sizeof(unsigned short));		    }                                                    	entry->last_used=jiffies;               	}	spin_unlock_bh(&rif_lock);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c8b35d2a29ec3c93e3b9c1e70d649a77a214b1c1/tr.c/clean/net/802/tr.c