Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

356 lines
14 KiB

  1. #define MSG_HELP_START L"%1!-14s! - "
  2. #define MSG_NEWLINE _T("\n")
  3. #define TOKEN_ROUTER _T("router")
  4. #define TOKEN_MIB _T("mib")
  5. // tokens for commands
  6. #define TOKEN_COMMAND_ADD _T("add")
  7. #define TOKEN_COMMAND_DELETE _T("delete")
  8. #define TOKEN_COMMAND_SET _T("set")
  9. #define TOKEN_COMMAND_SHOW _T("show")
  10. #define TOKEN_COMMAND_SHOW_HELPER _T("show helper")
  11. #define TOKEN_COMMAND_HELP _T("help")
  12. #define TOKEN_COMMAND_INSTALL _T("install")
  13. #define TOKEN_COMMAND_UNINSTALL _T("uninstall")
  14. #define TOKEN_COMMAND_HELP1 _T("/?")
  15. #define TOKEN_COMMAND_HELP2 _T("-?")
  16. // Global option tokens used by multiple protocols
  17. #define TOKEN_OPT_LOGGINGLEVEL L"loglevel"
  18. // MSDP options
  19. #define TOKEN_OPT_KEEPALIVE L"keepalive"
  20. #define TOKEN_OPT_SAHOLDDOWN L"saholddown"
  21. #define TOKEN_OPT_CONNECTRETRY L"connectretry"
  22. #define TOKEN_OPT_LOCALADDR L"localaddr"
  23. #define TOKEN_OPT_REMADDR L"remoteaddr"
  24. #define TOKEN_OPT_ACCEPTALL L"acceptall"
  25. #define TOKEN_OPT_CACHELIFETIME L"cachelifetime"
  26. #define TOKEN_OPT_CACHING L"caching"
  27. #define TOKEN_OPT_DEFAULTPEER L"defaultpeer"
  28. #define TOKEN_OPT_GROUPADDR L"grpaddr"
  29. #define TOKEN_OPT_SOURCEADDR L"srcaddr"
  30. #define TOKEN_OPT_ENCAPSMETHOD L"encapsulation"
  31. // interface options
  32. #define TOKEN_OPT_INTERFACE_NAME _T("NAME")
  33. #define TOKEN_OPT_INTERFACE_STATUS _T("STATE")
  34. #define TOKEN_OPT_DISCOVERY _T("DISC")
  35. #define TOKEN_OPT_MIN_DISC_INTERVAL _T("MININT")
  36. #define TOKEN_OPT_MAX_DISC_INTERVAL _T("MAXINT")
  37. #define TOKEN_OPT_LIFETIME _T("LIFE")
  38. #define TOKEN_OPT_LEVEL _T("LEVEL")
  39. #define TOKEN_OPT_TTL _T("TTL")
  40. // protocol options
  41. #define TOKEN_OPT_SERVER _T("SERVER")
  42. #define TOKEN_OPT_LOG_LEVEL _T("LOGLEVEL")
  43. #define TOKEN_OPT_AUTHENTICATION _T("AUTH")
  44. #define TOKEN_OPT_PASSWORD _T("PASSWORD")
  45. #define TOKEN_OPT_PEER_MODE _T("PEERMODE")
  46. // VRRP Interface options
  47. #define TOKEN_OPT_NAME _T("NAME=")
  48. #define TOKEN_OPT_VRID _T("VRID=")
  49. #define TOKEN_OPT_IPADDRESS _T("IPADDR=")
  50. #define TOKEN_OPT_AUTH _T("AUTH=")
  51. #define TOKEN_OPT_PASSWD _T("PASSWD=")
  52. #define TOKEN_OPT_ADVTINTERVAL _T("ADVTINTERVAL=")
  53. #define TOKEN_OPT_PRIO _T("PRIORITY=")
  54. #define TOKEN_OPT_PREEMPT _T("PREEMPT=")
  55. // Route Options
  56. #define TOKEN_OPT_NEXT_HOP _T("NEXTHOP=")
  57. // overloaded options
  58. #define TOKEN_OPT_TYPE _T("TYPE")
  59. #define TOKEN_OPT_METRIC _T("METRIC")
  60. #define TOKEN_OPT_PROTOCOL _T("PROTO")
  61. #define TOKEN_OPT_PREF_LEVEL _T("PREFLEVEL")
  62. // Miscellaneous options
  63. #define TOKEN_OPT_INDEX _T("INDEX=")
  64. #define TOKEN_OPT_HELP1 _T("/?")
  65. #define TOKEN_OPT_HELP2 _T("-?")
  66. #define TOKEN_OPT_GLOBAL _T("GLOBAL")
  67. // Option values
  68. // Interface types
  69. #define TOKEN_OPT_VALUE_LAN _T("LAN")
  70. #define TOKEN_OPT_VALUE_WAN _T("WAN")
  71. // Router types
  72. #define TOKEN_OPT_VALUE_CLIENT _T("CLIENT")
  73. #define TOKEN_OPT_VALUE_HOME _T("HOME")
  74. #define TOKEN_OPT_VALUE_FULL _T("FULL")
  75. #define TOKEN_OPT_VALUE_DEDICATED _T("DEDICATED")
  76. #define TOKEN_OPT_VALUE_INTERNAL _T("INTERNAL")
  77. // Protocol types
  78. #define TOKEN_OPT_VALUE_RTRMGR _T("ROUTERMANAGER")
  79. #define TOKEN_OPT_VALUE_RIP _T("RIP")
  80. #define TOKEN_OPT_VALUE_OSPF _T("OSPF")
  81. #define TOKEN_OPT_VALUE_BOOTP _T("BOOTP")
  82. #define TOKEN_OPT_VALUE_IGMP _T("IGMP")
  83. #define TOKEN_OPT_VALUE_AUTO_DHCP _T("AUTODHCP")
  84. #define TOKEN_OPT_VALUE_DNS_PROXY _T("DNSPROXY")
  85. #define TOKEN_OPT_VALUE_VRRP _T("VRRP")
  86. #define TOKEN_OPT_VALUE_TCP _T("TCP")
  87. #define TOKEN_OPT_VALUE_UDP _T("UDP")
  88. #define TOKEN_OPT_VALUE_ICMP _T("ICMP")
  89. #define TOKEN_OPT_VALUE_NETMGMT _T("SNMP")
  90. #define TOKEN_OPT_VALUE_LOCAL _T("LOCAL")
  91. #define TOKEN_OPT_VALUE_STATIC _T("STATIC")
  92. #define TOKEN_OPT_VALUE_AUTOSTATIC _T("AUTOSTATIC")
  93. #define TOKEN_OPT_VALUE_NONDOD _T("NONDOD")
  94. #define TOKEN_OPT_VALUE_ANY _T("ANY")
  95. // Igmp protocol types
  96. #define TOKEN_OPT_VALUE_IGMPRTRV1 _T("IGMPRTRV1")
  97. #define TOKEN_OPT_VALUE_IGMPRTRV2 _T("IGMPRTRV2")
  98. #define TOKEN_OPT_VALUE_IGMPPROXY _T("IGMPPROXY")
  99. #define TOKEN_OPT_VALUE_TRUE _T("TRUE")
  100. #define TOKEN_OPT_VALUE_FALSE _T("FALSE")
  101. #define TOKEN_OPT_VALUE_HOST_JOIN _T("HOSTJOIN")
  102. #define TOKEN_OPT_VALUE_MGM_ONLY_JOIN _T("MGMONLYJOIN")
  103. // Accept/Announce types
  104. #define TOKEN_OPT_VALUE_RIP1 _T("RIP1")
  105. #define TOKEN_OPT_VALUE_RIP1_COMPAT _T("RIP1COMPAT")
  106. #define TOKEN_OPT_VALUE_RIP2 _T("RIP2")
  107. // log level types
  108. #define TOKEN_OPT_VALUE_ERROR _T("ERROR")
  109. #define TOKEN_OPT_VALUE_WARN _T("WARN")
  110. #define TOKEN_OPT_VALUE_INFO _T("INFO")
  111. // unicast peer modes
  112. #define TOKEN_OPT_VALUE_ALSO _T("ALSO")
  113. #define TOKEN_OPT_VALUE_ONLY _T("ONLY")
  114. // filter modes
  115. #define TOKEN_OPT_VALUE_INCLUDE _T("INCLUDE")
  116. #define TOKEN_OPT_VALUE_EXCLUDE _T("EXCLUDE")
  117. // Misc. option vlues
  118. #define TOKEN_OPT_VALUE_INPUT _T("INPUT")
  119. #define TOKEN_OPT_VALUE_OUTPUT _T("OUTPUT")
  120. #define TOKEN_OPT_VALUE_DIAL _T("DIAL")
  121. #define TOKEN_OPT_VALUE_ENABLE L"enable"
  122. #define TOKEN_OPT_VALUE_DISABLE L"disable"
  123. #define TOKEN_OPT_VALUE_DEFAULT L"default"
  124. #define TOKEN_OPT_VALUE_YES _T("YES")
  125. #define TOKEN_OPT_VALUE_NO _T("NO")
  126. #define TOKEN_OPT_VALUE_NONE _T("NONE")
  127. #define TOKEN_OPT_VALUE_PASSWORD _T("PASSWORD")
  128. #define TOKEN_OPT_VALUE_DROP _T("DROP")
  129. #define TOKEN_OPT_VALUE_FORWARD _T("FORWARD")
  130. #define TOKEN_OPT_VALUE_ACCEPT _T("ACCEPT")
  131. #define TOKEN_OPT_VALUE_DEMAND _T("DEMAND")
  132. #define TOKEN_OPT_VALUE_PERIODIC _T("PERIODIC")
  133. #define TOKEN_OPT_VALUE_NBMA _T("NBMA")
  134. #define TOKEN_OPT_VALUE_POINT_TO_POINT _T("P2P")
  135. #define TOKEN_OPT_VALUE_BROADCAST _T("BROADCAST")
  136. #define TOKEN_OPT_VALUE_ADDRESSONLY _T("ADDRESSONLY")
  137. #define TOKEN_OPT_VALUE_PRIVATE _T("PRIVATE")
  138. #define TOKEN_OPT_VALUE_AUTH_NONE _T("NONE")
  139. #define TOKEN_OPT_VALUE_AUTH_SIMPLE_PASSWORD _T("SIMPLEPASSWD")
  140. #define TOKEN_OPT_VALUE_AUTH_MD5 _T("MD5")
  141. // Commands for configuring the various protocols
  142. // tokens for commands required by most protocols
  143. #define CMD_GROUP_ADD _T("add")
  144. #define CMD_GROUP_DELETE _T("delete")
  145. #define CMD_GROUP_SET _T("set")
  146. #define CMD_GROUP_SHOW _T("show")
  147. #define CMD_SHOW_HELPER _T("show helper")
  148. #define CMD_INSTALL _T("install")
  149. #define CMD_UNINSTALL _T("uninstall")
  150. #define CMD_DUMP _T("dump")
  151. #define CMD_HELP1 _T("help")
  152. #define CMD_HELP2 _T("?")
  153. #define CMD_MIB _T("mib")
  154. #define CMD_ADD_HELPER _T("add helper")
  155. #define CMD_DEL_HELPER _T("delete helper")
  156. // VRRP commands
  157. #define CMD_VRRP_ADD_INTERFACE L"add interface"
  158. #define CMD_VRRP_ADD_VRID L"add VRID"
  159. #define CMD_VRRP_DELETE_INTERFACE L"delete interface"
  160. #define CMD_VRRP_DELETE_VRID L"delete VRID"
  161. #define CMD_VRRP_SET_GLOBAL L"set global"
  162. #define CMD_VRRP_SET_INTERFACE L"set interface"
  163. #define CMD_VRRP_SHOW_GLOBAL L"show global"
  164. #define CMD_VRRP_SHOW_INTERFACE L"show interface"
  165. // MSDP commands
  166. #define CMD_MSDP_ADD_PEER L"add peer"
  167. #define CMD_MSDP_DELETE_PEER L"delete peer"
  168. #define CMD_MSDP_SET_PEER L"set peer"
  169. #define CMD_MSDP_SHOW_PEER L"show peer"
  170. #define CMD_MSDP_SHOW_PEERSTATS L"show peerstats"
  171. #define CMD_MSDP_SET_GLOBAL L"set global"
  172. #define CMD_MSDP_SHOW_GLOBAL L"show global"
  173. #define CMD_MSDP_SHOW_GLOBALSTATS L"show globalstats"
  174. #define CMD_MSDP_SHOW_SA L"show sa"
  175. // Tokens for MSDP MIB
  176. #define TOKEN_MSDP_MIB_OBJECT_PEERSTATS L"peerstats"
  177. #define TOKEN_MSDP_MIB_OBJECT_GLOBALSTATS L"globalstats"
  178. #define TOKEN_MSDP_MIB_OBJECT_SA L"sa"
  179. // Common dump commands
  180. #define DMP_POPD L"popd\n"
  181. #define DMP_INSTALL L"install\n"
  182. #define DMP_UNINSTALL L"uninstall\n"
  183. // MSDP commands
  184. #define DMP_MSDP_PUSHD L"pushd routing ip msdp\n"
  185. #define DMP_MSDP_SET_GLOBAL L"set global"
  186. #define DMP_MSDP_ADD_PEER L"add peer"
  187. #define DMP_MSDP_STRING_ARGUMENT L" %1!s!=%2!s!"
  188. #define DMP_MSDP_INTEGER_ARGUMENT L" %1!s!=%2!d!"
  189. // VRRP commands
  190. //
  191. #define DMP_VRRP_INSTALL _T("\
  192. install\n")
  193. #define DMP_VRRP_PUSHD L"\
  194. pushd routing ip vrrp\n"
  195. #define DMP_VRRP_SET_GLOBAL _T("\
  196. set global %1!s!=%2!s!\n")
  197. #define DMP_VRRP_ADD_INTERFACE _T("\
  198. add interface %1!s!\"%2!s!\"\n")
  199. #define DMP_VRRP_ADD_VRID _T("\
  200. add vrid %1!s!\"%2!s!\" %3!s!%4!d! %5!s!%6!s!\n")
  201. #define DMP_VRRP_SET_INTERFACE _T("\
  202. set interface \
  203. %1!s!\"%2!s!\" \
  204. %3!s!%4!d! \
  205. %5!s!%6!s! \
  206. %7!s!%8!d!-%9!d!-%10!d!-%11!d!-%12!d!-%13!d!-%14!d!-%15!d! \
  207. %16!s!%17!d! \
  208. %18!s!%19!d! \
  209. %20!s!%21!s! \n")
  210. #define DMP_VRRP_UNINSTALL _T("\
  211. uninstall\n")
  212. // Ospf dump commands
  213. #define DMP_OSPF_PUSHD L"\
  214. pushd ip ospf\n"
  215. #define DMP_OSPF_INSTALL _T("\
  216. install\n")
  217. #define DMP_OSPF_UNINSTALL _T("\
  218. uninstall\n")
  219. #define DMP_OSPF_SET_GLOBAL _T("\
  220. set global routerid=%1!s! asborder=%2!d! loglevel=%3!s!\n\n")
  221. #define DMP_OSPF_DELETE_INTERFACE _T("\
  222. delete interface name=%1!s!\n")
  223. #define DMP_OSPF_ADD_INTERFACE _T("\
  224. add interface name=%1!s!\n")
  225. #define DMP_OSPF_SET_INTERFACE _T("\
  226. set interface name=%1!s!\
  227. ifaddr=%2!s!\
  228. ifmask=%3!s!\
  229. iftype=%4!s!\
  230. prio=%5!d!\
  231. transdelay=%6!d!\
  232. retrans=%7!d!\
  233. hello=%8!d!\
  234. dead=%9!d!\
  235. poll=%10!d!\
  236. metric=%11!d!\
  237. password=%12!s!\
  238. mtu=%13!d!\n\n")
  239. #define DMP_OSPF_ADD_AREA _T("\
  240. add area areaid=%1!s!\n\n")
  241. #define DMP_OSPF_DELETE_AREA _T("\
  242. delete area areaid=%1!s!\n")
  243. #define DMP_OSPF_SET_AREA _T("\
  244. set area areaid=%1!s!\
  245. auth=%2!s!\
  246. importas=%3!s!\
  247. metric=%4!d!\
  248. sumad=%5!s!\n\n")
  249. #define DMP_OSPF_ADD_NEIGHBOR _T("\
  250. add neighbor name=%1!s! ifaddr=%2!s! nbraddr=%3!s! nbrprio=%4!d!\n")
  251. #define DMP_OSPF_DELETE_NEIGHBOR _T("\
  252. delete neighbor name=%1!s! ifaddr=%2!s! nbraddr=%3!s!\n")
  253. #define DMP_OSPF_ADD_VIRTUAL_INTERFACE _T("\
  254. add neighbor name=%1!s! ifaddr=%2!s! nbraddr=%3!s!\n")
  255. #define DMP_OSPF_DELETE_VIRTUAL_INTERFACE _T("\
  256. delete virtif transareaid=%1!s! virtnbrid=%2!s!\n")
  257. #define DMP_OSPF_SET_VIRTUAL_INTERFACE _T("\
  258. set virtif transareaid=%1!s! virtnbrid=%2!s!\
  259. transdelay=%3!d! retrans=%4!d! hello=%5!d!\
  260. dead=%6!d! password=%7!s!\n")
  261. // Ospf hlp commands
  262. #define CMD_OSPF_ADD_AREA_RANGE _T("add range")
  263. #define CMD_OSPF_ADD_AREA _T("add area")
  264. #define CMD_OSPF_ADD_VIRTIF _T("add virtif")
  265. #define CMD_OSPF_ADD_IF_NBR _T("add neighbor")
  266. #define CMD_OSPF_ADD_IF _T("add interface")
  267. #define CMD_OSPF_ADD _T("add")
  268. #define CMD_OSPF_DEL_AREA_RANGE _T("delete range")
  269. #define CMD_OSPF_DEL_AREA _T("delete area")
  270. #define CMD_OSPF_DEL_VIRTIF _T("delete virtif")
  271. #define CMD_OSPF_DEL_IF_NBR _T("delete neighbor")
  272. #define CMD_OSPF_DEL_IF _T("delete interface")
  273. #define CMD_OSPF_DEL _T("delete")
  274. #define CMD_OSPF_SET_AREA _T("set area")
  275. #define CMD_OSPF_SET_VIRTIF _T("set virtif")
  276. #define CMD_OSPF_SET_IF _T("set interface")
  277. #define CMD_OSPF_SET_GLOBAL _T("set global")
  278. #define CMD_OSPF_SHOW_GLOBAL _T("show global")
  279. #define CMD_OSPF_SHOW_AREA _T("show area")
  280. #define CMD_OSPF_SHOW_VIRTIF _T("show virtif")
  281. #define CMD_OSPF_SHOW_IF _T("show interface")
  282. #define CMD_OSPF_SHOW _T("show")