system crash :: ClientEventConnect

hi,

I am making a TDI client, in which I am registring a
ClientEventConnect routine to accept the
connection.The problem is ,the event handler is
getting called but then the system crashes.I am able
to refuse the connection by making the OUT parameters
to NULL;
I don’t know the structure of ConnectionContext param
also.
Other event handlers like
ClientEventReceive,ClientEventSend are working fine.

Hoping for a solution.
vijender

— NT Developers Interest List digest
wrote:
> NTDEV Digest for Wednesday, October 02, 2002.
>
> 1. Re: HDD serial number
> 2. Re: Looking for a WDM DMA Sample
> 3. Re: Looking for a WDM DMA Sample
> 4. Re: Looking for a WDM DMA Sample
> 5. Re: Looking for a WDM DMA Sample
> 6. Re: Looking for a WDM DMA Sample
> 7. Re: VToolsD with C7
> 8. Re: VToolsD with C7
> 9. Re: Looking for a WDM DMA Sample
> 10. Re: Looking for a WDM DMA Sample
> 11. Re: Looking for a WDM DMA Sample
> 12. Re: Looking for a WDM DMA Sample
> 13. RE: Looking for a WDM DMA Sample - platforms
> that translate DMA addresses
> 14. RE: Looking for a WDM DMA Sample - platforms
> that tra
> nslate DMA addresses
> 15. RE: About Driver-Driver Communication.
> 16. Re: Looking for a WDM DMA Sample
> 17. Re: Looking for a WDM DMA Sample
> 18. Support WriteFileGather in driver
> 19. Re: Support WriteFileGather in driver
> 20. RE: Support WriteFileGather in driver
> 21. Re: HDD physical serial number
> 22. Re: Looking for a WDM DMA Sample
> 23. Re: Monitoring mount and remount operations
> 24. Re: Looking for a WDM DMA Sample
> 25. Re: Looking for a WDM DMA Sample
> 26. Re: Looking for a WDM DMA Sample
> 27. Re: Looking for a WDM DMA Sample
> 28. Re: Looking for a WDM DMA Sample
> 29. Re: Looking for a WDM DMA Sample
> 30. Re: Looking for a WDM DMA Sample
> 31. Re: VToolsD with C7
> 32. Canceling Irps in Win2k with Surprise removal
>
>
----------------------------------------------------------------------
>
> Subject: Re: HDD serial number
> From: “Mark Cariddi”
> Date: Wed, 2 Oct 2002 07:34:14 -0400
> X-Message-Number: 1
>
> You can get this through the SCSI inquiry command.
> You need to request
> paqe code VPD_SERIAL_NUMBER which I think is 0x80 or
> 0x83. You will have
> to probably do this via SCSI passthrough.
>
> --Mark Cariddi
> www.osr.com
>
> “Nagesh Bhattu”
> wrote in message
> news:xxxxx@ntdev…
> >
> > Hi,
> > is there any way to get the serial number of
> SCSI disks on windows
> > platforms(2000/NT). We have tried using WMI for
> this purpose. But the
> field
> > is blank. WMI does not report serial number.
> > Is there any other place where I can get this
> information.For IDE disks,
> > this is possible through SMART/IOCTL.
> >
> > Thanks in advance,
> > Nagesh Bhattu
> >
> >
> >
> >
> >
> >
>
>
>
>
----------------------------------------------------------------------
>
> Subject: Re: Looking for a WDM DMA Sample
> From: “Moreira, Alberto”
>
> Date: Wed, 2 Oct 2002 10:27:14 -0400
> X-Message-Number: 2
>
> Why not ? Hardware level code isn’t necessarily more
> unstable than any other
> code. And I trust my hand better.
>
> Alberto.
>
> -----Original Message-----
> From: Phil Barila
> [mailto:xxxxx@Seagate.com]
> Sent: Tuesday, October 01, 2002 6:59 PM
> To: NT Developers Interest List
> Subject: [ntdev] Re: Looking for a WDM DMA Sample
>
>
> “Moreira, Alberto”
> wrote in message
> news:xxxxx@ntdev…
> > The issue is, do
> > we want compatibility to be always at OS level ? I
> believe we should allow
> > for hardware-level compatibility too, and make
> sure that the developer has
> > access to a way of removing the OS from sight if
> that’s what’s needed.
>
> Not in a production OS.
>
> –
> Philip D. Barila
> Seagate Technology, LLC
> (720) 684-1842
>
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@compuware.com
> To unsubscribe send a blank email to %%email.unsub%%
>
>
>
> The contents of this e-mail are intended for the
> named addressee only. It
> contains information that may be confidential.
> Unless you are the named
> addressee or an authorized designee, you may not
> copy or use it, or disclose
> it to anyone else. If you received it in error
> please notify us immediately
> and then destroy it.
>
>
>
>
----------------------------------------------------------------------
>
> Subject: Re: Looking for a WDM DMA Sample
> From: “Moreira, Alberto”
>
> Date: Wed, 2 Oct 2002 10:39:59 -0400
> X-Message-Number: 3
>
> A good kernel should run without making any
> assumptions on the underlying
> hardware layer, and it should work just as well if
> the interface to the
> hardware is virtualized. There should be ways of
> operating independently of
> the OS, in cases we either don’t need it or we want
> to achieve something in
> spite of it. I can see many reasons why I should
> want to write a kernel
> module that bridges directly from an app to an OS -
> direct rendering, for
> example, is such a case. A well designed operating
> system will let me write
> kernel modules that expose my hardware to my app
> bypassing its own
> mechanisms.
>
> The i386 architecture today supports 36-bit memory
> addressing. The fact that
> 36-bit addressing is implemented as blocks of 32-bit
> address spaces does
> insert some considerations that older hardware
> didn’t have, and that
> requires hardware-level software developers to take
> it into account - but
> that doesn’t mean we necessarily want to punt to the
> OS when we handle it.
> Hardware has been evolving ever since I remember,
> and hardware-level
> programmers had to keep up with it - but again, I
> find it a terrible idea
> that every time the going gets tough I must punt to
> the OS. Sorry, no, if an
> OS does not make strong provision for hardware
> handling that doesn’t
> necessarily comply with its internal peeves, I can’t
> say I like it.
>
> As for a nice driver subsystem design, look at
> Linux. It’s at least as
> stable as NT, and people don’t have to go through
> nearly as many hoops to
> get things done.
>
>
> Alberto.
>
>
>
> -----Original Message-----
> From: Mark Roddy [mailto:xxxxx@hollistech.com]
>
=== message truncated ===

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

