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.

78 lines
1.8 KiB

  1. #ifndef __IPKERN_IPKERN_H__
  2. #define __IPKERN_IPKERN_H__
  3. typedef
  4. VOID
  5. (*PCMD_HANDLER)(
  6. LONG lNumArgs,
  7. PWCHAR rgpwszArgs[]
  8. );
  9. typedef struct _CMD_ENTRY
  10. {
  11. DWORD dwTokenId;
  12. PCMD_HANDLER pfnHandler;
  13. }CMD_ENTRY, *PCMD_ENTRY;
  14. #define PhysAddrToUnicode(pwszUnicode,pszAddr,dwLen) \
  15. { \
  16. CHAR __szTemp[3*MAXLEN_PHYSADDR + 8]; \
  17. DWORD __i,__dwTempLen; \
  18. __dwTempLen = (((dwLen) <= MAXLEN_PHYSADDR) ? (dwLen) : MAXLEN_PHYSADDR); \
  19. for(__i = 0; __i < __dwTempLen; __i++) \
  20. { \
  21. sprintf(&(__szTemp[3*__i]),"%02X-",pszAddr[__i]); \
  22. } \
  23. MultiByteToWideChar(CP_ACP, \
  24. 0, \
  25. (__szTemp), \
  26. -1, \
  27. (pwszUnicode), \
  28. 3*__i); \
  29. pwszUnicode[(3*__i) - 1] = TEXT('\0'); \
  30. }
  31. BOOL
  32. MatchToken(
  33. IN PWCHAR pwszToken,
  34. IN DWORD dwTokenId
  35. );
  36. LONG
  37. ParseCommand(
  38. PCMD_ENTRY pCmdTable,
  39. LONG lNumEntries,
  40. PWCHAR pwszFirstArg
  41. );
  42. VOID
  43. NetworkToUnicode(
  44. IN DWORD dwAddress,
  45. OUT PWCHAR pwszBuffer
  46. );
  47. DWORD
  48. DisplayMessage(
  49. DWORD dwMsgId,
  50. ...
  51. );
  52. PWCHAR
  53. MakeString(
  54. DWORD dwMsgId,
  55. ...
  56. );
  57. VOID
  58. FreeString(
  59. PWCHAR pwszString
  60. );
  61. DWORD
  62. UnicodeToNetwork(
  63. PWCHAR pwszAddr
  64. );
  65. #endif // __IPKERN_IPKERN_H__