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.

273 lines
11 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. net\routing\monitor2\ip\ipstring.h
  5. Abstract:
  6. Definitions of command line tokens are not localized.
  7. Author:
  8. Dave Thaler
  9. Revision History:
  10. V Raman 1/19/99
  11. --*/
  12. #define MSG_NEWLINE L"\n"
  13. #define MSG_STRING L"%1!s!"
  14. #define MSG_HELP_START L"%1!-14s! - "
  15. #define TOKEN_MIB_OBJECT_MFE L"mfe"
  16. #define TOKEN_MIB_OBJECT_MFESTATS L"mfestats"
  17. #define TOKEN_MIB_OBJECT_BOUNDARY L"boundarystats"
  18. #define TOKEN_MIB_OBJECT_SCOPE L"scope"
  19. #define TOKEN_MIB_OBJECT_JOINS L"joins"
  20. #define TOKEN_MIB_OBJECT_RTMDESTINATIONS L"rtmdestinations"
  21. #define TOKEN_MIB_OBJECT_RTMROUTES L"rtmroutes"
  22. #define CMD_IPMIB_SHOW_INTERFACE L"interface"
  23. #define CMD_IPMIB_SHOW_IPSTATS L"ipstats"
  24. #define CMD_IPMIB_SHOW_IPADDRESS L"ipaddress"
  25. #define CMD_IPMIB_SHOW_IPFORWARD L"ipforward"
  26. #define CMD_IPMIB_SHOW_IPNET L"ipnet"
  27. #define CMD_IPMIB_SHOW_TCPSTATS L"tcpstats"
  28. #define CMD_IPMIB_SHOW_TCPCONN L"tcpconn"
  29. #define CMD_IPMIB_SHOW_UDPSTATS L"udpstats"
  30. #define CMD_IPMIB_SHOW_UDPCONN L"udpconn"
  31. #define CMD_IPMIB_SHOW_MFE L"mfe"
  32. #define CMD_IPMIB_SHOW_MFESTATS L"mfestats"
  33. #define CMD_IPMIB_SHOW_JOINS L"joins"
  34. #define CMD_IPMIB_SHOW_RTMDEST L"rtmdestinations"
  35. #define CMD_IPMIB_SHOW_RTMROUTE L"rtmroutes"
  36. #define CMD_IPMIB_SHOW_BOUNDARY L"boundarystats"
  37. #define CMD_IPMIB_SHOW_SCOPE L"scope"
  38. //
  39. // TOKEN_Xxx are tokens for arguments
  40. // These must be in lower case
  41. //
  42. #define TOKEN_NAME L"name"
  43. #define TOKEN_STATUS L"state"
  44. #define TOKEN_LOCALADDR L"localaddr"
  45. #define TOKEN_REMADDR L"remaddr"
  46. #define TOKEN_TTL L"ttl"
  47. #define TOKEN_FILTER_TYPE L"filtertype"
  48. #define TOKEN_SOURCE_ADDRESS L"srcaddr"
  49. #define TOKEN_SOURCE_MASK L"srcmask"
  50. #define TOKEN_DEST_ADDRESS L"dstaddr"
  51. #define TOKEN_DEST_MASK L"dstmask"
  52. #define TOKEN_ACTION L"action"
  53. #define TOKEN_CODE L"code"
  54. #define TOKEN_SOURCE_PORT L"srcport"
  55. #define TOKEN_DEST_PORT L"dstport"
  56. #define TOKEN_FILTER L"filtering"
  57. #define TOKEN_FRAGCHECK L"fragcheck"
  58. #define TOKEN_OPERATOR L"operator"
  59. #define TOKEN_VIEW L"view"
  60. #define TOKEN_DEST L"dest"
  61. #define TOKEN_MASK L"mask"
  62. #define TOKEN_NAMEINDEX L"nameorindex"
  63. #define TOKEN_NHOP L"nhop"
  64. #define TOKEN_METRIC L"metric"
  65. #define TOKEN_PREFERENCE L"preference"
  66. #define TOKEN_PROTOCOL L"proto"
  67. #define TOKEN_TYPE L"type"
  68. #define TOKEN_PREF_LEVEL L"preflevel"
  69. #define TOKEN_REFRESH L"rr"
  70. #define TOKEN_STATS L"stats"
  71. // Multicast scope options
  72. #define TOKEN_GROUP_ADDRESS L"grpaddr"
  73. #define TOKEN_GROUP_MASK L"grpmask"
  74. #define TOKEN_SCOPE_NAME L"scopename"
  75. #define TOKEN_LOG_LEVEL L"loglevel"
  76. #define TOKEN_DEFAULT L"default"
  77. //
  78. // TOKEN_VALUE_Xxx are tokens for possible values than an argument
  79. // can take
  80. // These must be in upper case
  81. //
  82. #define TOKEN_VALUE_RIP L"RIP"
  83. #define TOKEN_VALUE_OSPF L"OSPF"
  84. #define TOKEN_VALUE_TCP L"TCP"
  85. #define TOKEN_VALUE_TCP_ESTAB L"TCP-EST"
  86. #define TOKEN_VALUE_UDP L"UDP"
  87. #define TOKEN_VALUE_ICMP L"ICMP"
  88. #define TOKEN_VALUE_NETMGMT L"NetMgmt"
  89. #define TOKEN_VALUE_LOCAL L"LOCAL"
  90. #define TOKEN_VALUE_STATIC L"STATIC"
  91. #define TOKEN_VALUE_AUTOSTATIC L"AUTOSTATIC"
  92. #define TOKEN_VALUE_NONDOD L"NONDOD"
  93. #define TOKEN_VALUE_ANY L"ANY"
  94. #define TOKEN_VALUE_ERROR L"error"
  95. #define TOKEN_VALUE_WARN L"warn"
  96. #define TOKEN_VALUE_INFO L"info"
  97. #define TOKEN_VALUE_INPUT L"input"
  98. #define TOKEN_VALUE_OUTPUT L"output"
  99. #define TOKEN_VALUE_DIAL L"dial"
  100. #define TOKEN_VALUE_ENABLE L"enable"
  101. #define TOKEN_VALUE_DISABLE L"disable"
  102. #define TOKEN_VALUE_YES L"yes"
  103. #define TOKEN_VALUE_NO L"no"
  104. #define TOKEN_VALUE_NONE L"none"
  105. #define TOKEN_VALUE_DROP L"drop"
  106. #define TOKEN_VALUE_FORWARD L"forward"
  107. #define TOKEN_VALUE_POSITIVE L"active"
  108. #define TOKEN_VALUE_NEGATIVE L"negative"
  109. #define TOKEN_VALUE_BOTH L"both"
  110. #define TOKEN_VALUE_ALL L"all"
  111. #define TOKEN_VALUE_UNICAST L"unicast"
  112. #define TOKEN_VALUE_MULTICAST L"multicast"
  113. #define TOKEN_VALUE_MATCHING L"matching"
  114. #define TOKEN_VALUE_SHORTER L"shorterthan"
  115. #define TOKEN_VALUE_LONGER L"longerthan"
  116. #define TOKEN_MICROSOFT0 L"MS-0000"
  117. #define TOKEN_MICROSOFT1 L"Microsoft"
  118. #define TOKEN_MICROSOFT2 L"-"
  119. //
  120. // Tokens for commands
  121. // These must be in lower case
  122. //
  123. #define CMD_GROUP_ADD L"add"
  124. #define CMD_GROUP_DELETE L"delete"
  125. #define CMD_GROUP_SET L"set"
  126. #define CMD_GROUP_SHOW L"show"
  127. #define CMD_IP_LIST L"list"
  128. #define CMD_IP_HELP1 L"?"
  129. #define CMD_IP_HELP2 L"help"
  130. #define CMD_IP_INSTALL L"install"
  131. #define CMD_IP_UNINSTALL L"uninstall"
  132. #define CMD_IP_RESET L"reset"
  133. #define CMD_IP_DUMP L"dump"
  134. #define CMD_IP_UPDATE L"update"
  135. #define CMD_IP_MIB L"mib"
  136. #define CMD_IP_ADD_PROTOPREF L"preferenceforprotocol"
  137. #define CMD_IP_ADD_INTERFACE L"interface"
  138. #define CMD_IP_ADD_IF_FILTER L"filter"
  139. #define CMD_IP_ADD_RTMROUTE L"rtmroute"
  140. #define CMD_IP_ADD_PERSISTENTROUTE L"persistentroute"
  141. #define CMD_IP_ADD_IPIPTUNNEL L"ipiptunnel"
  142. #define CMD_IP_ADD_SCOPE L"scope"
  143. #define CMD_IP_ADD_BOUNDARY L"boundary"
  144. #define CMD_IP_ADD_HELPER L"helper"
  145. #define CMD_IP_DEL_PROTOPREF L"preferenceforprotocol"
  146. #define CMD_IP_DEL_INTERFACE L"interface"
  147. #define CMD_IP_DEL_IF_FILTER L"filter"
  148. #define CMD_IP_DEL_RTMROUTE L"rtmroute"
  149. #define CMD_IP_DEL_PERSISTENTROUTE L"persistentroute"
  150. #define CMD_IP_DEL_SCOPE L"scope"
  151. #define CMD_IP_DEL_BOUNDARY L"boundary"
  152. #define CMD_IP_DEL_HELPER L"helper"
  153. #define CMD_IP_SET_PROTOPREF L"preferenceforprotocol"
  154. #define CMD_IP_SET_INTERFACE L"interface"
  155. #define CMD_IP_SET_IF_FILTER L"filter"
  156. #define CMD_IP_SET_LOGLEVEL L"loglevel"
  157. #define CMD_IP_SET_IPIPTUNNEL L"ipiptunnel"
  158. #define CMD_IP_SET_RTMROUTE L"rtmroute"
  159. #define CMD_IP_SET_PERSISTENTROUTE L"persistentroute"
  160. #define CMD_IP_SET_SCOPE L"scope"
  161. #define CMD_IP_SHOW_PROTOPREF L"preferenceforprotocol"
  162. #define CMD_IP_SHOW_PROTOCOL L"protocol"
  163. #define CMD_IP_SHOW_INTERFACE L"interface"
  164. #define CMD_IP_SHOW_IF_FILTER L"filter"
  165. #define CMD_IP_SHOW_PERSISTENTROUTE L"persistentroutes"
  166. #define CMD_IP_SHOW_LOGLEVEL L"loglevel"
  167. #define CMD_IP_SHOW_SCOPE L"scope"
  168. #define CMD_IP_SHOW_BOUNDARY L"boundary"
  169. #define CMD_IP_SHOW_HELPER L"helper"
  170. #define MSG_IP_MIB_CMD L"%1!s! %2!s!\n"
  171. #define DMP_IP_ADD_IF L"\
  172. \nadd interface name=%1!s! state=%2!s!"
  173. #define DMP_IP_ADD_IF_FILTER L"\
  174. \nadd filter name=%1!s! filtertype=%2!s! srcaddr=%3!s! srcmask=%4!s! \
  175. dstaddr=%5!s! dstmask=%6!s! proto=%7!s! "
  176. #define DMP_IP_ADD_IF_FILTER_PORT L"\
  177. srcport=%1!d! dstport=%2!d!"
  178. #define DMP_IP_ADD_IF_FILTER_TC L"\
  179. type=%1!d! code=%2!d!"
  180. #define DMP_IP_ADDSET_PERSISTENTROUTE L"\
  181. \nadd persistentroute dest=%1!s! mask=%2!s! name=%3!s! nhop=%4!s! proto=%5!s! \
  182. preference=%6!d! metric=%7!d! view=%8!s!\
  183. \nset persistentroute dest=%1!s! mask=%2!s! name=%3!s! nhop=%4!s! proto=%5!s! \
  184. preference=%6!d! metric=%7!d! view=%8!s!"
  185. #define DMP_IP_ADDSET_P2P_PERSISTENTROUTE L"\
  186. \nadd persistentroute dest=%1!s! mask=%2!s! name=%3!s! proto=%4!s! \
  187. preference=%5!d! metric=%6!d! view=%7!s!\
  188. \nset persistentroute dest=%1!s! mask=%2!s! name=%3!s! proto=%4!s! \
  189. preference=%5!d! metric=%6!d! view=%7!s!"
  190. #define DMP_IP_SET_PROTOPREF L"\
  191. \nadd preferenceforprotocol proto=%1!s! preflevel=%2!d!"
  192. #define DMP_IP_SET_LOGLEVEL L"\
  193. \nset loglevel %1!s!"
  194. #define DMP_IP_SET_IF L"\
  195. \nset interface name=%1!s! state=%2!s! disc=%3!s! minint=%4!d!\
  196. maxint=%5!d! life=%6!d! level=%7!d!"
  197. #define DMP_IP_SET_RTR_DISC_INFO L"\
  198. \nset interface name=%1!s! disc=%2!s! minint=%3!d!\
  199. maxint=%4!d! life=%5!d! level=%6!d!"
  200. #define DMP_IP_SET_IF_FILTER_FRAG L"\
  201. \nset filter name=%1!s! fragcheck=%2!s!"
  202. #define DMP_IP_SET_IF_FILTER L"\
  203. \nset filter name=%1!s! filtertype=%2!s! action=%3!s!"
  204. #define DMP_IP_ADD_IPIPTUNNEL L"\
  205. \nadd ipiptunnel name=%1!s! localaddr=%2!s! remaddr=%3!s! ttl=%4!d!"
  206. #define DMP_ROUTING_HEADER L"pushd routing\nreset"
  207. #define DMP_IP_HEADER L"pushd routing ip\nreset"
  208. #define DMP_POPD L"\npopd\n"
  209. #define DMP_SCOPE_INFO L"\
  210. \nadd scope grpaddr=%1!hs! grpmask=%2!hs! scopename=%3!s!"
  211. #define DMP_BOUNDARY_INFO L"\
  212. \nadd boundary name=%1!s! grpaddr=%2!hs! grpmask=%3!hs!"