4 #pragma GCC system_header
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 \
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
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
57 typedef enum _RAS_PARAMS_FORMAT
{
61 typedef union RAS_PARAMS_VALUE
{
68 typedef struct RAS_PARAMETERS
{
69 CHAR P_Key
[RASSAPI_MAX_PARAM_KEY_SIZE
];
70 RAS_PARAMS_FORMAT P_Type
;
72 RAS_PARAMS_VALUE P_Value
;
74 typedef struct _RAS_USER_0
{
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
];
85 WCHAR wszUserName
[UNLEN
+ 1];
86 WCHAR wszComputer
[NETBIOS_NAME_LEN
];
87 DWORD dwStartSessionTime
; /* seconds from 1/1/1970 */
88 WCHAR wszLogonDomain
[DNLEN
+ 1];
90 } RAS_PORT_0
, *PRAS_PORT_0
;
91 typedef struct _RAS_PPP_NBFCP_RESULT
{
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
{
99 WCHAR wszAddress
[ RAS_IPADDRESSLEN
+ 1 ];
100 } RAS_PPP_IPCP_RESULT
;
101 typedef struct _RAS_PPP_IPXCP_RESULT
{
103 WCHAR wszAddress
[ RAS_IPXADDRESSLEN
+ 1 ];
104 } RAS_PPP_IPXCP_RESULT
;
105 typedef struct _RAS_PPP_ATCP_RESULT
{
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
{
118 DWORD HardwareCondition
;
122 DWORD SizeMediaParms
;
123 RAS_PPP_PROJECTION_RESULT ProjResult
;
124 } RAS_PORT_1
, *PRAS_PORT_1
;
125 typedef struct _RAS_PORT_STATISTICS
{
128 DWORD dwFramesXmited
;
132 DWORD dwAlignmentErr
;
133 DWORD dwHardwareOverrunErr
;
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
;
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
{
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
);
182 #endif /* _RASSAPI_H */