summaryrefslogblamecommitdiffstats
path: root/private/ntos/ndis/htdsu/htdsu.h
blob: d0fa6f175e17d5f8863ddc4b83b80fe2439976d9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                
/***************************************************************************\
|* Copyright (c) 1994  Microsoft Corporation                               *|
|* Developed for Microsoft by TriplePoint, Inc. Beaverton, Oregon          *|
|*                                                                         *|
|* This file is part of the HT Communications DSU41 WAN Miniport Driver.   *|
\***************************************************************************/

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Module Name:

    htdsu.h

Abstract:

    This module defines the software structures and values used to support
    the NDIS Minport driver on the HT DSU41 controller.  It's a good place
    to look when your trying to figure out how the driver structures are
    related to each other.

    This driver conforms to the NDIS 3.0 Miniport interface.

Author:

    Larry Hattery - TriplePoint, Inc. (larryh@tpi.com) Jun-94

Environment:

    Include this file at the top of each module in the Miniport driver.

Revision History:

---------------------------------------------------------------------------*/

#ifndef _HTDSU_H
#define _HTDSU_H

/*
// NDIS_MINIPORT_DRIVER must be defined before the NDIS include files.
// Normally, it is defined on the command line by setting the C_DEFINES
// variable in the sources build file.
*/
#include <ndis.h>
#include <ndiswan.h>
#include <pshpack1.h>     // Force packing on variable length structures
#   include <ndistapi.h>
#include <poppack.h>
#include <string.h>

/*
// Include everything here so the driver modules can just include this
// file and get all they need.
*/
#include "debug.h"
#include "card.h"
#include "keywords.h"

/*
// This constant is the maximum NdisStallExecution time allowed to be used
// in an NDIS driver.  If you need longer delays, you must wrap the call
// in a loop.
*/
#define _100_MICROSECONDS           100

/*
// The link speeds we support.
*/
#define _64KBPS                     64000
#define _56KBPS                     57600

/*
// How many logical links does this driver support.  Actually, this driver
// defines logical links to be 1:1 with physical links.  You are free to
// model them however is appropriate for your adapter.
*/
#define HTDSU_NUM_LINKS             2

/*
// In this driver, there is only one TAPI line device per link structure.
*/
#define HTDSU_TAPI_NUM_LINES        HTDSU_NUM_LINKS

/*
// There is only one TAPI address ID per line device (zero based).
*/
#define HTDSU_TAPI_NUM_ADDRESSES    1
#define HTDSU_TAPI_ADDRESSID        0

/*
// There is only one TAPI call per address/line instance.
*/
#define HTDSU_TAPI_NUM_CALLS        1

/*
// This version number is used by the NDIS_TAPI_NEGOTIATE_EXT_VERSION request.
// It is not used by this driver or the current NDISTAPI release.
*/
#define HTDSU_TAPI_EXT_VERSION      0x00010000

/*
// The line mode can be leased or dial-up.  In leased mode we can present the
// WAN wrapper with a LINE_UP indication so it can use the connection without
// the TAPI interface.  In dialup mode, we need to present a TAPI service
// provider interface so RAS or something else can select the phone number.
// Currently, this driver only supports a single line adapter, but it has
// been written to allow the addition of a second line if the adapter becomes
// available.
*/
typedef enum _HTDSU_LINE_MODE
{
    HTDSU_LINEMODE_DIALUP,
    HTDSU_LINEMODE_LEASED

} HTDSU_LINE_MODE;

