[NS2] The modification of ARP operation

Introduction:

The following debug messages show that the ARP operation in the NIST WiMAX module. In case of downlink (From BS to SS), as BS needs to send data packets (for example: CBR traffic), it first transmits a ARP request which the mac address of destination is -1 (it means broadcast). SS receiving the ARP request will reply the ARP reponse which the mac address of destination is set to BS's mac address. It is used for notifying BS that SS's mac address. Thus, BS can know SS's mac address through ARP operations.

The deubg messages:
============================================================================================
At 100.001125 in Mac 0 DestClassifier classifying packet for -1(size=28, type=ARP)
At 100.004529 in Mac 0 BS scheduler dlsubframe expires (frame=12499)
At 100.004530 in Mac 1 SS scheduler dlsubframe expires.
At 100.004638 in Mac 1 DestClassifier classifying packet for 0(size=28, type=ARP)
At 100.008481 in Mac 0 BS scheduler ulsubframe expires
At 100.008481 in Mac 1 SS scheduler ulsubframe expires.
At 100.008481 in Mac 1 Start contention in 0.000172(backoff=2, size=124, ps=0.000001)
At 100.009764 in Mac 1 sending packet (type=MAC, size=6, txtime=0.000030) bwreq
received bandwidth request of 34 bytes from 16385
At 100.012529 in Mac 0 BS scheduler dlsubframe expires (frame=12500)
At 100.012529 Allocating UL burst for Node 1:duration= 1
At 100.012529 in BS 0 send_nbr_adv (nb_neighbor=0)
At 100.012530 in Mac 1 SS scheduler dlsubframe expires.
At 100.016481 in Mac 0 BS scheduler ulsubframe expires
At 100.016481 in Mac 1 SS scheduler ulsubframe expires.
At 100.018092 in Mac 1 sending packet (type=ARP, size=34, txtime=0.000018)
At 100.018115 in Mac 0 DestClassifier classifying packet for 1(size=1500, type=cbr)
============================================================================================

Modification:
In our projects, BS will transmit the ARP request to RS, but RS would not relay it to SS. This will causeBS can not get SS's mac address. We will need to execute the following procedures to amend the classify:
1. We need to check the IP address of destination in BS whether is SS's IP address.
2. RS is capable of forwarding the ARP request or ARP reponse to BS/SS, thus ARP operation could be finished.

Reference:
http://www.pcnet.idv.tw/pcnet/network/network_ip_arp.htm
http://en.wikipedia.org/wiki/Address_Resolution_Protocol