摘要:Nowadays, Wireless Sensor Networks (WSN) are emerging because of the technological developments in wireless communication and the advancements in miniaturization of sensor hardware nodes. WSN is an ad hoc network with more number of nodes densely deployed. Sensor nodes cooperatively pass the data through the network to a sink node. The research area of WSNs is growing and testing of new protocols and mechanisms developed for WSN application in real environment is infeasible as the number of nodes in WSN application is more. The use of simulation environments is an alternative to test the performance of an application prior to actual deployment. Global Mobile Information System Simulator (GloMoSim) is a open source network simulation software which simulates wired and wireless networks. GloMoSim uses the OSI reference model by using a layered approach. It supports parallel programming language called Parsec which is used for parallel discrete event simulation. It offers basic functionality to simulate wireless networks and does not support any sensor specific features and protocols for WSN simulation. Hence, without any further efforts in terms of adding protocols with the layers of GloMoSim, no WSNs can be simulated using GloMoSim. In this paper, the design, implementation of WSN routing protocol Sensor Protocol for Information via Negotiation (SPIN) and interfacing in network layer of GloMoSim is proposed. This addition makes GloMoSim suitable for WSN simulations.