[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b0438a630811242324n6988a7eeq13368f6113082a1b@mail.gmail.com>
Date: Tue, 25 Nov 2008 08:24:35 +0100
From: "Miguel Ángel Álvarez" <gotzoncabanes@...il.com>
To: "Krzysztof Halasa" <khc@...waw.pl>
Cc: "Francois Romieu" <romieu@...zoreil.com>, netdev@...r.kernel.org
Subject: Re: How to use ixp4xx_hss (or generic-hdlc?)
Hi
2008/11/24 Krzysztof Halasa <khc@...waw.pl>:
> "Miguel Ángel Álvarez" <gotzoncabanes@...il.com> writes:
>
>> I am not sure of having understood you. The buffer I send using sendto
>> should be just the payload and the generic-hdlc (or the hardware)
>> encapsulates it in an hdlc frame, or should I prepare the whole
>> frame?
>
> You sendto() the payload, but what is a payload?
>
> With a normal HDLC hw driver, it (and the hardware) will generate the
> flag sequences, will do bit-(de)stuffing, will calculate and check the
> checksums, residual bits, aborts etc.
>
> You usually have to add 32-bit header: u8 address (broadcast,
> multicast, unicast) and control (such as unnumbered frame type), and
> u16 protocol number (IPv4, IPv6 etc, LCP/IPCP, Cisco keepalive etc).
> That's why it's called "raw HDLC", you're dealing with raw HDLC
> packets.
>
You are right... I was being quite simplistic.
>> I took a little different approach, using the same PF_PACKET socket to
>> obtain the ifr_ifindex, but in any case using your method or "my"
>> method, and activating the debugging in ixp4xx_hss, when I do a two
>> byte (0x30 0x31) sendto, the traces in debug_pkt give me:
>>
>> 1970/01/01,00:00:47 (none) user.debug kernel: hdlc0: hss_hdlc_xmit(2)
>> <7> 30<7>31<7>
>
> It should do just that (those '<7>' are weird, though).
Yes... I do not know where they can from, but I am 100% sure it is
only representation of the printk.
Thanks a lot. Things are much clear now.
Miguel Ángel Álvarez
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists