xref: /reactos/dll/win32/rasadhlp/precomp.h (revision c2c66aff)
1 #ifndef _RASADHLP_H
2 #define _RASADHLP_H
3 
4 #define _WIN32_WINNT 0x502
5 #define _CRT_SECURE_NO_DEPRECATE
6 #define WIN32_NO_STATUS
7 #define _INC_WINDOWS
8 #define COM_NO_WINDOWS_H
9 
10 #include <stdarg.h>
11 
12 /* PSDK Headers */
13 #include <windef.h>
14 #include <winbase.h>
15 #include <winsock2.h>
16 #include <wsnetbs.h>
17 #include <wininet.h>
18 
19 /* These should go in rasadhlp.h */
20 #define FILE_DEVICE_ACD                         0x000000F1
21 #define _ACD_CTL_CODE(function, method, access) \
22     CTL_CODE(FILE_DEVICE_ACD, function, method, access)
23 
24 #define IOCTL_ACD_RESET \
25     _ACD_CTL_CODE(0, METHOD_BUFFERED, FILE_WRITE_ACCESS)
26 #define IOCTL_ACD_ENABLE \
27     _ACD_CTL_CODE(1, METHOD_BUFFERED, FILE_WRITE_ACCESS)
28 #define IOCTL_ACD_NOTIFICATION \
29     _ACD_CTL_CODE(2, METHOD_BUFFERED, FILE_READ_ACCESS)
30 #define IOCTL_ACD_KEEPALIVE \
31     _ACD_CTL_CODE(3, METHOD_BUFFERED, FILE_READ_ACCESS)
32 #define IOCTL_ACD_COMPLETION \
33     _ACD_CTL_CODE(4, METHOD_BUFFERED, FILE_WRITE_ACCESS)
34 #define IOCTL_ACD_CONNECT_ADDRESS \
35     _ACD_CTL_CODE(5, METHOD_BUFFERED, FILE_READ_ACCESS)
36 
37 typedef enum
38 {
39     AutoDialIp,
40     AutoDialIpx,
41     AutoDialNetBios,
42     AutoDialIpHost
43 } AUTODIAL_FAMILY;
44 
45 typedef enum
46 {
47     ConnectionIpxLana,
48     ConnectionIp,
49     ConnectionIpHost,
50     ConnectionNetBiosMac,
51 } CONNECTION_FAMILY;
52 
53 typedef struct _AUTODIAL_ADDR
54 {
55     AUTODIAL_FAMILY Family;
56     union
57     {
58         IN_ADDR Ip4Address;
59         CHAR IpxNode[6];
60         CHAR NetBiosAddress[NETBIOS_NAME_LENGTH];
61         CHAR HostName[INTERNET_MAX_PATH_LENGTH];
62     };
63 } AUTODIAL_ADDR, *PAUTODIAL_ADDR;
64 
65 typedef struct _AUTODIAL_CONN
66 {
67     CONNECTION_FAMILY Family;
68     union
69     {
70         UCHAR IpxLana;
71         ULONG Ip4Address;
72         WCHAR ConnectionName[32];
73         CHAR NetBiosMac[6];
74     };
75 } AUTODIAL_CONN, *PAUTODIAL_CONN;
76 
77 typedef struct _AUTODIAL_COMMAND
78 {
79     AUTODIAL_ADDR Address;
80     BOOL NewConnection;
81     AUTODIAL_CONN Connection;
82 } AUTODIAL_COMMAND, *PAUTODIAL_COMMAND;
83 
84 BOOLEAN
85 WINAPI
86 AcsHlpNoteNewConnection(
87     IN PAUTODIAL_ADDR ConnectionAddress,
88     IN PAUTODIAL_CONN Connection
89 );
90 
91 BOOLEAN
92 WINAPI
93 AcsHlpAttemptConnection(
94     IN PAUTODIAL_ADDR ConnectionAddress
95 );
96 
97 #endif /* _RASADHLP_H */
98