Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 09:20:54 -0700
From:      Kevin Oberman <kob6558@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        Ben Gray <ben.r.gray@gmail.com>, freebsd-net@freebsd.org
Subject:   Re: Test tools for new network driver
Message-ID:  <CAN6yY1vrbwNn4DTokMiK59T6eGaRHLvHxR%2B0LotekwBtHn8Uzw@mail.gmail.com>
In-Reply-To: <CAJ-VmokujPpBqjBBMffGvGZ%2BwRZwbtNYNn18-ngLd=3W0E-wcg@mail.gmail.com>
References:  <4E4E3522.6030207@gmail.com> <CAJ-VmokujPpBqjBBMffGvGZ%2BwRZwbtNYNn18-ngLd=3W0E-wcg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
 On Fri, Aug 19, 2011 at 4:00 AM, Adrian Chadd <adrian@freebsd.org> wrote:
> Cool!
>
> I don't think there's a random MAC address function call; I see
> homebrewed versions of those in various drivers. :)
>
> I'm not sure about a packet fuzz tester; but that sounds like it'd be
> a great addition to the tools/ directory.

/dev/random will do fine, but please be aware that the Ethernet
(actually 802.1) spec says
that the second bit on the wire (the bit after the "group address" bit
(better known as the
multicast) bit should be set for all "locally assigned" MAC addresses,
so you should OR the first byte if the address with 0x2.

This requirement is often overlooked and I don't think the MAC police
will haul you off to
jail(8) if you ignore it, but I do like to remind people that the rule
is there. (OK, I am probably a bit OCD.)

> On 19 August 2011 18:04, Ben Gray <ben.r.gray@gmail.com> wrote:
>> Hi,
>>
>>    I'm not sure if this the right list to post to, but here goes ...
>>
>>    I'm currently writing a driver for the SMSC LAN95xx range of USB to
>> Ethernet adapter chips
>> (http://www.smsc.com/index.php?tid=300&pid=135&tab=1). The basic RX/TX works
>> and now I'm trying to get the H/W checksum offload working, however I've
>> come across some problems with the H/W implementation, e.g. it doesn't work
>> with small (<64 byte) packets.
>>
>>    So I was wondering if anyone knows of any test tools I can use to fire
>> all the different unusual sort of packets at the interface to see how the
>> H/W csum reacts, i.e. runt packets, packets with IP options, IPv6 packets
>> with extension headers, etc.
>>
>>    Another question I had was; is there a kernel function to generate a
>> random MAC address ? Or is there a FreeBSD (or FOSS equivalent) Ethernet
>> manufacturer ID I could use for randomly generated MAC addresses ?
>>
>>    The primarily purpose is for the range of Texas Instruments ARM
>> development boards (Pandaboard & Beagleboard), however there does exist at
>> least one USB dongle you can buy for the PC which uses this chipset.
>>
>> Thanks in advance,
>> Ben

-- 
R. Kevin Oberman, Network Engineer - Retired
E-mail: kob6558@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1vrbwNn4DTokMiK59T6eGaRHLvHxR%2B0LotekwBtHn8Uzw>