Source code of Windows XP (NT5)
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.

291 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. crctable.h
  5. Abstract:
  6. This module is used to take apart NBF Frames and print what LLC
  7. and/or NetBIOS Frame is being sent (or received).
  8. Author:
  9. Thomas J. Dimitri (TommyD) 08-May-1992
  10. Environment:
  11. Kernel Mode - Or whatever is the equivalent on OS/2 and DOS.
  12. Revision History:
  13. --*/
  14. UCHAR dst_addr[6] = {' ', 'D', 'E', 'S', 'T', ' '};
  15. UCHAR src_addr[6] = {' ', 'S', 'R', 'C', ' ', ' '};
  16. UCHAR bcast_addr[6] = {0x03, 0x00, 0x00, 0x00, 0x00, 0x01};
  17. //*** CRC table
  18. static USHORT crc_table[256] = {
  19. 0x0000,
  20. 0x1021,
  21. 0x2042,
  22. 0x3063,
  23. 0x4084,
  24. 0x50a5,
  25. 0x60c6,
  26. 0x70e7,
  27. 0x8108,
  28. 0x9129,
  29. 0xa14a,
  30. 0xb16b,
  31. 0xc18c,
  32. 0xd1ad,
  33. 0xe1ce,
  34. 0xf1ef,
  35. 0x1231,
  36. 0x0210,
  37. 0x3273,
  38. 0x2252,
  39. 0x52b5,
  40. 0x4294,
  41. 0x72f7,
  42. 0x62d6,
  43. 0x9339,
  44. 0x8318,
  45. 0xb37b,
  46. 0xa35a,
  47. 0xd3bd,
  48. 0xc39c,
  49. 0xf3ff,
  50. 0xe3de,
  51. 0x2462,
  52. 0x3443,
  53. 0x0420,
  54. 0x1401,
  55. 0x64e6,
  56. 0x74c7,
  57. 0x44a4,
  58. 0x5485,
  59. 0xa56a,
  60. 0xb54b,
  61. 0x8528,
  62. 0x9509,
  63. 0xe5ee,
  64. 0xf5cf,
  65. 0xc5ac,
  66. 0xd58d,
  67. 0x3653,
  68. 0x2672,
  69. 0x1611,
  70. 0x0630,
  71. 0x76d7,
  72. 0x66f6,
  73. 0x5695,
  74. 0x46b4,
  75. 0xb75b,
  76. 0xa77a,
  77. 0x9719,
  78. 0x8738,
  79. 0xf7df,
  80. 0xe7fe,
  81. 0xd79d,
  82. 0xc7bc,
  83. 0x48c4,
  84. 0x58e5,
  85. 0x6886,
  86. 0x78a7,
  87. 0x0840,
  88. 0x1861,
  89. 0x2802,
  90. 0x3823,
  91. 0xc9cc,
  92. 0xd9ed,
  93. 0xe98e,
  94. 0xf9af,
  95. 0x8948,
  96. 0x9969,
  97. 0xa90a,
  98. 0xb92b,
  99. 0x5af5,
  100. 0x4ad4,
  101. 0x7ab7,
  102. 0x6a96,
  103. 0x1a71,
  104. 0x0a50,
  105. 0x3a33,
  106. 0x2a12,
  107. 0xdbfd,
  108. 0xcbdc,
  109. 0xfbbf,
  110. 0xeb9e,
  111. 0x9b79,
  112. 0x8b58,
  113. 0xbb3b,
  114. 0xab1a,
  115. 0x6ca6,
  116. 0x7c87,
  117. 0x4ce4,
  118. 0x5cc5,
  119. 0x2c22,
  120. 0x3c03,
  121. 0x0c60,
  122. 0x1c41,
  123. 0xedae,
  124. 0xfd8f,
  125. 0xcdec,
  126. 0xddcd,
  127. 0xad2a,
  128. 0xbd0b,
  129. 0x8d68,
  130. 0x9d49,
  131. 0x7e97,
  132. 0x6eb6,
  133. 0x5ed5,
  134. 0x4ef4,
  135. 0x3e13,
  136. 0x2e32,
  137. 0x1e51,
  138. 0x0e70,
  139. 0xff9f,
  140. 0xefbe,
  141. 0xdfdd,
  142. 0xcffc,
  143. 0xbf1b,
  144. 0xaf3a,
  145. 0x9f59,
  146. 0x8f78,
  147. 0x9188,
  148. 0x81a9,
  149. 0xb1ca,
  150. 0xa1eb,
  151. 0xd10c,
  152. 0xc12d,
  153. 0xf14e,
  154. 0xe16f,
  155. 0x1080,
  156. 0x00a1,
  157. 0x30c2,
  158. 0x20e3,
  159. 0x5004,
  160. 0x4025,
  161. 0x7046,
  162. 0x6067,
  163. 0x83b9,
  164. 0x9398,
  165. 0xa3fb,
  166. 0xb3da,
  167. 0xc33d,
  168. 0xd31c,
  169. 0xe37f,
  170. 0xf35e,
  171. 0x02b1,
  172. 0x1290,
  173. 0x22f3,
  174. 0x32d2,
  175. 0x4235,
  176. 0x5214,
  177. 0x6277,
  178. 0x7256,
  179. 0xb5ea,
  180. 0xa5cb,
  181. 0x95a8,
  182. 0x8589,
  183. 0xf56e,
  184. 0xe54f,
  185. 0xd52c,
  186. 0xc50d,
  187. 0x34e2,
  188. 0x24c3,
  189. 0x14a0,
  190. 0x0481,
  191. 0x7466,
  192. 0x6447,
  193. 0x5424,
  194. 0x4405,
  195. 0xa7db,
  196. 0xb7fa,
  197. 0x8799,
  198. 0x97b8,
  199. 0xe75f,
  200. 0xf77e,
  201. 0xc71d,
  202. 0xd73c,
  203. 0x26d3,
  204. 0x36f2,
  205. 0x0691,
  206. 0x16b0,
  207. 0x6657,
  208. 0x7676,
  209. 0x4615,
  210. 0x5634,
  211. 0xd94c,
  212. 0xc96d,
  213. 0xf90e,
  214. 0xe92f,
  215. 0x99c8,
  216. 0x89e9,
  217. 0xb98a,
  218. 0xa9ab,
  219. 0x5844,
  220. 0x4865,
  221. 0x7806,
  222. 0x6827,
  223. 0x18c0,
  224. 0x08e1,
  225. 0x3882,
  226. 0x28a3,
  227. 0xcb7d,
  228. 0xdb5c,
  229. 0xeb3f,
  230. 0xfb1e,
  231. 0x8bf9,
  232. 0x9bd8,
  233. 0xabbb,
  234. 0xbb9a,
  235. 0x4a75,
  236. 0x5a54,
  237. 0x6a37,
  238. 0x7a16,
  239. 0x0af1,
  240. 0x1ad0,
  241. 0x2ab3,
  242. 0x3a92,
  243. 0xfd2e,
  244. 0xed0f,
  245. 0xdd6c,
  246. 0xcd4d,
  247. 0xbdaa,
  248. 0xad8b,
  249. 0x9de8,
  250. 0x8dc9,
  251. 0x7c26,
  252. 0x6c07,
  253. 0x5c64,
  254. 0x4c45,
  255. 0x3ca2,
  256. 0x2c83,
  257. 0x1ce0,
  258. 0x0cc1,
  259. 0xef1f,
  260. 0xff3e,
  261. 0xcf5d,
  262. 0xdf7c,
  263. 0xaf9b,
  264. 0xbfba,
  265. 0x8fd9,
  266. 0x9ff8,
  267. 0x6e17,
  268. 0x7e36,
  269. 0x4e55,
  270. 0x5e74,
  271. 0x2e93,
  272. 0x3eb2,
  273. 0x0ed1,
  274. 0x1ef0 };
  275.