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