/*
// This structure contains all the link information maintained by the
// Miniport driver.  It encompasses both the TAPI and WAN connections.
*/
typedef struct _HTDSU_LINK
{
    /* 000
    // Pointer back to the Adapter data structure so we can get at it
    // when passed a pointer to this structure in NdisMWanSend().
    */
    struct _HTDSU_ADAPTER *Adapter;

    /* 004
    // This is used to select which card channel the link is associated with.
    */
    USHORT CardLine;

    /* 006
    // This is a zero based index used to assign TAPI device ID to the
    // link based on TAPI DeviceIdBase assigned to this driver.
    */
    USHORT LinkIndex;

    /* 008
    // Remember what mode the line was set to.
    */
    HTDSU_LINE_MODE  LineMode;

    /* 00C
    // The WAN wrapper supplied handle to be used on Miniport calls
    // such as NdisMWanIndicateReceive().
    */
    NDIS_HANDLE NdisLinkContext;

    /* 010
    // The Connection wrapper supplied handle for use when indicating
    // TAPI LINE_EVENT's.
    */
    HTAPI_LINE htLine;

    /* 014
    // The Connection wrapper supplied handle for use when indicating
    // TAPI LINECALLSTATE events.
    */
    HTAPI_CALL htCall;

    /* 018
    // The current TAPI LINEDEVSTATE of the associated with the link.
    */
    ULONG DevState;                 // Current state
    ULONG DevStatesCaps;            // Events currently supported
    ULONG DevStatesMask;            // Events currently enabled

    /* 024
    // The current TAPI LINEADDRESSSTATE of the associated with the link.
    */
    ULONG AddressState;             // Current state
    ULONG AddressStatesCaps;        // Events currently supported
    ULONG AddressStatesMask;        // Events currently enabled

    /* 030
    // The current TAPI LINECALLSTATE of the associated with the link.
    */
    ULONG CallState;                // Current state
    ULONG CallStatesCaps;           // Events currently supported
    ULONG CallStatesMask;           // Events currently enabled

    /* 03C
    // The current TAPI media mode(s) supported by the card.
    */
    ULONG MediaMode;                // Current state
    ULONG MediaModesCaps;           // Events currently supported
    ULONG MediaModesMask;           // Events currently enabled

    /* 048
    // TAPI line address is assigned during installation and saved in the
    // registry.  It is read from the registry and saved here at init time.
    */
    CHAR LineAddress[0x14];

    /* 05C
    // The speed provided by the link in bits per second.  This value is
    // passed up by the Miniport during the LINE_UP indication.
    */
    ULONG LinkSpeed;

    /* 060
    // The quality of service provided by the link.  This value is passed
    // up by the Miniport during the LINE_UP indication.
    */
    NDIS_WAN_QUALITY Quality;

    /* 064
    // The number of rings detected in the current ring sequence.
    */
    USHORT RingCount;

    /* 066
    // The number of packets that should be sent before pausing to wait
    // for an acknowledgement.  This value is passed up by the Miniport
    // during the LINE_UP indication.
    */
    USHORT SendWindow;

    /* 068
    // The number of packets currently queued for transmission on this link.
    */
    ULONG NumTxQueued;

    /* 06C
    // Set TRUE if link is being closed.
    */
    BOOLEAN Closing;

    /* 06D
    // Set TRUE if call is being closed.
    */
    BOOLEAN CallClosing;

    /* 070
    // The current settings associated with this link as passed in via
    // the OID_WAN_SET_LINK_INFO request.
    */
    NDIS_WAN_SET_LINK_INFO WanLinkInfo;

    /*
    // This timer is used to keep track of the call state when a call is
    // coming in or going out.
    */
    NDIS_MINIPORT_TIMER CallTimer;

} HTDSU_LINK, *PHTDSU_LINK;

/*
// Use this macro to determine if a link structure pointer is really valid.
*/
#define IS_VALID_LINK(Adapter, Link) \
            (Link && Link->Adapter == Adapter)

/*
// Use this macro to get a pointer to a link structure from a CardLine ID.
*/
#define GET_LINK_FROM_CARDLINE(Adapter, CardLine) \
        &(Adapter->WanLinkArray[CardLine-HTDSU_CMD_LINE1])

/*
// Use this macro to get a pointer to a link structure from a LinkIndex.
*/
#define GET_LINK_FROM_LINKINDEX(Adapter, LinkIndex) \
        &(Adapter->WanLinkArray[LinkIndex])

/*
// Use this macro to get a pointer to a link structure from a TAPI DeviceID.
*/
#define GET_LINK_FROM_DEVICEID(Adapter, ulDeviceID) \
        &(Adapter->WanLinkArray[ulDeviceID - Adapter->DeviceIdBase]); \
        ASSERT(ulDeviceID >= Adapter->DeviceIdBase); \
        ASSERT(ulDeviceID <  Adapter->DeviceIdBase+Adapter->NumLineDevs)

