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.
 
 
 
 
 
 

78 lines
1.9 KiB

#ifndef __IPKERN_IPKERN_H__
#define __IPKERN_IPKERN_H__
typedef
VOID
(*PCMD_HANDLER)(
LONG lNumArgs,
PWCHAR rgpwszArgs[]
);
typedef struct _CMD_ENTRY
{
DWORD dwTokenId;
PCMD_HANDLER pfnHandler;
}CMD_ENTRY, *PCMD_ENTRY;
#define PhysAddrToUnicode(pwszUnicode,pszAddr,dwLen) \
{ \
CHAR __szTemp[3*MAXLEN_PHYSADDR + 8]; \
DWORD __i,__dwTempLen; \
__dwTempLen = (((dwLen) <= MAXLEN_PHYSADDR) ? (dwLen) : MAXLEN_PHYSADDR); \
for(__i = 0; __i < __dwTempLen; __i++) \
{ \
sprintf(&(__szTemp[3*__i]),"%02X-",pszAddr[__i]); \
} \
MultiByteToWideChar(CP_ACP, \
0, \
(__szTemp), \
-1, \
(pwszUnicode), \
3*__i); \
pwszUnicode[(3*__i) - 1] = TEXT('\0'); \
}
BOOL
MatchToken(
IN PWCHAR pwszToken,
IN DWORD dwTokenId
);
LONG
ParseCommand(
PCMD_ENTRY pCmdTable,
LONG lNumEntries,
PWCHAR pwszFirstArg
);
VOID
NetworkToUnicode(
IN DWORD dwAddress,
OUT PWCHAR pwszBuffer
);
DWORD
DisplayMessage(
DWORD dwMsgId,
...
);
PWCHAR
MakeString(
DWORD dwMsgId,
...
);
VOID
FreeString(
PWCHAR pwszString
);
DWORD
UnicodeToNetwork(
PWCHAR pwszAddr
);
#endif // __IPKERN_IPKERN_H__