IOCTL_PROTOCOL_RESET

Hi,

These must be a trivial questions ,But please help!!

What does IOCTL_PROTOCOL_RESET do?
It is used in the ResetAdapter function of the packet driver sample from
Microsoft

I modified the New packet driver sample from Microsoft to send and receive
packets simultaneously using two threads.I send about 200 ethernet packets in
either direction. I just call the send and receive in respective loops
My problem:-

If I send file F1 from Machine M1 and receive file F2 from Machine M2 ,
the machine M1 takes lot of time to complete reading.But M2 reads in a flash
Similar is the case with M2 if I first send from it and then receive.

I send about 200 ethernet packets in either direction.

Also, Sometimes it receives junk data.

Could anybody please help me?

But if I first send data to another Machine and then Receive some other data

Regards
jay


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You have complete code for the handling of IOCTL_PROTOCOL_RESET. It is
called when the test app selects Reset Adapter, In the driver it calls
NdisResetAdapter. The idea is to provide a way to cancel all pending sends,
receives and requests…

Concerning your data problem, you might consider using a network monitor
(such as NetMon provided by Microsoft) to look on the actual network to see
what is actually going on.

There are several explanations for the “junk data”:

1.) Unexpected “Real” Packet - It is not junk data at all. Instead it might
be a normal network packet that is using a protocol that you are not
expecting. For example, and ICMP or NETBEUI packet.

2.) Bug In Receiving -If you look on the network with a network analyzer and
all the packets that you see are “good” (not junk), then you know you have a
problem in the way you are doing receives.

3.) Bug In Sending - If you look on the network and you see a junk packet
you know that you sent (i.e., it isn’t just a real packet that you weren’t
expecting), then you know that you have problem in the way you are doing
transmits.

In any case, try to isolate the problem to a send or a receive problem, then
work from there.

Regards,

Thomas F. Divine

PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:

----- Original Message -----
From: Jayachandran.B
To: NT Developers Interest List
Sent: Friday, February 09, 2001 9:57 AM
Subject: [ntdev] IOCTL_PROTOCOL_RESET

>
>
> Hi,
>
> These must be a trivial questions ,But please help!!
>
> What does IOCTL_PROTOCOL_RESET do?
> It is used in the ResetAdapter function of the packet driver sample from
> Microsoft
>
> I modified the New packet driver sample from Microsoft to send and
receive
> packets simultaneously using two threads.I send about 200 ethernet packets
in
> either direction. I just call the send and receive in respective loops
> My problem:-
> --------------
>
> If I send file F1 from Machine M1 and receive file F2 from Machine M2 ,
> the machine M1 takes lot of time to complete reading.But M2 reads in a
flash
> Similar is the case with M2 if I first send from it and then receive.
>
> I send about 200 ethernet packets in either direction.
>
> Also, Sometimes it receives junk data.
>
> Could anybody please help me?
>
>
> But if I first send data to another Machine and then Receive some other
data
>
>
> Regards
> jay


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</http:></http:>

Hi,

Thank you very much for the reply.

I am connecting two machines directly.
I am not using TCP/IP
In this case can other protocols like ICMP or NETBEUI come into play?
Also can I use Netmon?
Sometimes the send and receive works accurately (I send and receive the same
file and I do a manual file compare to see the correctness) At other times it
receives incorrect data.It will receive 3 or 4 lines(3*16 or 4*16 ) of
zeroes.and receive a part of the already received data again!!!

Also could you tell me the reason for the delay if Receive is preceded by
Transmit?
Note that both machines are using their own files for TX.

Thanks &Regards
jay

“Thomas F. Divine” wrote:

You have complete code for the handling of IOCTL_PROTOCOL_RESET. It is
called when the test app selects Reset Adapter, In the driver it calls
NdisResetAdapter. The idea is to provide a way to cancel all pending sends,
receives and requests…

Concerning your data problem, you might consider using a network monitor
(such as NetMon provided by Microsoft) to look on the actual network to see
what is actually going on.

There are several explanations for the “junk data”:

1.) Unexpected “Real” Packet - It is not junk data at all. Instead it might
be a normal network packet that is using a protocol that you are not
expecting. For example, and ICMP or NETBEUI packet.

2.) Bug In Receiving -If you look on the network with a network analyzer and
all the packets that you see are “good” (not junk), then you know you have a
problem in the way you are doing receives.

3.) Bug In Sending - If you look on the network and you see a junk packet
you know that you sent (i.e., it isn’t just a real packet that you weren’t
expecting), then you know that you have problem in the way you are doing
transmits.

In any case, try to isolate the problem to a send or a receive problem, then
work from there.

Regards,

Thomas F. Divine

PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:
>
> ----- Original Message -----
> From: Jayachandran.B
> To: NT Developers Interest List
> Sent: Friday, February 09, 2001 9:57 AM
> Subject: [ntdev] IOCTL_PROTOCOL_RESET
>
> >
> >
> > Hi,
> >
> > These must be a trivial questions ,But please help!!
> >
> > What does IOCTL_PROTOCOL_RESET do?
> > It is used in the ResetAdapter function of the packet driver sample from
> > Microsoft
> >
> > I modified the New packet driver sample from Microsoft to send and
> receive
> > packets simultaneously using two threads.I send about 200 ethernet packets
> in
> > either direction. I just call the send and receive in respective loops
> > My problem:-
> > --------------
> >
> > If I send file F1 from Machine M1 and receive file F2 from Machine M2 ,
> > the machine M1 takes lot of time to complete reading.But M2 reads in a
> flash
> > Similar is the case with M2 if I first send from it and then receive.
> >
> > I send about 200 ethernet packets in either direction.
> >
> > Also, Sometimes it receives junk data.
> >
> > Could anybody please help me?
> >
> >
> > But if I first send data to another Machine and then Receive some other
> data
> >
> >
> > Regards
> > jay
>
> —
> You are currently subscribed to ntdev as: xxxxx@miel.mot.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</http:></http:>

----- Original Message -----
From: Jayachandran.B
To: NT Developers Interest List
Sent: Saturday, February 10, 2001 4:57 AM
Subject: [ntdev] Re: IOCTL_PROTOCOL_RESET

> Hi,
>
> Thank you very much for the reply.
>
> I am connecting two machines directly.
> I am not using TCP/IP
> In this case can other protocols like ICMP or NETBEUI come into play?

Most likely not.

> Also can I use Netmon?

Yes.

But the best view of the problem would probably be from a stand-alone
machine which not hosting the adapters that you are using dor send or
receive.

> Sometimes the send and receive works accurately (I send and receive the
same
> file and I do a manual file compare to see the correctness) At other times
it
> receives incorrect data.It will receive 3 or 4 lines(316 or 416 ) of
> zeroes.and receive a part of the already received data again!!!
>

You have a bug, it seems or a problem in interpreting what you are
receiving. At this point is could equally well be a bug in sending or a bug
in receiving or anywhere is the path from the original source file to the
received file.

If you are sending short packets, understand that there is a minimum packet
size, somewhere aroung 64 bytes. If you send less that the minimum, then the
sender “pads” the data (usually with garbage) so the packet sent on the
network is the minimum size. In this case the received packet will have some
garbage at the end.

Protocols accomodate this by including a header of some type in each packet.
The header includes the amount of actual data in the packet, so even if it
is short you would know how to ignore the “pad” bytes.

Good luck,

Thomas F. Divine

PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client
http: - http:


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</http:></http:>