#define GET_DEVICEID_FROM_LINK(Adapter, Link) \
        (Link->LinkIndex + Adapter->DeviceIdBase)

/*
// Use this macro to get a pointer to a link structure from a TAPI line handle.
*/
#define GET_LINK_FROM_HDLINE(Adapter, hdLine) \
        (PHTDSU_LINK) \
        (((PHTDSU_LINK) (hdLine) == &(Adapter->WanLinkArray[0])) ? (hdLine) : \
         ((PHTDSU_LINK) (hdLine) == &(Adapter->WanLinkArray[1])) ? (hdLine) : 0)

/*
// Use this macro to get a pointer to a link structure from a TAPI call handle.
*/
#define GET_LINK_FROM_HDCALL(Adapter, hdCall) \
        (PHTDSU_LINK) \
        (((PHTDSU_LINK) (hdCall) == &(Adapter->WanLinkArray[0])) ? (hdCall) : \
         ((PHTDSU_LINK) (hdCall) == &(Adapter->WanLinkArray[1])) ? (hdCall) : 0)

/*
// This structure contains all the information about a single adapter
// instance this Miniport driver is controlling.
*/
typedef struct _HTDSU_ADAPTER
{
#if DBG
    /* 000
    // Debug flags control how much debug is displayed in the checked version.
    */
    ULONG DbgFlags;
    UCHAR DbgID[4];
#endif

    /* 008
    // This is the handle given by the wrapper for calling ndis
    // functions.
    */
    NDIS_HANDLE MiniportAdapterHandle;

    /* 00C
    // Spinlock to protect fields in this structure..
    */
    NDIS_SPIN_LOCK Lock;

    /* 014
    // Lets us know when a transmit is in progress.
    */
    BOOLEAN TransmitInProgress;

    /* 018
    // Packets waiting to be sent when the controller is available.
    */
    LIST_ENTRY TransmitIdleList;

    /* 020
    // Packets currently submitted to the controller waiting for completion.
    */
    LIST_ENTRY TransmitBusyList;

    /* 028
    // Physical address where adapter memory is jumpered to.
    */
    NDIS_PHYSICAL_ADDRESS PhysicalAddress;

    /* 030
    // System address where the adapter memory is mapped to.
    */
    PVOID VirtualAddress;

    /* 034
    // Overlay the adapter memory structure on the virtual address
    // where we've mapped it into system I/O (memory) space.
    */
    PHTDSU_REGISTERS AdapterRam;

    /* 038
    // How much memory is on the adapter.
    */
    USHORT MemorySize;

    /* 03A
    // Currently enabled interrupts
    */
    USHORT InterruptEnableFlag;

    /* 03C
    // Currently pending interrupts
    */
    USHORT InterruptStatusFlag;

    /* 03E
    // Interrupt number this adapter is using.
    */
    CHAR InterruptNumber;

    /* 03F
    // A unique instance number to be used to generate a unique
    // WAN permanent address (not really permanent, but it's unique).
    */
    CHAR InstanceNumber;

    /* 040
    // Set TRUE if something goes terribly wrong with the hardware.
    */
    BOOLEAN NeedReset;

    /* 041
    // Set TRUE when the DPC is entered, and reset to FALSE when it leaves.
    */
    BOOLEAN InTheDpcHandler;

    /* 042
    // Specifies whether line is to be treated as a leased WAN line
    // or a dialup TAPI line.
    */
    USHORT LineType;
    
    /* 044
    // The DSU41 has only one line, DSU42 has two.
    */
    UINT NumLineDevs;

    /* 048
    // The ulDeviceIDBase field passed in the PROVIDER_INIT request informs a miniport of the zero-based
    // starting index that the Connection Wrapper will use when referring to a single adapter’s line devices by
    // index.  For example, if a ulDeviceIDBase of two is specified and the adapter supports three line devices,
    // then the Connection Wrapper will use the identifiers two, three, and four to refer to the adapter’s three
    // devices.
    */
    ULONG DeviceIdBase;

    /* 04C
    // The number of line open calls currently on this adapter.
    */
    UINT NumOpens;

    /* 050
    // NDIS interrupt control structure.
    */
    NDIS_MINIPORT_INTERRUPT Interrupt;
    
    /*
    // Specifies whether what speed the line is to be configured to.
    */
    USHORT LineRate;

    /*
    // WAN info structure.
    */
    NDIS_WAN_INFO WanInfo;

    /*
    // This holds the TAPI ProviderInfo string returned from HtTapiGetDevCaps
    // This is two null terminated strings packed end to end.
    */
    CHAR ProviderInfo[48];      // This size is the max allowed by RAS
    USHORT ProviderInfoSize;    // Size in bytes of both strings.

    /*
    // WAN/TAPI link managment object for each connection we support.
    */
    HTDSU_LINK WanLinkArray[HTDSU_NUM_LINKS];

    /*
    // This contains the name of our TAPI configuration DLL which is read
    // from the registry during initialization.  The name of the DLL and
    // its path will be saved in the registry during installation.
    */
    CHAR ConfigDLLName[128];

} HTDSU_ADAPTER, * PHTDSU_ADAPTER;


