Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2597 lines
60 KiB

  1. //****************************************************************************
  2. //
  3. // Microsoft NT Remote Access Service
  4. //
  5. // Copyright 1992-93
  6. //
  7. //
  8. // Revision History
  9. //
  10. //
  11. // 6/8/92 Gurdeep Singh Pall Created
  12. //
  13. //
  14. // Description: This file contains all structures used in rasman
  15. //
  16. //****************************************************************************
  17. #ifndef _STRUCTS_
  18. #define _STRUCTS_
  19. #include <rasppp.h>
  20. #include <rasapip.h>
  21. enum ReqTypes {
  22. REQTYPE_NONE = 0,
  23. REQTYPE_PORTOPEN = 1,
  24. REQTYPE_PORTCLOSE = 2,
  25. REQTYPE_PORTGETINFO = 3,
  26. REQTYPE_PORTSETINFO = 4,
  27. REQTYPE_PORTLISTEN = 5,
  28. REQTYPE_PORTSEND = 6,
  29. REQTYPE_PORTRECEIVE = 7,
  30. REQTYPE_PORTGETSTATISTICS = 8,
  31. REQTYPE_PORTDISCONNECT = 9,
  32. REQTYPE_PORTCLEARSTATISTICS = 10,
  33. REQTYPE_PORTCONNECTCOMPLETE = 11,
  34. REQTYPE_DEVICEENUM = 12,
  35. REQTYPE_DEVICEGETINFO = 13,
  36. REQTYPE_DEVICESETINFO = 14,
  37. REQTYPE_DEVICECONNECT = 15,
  38. REQTYPE_ACTIVATEROUTE = 16,
  39. REQTYPE_ALLOCATEROUTE = 17,
  40. REQTYPE_DEALLOCATEROUTE = 18,
  41. REQTYPE_COMPRESSIONGETINFO = 19,
  42. REQTYPE_COMPRESSIONSETINFO = 20,
  43. REQTYPE_PORTENUM = 21,
  44. REQTYPE_GETINFO = 22,
  45. REQTYPE_GETUSERCREDENTIALS = 23,
  46. REQTYPE_PROTOCOLENUM = 24,
  47. REQTYPE_PORTSENDHUB = 25,
  48. REQTYPE_PORTRECEIVEHUB = 26,
  49. REQTYPE_DEVICELISTEN = 27,
  50. REQTYPE_NUMPORTOPEN = 28,
  51. REQTYPE_PORTINIT = 29,
  52. REQTYPE_REQUESTNOTIFICATION = 30,
  53. REQTYPE_ENUMLANNETS = 31,
  54. REQTYPE_GETINFOEX = 32,
  55. REQTYPE_CANCELRECEIVE = 33,
  56. REQTYPE_PORTENUMPROTOCOLS = 34,
  57. REQTYPE_SETFRAMING = 35,
  58. REQTYPE_ACTIVATEROUTEEX = 36,
  59. REQTYPE_REGISTERSLIP = 37,
  60. REQTYPE_STOREUSERDATA = 38,
  61. REQTYPE_RETRIEVEUSERDATA = 39,
  62. REQTYPE_GETFRAMINGEX = 40,
  63. REQTYPE_SETFRAMINGEX = 41,
  64. REQTYPE_GETPROTOCOLCOMPRESSION = 42,
  65. REQTYPE_SETPROTOCOLCOMPRESSION = 43,
  66. REQTYPE_GETFRAMINGCAPABILITIES = 44,
  67. REQTYPE_SETCACHEDCREDENTIALS = 45,
  68. REQTYPE_PORTBUNDLE = 46,
  69. REQTYPE_GETBUNDLEDPORT = 47,
  70. REQTYPE_PORTGETBUNDLE = 48,
  71. REQTYPE_BUNDLEGETPORT = 49,
  72. REQTYPE_SETATTACHCOUNT = 50,
  73. REQTYPE_GETDIALPARAMS = 51,
  74. REQTYPE_SETDIALPARAMS = 52,
  75. REQTYPE_CREATECONNECTION = 53,
  76. REQTYPE_DESTROYCONNECTION = 54,
  77. REQTYPE_ENUMCONNECTION = 55,
  78. REQTYPE_ADDCONNECTIONPORT = 56,
  79. REQTYPE_ENUMCONNECTIONPORTS = 57,
  80. REQTYPE_GETCONNECTIONPARAMS = 58,
  81. REQTYPE_SETCONNECTIONPARAMS = 59,
  82. REQTYPE_GETCONNECTIONUSERDATA = 60,
  83. REQTYPE_SETCONNECTIONUSERDATA = 61,
  84. REQTYPE_GETPORTUSERDATA = 62,
  85. REQTYPE_SETPORTUSERDATA = 63,
  86. REQTYPE_PPPSTOP = 64,
  87. REQTYPE_PPPSTART = 65,
  88. REQTYPE_PPPRETRY = 66,
  89. REQTYPE_PPPGETINFO = 67,
  90. REQTYPE_PPPCHANGEPWD = 68,
  91. REQTYPE_PPPCALLBACK = 69,
  92. REQTYPE_ADDNOTIFICATION = 70,
  93. REQTYPE_SIGNALCONNECTION = 71,
  94. REQTYPE_SETDEVCONFIG = 72,
  95. REQTYPE_GETDEVCONFIG = 73,
  96. REQTYPE_GETTIMESINCELASTACTIVITY = 74,
  97. REQTYPE_BUNDLEGETSTATISTICS = 75,
  98. REQTYPE_BUNDLECLEARSTATISTICS = 76,
  99. REQTYPE_CLOSEPROCESSPORTS = 77,
  100. REQTYPE_PNPCONTROL = 78,
  101. REQTYPE_SETIOCOMPLETIONPORT = 79,
  102. REQTYPE_SETROUTERUSAGE = 80,
  103. REQTYPE_SERVERPORTCLOSE = 81,
  104. REQTYPE_SENDPPPMESSAGETORASMAN = 82,
  105. REQTYPE_PORTGETSTATISTICSEX = 83,
  106. REQTYPE_BUNDLEGETSTATISTICSEX = 84,
  107. REQTYPE_SETRASDIALINFO = 85,
  108. REQTYPE_REGISTERPNPNOTIF = 86,
  109. REQTYPE_PORTRECEIVEEX = 87,
  110. REQTYPE_GETATTACHEDCOUNT = 88,
  111. REQTYPE_SETBAPPOLICY = 89,
  112. REQTYPE_PPPSTARTED = 90,
  113. REQTYPE_REFCONNECTION = 91,
  114. REQTYPE_SETEAPINFO = 92,
  115. REQTYPE_GETEAPINFO = 93,
  116. REQTYPE_SETDEVICECONFIGINFO = 94,
  117. REQTYPE_GETDEVICECONFIGINFO = 95,
  118. REQTYPE_FINDPREREQUISITEENTRY = 96,
  119. REQTYPE_PORTOPENEX = 97,
  120. REQTYPE_GETLINKSTATS = 98,
  121. REQTYPE_GETCONNECTIONSTATS = 99,
  122. REQTYPE_GETHPORTFROMCONNECTION = 100,
  123. REQTYPE_REFERENCECUSTOMCOUNT = 101,
  124. REQTYPE_GETHCONNFROMENTRY = 102,
  125. REQTYPE_GETCONNECTINFO = 103,
  126. REQTYPE_GETDEVICENAME = 104,
  127. REQTYPE_GETCALLEDID = 105,
  128. REQTYPE_SETCALLEDID = 106,
  129. REQTYPE_ENABLEIPSEC = 107,
  130. REQTYPE_ISIPSECENABLED = 108,
  131. REQTYPE_SETEAPLOGONINFO = 109,
  132. REQTYPE_SENDNOTIFICATION = 110,
  133. REQTYPE_GETNDISWANDRIVERCAPS = 111,
  134. REQTYPE_GETBANDWIDTHUTILIZATION = 112,
  135. REQTYPE_REGISTERREDIALCALLBACK = 113,
  136. REQTYPE_GETPROTOCOLINFO = 114,
  137. REQTYPE_GETCUSTOMSCRIPTDLL = 115,
  138. REQTYPE_ISTRUSTEDCUSTOMDLL = 116,
  139. REQTYPE_DOIKE = 117,
  140. REQTYPE_QUERYIKESTATUS = 118,
  141. REQTYPE_SETRASCOMMSETTINGS = 119,
  142. REQTYPE_SETKEY = 120,
  143. REQTYPE_GETKEY = 121,
  144. REQTYPE_ADDRESSDISABLE = 122,
  145. REQTYPE_GETDEVCONFIGEX = 123,
  146. REQTYPE_SENDCREDS = 124,
  147. REQTYPE_GETUNICODEDEVICENAME = 125,
  148. REQTYPE_GETDEVICENAMEW = 126,
  149. REQTYPE_GETBESTINTERFACE = 127,
  150. REQTYPE_ISPULSEDIAL = 128,
  151. } ; // <---------------------------- If you change this change MAX_REQTYPES
  152. #define MAX_REQTYPES 129
  153. typedef enum ReqTypes ReqTypes ;
  154. //* Request Buffers:
  155. //
  156. struct RequestBuffer {
  157. DWORD RB_PCBIndex ; // Index for the port in the PCB array
  158. ReqTypes RB_Reqtype ; // Request type:
  159. DWORD RB_Dummy; // This is not used but don't remove it otherwise
  160. // admining down level servers will break.
  161. DWORD RB_Done;
  162. LONGLONG Alignment; // Added to align the following structure
  163. // on a quadword boundary
  164. BYTE RB_Buffer [1] ; // Request specific data.
  165. } ;
  166. typedef struct RequestBuffer RequestBuffer ;
  167. //* Function pointer for request call table
  168. //
  169. typedef VOID (* REQFUNC) (pPCB, PBYTE) ;
  170. typedef VOID (* REQFUNCTHUNK) (pPCB, PBYTE, DWORD);
  171. typedef BOOL (* REQFUNCVALIDATE) (RequestBuffer *, DWORD);
  172. #define RASMAN_THUNK_VERSION sizeof(ULONG_PTR)
  173. //* DeltaQueueElement:
  174. //
  175. struct DeltaQueueElement {
  176. struct DeltaQueueElement *DQE_Next ;
  177. struct DeltaQueueElement *DQE_Last ;
  178. DWORD DQE_Delta ;
  179. PVOID DQE_pPcb ;
  180. PVOID DQE_Function ;
  181. PVOID DQE_Arg1 ;
  182. } ;
  183. typedef struct DeltaQueueElement DeltaQueueElement ;
  184. //* DeltaQueue
  185. //
  186. struct DeltaQueue {
  187. DeltaQueueElement *DQ_FirstElement ;
  188. } ;
  189. typedef struct DeltaQueue DeltaQueue ;
  190. //* Media Control Block: All information pertaining to a Media type.
  191. //
  192. struct MediaControlBlock {
  193. CHAR MCB_Name [MAX_MEDIA_NAME] ; // "SERIAL" etc.
  194. FARPROC MCB_AddrLookUp [MAX_ENTRYPOINTS] ; // All media dlls entry
  195. // points.
  196. WORD MCB_Endpoints ; // Number of ports of
  197. // this Media type.
  198. HANDLE MCB_DLLHandle ;
  199. } ;
  200. typedef struct MediaControlBlock MediaCB, *pMediaCB ;
  201. #define CALLER_IN_PROCESS 0x00000001
  202. #define CALLER_LOCAL 0x00000002
  203. #define CALLER_REMOTE 0x00000004
  204. #define CALLER_ALL 0x00000007
  205. #define CALLER_NONE 0x00000008
  206. typedef struct _REQUEST_FUNCTION
  207. {
  208. REQFUNC pfnReqFunc;
  209. REQFUNCTHUNK pfnReqFuncThunk;
  210. REQFUNCVALIDATE pfnRequestValidate;
  211. BOOL Flags;
  212. } REQUEST_FUNCTION;
  213. //* Device Control Block: All information about every device type attached to.
  214. //
  215. struct DeviceControlBlock {
  216. CHAR DCB_Name [MAX_DEVICE_NAME+1] ; // "MODEM" etc.
  217. FARPROC DCB_AddrLookUp [MAX_ENTRYPOINTS] ; // All device dll entry
  218. // points.
  219. WORD DCB_UseCount ; // Number of ports using
  220. // this device.
  221. HINSTANCE DCB_DLLHandle ;
  222. } ;
  223. typedef struct DeviceControlBlock DeviceCB, *pDeviceCB ;
  224. //* EndpointMappingBlock: One for each MAC - contains info on what endpoints
  225. // belong to the MAC.
  226. //
  227. struct EndpointMappingBlock {
  228. WCHAR EMB_MacName [MAC_NAME_SIZE] ;
  229. USHORT EMB_FirstEndpoint ;
  230. USHORT EMB_LastEndpoint ;
  231. } ;
  232. typedef struct EndpointMappingBlock EndpointMappingBlock,
  233. *pEndpointMappingBlock ;
  234. //* Protocol Info: All information about a protocol binding used by RAS.
  235. //
  236. struct ProtocolInfo {
  237. RAS_PROTOCOLTYPE PI_Type ; // ASYBEUI, IPX, IP etc.
  238. CHAR PI_AdapterName [MAX_ADAPTER_NAME]; // "\devices\rashub01"
  239. CHAR PI_XportName [MAX_XPORT_NAME]; // "\devices\nbf\nbf01"
  240. PVOID PI_ProtocolHandle ; // Used for routing
  241. DWORD PI_Allocated ; // Allocated yet?
  242. DWORD PI_Activated ; // Activated yet?
  243. UCHAR PI_LanaNumber ; // For Netbios transports.
  244. BOOL PI_WorkstationNet ; // TRUE for wrk nets.
  245. BOOL PI_DialOut;
  246. } ;
  247. typedef struct ProtocolInfo ProtInfo, *pProtInfo ;
  248. //* Generic List structure:
  249. //
  250. struct List {
  251. struct List * L_Next ;
  252. BOOL L_Activated ; // applies to route elements only
  253. PVOID L_Element ;
  254. } ;
  255. typedef struct List List, *pList ;
  256. //* Handle List structure:
  257. //
  258. struct HandleList {
  259. struct HandleList *H_Next ;
  260. HANDLE H_Handle ;
  261. DWORD H_Flags; // NOTIF_* flags
  262. DWORD H_Pid;
  263. } ;
  264. typedef struct HandleList HandleList, *pHandleList ;
  265. struct PnPNotifierList {
  266. struct PnPNotifierList *PNPNotif_Next;
  267. union
  268. {
  269. PAPCFUNC pfnPnPNotifHandler;
  270. HANDLE hPnPNotifier;
  271. } PNPNotif_uNotifier;
  272. DWORD PNPNotif_dwFlags;
  273. HANDLE hThreadHandle;
  274. } ;
  275. typedef struct PnPNotifierList PnPNotifierList, *pPnPNotifierList;
  276. //* Send/Rcv Buffers:
  277. //
  278. struct SendRcvBuffer {
  279. DWORD SRB_NextElementIndex ;
  280. DWORD SRB_Pid ;
  281. NDISWAN_IO_PACKET SRB_Packet ;
  282. BYTE SRB_Buffer [PACKET_SIZE] ;
  283. } ;
  284. typedef struct SendRcvBuffer SendRcvBuffer ;
  285. //* Send/Rcv Buffer List:
  286. //
  287. struct SendRcvBufferList {
  288. DWORD SRBL_AvailElementIndex ;
  289. HANDLE SRBL_Mutex ;
  290. //CHAR SRBL_MutexName [MAX_OBJECT_NAME] ;
  291. DWORD SRBL_NumOfBuffers ;
  292. SendRcvBuffer SRBL_Buffers[1] ;
  293. } ;
  294. typedef struct SendRcvBufferList SendRcvBufferList ;
  295. //* Worker Element:
  296. //
  297. struct WorkerElement {
  298. HANDLE WE_Notifier ; // Used to signal request completion.
  299. ReqTypes WE_ReqType ; // Request type:
  300. DeltaQueueElement *WE_TimeoutElement ; // points into the timeout queue.
  301. } ;
  302. typedef struct WorkerElement WorkerElement ;
  303. struct RasmanPacket {
  304. struct RasmanPacket *Next;
  305. RAS_OVERLAPPED RP_OverLapped ;
  306. NDISWAN_IO_PACKET RP_Packet ;
  307. BYTE RP_Buffer [MAX_RECVBUFFER_SIZE] ;
  308. } ;
  309. typedef struct RasmanPacket RasmanPacket ;
  310. //* Struct used for supporting multiple receives from the port in the frame mode.
  311. //
  312. struct ReceiveBufferList {
  313. BOOLEAN PacketPosted;
  314. DWORD PacketNumber;
  315. RasmanPacket *Packet;
  316. } ;
  317. typedef struct ReceiveBufferList ReceiveBufferList;
  318. //
  319. // Struct used for supporting bap notifications
  320. //
  321. struct RasmanBapPacket {
  322. struct RasmanBapPacket *Next;
  323. RAS_OVERLAPPED RBP_Overlapped;
  324. NDISWAN_SET_THRESHOLD_EVENT RBP_ThresholdEvent;
  325. };
  326. typedef struct RasmanBapPacket RasmanBapPacket;
  327. //
  328. // List of Bap buffers
  329. //
  330. struct BapBuffersList {
  331. DWORD dwMaxBuffers;
  332. DWORD dwNumBuffers;
  333. RasmanBapPacket *pPacketList;
  334. };
  335. typedef struct BapBuffersList BapBuffersList;
  336. //* DisconnectAction
  337. //
  338. struct SlipDisconnectAction {
  339. DWORD DA_IPAddress ;
  340. BOOL DA_fPrioritize;
  341. WCHAR DA_Device [MAX_ARG_STRING_SIZE] ;
  342. WCHAR DA_DNSAddress[17];
  343. WCHAR DA_DNS2Address[17];
  344. WCHAR DA_WINSAddress[17];
  345. WCHAR DA_WINS2Address[17];
  346. } ;
  347. typedef struct SlipDisconnectAction SlipDisconnectAction ;
  348. //
  349. // Opaque user data structure.
  350. //
  351. struct UserData {
  352. LIST_ENTRY UD_ListEntry; // list of all user data objects
  353. DWORD UD_Tag; // object type
  354. DWORD UD_Length; // length of UD_Data field
  355. BYTE UD_Data[1]; // variable length data
  356. };
  357. typedef struct UserData UserData;
  358. enum EpProts {
  359. IpOut = 0,
  360. NbfOut = 1,
  361. NbfIn = 2,
  362. MAX_EpProts
  363. };
  364. typedef enum EpProts EpProts;
  365. // #define MAX_EpProts 3
  366. struct EpInfo {
  367. INT EP_Available;
  368. INT EP_LowWatermark;
  369. INT EP_HighWatermark;
  370. };
  371. typedef struct EpInfo EpInfo;
  372. struct EpInfoContext {
  373. UINT EPC_EndPoints[MAX_EpProts];
  374. };
  375. typedef struct EpInfoContext EpInfoContext;
  376. //
  377. // Values for ConnectionBlock.CB_Flags
  378. //
  379. #define CONNECTION_VALID 0x00000001
  380. #define CONNECTION_DEFAULT_CREDS 0x00000002
  381. #define CONNECTION_DEFERRING_CLOSE 0x00000004
  382. #define CONNECTION_DEFERRED_CLOSE 0x00000008
  383. //
  384. // RasApi32 connection structure. This structure is
  385. // created before a port is opened and is always
  386. // associated with the first port in the connection.
  387. //
  388. struct ConnectionBlock {
  389. LIST_ENTRY CB_ListEntry; // list of all connection blocks
  390. HCONN CB_Handle; // unique connection id
  391. DWORD CB_Signaled; // this connection has already been signaled
  392. LIST_ENTRY CB_UserData; // list of UserData structures
  393. pHandleList CB_NotifierList; // notification list for this connection
  394. struct PortControlBlock **CB_PortHandles; // array of ports in this connection
  395. DWORD CB_MaxPorts; // maximum elements in CB_PortHandles array
  396. DWORD CB_Ports; // number of ports currently in this connection
  397. DWORD CB_SubEntries; // Number of subentries in this connection
  398. HANDLE CB_Process; // handle of creating process
  399. DWORD CB_RefCount;
  400. DWORD CB_Flags;
  401. BOOL CB_fAlive;
  402. BOOL CB_fAutoClose;
  403. HCONN CB_ReferredEntry;
  404. DWORD CB_CustomCount;
  405. DWORD CB_dwPid;
  406. GUID CB_GuidEntry;
  407. RAS_CONNECTIONPARAMS CB_ConnectionParams; // bandwidth, idle, redial
  408. };
  409. typedef struct ConnectionBlock ConnectionBlock;
  410. struct ClientProcessBlock {
  411. LIST_ENTRY CPB_ListEntry;
  412. // HANDLE CPB_hProcess;
  413. DWORD CPB_Pid;
  414. };
  415. typedef struct ClientProcessBlock ClientProcessBlock;
  416. //* Bundle struct is used as a place holder for all links bundled together
  417. //
  418. struct Bundle {
  419. LIST_ENTRY B_ListEntry; // list of all bundle blocks
  420. HANDLE B_NdisHandle; // ndiswan bundle handle
  421. DWORD B_Count ; // number of channels bundled
  422. pList B_Bindings ; // bindings allocated to this bundle
  423. HBUNDLE B_Handle ; // unique id for the bundle
  424. // BOOL B_fAmb;
  425. } ;
  426. typedef struct Bundle Bundle ;
  427. //* Port Control Block: Contains all information related to a port.
  428. //
  429. struct PortControlBlock {
  430. HPORT PCB_PortHandle ; // the HPORT used by everybody
  431. CHAR PCB_Name [MAX_PORT_NAME] ; // "COM1", "SVC1" etc.
  432. RASMAN_STATUS PCB_PortStatus ; // OPEN, CLOSED, UNKNOWN.
  433. RASMAN_STATE PCB_ConnState ; // CONNECTING, LISTENING, etc.
  434. RASMAN_USAGE PCB_CurrentUsage ; // CALL_IN, CALL_OUT, CALL_IN_OUT
  435. RASMAN_USAGE PCB_ConfiguredUsage ; // CALL_IN, CALL_OUT, CALL_IN_OUT
  436. RASMAN_USAGE PCB_OpenedUsage; // CALL_IN, CALL_OUT, CALL_ROUTER
  437. WORD PCB_OpenInstances ; // Number of times port is opened.
  438. pMediaCB PCB_Media ; // Pointer to Media structure
  439. CHAR PCB_DeviceType [MAX_DEVICETYPE_NAME];// Device type attached
  440. // to port. "MODEM" etc.
  441. CHAR PCB_DeviceName [MAX_DEVICE_NAME+1] ; // Device name, "HAYES"..
  442. DWORD PCB_LineDeviceId ; // Valid for TAPI devices only
  443. DWORD PCB_AddressId ; // Valid for TAPI devices only
  444. HANDLE PCB_PortIOHandle ; // Handle returned by media dll for the port.
  445. HANDLE PCB_PortFileHandle ; // Handle to be used for ReadFile/WriteFile etc.
  446. // This handle MAY be different than PortIOHandle (above) as in case of unimodem.
  447. pList PCB_DeviceList ; // List of devices used for the port.
  448. pList PCB_Bindings ; // Protocols routed to.
  449. HANDLE PCB_LinkHandle; // Handle to link (ndiswan)
  450. HANDLE PCB_BundleHandle; // Handle to bundle (ndiswan)
  451. DWORD PCB_LastError ; // Error code of last async API
  452. RASMAN_DISCONNECT_REASON PCB_DisconnectReason; // USER_REQUESTED, etc.
  453. DWORD PCB_OwnerPID ; // PID of the current owner of port
  454. CHAR PCB_DeviceTypeConnecting[MAX_DEVICETYPE_NAME] ; // Device type
  455. // through which connecting
  456. CHAR PCB_DeviceConnecting[MAX_DEVICE_NAME+1] ; // Device name through
  457. // which connecting.
  458. pHandleList PCB_NotifierList ;// Used to notify to UI/server when
  459. // disconnection occurs.
  460. pHandleList PCB_BiplexNotifierList ;// Same as above - used for backing
  461. // up the disconnect notifier list
  462. HANDLE PCB_BiplexAsyncOpNotifier ; // Used for backing up async op
  463. // notifier in biplex ports.
  464. PBYTE PCB_BiplexUserStoredBlock ; // Stored for the user
  465. DWORD PCB_BiplexUserStoredBlockSize ; // Stored for the user
  466. DWORD PCB_BiplexOwnerPID ; // Used for backing up first Owner's
  467. // PID.
  468. pEndpointMappingBlock
  469. PCB_MacEndpointsBlock ; // Points to the endpoint range
  470. // for the mac.
  471. WorkerElement PCB_AsyncWorkerElement ; // Used for all async operations.
  472. OVERLAPPED PCB_SendOverlapped ; // Used for overlapped SEND operations
  473. DWORD PCB_ConnectDuration ; // Tells number of milliseconds since connection
  474. SendRcvBuffer *PCB_PendingReceive; // Pointer to the pending receive buffer.
  475. DWORD PCB_BytesReceived; // Bytes received in the last receive
  476. RasmanPacket *PCB_RecvPackets; // List of completed packets for this pcb
  477. RasmanPacket *PCB_LastRecvPacket; // Last packet on the list of completed packets for this pcb
  478. SlipDisconnectAction PCB_DisconnectAction ;// Action to be performed when disconnect happens
  479. PBYTE PCB_UserStoredBlock ; // Stored for the user
  480. DWORD PCB_UserStoredBlockSize ; // Stored for the user
  481. DWORD PCB_LinkSpeed ; // bps
  482. DWORD PCB_Stats[MAX_STATISTICS] ; // Stored stats when disconnected
  483. DWORD PCB_AdjustFactor[MAX_STATISTICS] ; // "zeroed" adjustment to stats
  484. DWORD PCB_BundleAdjustFactor[MAX_STATISTICS] ; // "zeroed" adjustment to bundle stats
  485. Bundle *PCB_Bundle ; // Points to the bundle context.
  486. Bundle *PCB_LastBundle ; // Points to the last bundle this port was a part of
  487. ConnectionBlock *PCB_Connection; // connection this port belongs
  488. //HCONN PCB_PrevConnectionHandle; // previous connection this port belonged to
  489. BOOL PCB_AutoClose; // automatically close this port on disconnect
  490. LIST_ENTRY PCB_UserData; // list of UserData structures
  491. DWORD PCB_SubEntry; // phonebook entry subentry index
  492. HANDLE PCB_PppEvent ;
  493. PPP_MESSAGE * PCB_PppQHead ;
  494. PPP_MESSAGE * PCB_PppQTail ;
  495. HANDLE PCB_IoCompletionPort; // rasapi32 I/O completion port
  496. LPOVERLAPPED PCB_OvDrop; // addr of rasapi32 OVEVT_DIAL_DROP overlapped structure
  497. LPOVERLAPPED PCB_OvStateChange; // addr of rasapi32 OVEVT_DIAL_STATECHANGE overlapped structure
  498. LPOVERLAPPED PCB_OvPpp; // addr of rasapi32 OVEVT_DIAL_PPP overlapped structure
  499. LPOVERLAPPED PCB_OvLast; // last event marker
  500. CHAR *PCB_pszPhonebookPath; // Phonebook Path if this is in a dial out connection
  501. CHAR *PCB_pszEntryName; // Entry name of the connection
  502. // CHAR *PCB_pszEntryNameCopy; // A copy of entry name stored by rasman
  503. CHAR *PCB_pszPhoneNumber;
  504. BOOL PCB_RasmanReceiveFlags;
  505. DeviceInfo *PCB_pDeviceInfo;
  506. PRAS_CUSTOM_AUTH_DATA PCB_pCustomAuthData;
  507. ULONG PCB_ulDestAddr;
  508. BOOL PCB_fAmb;
  509. PRAS_CUSTOM_AUTH_DATA PCB_pCustomAuthUserData;
  510. BOOL PCB_fLogon;
  511. HANDLE PCB_hEventClientDisconnect;
  512. BOOL PCB_fFilterPresent;
  513. DWORD PCB_LogonId; // LogonId of owning pid
  514. HANDLE PCB_hIkeNegotiation;
  515. BOOL PCB_fPppStarted;
  516. BOOL PCB_fRedial;
  517. } ;
  518. typedef struct PortControlBlock PCB, *pPCB ;
  519. //* Request Buffer List: Currently contains only one buffer.
  520. //
  521. struct ReqBufferList {
  522. PRAS_OVERLAPPED RBL_PRAS_OvRequestEvent; // this event is used to notify rasman of
  523. // availability of a request.
  524. HANDLE RBL_Mutex ;
  525. CHAR RBL_MutexName [MAX_OBJECT_NAME] ;
  526. RequestBuffer RBL_Buffer;
  527. } ;
  528. typedef struct ReqBufferList ReqBufferList ;
  529. /*
  530. struct RedialCallbackInfo
  531. {
  532. CHAR szPhonebook[MAX_PATH];
  533. CHAR szEntry[MAX_ENTRYNAME_SIZE];
  534. };
  535. typedef struct RedialCallbackInfo RedialCallbackInfo;
  536. */
  537. //
  538. // Copied from rasip.h for RegisterSlip
  539. //
  540. struct RasIPLinkUpInfo {
  541. #define CALLIN 0
  542. #define CALLOUT 1
  543. ULONG I_Usage ; // CALLIN, or CALLOUT
  544. ULONG I_IPAddress ; // For client - the client's IP Address, for server
  545. // the client's IP address.
  546. ULONG I_NetbiosFilter ; // 1 = ON, 0 - OFF.
  547. } ;
  548. typedef struct RasIPLinkUpInfo RasIPLinkUpInfo ;
  549. //* DLLEntryPoints
  550. //
  551. struct DLLEntryPoints {
  552. LPTSTR name ;
  553. WORD id ;
  554. } ;
  555. typedef struct DLLEntryPoints MediaDLLEntryPoints, DeviceDLLEntryPoints;
  556. // Structures used for reading in media info
  557. //
  558. struct MediaInfoBuffer {
  559. CHAR MediaDLLName[MAX_MEDIA_NAME] ;
  560. } ;
  561. typedef struct MediaInfoBuffer MediaInfoBuffer ;
  562. struct MediaEnumBuffer {
  563. WORD NumberOfMedias ;
  564. MediaInfoBuffer MediaInfo[] ;
  565. } ;
  566. typedef struct MediaEnumBuffer MediaEnumBuffer ;
  567. //
  568. // Following structure definitions are for 32 bit structures
  569. // only and will be used for validating pre-thunked buffers.
  570. //
  571. typedef struct _PortOpen32
  572. {
  573. DWORD retcode;
  574. DWORD notifier;
  575. DWORD porthandle ;
  576. DWORD PID ;
  577. DWORD open ;
  578. CHAR portname [MAX_PORT_NAME] ;
  579. CHAR userkey [MAX_USERKEY_SIZE] ;
  580. CHAR identifier[MAX_IDENTIFIER_SIZE] ;
  581. } PortOpen32 ;
  582. typedef struct _PortReceive32
  583. {
  584. DWORD size ;
  585. DWORD timeout ;
  586. DWORD handle ;
  587. DWORD pid ;
  588. DWORD buffer ;
  589. } PortReceive32 ;
  590. typedef struct _PortDisconnect32
  591. {
  592. DWORD handle ;
  593. DWORD pid ;
  594. } PortDisconnect32 ;
  595. typedef struct _DeviceConnect32
  596. {
  597. CHAR devicetype [MAX_DEVICETYPE_NAME] ;
  598. CHAR devicename [MAX_DEVICE_NAME + 1] ;
  599. DWORD timeout ;
  600. DWORD handle ;
  601. DWORD pid ;
  602. } DeviceConnect32 ;
  603. typedef struct _RASMAN_INFO_32
  604. {
  605. RASMAN_STATUS RI_PortStatus ;
  606. RASMAN_STATE RI_ConnState ;
  607. DWORD RI_LinkSpeed ;
  608. DWORD RI_LastError ;
  609. RASMAN_USAGE RI_CurrentUsage ;
  610. CHAR RI_DeviceTypeConnecting [MAX_DEVICETYPE_NAME] ;
  611. CHAR RI_DeviceConnecting [MAX_DEVICE_NAME + 1] ;
  612. CHAR RI_szDeviceType[MAX_DEVICETYPE_NAME];
  613. CHAR RI_szDeviceName[MAX_DEVICE_NAME + 1];
  614. CHAR RI_szPortName[MAX_PORT_NAME + 1];
  615. RASMAN_DISCONNECT_REASON RI_DisconnectReason ;
  616. DWORD RI_OwnershipFlag ;
  617. DWORD RI_ConnectDuration ;
  618. DWORD RI_BytesReceived ;
  619. //
  620. // If this port belongs to a connection, then
  621. // the following fields are filled in.
  622. //
  623. CHAR RI_Phonebook[MAX_PATH+1];
  624. CHAR RI_PhoneEntry[MAX_PHONEENTRY_SIZE+1];
  625. DWORD RI_ConnectionHandle;
  626. DWORD RI_SubEntry;
  627. RASDEVICETYPE RI_rdtDeviceType;
  628. GUID RI_GuidEntry;
  629. DWORD RI_dwSessionId;
  630. DWORD RI_dwFlags;
  631. }RASMAN_INFO_32 ;
  632. typedef struct _Info32
  633. {
  634. DWORD retcode ;
  635. RASMAN_INFO_32 info ;
  636. } Info32 ;
  637. typedef struct _ReqNotification32
  638. {
  639. DWORD handle ;
  640. DWORD pid ;
  641. } ReqNotification32 ;
  642. typedef struct _PortBundle32
  643. {
  644. DWORD porttobundle ;
  645. } PortBundle32 ;
  646. typedef struct _GetBundledPort32
  647. {
  648. DWORD retcode ;
  649. DWORD port ;
  650. } GetBundledPort32 ;
  651. typedef struct _PortGetBundle32
  652. {
  653. DWORD retcode ;
  654. DWORD bundle ;
  655. } PortGetBundle32 ;
  656. typedef struct _BundleGetPort32
  657. {
  658. DWORD retcode;
  659. DWORD bundle ;
  660. DWORD port ;
  661. } BundleGetPort32 ;
  662. typedef struct _Connection32
  663. {
  664. DWORD retcode;
  665. DWORD pid;
  666. DWORD conn;
  667. DWORD dwEntryAlreadyConnected;
  668. DWORD dwSubEntries;
  669. DWORD dwDialMode;
  670. GUID guidEntry;
  671. CHAR szPhonebookPath[MAX_PATH];
  672. CHAR szEntryName[MAX_ENTRYNAME_SIZE];
  673. CHAR szRefPbkPath[MAX_PATH];
  674. CHAR szRefEntryName[MAX_ENTRYNAME_SIZE];
  675. BYTE data[1];
  676. } Connection32;
  677. typedef struct _Enum32
  678. {
  679. DWORD retcode ;
  680. DWORD size ;
  681. DWORD entries ;
  682. BYTE buffer [1] ;
  683. } Enum32 ;
  684. typedef struct _AddConnectionPort32
  685. {
  686. DWORD retcode;
  687. DWORD conn;
  688. DWORD dwSubEntry;
  689. } AddConnectionPort32;
  690. typedef struct _EnumConnectionPorts32
  691. {
  692. DWORD retcode;
  693. DWORD conn;
  694. DWORD size;
  695. DWORD entries;
  696. BYTE buffer[1];
  697. } EnumConnectionPorts32;
  698. typedef struct _ConnectionParams32
  699. {
  700. DWORD retcode;
  701. DWORD conn;
  702. RAS_CONNECTIONPARAMS params;
  703. } ConnectionParams32;
  704. typedef struct _PPP_LCP_RESULT_32
  705. {
  706. /* Valid handle indicates one of the possibly multiple connections to
  707. ** which this connection is bundled. INVALID_HANDLE_VALUE indicates the
  708. ** connection is not bundled.
  709. */
  710. DWORD hportBundleMember;
  711. DWORD dwLocalAuthProtocol;
  712. DWORD dwLocalAuthProtocolData;
  713. DWORD dwLocalEapTypeId;
  714. DWORD dwLocalFramingType;
  715. DWORD dwLocalOptions; // Look at PPPLCPO_*
  716. DWORD dwRemoteAuthProtocol;
  717. DWORD dwRemoteAuthProtocolData;
  718. DWORD dwRemoteEapTypeId;
  719. DWORD dwRemoteFramingType;
  720. DWORD dwRemoteOptions; // Look at PPPLCPO_*
  721. DWORD szReplyMessage;
  722. }
  723. PPP_LCP_RESULT_32;
  724. typedef struct _PPP_PROJECTION_RESULT_32
  725. {
  726. PPP_NBFCP_RESULT nbf;
  727. PPP_IPCP_RESULT ip;
  728. PPP_IPXCP_RESULT ipx;
  729. PPP_ATCP_RESULT at;
  730. PPP_CCP_RESULT ccp;
  731. PPP_LCP_RESULT_32 lcp;
  732. }
  733. PPP_PROJECTION_RESULT_32;
  734. typedef struct ConnectionUserData32
  735. {
  736. DWORD retcode;
  737. DWORD conn;
  738. DWORD dwTag;
  739. DWORD dwcb;
  740. BYTE data[1];
  741. } ConnectionUserData32;
  742. typedef struct _PPP_INTERFACE_INFO_32
  743. {
  744. ROUTER_INTERFACE_TYPE IfType;
  745. DWORD hIPInterface;
  746. DWORD hIPXInterface;
  747. CHAR szzParameters[PARAMETERBUFLEN];
  748. } PPP_INTERFACE_INFO_32;
  749. typedef struct _PPP_EAP_UI_DATA_32
  750. {
  751. DWORD dwContextId;
  752. DWORD pEapUIData;
  753. DWORD dwSizeOfEapUIData;
  754. }
  755. PPP_EAP_UI_DATA_32;
  756. typedef struct _RASMAN_DATA_BLOB_32
  757. {
  758. DWORD cbData;
  759. DWORD pbData;
  760. } RASMAN_DATA_BLOB_32;
  761. typedef struct _PPP_START_32
  762. {
  763. CHAR szPortName[ MAX_PORT_NAME +1 ];
  764. CHAR szUserName[ UNLEN + 1 ];
  765. CHAR szPassword[ PWLEN + 1 ];
  766. CHAR szDomain[ DNLEN + 1 ];
  767. LUID Luid;
  768. PPP_CONFIG_INFO ConfigInfo;
  769. CHAR szzParameters[ PARAMETERBUFLEN ];
  770. BOOL fThisIsACallback;
  771. BOOL fRedialOnLinkFailure;
  772. DWORD hEvent;
  773. DWORD dwPid;
  774. PPP_INTERFACE_INFO_32 PppInterfaceInfo;
  775. DWORD dwAutoDisconnectTime;
  776. PPP_BAPPARAMS BapParams;
  777. DWORD pszPhonebookPath;
  778. DWORD pszEntryName;
  779. DWORD pszPhoneNumber;
  780. DWORD hToken;
  781. DWORD pCustomAuthConnData;
  782. DWORD dwEapTypeId;
  783. BOOL fLogon;
  784. BOOL fNonInteractive;
  785. DWORD dwFlags;
  786. DWORD pCustomAuthUserData;
  787. PPP_EAP_UI_DATA_32 EapUIData;
  788. // CHAR chSeed;
  789. RASMAN_DATA_BLOB_32 DBPassword;
  790. }
  791. PPP_START_32;
  792. typedef struct _PPP_CHANGEPW_32
  793. {
  794. CHAR szUserName[ UNLEN + 1 ];
  795. CHAR szOldPassword[ PWLEN + 1 ];
  796. CHAR szNewPassword[ PWLEN + 1 ];
  797. CHAR chSeed; //Seed used to encode the password
  798. RASMAN_DATA_BLOB_32 DB_Password;
  799. RASMAN_DATA_BLOB_32 DB_OldPassword;
  800. }
  801. PPP_CHANGEPW_32;
  802. /* Parameters to notify server of new authentication credentials after it's
  803. ** told client the original credentials are invalid but a retry is allowed.
  804. */
  805. typedef struct _PPP_RETRY_32
  806. {
  807. CHAR szUserName[ UNLEN + 1 ];
  808. CHAR szPassword[ PWLEN + 1 ];
  809. CHAR szDomain[ DNLEN + 1 ];
  810. CHAR chSeed; //Seed used to encode the password
  811. RASMAN_DATA_BLOB_32 DBPassword;
  812. }
  813. PPP_RETRY_32;
  814. typedef struct _PPPE_MESSAGE_32
  815. {
  816. DWORD dwMsgId;
  817. DWORD hPort;
  818. DWORD hConnection;
  819. union
  820. {
  821. PPP_START_32 Start; // PPPEMSG_Start
  822. PPP_STOP Stop; // PPPEMSG_Stop
  823. PPP_CALLBACK Callback; // PPPEMSG_Callback
  824. PPP_CHANGEPW ChangePw; // PPPEMSG_ChangePw
  825. PPP_RETRY Retry; // PPPEMSG_Retry
  826. PPP_RECEIVE Receive; // PPPEMSG_Receive
  827. PPP_BAP_EVENT BapEvent; // PPPEMSG_BapEvent
  828. PPPDDM_START DdmStart; // PPPEMSG_DdmStart
  829. PPP_CALLBACK_DONE CallbackDone; // PPPEMSG_DdmCallbackDone
  830. PPP_INTERFACE_INFO InterfaceInfo; // PPPEMSG_DdmInterfaceInfo
  831. PPP_BAP_CALLBACK_RESULT
  832. BapCallbackResult; // PPPEMSG_DdmBapCallbackResult
  833. PPP_DHCP_INFORM DhcpInform; // PPPEMSG_DhcpInform
  834. PPP_EAP_UI_DATA EapUIData; // PPPEMSG_EapUIData
  835. PPP_PROTOCOL_EVENT ProtocolEvent; // PPPEMSG_ProtocolEvent
  836. PPP_IP_ADDRESS_LEASE_EXPIRED // PPPEMSG_IpAddressLeaseExpired
  837. IpAddressLeaseExpired;
  838. PPP_POST_LINE_DOWN PostLineDown; //PPPEMSG_PostLineDown
  839. }
  840. ExtraInfo;
  841. }
  842. PPPE_MESSAGE_32;
  843. typedef struct _PPP_MESSAGE_32
  844. {
  845. DWORD Next;
  846. DWORD dwError;
  847. PPP_MSG_ID dwMsgId;
  848. DWORD hPort;
  849. union
  850. {
  851. /* dwMsgId is PPPMSG_ProjectionResult or PPPDDMMSG_Done.
  852. */
  853. PPP_PROJECTION_RESULT_32 ProjectionResult;
  854. /* dwMsgId is PPPMSG_Failure.
  855. */
  856. PPP_FAILURE Failure;
  857. /*
  858. */
  859. PPP_STOPPED Stopped;
  860. /* dwMsgId is PPPMSG_InvokeEapUI
  861. */
  862. PPP_INVOKE_EAP_UI InvokeEapUI;
  863. /* dwMsgId is PPPMSG_SetCustomAuthData
  864. */
  865. PPP_SET_CUSTOM_AUTH_DATA SetCustomAuthData;
  866. /* dwMsgId is PPPDDMMSG_Failure.
  867. */
  868. PPPDDM_FAILURE DdmFailure;
  869. /* dwMsgId is PPPDDMMSG_Authenticated.
  870. */
  871. PPPDDM_AUTH_RESULT AuthResult;
  872. /* dwMsgId is PPPDDMMSG_CallbackRequest.
  873. */
  874. PPPDDM_CALLBACK_REQUEST CallbackRequest;
  875. /* dwMsgId is PPPDDMMSG_BapCallbackRequest.
  876. */
  877. PPPDDM_BAP_CALLBACK_REQUEST BapCallbackRequest;
  878. /* dwMsgId is PPPDDMMSG_NewBapLinkUp
  879. */
  880. PPPDDM_NEW_BAP_LINKUP BapNewLinkUp;
  881. /* dwMsgId is PPPDDMMSG_NewBundle
  882. */
  883. PPPDDM_NEW_BUNDLE DdmNewBundle;
  884. /* dwMsgId is PPPDDMMSG_PnPNotification
  885. */
  886. PPPDDM_PNP_NOTIFICATION DdmPnPNotification;
  887. /* dwMsgId is PPPDDMMSG_Stopped
  888. */
  889. PPPDDM_STOPPED DdmStopped;
  890. }
  891. ExtraInfo;
  892. }
  893. PPP_MESSAGE_32;
  894. typedef struct _AddNotification32
  895. {
  896. DWORD retcode;
  897. DWORD pid;
  898. BOOL fAny;
  899. DWORD hconn;
  900. DWORD hevent;
  901. DWORD dwfFlags;
  902. } AddNotification32;
  903. typedef struct _SignalConnection32
  904. {
  905. DWORD retcode;
  906. DWORD hconn;
  907. } SignalConnection32;
  908. typedef struct _SetIoCompletionPortInfo32
  909. {
  910. LONG hIoCompletionPort;
  911. DWORD pid;
  912. LONG lpOvDrop;
  913. LONG lpOvStateChange;
  914. LONG lpOvPpp;
  915. LONG lpOvLast;
  916. DWORD hConn;
  917. } SetIoCompletionPortInfo32;
  918. typedef struct _FindRefConnection32
  919. {
  920. DWORD retcode;
  921. DWORD hConn;
  922. DWORD hRefConn;
  923. } FindRefConnection32;
  924. typedef struct _PortOpenEx32
  925. {
  926. DWORD retcode;
  927. DWORD pid;
  928. DWORD dwFlags;
  929. DWORD hport;
  930. DWORD dwOpen;
  931. DWORD hnotifier;
  932. DWORD dwDeviceLineCounter;
  933. CHAR szDeviceName[MAX_DEVICE_NAME + 1];
  934. } PortOpenEx32;
  935. typedef struct _GetStats32
  936. {
  937. DWORD retcode;
  938. DWORD hConn;
  939. DWORD dwSubEntry;
  940. BYTE abStats[1];
  941. } GetStats32;
  942. typedef struct _GetHportFromConnection32
  943. {
  944. DWORD retcode;
  945. DWORD hConn;
  946. DWORD hPort;
  947. } GetHportFromConnection32;
  948. typedef struct _ReferenceCustomCount32
  949. {
  950. DWORD retcode;
  951. BOOL fAddRef;
  952. DWORD hConn;
  953. DWORD dwCount;
  954. CHAR szEntryName[MAX_ENTRYNAME_SIZE + 1];
  955. CHAR szPhonebookPath[MAX_PATH + 1];
  956. } ReferenceCustomCount32;
  957. typedef struct _HconnFromEntry32
  958. {
  959. DWORD retcode;
  960. DWORD hConn;
  961. CHAR szEntryName[MAX_ENTRYNAME_SIZE + 1];
  962. CHAR szPhonebookPath[MAX_PATH + 1];
  963. } HconnFromEntry32;
  964. typedef struct _RASEVENT32
  965. {
  966. RASEVENTTYPE Type;
  967. union
  968. {
  969. // ENTRY_ADDED,
  970. // ENTRY_MODIFIED,
  971. // ENTRY_CONNECTED
  972. // ENTRY_CONNECTING
  973. // ENTRY_DISCONNECTING
  974. // ENTRY_DISCONNECTED
  975. struct
  976. {
  977. RASENUMENTRYDETAILS Details;
  978. };
  979. // ENTRY_DELETED,
  980. // INCOMING_CONNECTED,
  981. // INCOMING_DISCONNECTED,
  982. // ENTRY_BANDWIDTH_ADDED
  983. // ENTRY_BANDWIDTH_REMOVED
  984. // guidId is valid
  985. // ENTRY_RENAMED
  986. // ENTRY_AUTODIAL,
  987. struct
  988. {
  989. DWORD hConnection;
  990. RASDEVICETYPE rDeviceType;
  991. GUID guidId;
  992. WCHAR pszwNewName [RASAPIP_MAX_ENTRY_NAME + 1];
  993. };
  994. // SERVICE_EVENT,
  995. struct
  996. {
  997. SERVICEEVENTTYPE Event;
  998. RASSERVICE Service;
  999. };
  1000. // DEVICE_ADDED
  1001. // DEVICE_REMOVED
  1002. RASDEVICETYPE DeviceType;
  1003. };
  1004. } RASEVENT32;
  1005. typedef struct _SendNotification32
  1006. {
  1007. DWORD retcode;
  1008. RASEVENT32 RasEvent;
  1009. } SendNotification32;
  1010. typedef struct _DoIke32
  1011. {
  1012. DWORD retcode;
  1013. DWORD hEvent;
  1014. DWORD pid;
  1015. CHAR szEvent[20];
  1016. } DoIke32;
  1017. typedef struct _NDISWAN_IO_PACKET32
  1018. {
  1019. IN OUT ULONG PacketNumber;
  1020. IN OUT DWORD hHandle;
  1021. IN OUT USHORT usHandleType;
  1022. IN OUT USHORT usHeaderSize;
  1023. IN OUT USHORT usPacketSize;
  1024. IN OUT USHORT usPacketFlags;
  1025. IN OUT UCHAR PacketData[1];
  1026. } NDISWAN_IO_PACKET32;
  1027. typedef struct _SendRcvBuffer32
  1028. {
  1029. DWORD SRB_NextElementIndex ;
  1030. DWORD SRB_Pid ;
  1031. NDISWAN_IO_PACKET32 SRB_Packet ;
  1032. BYTE SRB_Buffer [PACKET_SIZE] ;
  1033. } SendRcvBuffer32 ;
  1034. typedef struct _PortSend32
  1035. {
  1036. SendRcvBuffer32 buffer;
  1037. DWORD size ;
  1038. } PortSend32 ;
  1039. typedef struct _PortReceiveEx32
  1040. {
  1041. DWORD retcode;
  1042. SendRcvBuffer32 buffer;
  1043. DWORD size;
  1044. } PortReceiveEx32;
  1045. typedef struct _RefConnection32
  1046. {
  1047. DWORD retcode;
  1048. DWORD hConn;
  1049. BOOL fAddref;
  1050. DWORD dwRef;
  1051. } RefConnection32;
  1052. typedef struct _GetEapInfo32
  1053. {
  1054. DWORD retcode;
  1055. DWORD hConn;
  1056. DWORD dwSubEntry;
  1057. DWORD dwContextId;
  1058. DWORD dwEapTypeId;
  1059. DWORD dwSizeofEapUIData;
  1060. BYTE data[1];
  1061. } GetEapInfo32;
  1062. // Function prototype for Timer called function
  1063. //
  1064. typedef VOID (* TIMERFUNC) (pPCB, PVOID) ;
  1065. typedef struct PortOpen
  1066. {
  1067. DWORD retcode;
  1068. HANDLE notifier;
  1069. HPORT porthandle ;
  1070. DWORD PID ;
  1071. DWORD open ;
  1072. CHAR portname [MAX_PORT_NAME] ;
  1073. CHAR userkey [MAX_USERKEY_SIZE] ;
  1074. CHAR identifier[MAX_IDENTIFIER_SIZE] ;
  1075. } PortOpen ;
  1076. typedef struct Enum
  1077. {
  1078. DWORD retcode ;
  1079. DWORD size ;
  1080. DWORD entries ;
  1081. BYTE buffer [1] ;
  1082. } Enum ;
  1083. typedef struct PortDisconnect
  1084. {
  1085. HANDLE handle ;
  1086. DWORD pid ;
  1087. } PortDisconnect ;
  1088. typedef struct GetInfo
  1089. {
  1090. DWORD retcode ;
  1091. DWORD size ;
  1092. BYTE buffer [1] ;
  1093. } GetInfo ;
  1094. typedef struct DeviceEnum
  1095. {
  1096. DWORD dwsize;
  1097. CHAR devicetype [MAX_DEVICETYPE_NAME] ;
  1098. } DeviceEnum ;
  1099. typedef struct DeviceSetInfo
  1100. {
  1101. DWORD pid;
  1102. DWORD dwAlign;
  1103. CHAR devicetype [MAX_DEVICETYPE_NAME] ;
  1104. CHAR devicename [MAX_DEVICE_NAME] ;
  1105. RASMAN_DEVICEINFO info ;
  1106. } DeviceSetInfo ;
  1107. typedef struct DeviceGetInfo
  1108. {
  1109. DWORD dwSize;
  1110. CHAR devicetype [MAX_DEVICETYPE_NAME] ;
  1111. CHAR devicename [MAX_DEVICE_NAME+1] ;
  1112. BYTE buffer [1] ;
  1113. } DeviceGetInfo ;
  1114. typedef struct PortReceiveStruct
  1115. {
  1116. DWORD size ;
  1117. DWORD timeout ;
  1118. HANDLE handle ;
  1119. DWORD pid ;
  1120. SendRcvBuffer *buffer ;
  1121. } PortReceiveStruct ;
  1122. typedef struct PortReceiveEx
  1123. {
  1124. DWORD retcode;
  1125. SendRcvBuffer buffer;
  1126. DWORD size;
  1127. } PortReceiveEx;
  1128. typedef struct PortListen
  1129. {
  1130. DWORD timeout ;
  1131. HANDLE handle ;
  1132. DWORD pid ;
  1133. } PortListen ;
  1134. typedef struct PortCloseStruct
  1135. {
  1136. DWORD pid ;
  1137. DWORD close ;
  1138. } PortCloseStruct ;
  1139. typedef struct PortSend
  1140. {
  1141. SendRcvBuffer buffer;
  1142. DWORD size ;
  1143. } PortSend ;
  1144. typedef struct PortSetInfo
  1145. {
  1146. RASMAN_PORTINFO info ;
  1147. } PortSetInfo ;
  1148. typedef struct PortGetStatistics
  1149. {
  1150. DWORD retcode ;
  1151. RAS_STATISTICS statbuffer ;
  1152. } PortGetStatistics ;
  1153. typedef struct DeviceConnect
  1154. {
  1155. CHAR devicetype [MAX_DEVICETYPE_NAME] ;
  1156. CHAR devicename [MAX_DEVICE_NAME + 1] ;
  1157. DWORD timeout ;
  1158. HANDLE handle ;
  1159. DWORD pid ;
  1160. } DeviceConnect ;
  1161. typedef struct AllocateRoute
  1162. {
  1163. RAS_PROTOCOLTYPE type ;
  1164. BOOL wrknet ;
  1165. } AllocateRoute ;
  1166. typedef struct ActivateRoute
  1167. {
  1168. RAS_PROTOCOLTYPE type ;
  1169. PROTOCOL_CONFIG_INFO config ;
  1170. } ActivateRoute;
  1171. typedef struct ActivateRouteEx
  1172. {
  1173. RAS_PROTOCOLTYPE type ;
  1174. DWORD framesize ;
  1175. PROTOCOL_CONFIG_INFO config ;
  1176. } ActivateRouteEx;
  1177. typedef struct DeAllocateRouteStruct
  1178. {
  1179. HBUNDLE hbundle;
  1180. RAS_PROTOCOLTYPE type ;
  1181. } DeAllocateRouteStruct ;
  1182. typedef struct Route
  1183. {
  1184. DWORD retcode ;
  1185. RASMAN_ROUTEINFO info ;
  1186. } Route ;
  1187. typedef struct CompressionSetInfo
  1188. {
  1189. DWORD retcode ;
  1190. DWORD dwAlign;
  1191. RAS_COMPRESSION_INFO send ;
  1192. RAS_COMPRESSION_INFO recv ;
  1193. } CompressionSetInfo ;
  1194. typedef struct CompressionGetInfo
  1195. {
  1196. DWORD retcode ;
  1197. DWORD dwAlign;
  1198. RAS_COMPRESSION_INFO send ;
  1199. RAS_COMPRESSION_INFO recv ;
  1200. } CompressionGetInfo ;
  1201. typedef struct Info
  1202. {
  1203. DWORD retcode ;
  1204. RASMAN_INFO info ;
  1205. } Info ;
  1206. typedef struct GetCredentials
  1207. {
  1208. DWORD retcode;
  1209. BYTE Challenge [MAX_CHALLENGE_SIZE] ;
  1210. LUID LogonId ;
  1211. WCHAR UserName [MAX_USERNAME_SIZE] ;
  1212. BYTE CSCResponse [MAX_RESPONSE_SIZE] ;
  1213. BYTE CICResponse [MAX_RESPONSE_SIZE] ;
  1214. BYTE LMSessionKey [MAX_SESSIONKEY_SIZE] ;
  1215. BYTE UserSessionKey [MAX_USERSESSIONKEY_SIZE] ;
  1216. } GetCredentials ;
  1217. typedef struct SetCachedCredentialsStruct
  1218. {
  1219. DWORD retcode;
  1220. CHAR Account[ MAX_USERNAME_SIZE + 1 ];
  1221. CHAR Domain[ MAX_DOMAIN_SIZE + 1 ];
  1222. CHAR NewPassword[ MAX_PASSWORD_SIZE + 1 ];
  1223. } SetCachedCredentialsStruct;
  1224. typedef struct ReqNotification
  1225. {
  1226. HANDLE handle ;
  1227. DWORD pid ;
  1228. } ReqNotification ;
  1229. typedef struct EnumLanNets
  1230. {
  1231. DWORD count ;
  1232. UCHAR lanas[MAX_LAN_NETS] ;
  1233. } EnumLanNets ;
  1234. typedef struct InfoEx
  1235. {
  1236. DWORD retcode ;
  1237. DWORD pid;
  1238. DWORD count;
  1239. RASMAN_INFO info ;
  1240. } InfoEx ;
  1241. typedef struct EnumProtocols
  1242. {
  1243. DWORD retcode ;
  1244. RAS_PROTOCOLS protocols ;
  1245. DWORD count ;
  1246. } EnumProtocolsStruct ;
  1247. typedef struct SetFramingStruct
  1248. {
  1249. DWORD Sendbits ;
  1250. DWORD Recvbits ;
  1251. DWORD SendbitMask ;
  1252. DWORD RecvbitMask ;
  1253. } SetFramingStruct ;
  1254. typedef struct RegisterSlipStruct
  1255. {
  1256. DWORD ipaddr ;
  1257. DWORD dwFrameSize;
  1258. BOOL priority ;
  1259. WCHAR szDNSAddress[17];
  1260. WCHAR szDNS2Address[17];
  1261. WCHAR szWINSAddress[17];
  1262. WCHAR szWINS2Address[17];
  1263. } RegisterSlipStruct ;
  1264. typedef struct OldUserData
  1265. {
  1266. DWORD retcode ;
  1267. DWORD size ;
  1268. BYTE data[1] ;
  1269. } OldUserData ;
  1270. typedef struct FramingInfo
  1271. {
  1272. DWORD retcode ;
  1273. RAS_FRAMING_INFO info ;
  1274. } FramingInfo ;
  1275. typedef struct ProtocolComp
  1276. {
  1277. DWORD retcode;
  1278. RAS_PROTOCOLTYPE type;
  1279. RAS_PROTOCOLCOMPRESSION send;
  1280. RAS_PROTOCOLCOMPRESSION recv;
  1281. } ProtocolComp ;
  1282. typedef struct FramingCapabilities
  1283. {
  1284. DWORD retcode ;
  1285. RAS_FRAMING_CAPABILITIES caps ;
  1286. } FramingCapabilities ;
  1287. typedef struct PortBundleStruct
  1288. {
  1289. HPORT porttobundle ;
  1290. } PortBundleStruct ;
  1291. typedef struct GetBundledPortStruct
  1292. {
  1293. DWORD retcode ;
  1294. HPORT port ;
  1295. } GetBundledPortStruct ;
  1296. typedef struct PortGetBundleStruct
  1297. {
  1298. DWORD retcode ;
  1299. HBUNDLE bundle ;
  1300. } PortGetBundleStruct ;
  1301. typedef struct BundleGetPortStruct
  1302. {
  1303. DWORD retcode;
  1304. HBUNDLE bundle ;
  1305. HPORT port ;
  1306. } BundleGetPortStruct ;
  1307. typedef struct AttachInfo
  1308. {
  1309. DWORD dwPid;
  1310. BOOL fAttach;
  1311. } AttachInfo;
  1312. typedef struct DialParams
  1313. {
  1314. DWORD retcode;
  1315. DWORD dwUID;
  1316. DWORD dwMask;
  1317. BOOL fDelete;
  1318. DWORD dwPid;
  1319. RAS_DIALPARAMS params;
  1320. WCHAR sid[1];
  1321. } DialParams;
  1322. typedef struct Connection
  1323. {
  1324. DWORD retcode;
  1325. DWORD pid;
  1326. HCONN conn;
  1327. DWORD dwEntryAlreadyConnected;
  1328. DWORD dwSubEntries;
  1329. DWORD dwDialMode;
  1330. GUID guidEntry;
  1331. CHAR szPhonebookPath[MAX_PATH];
  1332. CHAR szEntryName[MAX_ENTRYNAME_SIZE];
  1333. CHAR szRefPbkPath[MAX_PATH];
  1334. CHAR szRefEntryName[MAX_ENTRYNAME_SIZE];
  1335. BYTE data[1];
  1336. } Connection;
  1337. typedef struct AddConnectionPortStruct
  1338. {
  1339. DWORD retcode;
  1340. HCONN conn;
  1341. DWORD dwSubEntry;
  1342. } AddConnectionPortStruct;
  1343. typedef struct EnumConnectionPortsStruct
  1344. {
  1345. DWORD retcode;
  1346. HCONN conn;
  1347. DWORD size;
  1348. DWORD entries;
  1349. BYTE buffer[1];
  1350. } EnumConnectionPortsStruct;
  1351. typedef struct ConnectionParams
  1352. {
  1353. DWORD retcode;
  1354. HCONN conn;
  1355. RAS_CONNECTIONPARAMS params;
  1356. } ConnectionParams;
  1357. typedef struct ConnectionUserData
  1358. {
  1359. DWORD retcode;
  1360. HCONN conn;
  1361. DWORD dwTag;
  1362. DWORD dwcb;
  1363. BYTE data[1];
  1364. } ConnectionUserData;
  1365. typedef struct PortUserData
  1366. {
  1367. DWORD retcode;
  1368. DWORD dwTag;
  1369. DWORD dwcb;
  1370. BYTE data[1];
  1371. } PortUserData;
  1372. PPPE_MESSAGE PppEMsg;
  1373. PPP_MESSAGE PppMsg;
  1374. typedef struct AddNotificationStruct
  1375. {
  1376. DWORD retcode;
  1377. DWORD pid;
  1378. BOOL fAny;
  1379. HCONN hconn;
  1380. HANDLE hevent;
  1381. DWORD dwfFlags;
  1382. } AddNotificationStruct;
  1383. typedef struct SignalConnectionStruct
  1384. {
  1385. DWORD retcode;
  1386. HCONN hconn;
  1387. } SignalConnectionStruct;
  1388. typedef struct SetDevConfigStruct
  1389. {
  1390. DWORD size ;
  1391. CHAR devicetype [MAX_DEVICETYPE_NAME] ;
  1392. BYTE config[1] ;
  1393. } SetDevConfigStruct;
  1394. typedef struct GetDevConfigStruct
  1395. {
  1396. DWORD retcode;
  1397. CHAR devicetype [MAX_DEVICETYPE_NAME] ;
  1398. DWORD size ;
  1399. BYTE config[1] ;
  1400. } GetDevConfigStruct;
  1401. typedef struct GetTimeSinceLastActivityStruct
  1402. {
  1403. DWORD dwTimeSinceLastActivity;
  1404. DWORD dwRetCode;
  1405. } GetTimeSinceLastActivityStruct;
  1406. typedef struct CloseProcessPortsInfo
  1407. {
  1408. DWORD pid;
  1409. } CloseProcessPortsInfo;
  1410. typedef struct PnPControlInfo
  1411. {
  1412. DWORD dwOp;
  1413. } PnPControlInfo;
  1414. typedef struct SetIoCompletionPortInfo
  1415. {
  1416. HANDLE hIoCompletionPort;
  1417. DWORD pid;
  1418. LPOVERLAPPED lpOvDrop;
  1419. LPOVERLAPPED lpOvStateChange;
  1420. LPOVERLAPPED lpOvPpp;
  1421. LPOVERLAPPED lpOvLast;
  1422. HCONN hConn;
  1423. } SetIoCompletionPortInfo;
  1424. typedef struct SetRouterUsageInfo
  1425. {
  1426. BOOL fRouter;
  1427. } SetRouterUsageInfo;
  1428. typedef struct PnPNotif
  1429. {
  1430. PVOID pvNotifier;
  1431. DWORD dwFlags;
  1432. DWORD pid;
  1433. HANDLE hThreadHandle;
  1434. BOOL fRegister;
  1435. } PnPNotif;
  1436. //
  1437. // Generic cast is used for all requests
  1438. // that return only the retcode:
  1439. //
  1440. typedef struct Generic
  1441. {
  1442. DWORD retcode ;
  1443. } Generic ;
  1444. typedef struct SetRasdialInfoStruct
  1445. {
  1446. CHAR szPhonebookPath [ MAX_PATH ];
  1447. CHAR szEntryName [ MAX_ENTRYNAME_SIZE ];
  1448. CHAR szPhoneNumber[ RAS_MaxPhoneNumber ];
  1449. RAS_CUSTOM_AUTH_DATA rcad;
  1450. } SetRasdialInfoStruct;
  1451. typedef struct GetAttachedCount
  1452. {
  1453. DWORD retcode;
  1454. DWORD dwAttachedCount;
  1455. } GetAttachedCount;
  1456. typedef struct NotifyConfigChanged
  1457. {
  1458. RAS_DEVICE_INFO Info;
  1459. } NotifyConfigChanged;
  1460. typedef struct SetBapPolicy
  1461. {
  1462. HCONN hConn;
  1463. DWORD dwLowThreshold;
  1464. DWORD dwLowSamplePeriod;
  1465. DWORD dwHighThreshold;
  1466. DWORD dwHighSamplePeriod;
  1467. } SetBapPolicy;
  1468. typedef struct PppStartedStruct
  1469. {
  1470. HPORT hPort;
  1471. } PppStartedStruct;
  1472. typedef struct RefConnectionStruct
  1473. {
  1474. DWORD retcode;
  1475. HCONN hConn;
  1476. BOOL fAddref;
  1477. DWORD dwRef;
  1478. } RefConnectionStruct;
  1479. typedef struct SetEapInfo
  1480. {
  1481. DWORD retcode;
  1482. DWORD dwContextId;
  1483. DWORD dwSizeofEapUIData;
  1484. BYTE data[1];
  1485. } SetEapInfo;
  1486. typedef struct GetEapInfo
  1487. {
  1488. DWORD retcode;
  1489. HCONN hConn;
  1490. DWORD dwSubEntry;
  1491. DWORD dwContextId;
  1492. DWORD dwEapTypeId;
  1493. DWORD dwSizeofEapUIData;
  1494. BYTE data[1];
  1495. } GetEapInfo;
  1496. typedef struct DeviceConfigInfo
  1497. {
  1498. DWORD retcode;
  1499. DWORD dwVersion;
  1500. DWORD cbBuffer;
  1501. DWORD cEntries;
  1502. BYTE abdata[1];
  1503. } DeviceConfigInfo;
  1504. typedef struct FindRefConnection
  1505. {
  1506. DWORD retcode;
  1507. HCONN hConn;
  1508. HCONN hRefConn;
  1509. } FindRefConnection;
  1510. typedef struct PortOpenExStruct
  1511. {
  1512. DWORD retcode;
  1513. DWORD pid;
  1514. DWORD dwFlags;
  1515. HPORT hport;
  1516. DWORD dwOpen;
  1517. HANDLE hnotifier;
  1518. DWORD dwDeviceLineCounter;
  1519. CHAR szDeviceName[MAX_DEVICE_NAME + 1];
  1520. } PortOpenExStruct;
  1521. typedef struct GetStats
  1522. {
  1523. DWORD retcode;
  1524. HCONN hConn;
  1525. DWORD dwSubEntry;
  1526. BYTE abStats[1];
  1527. } GetStats;
  1528. typedef struct GetHportFromConnectionStruct
  1529. {
  1530. DWORD retcode;
  1531. HCONN hConn;
  1532. HPORT hPort;
  1533. } GetHportFromConnectionStruct;
  1534. typedef struct ReferenceCustomCountStruct
  1535. {
  1536. DWORD retcode;
  1537. BOOL fAddRef;
  1538. HCONN hConn;
  1539. DWORD dwCount;
  1540. CHAR szEntryName[MAX_ENTRYNAME_SIZE + 1];
  1541. CHAR szPhonebookPath[MAX_PATH + 1];
  1542. } ReferenceCustomCountStruct;
  1543. typedef struct HconnFromEntry
  1544. {
  1545. DWORD retcode;
  1546. HCONN hConn;
  1547. CHAR szEntryName[MAX_ENTRYNAME_SIZE + 1];
  1548. CHAR szPhonebookPath[MAX_PATH + 1];
  1549. } HconnFromEntry;
  1550. typedef struct GetConnectInfoStruct
  1551. {
  1552. DWORD retcode;
  1553. DWORD dwSize;
  1554. RASTAPI_CONNECT_INFO rci;
  1555. } GetConnectInfoStruct;
  1556. typedef struct GetDeviceNameStruct
  1557. {
  1558. DWORD retcode;
  1559. RASDEVICETYPE eDeviceType;
  1560. CHAR szDeviceName[MAX_DEVICE_NAME + 1];
  1561. } GetDeviceNameStruct;
  1562. typedef struct GetDeviceNameW
  1563. {
  1564. DWORD retcode;
  1565. RASDEVICETYPE eDeviceType;
  1566. WCHAR szDeviceName[MAX_DEVICE_NAME + 1];
  1567. } GetDeviceNameW;
  1568. typedef struct GetSetCalledId_500
  1569. {
  1570. DWORD retcode;
  1571. BOOL fWrite;
  1572. DWORD dwSize;
  1573. GUID guidDevice;
  1574. RAS_DEVICE_INFO_V500 rdi;
  1575. RAS_CALLEDID_INFO rciInfo;
  1576. } GetSetCalledId_500;
  1577. typedef struct GetSetCalledId
  1578. {
  1579. DWORD retcode;
  1580. BOOL fWrite;
  1581. DWORD dwSize;
  1582. GUID guidDevice;
  1583. RAS_DEVICE_INFO rdi;
  1584. RAS_CALLEDID_INFO rciInfo;
  1585. } GetSetCalledId;
  1586. typedef struct EnableIpSecStruct
  1587. {
  1588. DWORD retcode;
  1589. BOOL fEnable;
  1590. BOOL fServer;
  1591. RAS_L2TP_ENCRYPTION eEncryption;
  1592. } EnableIpSecStruct;
  1593. typedef struct IsIpSecEnabledStruct
  1594. {
  1595. DWORD retcode;
  1596. BOOL fIsIpSecEnabled;
  1597. } IsIpSecEnabledStruct;
  1598. typedef struct SetEapLogonInfoStruct
  1599. {
  1600. DWORD retcode;
  1601. BOOL fLogon;
  1602. DWORD dwSizeofEapData;
  1603. BYTE abEapData[1];
  1604. } SetEapLogonInfoStruct;
  1605. typedef struct SendNotification
  1606. {
  1607. DWORD retcode;
  1608. RASEVENT RasEvent;
  1609. } SendNotification;
  1610. typedef struct GetNdiswanDriverCapsStruct
  1611. {
  1612. DWORD retcode;
  1613. RAS_NDISWAN_DRIVER_INFO NdiswanDriverInfo;
  1614. } GetNdiswanDriverCapsStruct;
  1615. typedef struct GetBandwidthUtilizationStruct
  1616. {
  1617. DWORD retcode;
  1618. RAS_GET_BANDWIDTH_UTILIZATION BandwidthUtilization;
  1619. } GetBandwidthUtilizationStruct;
  1620. typedef struct RegisterRedialCallbackStruct
  1621. {
  1622. DWORD retcode;
  1623. VOID *pvCallback;
  1624. } RegisterRedialCallbackStruct;
  1625. typedef struct GetProtocolInfoStruct
  1626. {
  1627. DWORD retcode;
  1628. RASMAN_GET_PROTOCOL_INFO Info;
  1629. } GetProtocolInfoStruct;
  1630. typedef struct GetCustomScriptDllStruct
  1631. {
  1632. DWORD retcode;
  1633. CHAR szCustomScript[MAX_PATH+1];
  1634. } GetCustomScriptDllStruct;
  1635. typedef struct IsTrusted
  1636. {
  1637. DWORD retcode;
  1638. BOOL fTrusted;
  1639. WCHAR wszCustomDll[MAX_PATH+1];
  1640. } IsTrusted;
  1641. typedef struct DoIkeStruct
  1642. {
  1643. DWORD retcode;
  1644. HANDLE hEvent;
  1645. DWORD pid;
  1646. CHAR szEvent[20];
  1647. } DoIkeStruct;
  1648. typedef struct QueryIkeStatusStruct
  1649. {
  1650. DWORD retcode;
  1651. DWORD dwStatus;
  1652. } QueryIkeStatusStruct;
  1653. typedef struct SetRasCommSettingsStruct
  1654. {
  1655. DWORD retcode;
  1656. RASMANCOMMSETTINGS Settings;
  1657. } SetRasCommSettingsStruct;
  1658. typedef struct GetSetKey
  1659. {
  1660. DWORD retcode;
  1661. DWORD dwPid;
  1662. GUID guid;
  1663. DWORD dwMask;
  1664. DWORD cbkey;
  1665. BYTE data[1];
  1666. } GetSetKey;
  1667. typedef struct AddressDisable
  1668. {
  1669. DWORD retcode;
  1670. BOOL fDisable;
  1671. WCHAR szAddress[1024+1];
  1672. } AddressDisable;
  1673. typedef struct GetDevConfigExStruct
  1674. {
  1675. DWORD retcode;
  1676. CHAR devicetype [MAX_DEVICETYPE_NAME] ;
  1677. DWORD size ;
  1678. BYTE config[1] ;
  1679. } GetDevConfigExStruct;
  1680. typedef struct SendCreds
  1681. {
  1682. DWORD retcode;
  1683. DWORD pid;
  1684. CHAR controlchar;
  1685. } SendCreds;
  1686. typedef struct GetUDeviceName
  1687. {
  1688. DWORD retcode;
  1689. WCHAR wszDeviceName[MAX_DEVICE_NAME + 1];
  1690. } GetUDeviceName;
  1691. typedef struct GetBestInterfaceStruct
  1692. {
  1693. DWORD retcode;
  1694. DWORD DestAddr;
  1695. DWORD BestIf;
  1696. DWORD Mask;
  1697. } GetBestInterfaceStruct;
  1698. typedef struct IsPulseDial
  1699. {
  1700. DWORD retcode;
  1701. BOOL fPulse;
  1702. } IsPulseDial;
  1703. //* REQTYPECAST: this union is used to cast the generic request buffer for
  1704. // passing information between the clients and the request thread.
  1705. //
  1706. union REQTYPECAST
  1707. {
  1708. PortOpen PortOpen;
  1709. Enum Enum;
  1710. PortDisconnect PortDisconnect;
  1711. GetInfo GetInfo;
  1712. DeviceEnum DeviceEnum;
  1713. DeviceSetInfo DeviceSetInfo;
  1714. DeviceGetInfo DeviceGetInfo;
  1715. PortReceiveStruct PortReceive;
  1716. PortReceiveEx PortReceiveEx;
  1717. PortListen PortListen;
  1718. PortCloseStruct PortClose;
  1719. PortSend PortSend;
  1720. PortSetInfo PortSetInfo;
  1721. PortGetStatistics PortGetStatistics;
  1722. DeviceConnect DeviceConnect;
  1723. AllocateRoute AllocateRoute;
  1724. ActivateRoute ActivateRoute;
  1725. ActivateRouteEx ActivateRouteEx;
  1726. DeAllocateRouteStruct DeAllocateRoute;
  1727. Route Route;
  1728. CompressionSetInfo CompressionSetInfo;
  1729. CompressionGetInfo CompressionGetInfo;
  1730. Info Info;
  1731. GetCredentials GetCredentials;
  1732. SetCachedCredentialsStruct SetCachedCredentials;
  1733. ReqNotification ReqNotification;
  1734. EnumLanNets EnumLanNets;
  1735. InfoEx InfoEx;
  1736. EnumProtocolsStruct EnumProtocols;
  1737. SetFramingStruct SetFraming;
  1738. RegisterSlipStruct RegisterSlip;
  1739. OldUserData OldUserData;
  1740. FramingInfo FramingInfo;
  1741. ProtocolComp ProtocolComp;
  1742. FramingCapabilities FramingCapabilities;
  1743. PortBundleStruct PortBundle;
  1744. GetBundledPortStruct GetBundledPort;
  1745. PortGetBundleStruct PortGetBundle;
  1746. BundleGetPortStruct BundleGetPort;
  1747. AttachInfo AttachInfo;
  1748. DialParams DialParams;
  1749. Connection Connection;
  1750. AddConnectionPortStruct AddConnectionPort;
  1751. EnumConnectionPortsStruct EnumConnectionPorts;
  1752. ConnectionParams ConnectionParams;
  1753. ConnectionUserData ConnectionUserData;
  1754. PortUserData PortUserData;
  1755. PPPE_MESSAGE PppEMsg;
  1756. PPP_MESSAGE PppMsg;
  1757. AddNotificationStruct AddNotification;
  1758. SignalConnectionStruct SignalConnection;
  1759. SetDevConfigStruct SetDevConfig;
  1760. GetDevConfigStruct GetDevConfig;
  1761. GetTimeSinceLastActivityStruct GetTimeSinceLastActivity;
  1762. CloseProcessPortsInfo CloseProcessPortsInfo;
  1763. PnPControlInfo PnPControlInfo;
  1764. SetIoCompletionPortInfo SetIoCompletionPortInfo;
  1765. SetRouterUsageInfo SetRouterUsageInfo;
  1766. PnPNotif PnPNotif;
  1767. Generic Generic;
  1768. SetRasdialInfoStruct SetRasdialInfo;
  1769. GetAttachedCount GetAttachedCount;
  1770. NotifyConfigChanged NotifyConfigChanged;
  1771. SetBapPolicy SetBapPolicy;
  1772. PppStartedStruct PppStarted;
  1773. RefConnectionStruct RefConnection;
  1774. SetEapInfo SetEapInfo;
  1775. GetEapInfo GetEapInfo;
  1776. DeviceConfigInfo DeviceConfigInfo;
  1777. FindRefConnection FindRefConnection;
  1778. PortOpenExStruct PortOpenEx;
  1779. GetStats GetStats;
  1780. GetHportFromConnectionStruct GetHportFromConnection;
  1781. ReferenceCustomCountStruct ReferenceCustomCount;
  1782. HconnFromEntry HconnFromEntry;
  1783. GetConnectInfoStruct GetConnectInfo;
  1784. GetDeviceNameStruct GetDeviceName;
  1785. GetDeviceNameW GetDeviceNameW;
  1786. GetSetCalledId_500 GetSetCalledId_500;
  1787. GetSetCalledId GetSetCalledId;
  1788. EnableIpSecStruct EnableIpSec;
  1789. IsIpSecEnabledStruct IsIpSecEnabled;
  1790. SetEapLogonInfoStruct SetEapLogonInfo;
  1791. SendNotification SendNotification;
  1792. GetNdiswanDriverCapsStruct GetNdiswanDriverCaps;
  1793. GetBandwidthUtilizationStruct GetBandwidthUtilization;
  1794. RegisterRedialCallbackStruct RegisterRedialCallback;
  1795. GetProtocolInfoStruct GetProtocolInfo;
  1796. GetCustomScriptDllStruct GetCustomScriptDll;
  1797. IsTrusted IsTrusted;
  1798. DoIkeStruct DoIke;
  1799. QueryIkeStatusStruct QueryIkeStatus;
  1800. SetRasCommSettingsStruct SetRasCommSettings;
  1801. GetSetKey GetSetKey;
  1802. AddressDisable AddressDisable;
  1803. GetDevConfigExStruct GetDevConfigEx;
  1804. SendCreds SendCreds;
  1805. GetUDeviceName GetUDeviceName;
  1806. GetBestInterfaceStruct GetBestInterface;
  1807. IsPulseDial IsPulseDial;
  1808. } ;
  1809. typedef union REQTYPECAST REQTYPECAST;
  1810. //
  1811. // This structure defines the current
  1812. // version of the shared mapped buffers.
  1813. // The version changes when the size of
  1814. // the mapped buffers changes due to
  1815. // device configuration PnP events.
  1816. //
  1817. struct ReqBufferIndex {
  1818. DWORD RBI_Version;
  1819. };
  1820. typedef struct ReqBufferIndex ReqBufferIndex;
  1821. //$$
  1822. //* This is the structure imposed on the file mapped shared memory
  1823. //
  1824. struct ReqBufferSharedSpace {
  1825. DWORD Version; // must match RequestBufferIndex.RBI_Version
  1826. WORD AttachedCount ; // This count is always shared so that
  1827. // it can be incremented and decremented
  1828. // by all processes attaching/detaching
  1829. WORD MaxPorts ; // The max number of ports.
  1830. PRAS_OVERLAPPED PRAS_OvCloseEvent; // use this event to post shut down event
  1831. // to rasman.
  1832. ReqBufferList ReqBuffers; // Always fixed size.
  1833. } ;
  1834. typedef struct ReqBufferSharedSpace ReqBufferSharedSpace ;
  1835. //* Used to store the transport information
  1836. //
  1837. struct TransportInfo {
  1838. DWORD TI_Lana ;
  1839. DWORD TI_Wrknet ;
  1840. CHAR TI_Route[MAX_ROUTE_SIZE] ;
  1841. CHAR TI_XportName [MAX_XPORT_NAME] ;
  1842. } ;
  1843. typedef struct TransportInfo TransportInfo, *pTransportInfo ;
  1844. typedef struct _ipsec_srv_node {
  1845. GUID gMMPolicyID;
  1846. GUID gQMPolicyID;
  1847. GUID gMMAuthID;
  1848. GUID gTxFilterID;
  1849. GUID gMMFilterID;
  1850. DWORD dwRefCount;
  1851. DWORD dwIpAddress;
  1852. LPWSTR pszQMPolicyName;
  1853. LPWSTR pszMMPolicyName;
  1854. HANDLE hTxFilter;
  1855. HANDLE hMMFilter;
  1856. HANDLE hTxSpecificFilter;
  1857. GUID gTxSpecificFilterID;
  1858. RAS_L2TP_ENCRYPTION eEncryption;
  1859. struct _ipsec_srv_node * pNext;
  1860. }IPSEC_SRV_NODE, * PIPSEC_SRV_NODE;
  1861. #endif