一、下载gpsr协议源码,在~/ns-allinone-2.35/ns-2.35下解压,得到gpsr文件夹。
源码地址:点击打开链接
7个为协议实现文件:
gpsr_packet.h: definition of packets of different type used by thisimplementaion
gpsr_neighbor.h : definition of the neighbor listof each node used by this gpsr implementation including the planaringprocedure
(both GG and RNG)
gpsr_neighbor.cc : theimplementation of the neighbor list class
gpsr.h : thedefinition of functions of GPSR routing agent of thisimplementation
gpsr.cc : the implementation of the GPSR routingagent
gpsr_sinklist.h: definition used for scenarios withmultiple sinks
gpsr_sinklist.cc:implementation of gpsr_sinklist.cc
以下4个文件为仿真所需文件