[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] drop packets by ARP
boo sunn wrote:
>
> hi:
>
> Thanks for information.
>
> Could you show me the code in ns-2 which does the
> "drop"?
>
From file arp.cc
int
ARPTable::arpresolve(nsaddr_t dst, Packet *p, LL *ll)
{
ARPEntry *llinfo ;
assert(initialized());
llinfo = arplookup(dst);
...
llinfo->count_++;
if(llinfo->hold_)
drop(llinfo->hold_, DROP_IFQ_ARP_FULL);
llinfo->hold_ = p;
/*
* We don't have a MAC address for this node. Send an ARP Request.
*
* XXX: Do I need to worry about the case where I keep ARPing
* for the SAME destination.
*/
int src = node_->address(); // this host's IP addr
arprequest(src, dst, ll);
return EADDRNOTAVAIL;
}
Rankster
> --- Stefan Rank <[email protected]>
> wrote:
> > Hi,
> >
> > when a packet waits for its IP address to be
> > resolved into its
> > Hardwareaddress, the packet is buffered. When
> > another packet arrives
> > with the same IP address to be resolved, the
> > previous packet is dropped.
> >
> > Rankster
> >
> > boo sunn wrote:
> > >
> > > hi:
> > >
> > > I am using ns-2.18a, and after running a script, I
> > > analyze the trace file, and find that there are
> > some
> > > packets which are dropped due to "ARP" (from new
> > > trace).
> > >
> > > I use PT_TCP, so can someone tell me why these
> > packets
> > > are dropped?
> > >
> > > Thanks,
> > >
> > > bo sun
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > NEW from Yahoo! GeoCities - quick and easy web
> > site hosting, just $8.95/month.
> > > http://geocities.yahoo.com/ps/info1
> >
>
> __________________________________________________
> Do You Yahoo!?
> NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1