summaryrefslogtreecommitdiffstats
path: root/private/ntos/afd/afdkd/conn.c
blob: c3e9dccd3d2a16254b9d599cbf64d32fe2e89be5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*++

Copyright (c) 1992  Microsoft Corporation

Module Name:

    conn.c

Abstract:

    Implements the conn command.

Author:

    Keith Moore (keithmo) 19-Apr-1995

Environment:

    User Mode.

Revision History:

--*/


#include "afdkdp.h"
#pragma hdrstop


//
//  Public functions.
//

DECLARE_API( conn )

/*++

Routine Description:

    Dumps the AFD_CONNECTION structure at the specified address.

Arguments:

    None.

Return Value:

    None.

--*/

{

    DWORD address = 0;
    ULONG result;
    AFD_CONNECTION connection;

    //
    // Snag the address from the command line.
    //

    sscanf( args, "%lx", &address );

    if( address == 0 ) {

        dprintf( "use: conn address\n" );
        return;

    }

    if( !ReadMemory(
            address,
            &connection,
            sizeof(connection),
            &result
            ) ) {

        dprintf(
            "conn: cannot read AFD_CONNECTION @ %08lx\n",
            address
            );

        return;

    }

    DumpAfdConnection(
        &connection,
        address
        );

}   // conn