On Tue, Oct 24, 2006 at 06:34:55PM +0200, Karel Kulhavy wrote:
> How do I do this C call taken from a Linux program on OpenBSD?
> 
> socket(PF_PACKET, SOCK_RAW, htons(0x4254))
> 
> man socket on OpenBSD offers AF_ISO (ISO protocols) which sounds like it
> could be access to individual ISO stack layers including layer 2? However
> the string ISO is not mentioned anywhere else in the manual page so the
> documentation on this seems to be missing (completeness of manual pages,
> hee, OpenBSD?)
> 

AF_ISO is no longer. Somebody forgot to clean the man pages after sending
the netiso stack to the attic. Btw. AF_ISO was an implementation of the
OSI/ISO network stack and has nothing to do with layer 2.

> "The types SOCK_RAW, which is available only to the superuser, and SOCK_RDM,
> which is planned, but not yet implemented, are not described here."
> 
> Is SOCK_RAW described anywhere else in the OpenBSD manpages? If yes, where?
> 

ip(4) and ip6(4).

> The SEE ALSO section doesn't also contain any entries which would evoke
> relation to AF_ISO or SOCK_RAW.
> 
> I basically need to fill in my own Ethernet frame, including DST and SRC MAC,
> with 3 possible patterns - random data, all zeroes, or alternating 01010101,
> and send lots of packets of this type. Then calculate from ifconfig how many
> were received on loopback and calculate bit error rate of the link for
> different electrical frequencies occuring in the data stream.
> 

Sounds like you are implementing a BER tester. You should use bpf(4) for
this as it gives you direct access to the device.

-- 
:wq Claudio

PS: I could use a BER tester from time to time as well :)

Reply via email to