Windows NT 4.0 source code leak
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.
 
 
 
 
 
 

95 lines
1.1 KiB

/*++
Copyright (c) 1996 Microsoft Corporation
Module Name:
addr.c
Abstract:
Implements the addr command.
Author:
Keith Moore (keithmo) 20-May-1996
Revision History:
--*/
#include "precomp.h"
#pragma hdrstop
//
// Public functions.
//
DECLARE_API( addr )
/*++
Routine Description:
Dumps the specified SOCKADDR structure.
Arguments:
None.
Return Value:
None.
--*/
{
DWORD address = 0;
ULONG result;
SOCKADDR addr;
INIT_API();
//
// Snag the address from the command line.
//
sscanf( lpArgumentString, "%lx", &address );
if( address == 0 ) {
dprintf(
"use: addr address\n"
);
} else {
if( !ReadMemory(
address,
&addr,
sizeof(addr),
&result
) ) {
dprintf(
"addr: cannot read SOCKADDR @ %08lx\n",
address
);
return;
}
DumpSockaddr(
"",
&addr,
address
);
}
} // addr