今日有空,把前期在ns 2.35平台上移值gpsr协议的过程记录一下,作以备忘。
1. 下载gpsr协议源文件
2. 建立gpsr文件夹,并拷贝协议文件
在【~
/ns-allinone-2.35/ns-2.35】下新建【gpsr】文件夹,并将第1步中下载好的压缩包解压到此目录中。
各个文件功能如下:
- gpsr_packet.h : definition of packets of different type used by this implementaion
- gpsr_neighbor.h : definition of the neighbor list of each node used by this gpsr implementation including the planaring procedure (both GG and RNG)
- gpsr_neighbor.cc : the implementation of the neighbor list class
- gpsr.h : the definition of functions of GPSR routing agent of this implementation
- gpsr.cc : the implementation of the GPSR routing agent
- gpsr_sinklist.h: definition used for scenarios with multiple sinks
- gpsr_sinklist.cc: implementation of gpsr_sinklist.cc
- 以上7个为协议实现文件
- gpsr.tcl : the node and agent creation functions used by simultion