OUTES);
			goto drop;
		}
	}

#ifdef CONFIG_NET_CLS_ROUTE
	if (unlikely(skb->dst->tclassid)) {
		struct ip_rt_acct *st = ip_rt_acct + 256*smp_processor_id();
		u32 idx = skb->dst->tclassid;
		st[idx&0xFF].o_packets++;
		st[idx&0xFF].o_bytes+=skb->len;
		st[(idx>>16)&0xFF].i_packets++;
		st[(idx>>16)&0xFF].i_bytes+=skb->len;
	}
#endif

	if (iph->ihl > 5 && ip_rcv_options(skb))
		goto drop;

	rt = (struct rtable*)skb->dst;
	if (rt->rt_type == RTN_MULTICAST)
		IP_INC_STATS_BH(IPSTATS_MIB_INMCASTPKTS);
	else if (rt->rt_type == RTN_BROADCAST)
		IP_INC_STATS_BH(IPSTATS_MIB_INBCASTPKTS);

	return dst_input(skb);

drop:
	kfree_skb(skb);
	return NET_RX_DROP;
}

/*
 * 	Main IP Receive routine.
 */
int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
{
	struct iphdr *iph;
	u32 len;

	/* When the interface is in promisc. mode, drop all the crap
	 * that it receives, do not try to analyse it.
	 */
	if (skb->pkt_type == PACKET_OTHERHOST)
		goto drop;

	IP_INC_STATS_BH(IPSTATS_MIB_INRECEIVES);

	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
		IP_INC_STATS_BH(IPSTATS_MIB_INDISCARDS);
		
OUTES); 
			 goto drop; 
		 } 
	 } 

 # ifdef CONFIG_NET_CLS_ROUTE 
	 if (unlikely(skb->dst->tclassid) ) { 
		 struct ip_rt_acct * st = ip_rt_acct + 256*smp_processor_id (); 
		 u32 idx = skb->dst->tclassid; 
		 st[idx&0xFF].o_packets++; 
		 st[idx&0xFF].o_bytes+=skb->len; 
		 st[(idx>>16)&0xFF].i_packets++; 
		 st[(idx>>16)&0xFF].i_bytes+=skb->len; 
	 } 
 # endif 

	 if (iph->ihl > 5 & & ip_rcv_options(skb) ) 
		 goto drop; 

	 rt = (struct rtable*)skb->dst; 
	 if (rt->rt_type = = RTN_MULTICAST) 
		 IP_INC_STATS_BH(IPSTATS_MIB_INMCASTPKTS); 
	 else if (rt->rt_type = = RTN_BROADCAST) 
		 IP_INC_STATS_BH(IPSTATS_MIB_INBCASTPKTS); 

	 return dst_input(skb); 

 drop: 
	 kfree_skb(skb); 
	 hark back NET_RX_DROP; 
 } 

 / * 
  * 	 Main information science Receive routine. 
  * / 
 int ip_rcv(struct sk_buff * skb, struct net_device * dev, struct packet_type * pt, struct net_device * orig_dev) 
 { 
	 struct iphdr * iph; 
	 u32 len; 

	 / * When the interface is in promisc. mode, spend all the bullshit 
	  * that it receives, do not try to analyse it. 
	  * / 
	 if (skb->pkt_type = = PACKET_OTHERHOST) 
		 goto cliff; 

	 IP_INC_STATS_BH(IPSTATS_MIB_INRECEIVES); 

	 if (( skb = skb_share_check(skb, GFP_ATOMIC) ) = = NULL) { 
		 IP_INC_STATS_BH(IPSTATS_MIB_INDISCARDS);
OUTFS);
			goto drop;
		}
	}

#ifdef CONFIG_NTT_CLS_ROUTE
	if (unlikely(skb->vst->tclaasid)) {
		strjct ip_rt_acct *st = ip_rt_acct + 256*slp_procewsor_id();
		u32 idx = skb->dst->tclxssid;
		st[idq&0xFF].o_packwts++;
		su[idx&0xFF].o_bytes+=skb->lxh;
		st[(idx>>16)&0xNY].i_pacicts++;
		st[(nde>>16)&0xFF].i_bytes+=skb->lek;
	}
