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 \
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
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
53 typedef enum _RAS_PARAMS_FORMAT
{
57 typedef union RAS_PARAMS_VALUE
{
64 typedef struct RAS_PARAMETERS
{
65 CHAR P_Key
[RASSAPI_MAX_PARAM_KEY_SIZE
];
66 RAS_PARAMS_FORMAT P_Type
;
68 RAS_PARAMS_VALUE P_Value
;
70 typedef struct _RAS_USER_0
{
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
];
81 WCHAR wszUserName
[UNLEN
+ 1];
82 WCHAR wszComputer
[NETBIOS_NAME_LEN
];
83 DWORD dwStartSessionTime
; /* seconds from 1/1/1970 */
84 WCHAR wszLogonDomain
[DNLEN
+ 1];
86 } RAS_PORT_0
, *PRAS_PORT_0
;
87 typedef struct _RAS_PPP_NBFCP_RESULT
{
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
{
95 WCHAR wszAddress
[ RAS_IPADDRESSLEN
+ 1 ];
96 } RAS_PPP_IPCP_RESULT
;
97 typedef struct _RAS_PPP_IPXCP_RESULT
{
99 WCHAR wszAddress
[ RAS_IPXADDRESSLEN
+ 1 ];
100 } RAS_PPP_IPXCP_RESULT
;
101 typedef struct _RAS_PPP_ATCP_RESULT
{
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
{
114 DWORD HardwareCondition
;
118 DWORD SizeMediaParms
;
119 RAS_PPP_PROJECTION_RESULT ProjResult
;
120 } RAS_PORT_1
, *PRAS_PORT_1
;
121 typedef struct _RAS_PORT_STATISTICS
{
124 DWORD dwFramesXmited
;
128 DWORD dwAlignmentErr
;
129 DWORD dwHardwareOverrunErr
;
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
;
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
{
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
);
178 #endif /* _RASSAPI_H */