[Click] ARPTable element

Fadjar Tandabawana fadjar at tst-indonesia.com
Fri Jul 10 13:12:20 EDT 2009


Dear Kohler,

I read the code of the ARPTable and I found something that I didn't
understand.

arptable.hh
....
struct ARPEntry {		// This structure is now larger than I'd like
	IPAddress _ip;		// (40B) but probably still fine.
	ARPEntry *_hashnext;
	EtherAddress _eth;
....

then I found 
arptable.cc
....
ARPTABLE::read_handler...
...
switch (reinterpret_cast<uintptr_t>(user_data)) {
      case h_table:
	for (Table::const_iterator it = arpt->_table.begin(); it; ++it) {
	    int ok = it->unicast(now, arpt->_expire_jiffies);
	    sa << it->_ip << ' ' << ok << ' ' << it->_eth << ' '
	       << Timestamp::make_jiffies(now - it->_live_jiffies) << '\n';
....

I'm confuse with this code.
What is the function of ARPEntry *_hashnext; in the read_handler if the
result always "ok"?

TIA


-- 
Regards,
Fadjar Tandabawana
TST Indonesia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20090711/b17f35ad/attachment.pgp 


More information about the click mailing list