netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: "Miguel Ángel Álvarez" <gotzoncabanes@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: How to use ixp4xx_hss (or generic-hdlc?)
Date: Sat, 22 Nov 2008 00:09:50 +0100	[thread overview]
Message-ID: <m3bpw8smkh.fsf@maximus.localdomain> (raw)
In-Reply-To: <b0438a630811200942nac803a4hb0c054bf28195cb3@mail.gmail.com> ("Miguel Ángel Álvarez"'s message of "Thu\, 20 Nov 2008 18\:42\:52 +0100")

"Miguel Ángel Álvarez" <gotzoncabanes@gmail.com> writes:

> Is there any kind of tutorials on using generic-hdlc interfaces?

Not much, Documentation/networking/generic-hdlc.txt.

> I
> just want to make a simple point-to-point connection between two
> devices using ixp4xx_hss. I would like the data to be packetized using
> hdlc.
> -  I suppose I should use sethdlc to configure the interface, but I am
> not sure about the configuration except that I should set "hdlc"
> protocol (I hope).

Sure.

> - Then I should "open" the interface. I am trying with "ifconfig hdlc0
> up", but I obtain an "ifconfig: SIOCSIFFLAGS: Function not
> implemented". As my previous use of net devices has been using
> ethernet or wifi devices in an "IP world", I am not quite sure if
> ifconfig should be used in this case.

modprobe driver and maybe hdlc_raw
sethdlc hdlc0 hdlc
ifconfig hdlc0 up should work fine.

> - Then I hope that I should open a raw (SOCK_RAW) PF_PACKET socket
> with protocol IPPROTO_RAW? I am not using IP, so this does not seem to
> be the correct protocol, but...

Seems entirely correct.

> - And the address to sendto the data? Should it be formed just using
> the name of the interface or it requires more data?

No, all data is sent to the other end :-)

> Thanks. I know these should be really newbie questions, but I am
> finding difficult to know how to manage a "serial" device using a
> netdev interface.

Actually it's a bit different than normal async serial ports - HDLC
means packets.
-- 
Krzysztof Halasa

      parent reply	other threads:[~2008-11-21 23:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20 17:42 How to use ixp4xx_hss (or generic-hdlc?) Miguel Ángel Álvarez
2008-11-20 22:24 ` Francois Romieu
2008-11-21  8:18   ` Miguel Ángel Álvarez
2008-11-21 23:28     ` Krzysztof Halasa
2008-11-24  9:56       ` Miguel Ángel Álvarez
2008-11-24 16:33         ` Krzysztof Halasa
2008-11-25  7:24           ` Miguel Ángel Álvarez
2008-11-21 23:09 ` Krzysztof Halasa [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=m3bpw8smkh.fsf@maximus.localdomain \
    --to=khc@pm.waw.pl \
    --cc=gotzoncabanes@gmail.com \
    --cc=netdev@vger.kernel.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).