Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / include / rassapi.h
blob9ba4afb41ebc4b0b391e53c035de4dfb370925df
1 #ifndef _RASSAPI_H
2 #define _RASSAPI_H
3 #if __GNUC__ >=3
4 #pragma GCC system_header
5 #endif
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 #ifndef UNLEN
11 #include <lmcons.h>
12 #endif
13 #define RASSAPI_MAX_PHONENUMBER_SIZE 128
14 #define RASSAPI_MAX_MEDIA_NAME 16
15 #define RASSAPI_MAX_PORT_NAME 16
16 #define RASSAPI_MAX_DEVICE_NAME 128
17 #define RASSAPI_MAX_DEVICETYPE_NAME 16
18 #define RASSAPI_MAX_PARAM_KEY_SIZE 32
19 #define RASPRIV_NoCallback 0x01
20 #define RASPRIV_AdminSetCallback 0x02
21 #define RASPRIV_CallerSetCallback 0x04
22 #define RASPRIV_DialinPrivilege 0x08
23 #define RASPRIV_CallbackType (RASPRIV_AdminSetCallback \
24 | RASPRIV_CallerSetCallback \
25 | RASPRIV_NoCallback)
26 #define RAS_MODEM_OPERATIONAL 1
27 #define RAS_MODEM_NOT_RESPONDING 2
28 #define RAS_MODEM_HARDWARE_FAILURE 3
29 #define RAS_MODEM_INCORRECT_RESPONSE 4
30 #define RAS_MODEM_UNKNOWN 5
31 #define RAS_PORT_NON_OPERATIONAL 1
32 #define RAS_PORT_DISCONNECTED 2
33 #define RAS_PORT_CALLING_BACK 3
34 #define RAS_PORT_LISTENING 4
35 #define RAS_PORT_AUTHENTICATING 5
36 #define RAS_PORT_AUTHENTICATED 6
37 #define RAS_PORT_INITIALIZING 7
38 #define MEDIA_UNKNOWN 0
39 #define MEDIA_SERIAL 1
40 #define MEDIA_RAS10_SERIAL 2
41 #define MEDIA_X25 3
42 #define MEDIA_ISDN 4
43 #define USER_AUTHENTICATED 0x0001
44 #define MESSENGER_PRESENT 0x0002
45 #define PPP_CLIENT 0x0004
46 #define GATEWAY_ACTIVE 0x0008
47 #define REMOTE_LISTEN 0x0010
48 #define PORT_MULTILINKED 0x0020
49 #define RAS_IPADDRESSLEN 15
50 #define RAS_IPXADDRESSLEN 22
51 #define RAS_ATADDRESSLEN 32
52 #define RASDOWNLEVEL 10
53 #define RASADMIN_35 35
54 #define RASADMIN_CURRENT 40
56 typedef ULONG IPADDR;
57 typedef enum _RAS_PARAMS_FORMAT {
58 ParamNumber = 0,
59 ParamString = 1
60 } RAS_PARAMS_FORMAT;
61 typedef union RAS_PARAMS_VALUE {
62 DWORD Number;
63 struct {
64 DWORD Length;
65 PCHAR Data;
66 } String;
67 } RAS_PARAMS_VALUE;
68 typedef struct RAS_PARAMETERS {
69 CHAR P_Key [RASSAPI_MAX_PARAM_KEY_SIZE];
70 RAS_PARAMS_FORMAT P_Type;
71 BYTE P_Attributes;
72 RAS_PARAMS_VALUE P_Value;
73 } RAS_PARAMETERS;
74 typedef struct _RAS_USER_0 {
75 BYTE bfPrivilege;
76 WCHAR szPhoneNumber[RASSAPI_MAX_PHONENUMBER_SIZE + 1];
77 } RAS_USER_0, *PRAS_USER_0;
78 typedef struct _RAS_PORT_0 {
79 WCHAR wszPortName[RASSAPI_MAX_PORT_NAME];
80 WCHAR wszDeviceType[RASSAPI_MAX_DEVICETYPE_NAME];
81 WCHAR wszDeviceName[RASSAPI_MAX_DEVICE_NAME];
82 WCHAR wszMediaName[RASSAPI_MAX_MEDIA_NAME];
83 DWORD reserved;
84 DWORD Flags;
85 WCHAR wszUserName[UNLEN + 1];
86 WCHAR wszComputer[NETBIOS_NAME_LEN];
87 DWORD dwStartSessionTime; /* seconds from 1/1/1970 */
88 WCHAR wszLogonDomain[DNLEN + 1];
89 BOOL fAdvancedServer;
90 } RAS_PORT_0, *PRAS_PORT_0;
91 typedef struct _RAS_PPP_NBFCP_RESULT {
92 DWORD dwError;
93 DWORD dwNetBiosError;
94 CHAR szName[ NETBIOS_NAME_LEN + 1 ];
95 WCHAR wszWksta[ NETBIOS_NAME_LEN + 1 ];
96 } RAS_PPP_NBFCP_RESULT;
97 typedef struct _RAS_PPP_IPCP_RESULT{
98 DWORD dwError;
99 WCHAR wszAddress[ RAS_IPADDRESSLEN + 1 ];
100 } RAS_PPP_IPCP_RESULT;
101 typedef struct _RAS_PPP_IPXCP_RESULT {
102 DWORD dwError;
103 WCHAR wszAddress[ RAS_IPXADDRESSLEN + 1 ];
104 } RAS_PPP_IPXCP_RESULT;
105 typedef struct _RAS_PPP_ATCP_RESULT {
106 DWORD dwError;
107 WCHAR wszAddress[ RAS_ATADDRESSLEN + 1 ];
108 } RAS_PPP_ATCP_RESULT;
109 typedef struct _RAS_PPP_PROJECTION_RESULT {
110 RAS_PPP_NBFCP_RESULT nbf;
111 RAS_PPP_IPCP_RESULT ip;
112 RAS_PPP_IPXCP_RESULT ipx;
113 RAS_PPP_ATCP_RESULT at;
114 } RAS_PPP_PROJECTION_RESULT;
115 typedef struct _RAS_PORT_1{
116 RAS_PORT_0 rasport0;
117 DWORD LineCondition;
118 DWORD HardwareCondition;
119 DWORD LineSpeed;
120 WORD NumStatistics;
121 WORD NumMediaParms;
122 DWORD SizeMediaParms;
123 RAS_PPP_PROJECTION_RESULT ProjResult;
124 } RAS_PORT_1, *PRAS_PORT_1;
125 typedef struct _RAS_PORT_STATISTICS {
126 DWORD dwBytesXmited;
127 DWORD dwBytesRcved;
128 DWORD dwFramesXmited;
129 DWORD dwFramesRcved;
130 DWORD dwCrcErr;
131 DWORD dwTimeoutErr;
132 DWORD dwAlignmentErr;
133 DWORD dwHardwareOverrunErr;
134 DWORD dwFramingErr;
135 DWORD dwBufferOverrunErr;
136 DWORD dwBytesXmitedUncompressed;
137 DWORD dwBytesRcvedUncompressed;
138 DWORD dwBytesXmitedCompressed;
139 DWORD dwBytesRcvedCompressed;
140 DWORD dwPortBytesXmited;
141 DWORD dwPortBytesRcved;
142 DWORD dwPortFramesXmited;
143 DWORD dwPortFramesRcved;
144 DWORD dwPortCrcErr;
145 DWORD dwPortTimeoutErr;
146 DWORD dwPortAlignmentErr;
147 DWORD dwPortHardwareOverrunErr;
148 DWORD dwPortFramingErr;
149 DWORD dwPortBufferOverrunErr;
150 DWORD dwPortBytesXmitedUncompressed;
151 DWORD dwPortBytesRcvedUncompressed;
152 DWORD dwPortBytesXmitedCompressed;
153 DWORD dwPortBytesRcvedCompressed;
154 } RAS_PORT_STATISTICS, *PRAS_PORT_STATISTICS;
155 typedef struct _RAS_SERVER_0 {
156 WORD TotalPorts;
157 WORD PortsInUse;
158 DWORD RasVersion;
159 } RAS_SERVER_0, *PRAS_SERVER_0;
161 DWORD APIENTRY RasAdminServerGetInfo( const WCHAR*, PRAS_SERVER_0 );
162 DWORD APIENTRY RasAdminGetUserAccountServer( const WCHAR*, const WCHAR*, LPWSTR );
163 DWORD APIENTRY RasAdminUserGetInfo( const WCHAR*, const WCHAR*, PRAS_USER_0 );
164 DWORD APIENTRY RasAdminUserSetInfo( const WCHAR*, const WCHAR*, const PRAS_USER_0 );
165 DWORD APIENTRY RasAdminPortEnum( const WCHAR*, PRAS_PORT_0*, WORD*);
166 DWORD APIENTRY RasAdminPortGetInfo( const WCHAR*, const WCHAR*, RAS_PORT_1*, RAS_PORT_STATISTICS*, RAS_PARAMETERS** );
167 DWORD APIENTRY RasAdminPortClearStatistics( const WCHAR*, const WCHAR* );
168 DWORD APIENTRY RasAdminPortDisconnect( const WCHAR*, const WCHAR* );
169 DWORD APIENTRY RasAdminFreeBuffer(PVOID);
170 DWORD APIENTRY RasAdminGetErrorString( UINT, WCHAR*, DWORD );
171 BOOL APIENTRY RasAdminAcceptNewConnection( RAS_PORT_1*, RAS_PORT_STATISTICS*, RAS_PARAMETERS* );
172 VOID APIENTRY RasAdminConnectionHangupNotification ( RAS_PORT_1*, RAS_PORT_STATISTICS*, RAS_PARAMETERS* );
173 DWORD APIENTRY RasAdminGetIpAddressForUser ( WCHAR*, WCHAR*, IPADDR*, BOOL*);
174 VOID APIENTRY RasAdminReleaseIpAddress ( WCHAR*, WCHAR*,IPADDR* );
175 DWORD APIENTRY RasAdminGetUserParms( WCHAR*, PRAS_USER_0 );
176 DWORD APIENTRY RasAdminSetUserParms( WCHAR*, DWORD, PRAS_USER_0 );
178 #ifdef __cplusplus
180 #endif
182 #endif /* _RASSAPI_H */