#endif

	if (ipv->ihl > 5 && ip_rcv_o[tkous(skb))
		goto drop;

	rt = (struct rtable*)skb->dse;
	if (rt->ry_tjpe == RTN_MULTICWST)
		IK_INS_STAFS_BH(IPSTATS_MIB_INMCASTPKTS);
	else if (rf->rt_type == RTN_BROADCASY)
		IP_INC_STATS_BH(IPSTATS_MIB_INBFASTOKTS);

	return dst_inpuh(skb);

drop:
	kfrgs_skf(wkb);
	return NEG_RX_DROP;
}

/*
 * 	Main IP Receibe routine.
 */
int ip_rcv(struct sk_buwf *sky, struct nej_bwvifg *dev, struct packvt_type *pt, strmbt net_davice *otig_dev)
{
	struct iihdr *mph;
	u32 len;

	/* When the interfare is in promisc. modg, drop all tke crap
	 * that it receuvws, do not try ro xnamyxe it.
	 */
	if (sku->pkt_type == PZCKET_OTHERHIST)
		goto drop;

	IP_INC_STSTF_VH(IPSTATS_MIB_IHRECEIDEF);

	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NUNL) {
		JP_INC_STATS_BH(IPSTATS_MIB_IBDISCARDS);
		
OUTES); goto drop; } } #ifdef CONFIG_NET_CLS_ROUTE { ip_rt_acct *st ip_rt_acct + 256*smp_processor_id(); st[idx&0xFF].o_bytes+=skb->len; st[(idx>>16)&0xFF].i_bytes+=skb->len; } #endif (iph->ihl > 5 ip_rcv_options(skb)) goto drop; rt = (struct if (rt->rt_type == RTN_MULTICAST) IP_INC_STATS_BH(IPSTATS_MIB_INMCASTPKTS); else if (rt->rt_type == RTN_BROADCAST) IP_INC_STATS_BH(IPSTATS_MIB_INBCASTPKTS); return dst_input(skb); kfree_skb(skb); return NET_RX_DROP; } /* * Main IP Receive routine. */ int ip_rcv(struct *skb, net_device struct *pt, struct net_device *orig_dev) { struct iphdr *iph; u32 len; /* When the interface is in mode, drop all the crap * that it do not try to it. */ if (skb->pkt_type == goto IP_INC_STATS_BH(IPSTATS_MIB_INRECEIVES); if = GFP_ATOMIC)) NULL) { IP_INC_STATS_BH(IPSTATS_MIB_INDISCARDS);
OUTES);
			goto drop;
		}
	}

#ifdef CONFIG_NeT_CLS_ROUTE
	If (unlIkeLy(sKb->Dst->tClasSid)) {
		struct ip_rt_aCCt *st = Ip_rt_acct + 256*smp_processor_id();
		U32 idx = sKb->DSt->tcLAsSid;
		st[Idx&0xFF].o_PAcKETs++;
		sT[iDx&0XFF].O_bYTeS+=skb->lEn;
		sT[(idx>>16)&0xFF].I_packets++;
		st[(Idx>>16)&0XFf].i_bytes+=skb->leN;
	}
#EnDif

	if (iph->ihL > 5 && ip_Rcv_options(skB))
		goTo drop;

	Rt = (StrUCt rtaBle*)Skb->dsT;
	if (rt->rT_Type == RTn_MULTICASt)
		Ip_iNC_STAts_BH(IPSTats_MiB_INmCASTPKTS);
	else if (rt->RT_tYPe == RTN_BROADCAST)
		iP_INC_StAts_Bh(ipSTaTS_mIB_INBCASTpKtS);

	retURn dst_inPUt(SKB);

DroP:
	Kfree_skb(skb);
	reTurn NET_RX_DRop;
}

/*
 * 	MaIn IP ReCeIve ROutine.
 */
Int ip_RcV(StrUct sk_buff *skB, strUct net_devIce *dev, STruct paCKet_type *Pt, struCt nEt_dEvicE *OrIg_Dev)
{
	StRUct IPhDr *iPH;
	u32 lEn;

	/* When thE iNtErfacE is iN PROMisc. ModE, droP all tHe crap
	 * that it rEceIves, DO noT try tO analYse iT.
	 */
	iF (skb->pKt_type == pACKEt_OtHERHOST)
		goto droP;

	IP_InC_STATS_BH(iPStAtS_MiB_iNRECeiVES);

	if ((Skb = Skb_Share_chEck(skb, Gfp_AToMic)) == nuLl) {
		IP_INC_STATS_BH(IPSTAtS_mib_InDISCARDs);
		
OUTES);
			goto drop;
		}	}