/***************************************************************************
// These routines are defined in htdsu.c
*/
NTSTATUS
DriverEntry(
    IN PDRIVER_OBJECT   DriverObject,
    IN PUNICODE_STRING  RegistryPath
    );

NDIS_STATUS
HtDsuInitialize(
    OUT PNDIS_STATUS    OpenErrorStatus,
    OUT PUINT           SelectedMediumIndex,
    IN PNDIS_MEDIUM     MediumArray,
    IN UINT             MediumArraySize,
    IN NDIS_HANDLE      MiniportAdapterHandle,
    IN NDIS_HANDLE      WrapperConfigurationContext
    );

NDIS_STATUS
HtDsuRegisterAdapter(
    IN PHTDSU_ADAPTER   Adapter,
    IN PSTRING          AddressList
    );

VOID
HtDsuHalt(
    IN PHTDSU_ADAPTER   Adapter
    );

NDIS_STATUS
HtDsuReconfigure(
    OUT PNDIS_STATUS    OpenErrorStatus,
    IN PHTDSU_ADAPTER   Adapter,
    IN NDIS_HANDLE      WrapperConfigurationContext
    );

NDIS_STATUS
HtDsuReset(
    OUT PBOOLEAN        AddressingReset,
    IN PHTDSU_ADAPTER   Adapter
    );

/***************************************************************************
// These routines are defined in interrup.c
*/
extern BOOLEAN
HtDsuCheckForHang(
    IN PHTDSU_ADAPTER   Adapter
    );

extern VOID
HtDsuDisableInterrupt(
    IN PHTDSU_ADAPTER   Adapter
    );

extern VOID
HtDsuEnableInterrupt(
    IN PHTDSU_ADAPTER   Adapter
    );

extern VOID
HtDsuISR(
    OUT PBOOLEAN        InterruptRecognized,
    OUT PBOOLEAN        QueueMiniportHandleInterrupt,
    IN PHTDSU_ADAPTER   Adapter
    );

VOID
HtDsuHandleInterrupt(
    IN PHTDSU_ADAPTER   Adapter
    );

VOID
HtDsuPollAdapter(
    IN PVOID                SystemSpecific1,
    IN PHTDSU_ADAPTER       Adapter,
    IN PVOID                SystemSpecific2,
    IN PVOID                SystemSpecific3
    );

/***************************************************************************
// These routines are defined in receive.c
*/
VOID
HtDsuReceivePacket(
    IN PHTDSU_ADAPTER   Adapter
    );

/***************************************************************************
// These routines are defined in request.c
*/
NDIS_STATUS
HtDsuQueryInformation(
    IN PHTDSU_ADAPTER   Adapter,
    IN NDIS_OID         Oid,
    IN PVOID            InformationBuffer,
    IN ULONG            InformationBufferLength,
    OUT PULONG          BytesWritten,
    OUT PULONG          BytesNeeded
    );

