Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

NDIS programming

Posted on 1997-11-18
4
Medium Priority
?
463 Views
Last Modified: 2013-12-03
How do I call NDIS driver routines? Where will I get information?
0
Comment
Question by:tarun
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Expert Comment

by:faster
ID: 1408556
I am not familiar with NDIS myself.  But I know microsoft DDK is what you want.  It has quite a lot of documents on various device driver and some examples.  There is also a DDK mailing list where NDIS discussion is very often.  If you need I can check out the list address for you.
0
 
LVL 1

Expert Comment

by:Tiutin
ID: 1408557
Hi, tarum !
Within the MSDN Library (CD of April 1997) you may find DDK Documentation. Go to Windows NT 4.0 DDK, Network Drivers, Network reference, Part 1. NDIS. There you will find the description of functions you are looking for.
Best wishes.
0
 

Author Comment

by:tarun
ID: 1408558
Thanks a lot. Now I have seen that, but still I am not very clear how to call NDIS 4.0 routines. Is there any NDIS development kit available from Microsoft or any other vendor.

0
 
LVL 1

Accepted Solution

by:
Tiutin earned 200 total points
ID: 1408559
I would suggest to look into MSDN Development Platform - DDD CD.
Disc 2 - Windows 95 DDK (.\net\Ndis3 - a lot of examples). One of them follows.
Disc 5 - Windows NT DDK (.\ddk\src\Network)
==================================================
.LALL
;****************************************************************
;
;       (C) Copyright MICROSOFT Corp, 1995
;
;       Title:      LANCELNK.ASM sourced from:
;       Title:      NDISLNK.ASM - Assembly linkage to NDIS Wrapper for MACs
;                                  and Protocols
;
;       Version:    3.00
;
;       Date:       05-Nov-1991
;
;================================================================
    TITLE $LANCELNK
    .386P

INCLUDE VMM.INC
INCLUDE NDIS.INC
INCLUDE NETVXD.INC          ; Net VxD initialization oredr



DECLARE_VIRTUAL_DEVICE %MAC, 3, 10, <%MAC>_Control, Undefined_Device_Id, \
        MAC_Init_Order

IFDEF CHICAGO
VxD_LOCKED_DATA_SEG

Public bInitAlready      
      bInitAlready       DB 0
      
VxD_LOCKED_DATA_ENDS
ENDIF

VxD_LOCKED_CODE_SEG

BeginProc C_Device_Init

IFDEF NDIS_STDCALL
extern _DriverEntry@8:NEAR
ELSE
extern _DriverEntry:NEAR
ENDIF

IFDEF CHICAGO
    mov  al, bInitAlready
      cmp  al, 0                              ; Make sure we' haven't been called already.
      jnz  Succeed_Init_Phase
      inc  bInitAlready                  ; Set the "Called Already" Flag
ENDIF

; Make sure the wrapper (Ndis.386) is loaded
    VxDcall NdisGetVersion
    jc   Fail_Init_Phase

    push 0
    push 0

IFDEF NDIS_STDCALL
    call _DriverEntry@8
ELSE
    call _DriverEntry
    add  esp,8
ENDIF

    cmp  eax,NDIS_STATUS_SUCCESS
    jne  Fail_Init_Phase
Succeed_Init_Phase:
    clc
    ret
Fail_Init_Phase:
    stc
    ret
EndProc C_Device_Init

Begin_Control_Dispatch %MAC
    Control_Dispatch Device_Init,                         C_Device_Init
IFDEF CHICAGO
    Control_Dispatch Sys_Dynamic_Device_Init,       C_Device_Init
ENDIF
End_Control_Dispatch %MAC



VxD_LOCKED_CODE_ENDS

;****************************************************************
;                 R E A L   M O D E   I N I T   C O D E
;****************************************************************

;******************************************************************************
;
;   MAC_Real_Init
;
;   DESCRIPTION:
;
;   ENTRY:
;
;   EXIT:
;
;   USES:
;
;==============================================================================

VxD_REAL_INIT_SEG

BeginProc MAC_Real_Init

;
;   If another us is loaded then don't load -- Just abort our load
;
     test    bx, Duplicate_From_INT2F OR Duplicate_Device_ID
     jnz     SHORT Ndis_RI_Abort_Load



;   No other  is loaded.

     xor     bx, bx
     xor     si, si
     mov     ax, Device_Load_Ok
     ret

Ndis_RI_Abort_Load:
     xor     bx, bx
     xor     si, si
     mov     ax, Abort_Device_Load
     ret

EndProc MAC_Real_Init

VxD_REAL_INIT_ENDS

END MAC_Real_Init

0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question