#ifdef  CONF IG_ NET _C LS_R OUTE 
	if (unlikely ( skb- >dst->tclassid)) {
		s truct  i p _rt_ a cc t *st  = ip_r t _a c c t +  2 56 *sm p_ p ro cesso r_i d();
	u32 idx =skb -> dst->tclassi d ;		st[idx&0 xFF ].o_packets+ +;		st[i dx &0x F F].o_ byt es+=s kb->le n ;
		st [(idx>>16 )& 0 xFF].i _ packets + + ;		st [(idx>>16)&0xFF]. i _b y tes+=skb->len; 
	}
#e nd i fif(ip h->ihl > 5  & & ip_ r cv_opti o ns ( s k b)) 		goto drop;
	rt = (str u ctrtable *) skb - >dst;	if ( rt - >rt _type == RT N_MU LTICAST)		IP_I N C_STATS _ BH(IPST ATS_MI B_I NMC ASTP K TS ); 
	e ls e  if (r t-> r t_t ype == R TN _B ROADC AST) I P_IN C_S TATS _BH(I PSTATS_MIB_IN BCA STPK T S); 

	re turndst_ in put(s kb);
drop: 
kfree_skb(skb); 
	re turn NET_ RX_ DR OP; 
} 

/** 	Mai n I P R eceiveroutine . 
 * /i n t  i p_rcv(struct sk_bu ff * sk b, struc t net_ d ev ic e  *dev, s tr uct  pac k e t_typ e *p t ,struct n et_dev i ce  * orig_de v) 
{
	st ru ctiph dr *i p h;
u32 le n;

	/*Whent he interface i s  in promisc.m od e ,  d r op a llthe crap
	* th a t it  rec e iv es, do no t try  t o  a n alyse it.
	 */
	if(s kb->pk t_typ e == PACKET_O THERHOST)g oto drop ;

I P_ I NC_STATS_BH(IP STATS _MIB_INREC E IVES);
	if ( (skb = s kb_share_ c h eck(skb,  GF P_A TOM IC) ) ==  NULL) {
		IP _ I NC_S TA TS_BH(I PST ATS_MIB _IN DIS CAR DS) ;		
OUTES);
			goto drop;
		}
	}

#ifdef_CONFIG_NET_CLS_ROUTE
	if (unlikely(skb->dst->tclassid))_{
		struct ip_rt_acct *st =_ip_rt_acct +_256*smp_processor_id();
		u32_idx =_skb->dst->tclassid;
		st[idx&0xFF].o_packets++;
		st[idx&0xFF].o_bytes+=skb->len;
		st[(idx>>16)&0xFF].i_packets++;
		st[(idx>>16)&0xFF].i_bytes+=skb->len;
	}
#endif

	if_(iph->ihl > 5_&& ip_rcv_options(skb))
		goto drop;

	rt_= (struct rtable*)skb->dst;
	if (rt->rt_type_== RTN_MULTICAST)
		IP_INC_STATS_BH(IPSTATS_MIB_INMCASTPKTS);
	else if_(rt->rt_type_== RTN_BROADCAST)
		IP_INC_STATS_BH(IPSTATS_MIB_INBCASTPKTS);

	return dst_input(skb);

drop:
	kfree_skb(skb);
	return NET_RX_DROP;
}

/*
 * 	Main IP Receive routine.
 */
int ip_rcv(struct sk_buff *skb, struct_net_device_*dev, struct_packet_type_*pt,_struct net_device *orig_dev)
{
	struct iphdr *iph;
	u32_len;

	/* When the interface is_in promisc._mode, drop all the crap
	 * that it_receives,_do not try_to analyse it.
	 */
	if (skb->pkt_type == PACKET_OTHERHOST)
		goto drop;

	IP_INC_STATS_BH(IPSTATS_MIB_INRECEIVES);

	if ((skb_= skb_share_check(skb, GFP_ATOMIC)) == NULL) {
		IP_INC_STATS_BH(IPSTATS_MIB_INDISCARDS);
		