Re: NDIS WAN IM for WinCE

From: Jeff Kelley [MS] (jeffkel_at_online.microsoft.com)
Date: 06/23/04


Date: Wed, 23 Jun 2004 12:35:13 -0700

PPP packets can be sent encrypted and/or compressed, it depends upon what
the peers agree on during connection establishment negotiations.

Format of a PPP packet carrying an IP packet (note that they are
*not*carrying an Ethernet packet) generally looks something like:

[FF 03] (address/control bytes, optional, may be negotiated off and not
sent)
00 21 IP protocol field (the leading 00 may not be sent if protocol
field compression has been negotiated)
<IP packet>

The <IP packet> may have its TCP/IP header compressed using Van Jacobson
TCP/IP header compression if that has been negotiated. If so, then instead
of 00 21 the protocol field would be 00 2D or 00 2F and what follows would
conform to the VJ RFC 1144.

If CCP has negoatiated MPPC/MPPE compression/encryption, then the packet
would look like:

[FF 03] (optional address/control)
00 FD CCP protocol type (00 may be not be sent)
XS SS CCP header (4 flag bits and 12 bit sequence number)
<Compressed/Encrypted PPP packet>

--
Jeff Kelley
Microsoft / Windows CE Networking
This posting is provided AS IS with no warranties, and confers no rights.
"John Walker" <john_walker2020@yahoo.com> wrote in message
news:e544e0f9.0406230534.596d6301@posting.google.com...
> Hello Jeff,
>
>    Thanks for all of your help and assistance.  But I believe I have
> finally got my Ndis IM driver working.  When I cradle my device, I can
> see the packets come and go.  I am currently trying to decode the PPP
> packets and just find the ethernet packets that are encapsulated
> within the PPP packets.
>
>    Are ppp packets normally encrypted and/or compressed?  Do you know
> if the PPP packets contains the protocol type?
>
> "Jeff Kelley [MS]" <jeffkel@online.microsoft.com> wrote in message
news:<40d8d4f9$1@news.microsoft.com>...
> > There are hooks that allow a dll to see the packets being sent/received.
> > This is less powerful than what inserting an IM driver would allow in
that
> > packets cannot be injected, dropped, or modified. It works for packets
being
> > sent between PPP and WAN miniports (e.g. AsyncMac), as well as for
packets
> > sent via NDIS to/from LAN miniports (e.g. TCPIP packets sent to an
Ethernet
> > adapter).
> >
> > Take a look at "public\common\oak\utils\netlog" in the CE 4.2 PB source
> > tree. This demonstrates the use of the packet tx/rx hooks to create a
netmon
> > format log file of packets sent/received by a CE device. The sibling
> > directory "netlogctl" is a command line utility used to configure and
> > start/stop the capture.
> >
> > --
> > Jeff Kelley
> > Microsoft / Windows CE Networking
> >
> > This posting is provided AS IS with no warranties, and confers no
rights.
> >
> > "John Walker" <john_walker2020@yahoo.com> wrote in message
> > news:e544e0f9.0406220537.58f137cf@posting.google.com...
> > > "Jeff Kelley [MS]" <jeffkel@online.microsoft.com> wrote in message
> >  news:<40d73b96$1@news.microsoft.com>...
> > > > Inserting IM drivers between WAN miniports and PPP is not supported.
> > > >
> > > > --
> > > > Jeff Kelley
> > > > Microsoft / Windows CE Networking
> > > >
> > > > This posting is provided AS IS with no warranties, and confers no
> >  rights.
> > > >
> > > > "John Walker" <john_walker2020@yahoo.com> wrote in message
> > > > news:e544e0f9.0406211016.46c5ed26@posting.google.com...
> > > > > Hello all,
> > > > >
> > > > > This is my first time on this board as I believe I have come
> > > > > across a stump regarding this project I am working on.
> > > > >
> > > > > My situation is this. I have succesfully ported over passthru for
> > > > > WinCE(in this case for Pocket PC). And my IM driver is succesfully
> > > > > able to 'passthru' packets on the upper edge(TCPIP protocol) and
the
> > > > > loweredge drivers(ethernet card).
> > > > >
> > > > > My problem is I want to bind my driver between PPP and AsyncMac on
> > > > > the PPC. I ended up creating a new IM driver to handle the WAN
> > > > > interface of NDIS. I have succesfully sandwich myself between PPP
> > > > > and AsyncMac but when PPP sends a packet and my WANSendHandler is
> > > > > called I am not sure what to do next?
> > > > >
> > > > > Should I go ahead and repackage the NDIS_WAN_PACKET into a
> > > > > NDIS_PACKET and call NdisSend to AsyncMac? If so, how is this
> > > > > properly done? I do not consider myself a expert on NDIS as I am
> > > > > still new to this but any help would be greatly appreciated.
> > > > >
> > > > > Thanks
> > >
> > > If IM drivers between WAN miniports and PPP is not supported - how
> > > would one go about capturing the communication packets between PPP and
> > > AsyncMac?
> > >
> > > I have been able to resend my WAN_PACKET with NdisWanSend and it seems
> > > to work because my logging within my Protocol interface for receive is
> > > being called afterwords.  But I am unsure how to handle this case.
> > >
> > > Are you saying that there is no way to capture the communication
> > > packets between PPP and AsyncMac?


Relevant Pages


Quantcast