Ns2 Codes For Ad Hoc Network