NDIS_STATUS
HtDsuSetInformation(
    IN PHTDSU_ADAPTER   Adapter,
    IN NDIS_OID         Oid,
    IN PVOID            InformationBuffer,
    IN ULONG            InformationBufferLength,
    OUT PULONG          BytesRead,
    OUT PULONG          BytesNeeded
    );

/***************************************************************************
// These routines are defined in send.c
*/
NDIS_STATUS
HtDsuWanSend(
    IN NDIS_HANDLE      MacBindingHandle,
    IN PHTDSU_LINK      Link,
    IN PNDIS_WAN_PACKET Packet
    );

VOID
HtDsuTransmitComplete(
    IN PHTDSU_ADAPTER   Adapter
    );

/***************************************************************************
// These routines are defined in card.c
*/
NDIS_STATUS
CardIdentify(
    IN PHTDSU_ADAPTER   Adapter
    );

NDIS_STATUS
CardDoCommand(
    IN PHTDSU_ADAPTER   Adapter,
    IN USHORT           CardLine,
    IN USHORT           CommandValue
    );

NDIS_STATUS
CardInitialize(
    IN PHTDSU_ADAPTER   Adapter,
    IN BOOLEAN          PerformSelfTest
    );

VOID
CardLineConfig(
    IN PHTDSU_ADAPTER   Adapter,
    IN USHORT           CardLine
    );

VOID
CardLineDisconnect(
    IN PHTDSU_ADAPTER   Adapter,
    IN USHORT           CardLine
    );

VOID
CardPrepareTransmit(
    IN PHTDSU_ADAPTER   Adapter,
    IN USHORT           CardLine,
    IN USHORT           Length
    );

VOID
CardGetReceiveInfo(
    IN PHTDSU_ADAPTER   Adapter,
    OUT PUSHORT         CardLine,
    OUT PUSHORT         BytesReceived,
    OUT PUSHORT         Status
    );

VOID
CardDialNumber(
    IN PHTDSU_ADAPTER   Adapter,
    IN USHORT           CardLine,
    IN PUCHAR           DialString,
    IN ULONG            DialStringLength
    );

/***************************************************************************
// These routines are defined in link.c
*/
VOID
LinkInitialize(
    IN PHTDSU_ADAPTER   Adapter,
    IN PSTRING          AddressList
    );

PHTDSU_LINK
LinkAllocate(
    IN PHTDSU_ADAPTER   Adapter,
    IN HTAPI_LINE       htLine,
    IN USHORT           LinkIndex
    );

VOID
LinkRelease(
    IN PHTDSU_LINK      Link
    );

VOID
LinkLineUp(
    IN PHTDSU_LINK      Link
    );

VOID
LinkLineDown(
    IN PHTDSU_LINK      Link
    );

VOID
LinkLineError(
    IN PHTDSU_LINK      Link,
    IN ULONG            Errors
    );

/***************************************************************************
// These routines are defined in tapi.c
*/
NDIS_STATUS
HtTapiQueryInformation(
    IN PHTDSU_ADAPTER   Adapter,
    IN NDIS_OID         Oid,
    IN PVOID            InformationBuffer,
    IN ULONG            InformationBufferLength,
    OUT PULONG          BytesWritten,
    OUT PULONG          BytesNeeded
    );

NDIS_STATUS
HtTapiSetInformation(
    IN PHTDSU_ADAPTER   Adapter,
    IN NDIS_OID         Oid,
    IN PVOID            InformationBuffer,
    IN ULONG            InformationBufferLength,
    OUT PULONG          BytesRead,
    OUT PULONG          BytesNeeded
    );

NDIS_STATUS
HtTapiConfigDialog(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_CONFIG_DIALOG Request
    );

NDIS_STATUS
HtTapiDevSpecific(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_DEV_SPECIFIC  Request
    );

NDIS_STATUS
HtTapiGetAddressCaps(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_ADDRESS_CAPS Request
    );

NDIS_STATUS
HtTapiGetAddressID(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_ADDRESS_ID Request
    );

NDIS_STATUS
HtTapiGetAddressStatus(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_ADDRESS_STATUS Request
    );