It would be helpful to know"what sort of crash"? Access violation, etc. You
must have a kernel debugger to be successful at this.

In general terms “context” is something that YOU invent. In this situation
it is a parameter (number, pointer, etc.) that YOU invent that will help YOU
know which of you many connections you are dealing with when you are called
later in other callbacks for connections.

Typically, you allocate (from non-paged pool) some sort of structure that
YOU invent that contains whatever information that YOU want to keep for the
connection. In the ConnectEventHandler you pass this pointer to the system
by setting the ConnectionContext value.

Later, the pointer that you passed in your ConnectEvetnHandler will be given
back to you. For example, the ConnectionContext pointer is given back to you
in your ReceiveEventHandler. There you can cast ConnectionContext to be a
pointer to your per-connection structure and YOU finally know which of your
connections you are dealing with.

Good luck,

Thomas F. Divine

PCAUSA - Tools & Resources For Network Software Developers
NDIS Protocol/Intermediate/Hooking - TDI Client/Filter
http: - http:

“vijender yadav” wrote in message
news:xxxxx@ntdev…
>
> hi,
>
> I am making a TDI client, in which I am registring a
> ClientEventConnect routine to accept the
> connection.The problem is ,the event handler is
> getting called but then the system crashes.I am able
> to refuse the connection by making the OUT parameters
> to NULL;
> I don’t know the structure of ConnectionContext param
> also.
> Other event handlers like
> ClientEventReceive,ClientEventSend are working fine.
>
> Hoping for a solution.
> vijender
>
>
>
> — NT Developers Interest List digest
> wrote:
> > NTDEV Digest for Wednesday, October 02, 2002.
> >
> > 1. Re: HDD serial number
> > 2. Re: Looking for a WDM DMA Sample
> > 3. Re: Looking for a WDM DMA Sample
> > 4. Re: Looking for a WDM DMA Sample
> > 5. Re: Looking for a WDM DMA Sample
> > 6. Re: Looking for a WDM DMA Sample
> > 7. Re: VToolsD with C7
> > 8. Re: VToolsD with C7
> > 9. Re: Looking for a WDM DMA Sample
> > 10. Re: Looking for a WDM DMA Sample
> > 11. Re: Looking for a WDM DMA Sample
> > 12. Re: Looking for a WDM DMA Sample
> > 13. RE: Looking for a WDM DMA Sample - platforms
> > that translate DMA addresses
> > 14. RE: Looking for a WDM DMA Sample - platforms
> > that tra
> > nslate DMA addresses
> > 15. RE: About Driver-Driver Communication.
> > 16. Re: Looking for a WDM DMA Sample
> > 17. Re: Looking for a WDM DMA Sample
> > 18. Support WriteFileGather in driver
> > 19. Re: Support WriteFileGather in driver
> > 20. RE: Support WriteFileGather in driver
> > 21. Re: HDD physical serial number
> > 22. Re: Looking for a WDM DMA Sample
> > 23. Re: Monitoring mount and remount operations
> > 24. Re: Looking for a WDM DMA Sample
> > 25. Re: Looking for a WDM DMA Sample
> > 26. Re: Looking for a WDM DMA Sample
> > 27. Re: Looking for a WDM DMA Sample
> > 28. Re: Looking for a WDM DMA Sample
> > 29. Re: Looking for a WDM DMA Sample
> > 30. Re: Looking for a WDM DMA Sample
> > 31. Re: VToolsD with C7
> > 32. Canceling Irps in Win2k with Surprise removal
> >
> >
> ----------------------------------------------------------------------
> >
> > Subject: Re: HDD serial number
> > From: “Mark Cariddi”
> > Date: Wed, 2 Oct 2002 07:34:14 -0400
> > X-Message-Number: 1
> >
> > You can get this through the SCSI inquiry command.
> > You need to request
> > paqe code VPD_SERIAL_NUMBER which I think is 0x80 or
> > 0x83. You will have
> > to probably do this via SCSI passthrough.
> >
> > --Mark Cariddi
> > www.osr.com
> >
> > “Nagesh Bhattu”
> > wrote in message
> > news:xxxxx@ntdev…
> > >
> > > Hi,
> > > is there any way to get the serial number of
> > SCSI disks on windows
> > > platforms(2000/NT). We have tried using WMI for
> > this purpose. But the
> > field
> > > is blank. WMI does not report serial number.
> > > Is there any other place where I can get this
> > information.For IDE disks,
> > > this is possible through SMART/IOCTL.
> > >
> > > Thanks in advance,
> > > Nagesh Bhattu
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> ----------------------------------------------------------------------
> >
> > Subject: Re: Looking for a WDM DMA Sample
> > From: “Moreira, Alberto”
> >
> > Date: Wed, 2 Oct 2002 10:27:14 -0400
> > X-Message-Number: 2
> >
> > Why not ? Hardware level code isn’t necessarily more
> > unstable than any other
> > code. And I trust my hand better.
> >
> > Alberto.
> >
> > -----Original Message-----
> > From: Phil Barila
> > [mailto:xxxxx@Seagate.com]
> > Sent: Tuesday, October 01, 2002 6:59 PM
> > To: NT Developers Interest List
> > Subject: [ntdev] Re: Looking for a WDM DMA Sample
> >
> >
> > “Moreira, Alberto”
> > wrote in message
> > news:xxxxx@ntdev…
> > > The issue is, do
> > > we want compatibility to be always at OS level ? I
> > believe we should allow
> > > for hardware-level compatibility too, and make
> > sure that the developer has
> > > access to a way of removing the OS from sight if
> > that’s what’s needed.
> >
> > Not in a production OS.
> >
> > –
> > Philip D. Barila
> > Seagate Technology, LLC
> > (720) 684-1842
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as:
> > xxxxx@compuware.com
> > To unsubscribe send a blank email to %%email.unsub%%
> >
> >
> >
> > The contents of this e-mail are intended for the
> > named addressee only. It
> > contains information that may be confidential.
> > Unless you are the named
> > addressee or an authorized designee, you may not
> > copy or use it, or disclose
> > it to anyone else. If you received it in error
> > please notify us immediately
> > and then destroy it.
> >
> >
> >
> >
> ----------------------------------------------------------------------
> >
> > Subject: Re: Looking for a WDM DMA Sample
> > From: “Moreira, Alberto”
> >
> > Date: Wed, 2 Oct 2002 10:39:59 -0400
> > X-Message-Number: 3
> >
> > A good kernel should run without making any
> > assumptions on the underlying
> > hardware layer, and it should work just as well if
> > the interface to the
> > hardware is virtualized. There should be ways of
> > operating independently of
> > the OS, in cases we either don’t need it or we want
> > to achieve something in
> > spite of it. I can see many reasons why I should
> > want to write a kernel
> > module that bridges directly from an app to an OS -
> > direct rendering, for
> > example, is such a case. A well designed operating
> > system will let me write
> > kernel modules that expose my hardware to my app
> > bypassing its own
> > mechanisms.
> >
> > The i386 architecture today supports 36-bit memory
> > addressing. The fact that
> > 36-bit addressing is implemented as blocks of 32-bit
> > address spaces does
> > insert some considerations that older hardware
> > didn’t have, and that
> > requires hardware-level software developers to take
> > it into account - but
> > that doesn’t mean we necessarily want to punt to the
> > OS when we handle it.
> > Hardware has been evolving ever since I remember,
> > and hardware-level
> > programmers had to keep up with it - but again, I
> > find it a terrible idea
> > that every time the going gets tough I must punt to
> > the OS. Sorry, no, if an
> > OS does not make strong provision for hardware
> > handling that doesn’t
> > necessarily comply with its internal peeves, I can’t
> > say I like it.
> >
> > As for a nice driver subsystem design, look at
> > Linux. It’s at least as
> > stable as NT, and people don’t have to go through
> > nearly as many hoops to
> > get things done.
> >
> >
> > Alberto.
> >
> >
> >
> > -----Original Message-----
> > From: Mark Roddy [mailto:xxxxx@hollistech.com]
> >
> === message truncated ===
>
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
>
></http:></http:>

