lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Nov 2008 17:33:41 +0100
From:	Krzysztof Halasa <khc@...waw.pl>
To:	Miguel Ángel Álvarez <gotzoncabanes@...il.com>
Cc:	"Francois Romieu" <romieu@...zoreil.com>, netdev@...r.kernel.org
Subject: Re: How to use ixp4xx_hss (or generic-hdlc?)

"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.

> 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).
-- 
Krzysztof Halasa
--
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