NDIS_STATUS
HtTapiGetCallAddressID(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_CALL_ADDRESS_ID Request
    );

NDIS_STATUS
HtTapiGetCallInfo(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_CALL_INFO Request
    );

NDIS_STATUS
HtTapiGetCallStatus(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_CALL_STATUS Request
    );

NDIS_STATUS
HtTapiGetDevCaps(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_DEV_CAPS  Request
    );

NDIS_STATUS
HtTapiGetDevConfig(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_DEV_CONFIG Request
    );

NDIS_STATUS
HtTapiGetExtensionID(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_EXTENSION_ID Request
    );

NDIS_STATUS
HtTapiGetID(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_ID        Request
    );

NDIS_STATUS
HtTapiGetLineDevStatus(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_GET_LINE_DEV_STATUS Request
    );

NDIS_STATUS
HtTapiMakeCall(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_MAKE_CALL     Request
    );

NDIS_STATUS
HtTapiNegotiateExtVersion(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_NEGOTIATE_EXT_VERSION Request
    );

NDIS_STATUS
HtTapiOpen(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_OPEN          Request
    );

NDIS_STATUS
HtTapiProviderInitialize(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_PROVIDER_INITIALIZE Request
    );

NDIS_STATUS
HtTapiAccept(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_ACCEPT        Request
    );

NDIS_STATUS
HtTapiAnswer(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_ANSWER        Request
    );

NDIS_STATUS
HtTapiClose(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_CLOSE         Request
    );

NDIS_STATUS
HtTapiCloseCall(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_CLOSE_CALL    Request
    );

NDIS_STATUS
HtTapiConditionalMediaDetection(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_CONDITIONAL_MEDIA_DETECTION Request
    );

NDIS_STATUS
HtTapiDial(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_DIAL          Request
    );

NDIS_STATUS
HtTapiDrop(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_DROP          Request
    );

NDIS_STATUS
HtTapiProviderShutdown(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_PROVIDER_SHUTDOWN Request
    );

NDIS_STATUS
HtTapiSecureCall(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_SECURE_CALL   Request
    );

NDIS_STATUS
HtTapiSelectExtVersion(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_SELECT_EXT_VERSION Request
    );

NDIS_STATUS
HtTapiSendUserUserInfo(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_SEND_USER_USER_INFO Request
    );

NDIS_STATUS
HtTapiSetAppSpecific(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_SET_APP_SPECIFIC Request
    );

NDIS_STATUS
HtTapiSetCallParams(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_SET_CALL_PARAMS Request
    );

NDIS_STATUS
HtTapiSetDefaultMediaDetection(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_SET_DEFAULT_MEDIA_DETECTION Request
    );

NDIS_STATUS
HtTapiSetDevConfig(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_SET_DEV_CONFIG Request
    );

NDIS_STATUS
HtTapiSetMediaMode(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_SET_MEDIA_MODE Request
    );

NDIS_STATUS
HtTapiSetStatusMessages(
    IN PHTDSU_ADAPTER           Adapter,
    IN PNDIS_TAPI_SET_STATUS_MESSAGES Request
    );

VOID
HtTapiAddressStateHandler(
    IN PHTDSU_ADAPTER           Adapter,
    IN PHTDSU_LINK              Link,
    IN ULONG                    AddressState
    );

VOID
HtTapiCallStateHandler(
    IN PHTDSU_ADAPTER           Adapter,
    IN PHTDSU_LINK              Link,
    IN ULONG                    CallState,
    IN ULONG                    StateParam
    );

VOID
HtTapiLineDevStateHandler(
    IN PHTDSU_ADAPTER           Adapter,
    IN PHTDSU_LINK              Link,
    IN ULONG                    LineDevState
    );

VOID
HtTapiResetHandler(
    IN PHTDSU_ADAPTER           Adapter
    );

VOID
HtTapiCallTimerHandler(
    IN PVOID                    SystemSpecific1,
    IN PHTDSU_LINK              Link,
    IN PVOID                    SystemSpecific2,
    IN PVOID                    SystemSpecific3
    );

#endif // _HTDSU_H