Hi,

A page pault occurs after returning
STATUS_MORE_PROCESSING_REQUIRED from
clienteventconnect.I am allocationg memory to
connectioncontext from nonpaged pool.

What about AcceptIrp?? I am preallocating the
Irp(global for now ) and then assigning it to out
AcceptIrp.

If I want to allow 5 clients to connect to my server,
then what should I store in connectioncontext?
I am creating end point connection object for each
client.

Ok I have a design .You tell me how much it is correct

In socket system call ,I am just creating a new
socket,initializing its contents to 0.
In bind ,I am opeing a transport address and querring
information from the transport.
Then in listen if the user says to allow ‘n’ clients
to connect,I am creating ‘n’ connection
endpoint(creating new sockets and copying info of
original except connection endpoint) using the
original transport address.I am making a linked list
of all these new sockets.
Then I register all the event handlers.

Now when a client connects ,clienteventconnect routine
will be called.
Now the first socket from the linked list will be
picked up, the connection endpoint object pointer will
be stored in connectioncontext and the list head
pointer will be shifted to next new socket.
then the connection context pointer can be passed to
other event handlers and the clients can be
distuinguished…

But first it should run for atleast one client…

I am using softIce …

waiting for reply.
vijender

— NT Developers Interest List digest
wrote:
> NTDEV Digest for Thursday, October 03, 2002.
>
> 1. Re: Canceling Irps in Win2k with Surprise removal
> 2. Re: OpenFileMapping in IIS4.0
> 3. platforms that translate DMA addresses
> 4. Re: OpenFileMapping in IIS4.0
> 5. XP io manger cancels my queued Irp’s, but not 2k
> 6. Kernel debugging…
> 7. RE: Kernel debugging…
> 8. RE: Kernel debugging…
> 9. RE: Kernel debugging…
> 10. system crash :: ClientEventConnect
> 11. Re: Knowing the parent of a file
> 12. Re: Looking for a WDM DMA Sample
> 13. Re: Canceling Irps in Win2k with Surprise
> removal
> 14. Re: XP io manger cancels my queued Irp’s, but
> not 2k
> 15. [ntdev]:To change page size
> 16. Re: XP io manger cancels my queued Irp’s, but
> not
> 2k
> 17. Re: Looking for a WDM DMA Sample
> 18. Re: Looking for a WDM DMA Sample
> 19. Re: Canceling Irps in Win2k with Surprise
> removal
> 20. Re: Looking for a WDM DMA Sample
> 21. Re: [ntdev]:To change page size
> 22. Re: system crash :: ClientEventConnect
> 23. MEMORY_MANAGEMENT BSOD
> 24. Re: Looking for a WDM DMA Sample
> 25. Re: Canceling Irps in Win2k with Surprise
> removal
> 26. Re: Looking for a WDM DMA Sample
> 27. Re: Looking for a WDM DMA Sample
> 28. Re: Looking for a WDM DMA Sample
> 29. RE: Kernel debugging…
> 30. Re: Looking for a WDM DMA Sample
> 31. using IOCTL_NDIS_QUERY_GLOBAL_STATS to get
> mac-address from kerne
> l-mode
> 32. Re: Looking for a WDM DMA Sample
> 33. Re: Looking for a WDM DMA Sample
> 34. Re: MEMORY_MANAGEMENT BSOD
> 35. Re: Looking for a WDM DMA Sample
> 36. Re: Looking for a WDM DMA Sample
> 37. Re: Looking for a WDM DMA Sample
> 38. SCSI filtering again
> 39. Re: Looking for a WDM DMA Sample
> 40. Re: Looking for a WDM DMA Sample
> 41. Re: Looking for a WDM DMA Sample
> 42. Re: Looking for a WDM DMA Sample
> 43. Re: Looking for a WDM DMA Sample
> 44. Getting: Message Rejected?
> 45. Re: Looking for a WDM DMA Sample
> 46. Re: Network driver installation on NT4
> 47. VPB SerialNumber field…
> 48. RE: Kernel debugging…
> 49. Re: [ntdev]:To change page size
>
>
----------------------------------------------------------------------
>
> Subject: Re: Canceling Irps in Win2k with Surprise
> removal
> From: “Justin Frodsham”
> Date: Thu, 3 Oct 2002 00:10:10 -0400
> X-Message-Number: 1
>
> I need to ammend my last message, the IO manager is
> not canceling IRP’s
> for me at all in Win2K. Is this normal? My driver
> was written to expect
> queued IRPs to be canceled by the IO manger just
> before I receive the
> surprise removal IRP (this works on XP). I have not
> successfully been
> able cancel IRP’s myself using IoCancelIrp().
>
> -Justin
>
>
----------------------------------------------------------------------
>
> Subject: Re: OpenFileMapping in IIS4.0
> From: “Udhayakumar”
> Date: Thu, 3 Oct 2002 00:39:28 -0400
> X-Message-Number: 2
>
> Hai,
>
> This is Some very Urgent.Can any on e help me to
> solve this problem
>
>
----------------------------------------------------------------------
>
> Subject: platforms that translate DMA addresses
> From: “Jake Oshins”
> Date: Wed, 2 Oct 2002 21:50:32 -0700
> X-Message-Number: 3
>
> The link between re-mapping I/O and MMI/O usually
> comes about because
> the platform designer is trying to make everything
> (including I/O and
> MMI/O) available below 32-bits, while also making
> RAM start at physical
> address zero.
>
>
> The thought process usually goes like this:
>
> 1) I have to put RAM at address 0 in order to make
> legacy code work.
> 2) I have to map in I/O space somewhere in
> processor memory address
> space - pick some high number.
> 3) I have to map in MMI/O space somewhere in
> processor memory address
> space - pick some other high number.
> 4) I have to support old ISA MMI/O devices which
> expect to live at low
> bus-relative addresses - so build a translation
> between
> processor-relative physical addresses and
> bus-relative physical
> addresses. This makes ISA devices appear to the
> processor at high
> physical addresses rather than the low bus-relative
> ones.
> 5) Now, since the ISA devices are decoding the low
> parts of
> bus-relative physical address space using the same
> physical addresses at
> which the processor is decoding RAM, create a
> bus-relative translation
> that allows a busmaster to read and write low
> physical RAM at high
> bus-relative addresses.
>
>
> I’m not advocating this sort of scheme. I’m just
> saying that it exists.
> And it has the interesting property that RAM can be
> addressed
> contiguously by the processor. This seemed
> important to some designs,
> so they chose it over the fantastically complex
> RAM-remapping scheme
> that we know and love in today’s PCs. (The PC
> scheme creates lots of
> holes in RAM, but it keeps the bus-relative physical
> addresses equal to
> the processor-relative physical addresses.
>
> Jake Oshins
> Windows NT Kernel Group
>
> This posting is provided “AS IS” with no warranties,
> and confers no
> rights.
>
> -----Original Message-----
> Subject: RE: Looking for a WDM DMA Sample -
> platforms that tra
> nslate DMA addresses
> From: Bi Chen
> Date: Wed, 2 Oct 2002 10:31:36 -0700
> X-Message-Number: 14
>
> Thanks. Jake:
>
> I am glad that I could get some inside of NT OS from
> Microsoft people.
>
> One more question, if a platform has to emulate IOIO
> (port IO) space,
> that
> leads to certain bus address translation, I assume
> it is only in IOIO
> space.
> I can understand that. However, as far as MMIO
> (memory mapped IO) space
> is
> considered, is there a need to translate bus address
> in 32-bit only
> case,
> baring chipset that sets fixed mapping window of
> IOIO space?
>
> Thanks again.
>
> Bi
>
> -----Original Message-----
> From: Jake Oshins
> [mailto:xxxxx@windows.microsoft.com]
> Sent: Wednesday, October 02, 2002 10:00 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: Looking for a WDM DMA Sample -
> platforms that
> translate DMA addresses
>
>
=== message truncated ===

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com