linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: andrew may <acmay@acmay.homeip.net>
To: Goddeeris Frederic <Frederic.Goddeeris@siemens.atea.be>
Cc: "'linuxppc-embedded@lists.linuxppc.org'"
	<linuxppc-embedded@lists.linuxppc.org>
Subject: Re: HDLC - Char or Network driver?
Date: Sat, 15 Sep 2001 14:43:58 -0700	[thread overview]
Message-ID: <20010915144358.A6415@ecam.san.rr.com> (raw)
In-Reply-To: <6B546A602AD2D211BFF00008C7A42889041D6BE9@hrtades2.atea.be>


On Fri, Sep 14, 2001 at 06:31:30PM +0200, Goddeeris Frederic wrote:
>
> Hi,
>
> I need to exchange data between an MPC860 and other components over an HDLC
> bus. I found a "PPP over HDLC" driver for the MPC850. Out of this I made a
> (quick and dirty) new driver for HDLC and it seems to work so I will be able
> to make a nice driver out of this but I am unsure whether this needs to be
> char driver of a network driver.
>
> From an application I need to send and receive native HDLC packets, so no
> additional protocol is needed.
>
> All examples and documents I find about network-drivers are so IP-related. A
> network driver registers itself but how can an application reach it? An
> Ethernet driver seems to be linked to the TCP/IP stack by using ifconfig.
> But what about an HDLC driver for example?

This would be better on a netdev mailling list.

look at linux/if_ether.h and pick a type from there or a number that won't
class with anything else you use. In the driver you will key off of skb->protocol
with that number and then at the app level you will use raw sockets bound to the
same protocol. ETH_P_WAN_PPP may be a good choice.

Look at drivers/wan/*.c in how the skb is setup before netif_rx. Also look at
hardheader functions if you want. They can be left out.

There should be plenty of examples of raw socket code. Even if it is IP based
it will show you how to use them to get raw packets down to and from the driver.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

      reply	other threads:[~2001-09-15 21:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-14 16:31 HDLC - Char or Network driver? Goddeeris Frederic
2001-09-15 21:43 ` andrew may [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010915144358.A6415@ecam.san.rr.com \
    --to=acmay@acmay.homeip.net \
    --cc=Frederic.Goddeeris@siemens.atea.be \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).