Re: arbitrary packets on an ethernet network



I use very limited microcontrollers (32kbyte rom, 1,5kbyte ram), and
it's quite difficult to implement a complete tcp/ip stack and have also
space for my application. So I'm thinking to use ethernet packets with a
user-defined protocol.

Did you take a look at uIP of Adam Dunkels?
This is a very minimalistic tcp/ip stack for old 8-bit-computers (e.g. Apple
II, C64) which takes only some hundred bytes of memory while executing and
has a very small memory footprint. You might be able to get the memory
requirements down to 520 bytes and the code size down to 5,3 kB.
But this environment isn't really good at doing ethernet in general... the
memory is too small, I think.

I'm doing some test with PCs; I'm using an ethernet packet generator
(packeth, packeth.sourceforge.net ) and a sniffer (wireshark); I put in
the ethernet header a random value (this value is 0800 for ip; 0806 for
arp; I put 8959, wireshark tells it's an unknown one).

8959h is not used yet (I looked at
http://www.iana.org/assignments/ethernet-numbers), so you shouldn't run into
problems.

The test packet is correctly sent by packeth and correctly received by
wireshark, and the other PCs on the network didn't complain about it,
even if the ethernet destination address was 'ffffffffffff', broadcast.

Ethernet headers are used to find out the protocol the packet transports, so
the OS can hand over the packet to the driver. If there is a packet with an
unknown protocol, the packet should be ignored. I think every OS reacts this
way, because there might be machines on the network which use a protocol not
understood by that particular system.

My question is: can I use with no problems my protocol? There are things
I should know? Some limitation I will run into? I have to use a
particular ethernet packet type?

If you don't use an assigned number, you should be safe. The limitations
you'll more come across are your tight memory constrains, I think. As long
as your Ethernet header is compliant, you shouldn't need to use some
particular body, because every protocol is different and as such the bodies
are also.

Regards,
Sebastian


.



Relevant Pages

  • Re: Sniffer Cant see cluster traffic
    ... > protocol and cluster specific multicast MAC address, ... > node specific source MAC address. ... > is a multi-cast packet or a directed packet. ... Yep and that is solely at the ethernet packet level. ...
    (comp.os.vms)
  • Is this windows media 2 normal , request by firewall
    ... Protocol: Raw Ethernet ... Ethernet II (Packet Length: 44) ... Address Resolution Protocol ... Outgoing Mail is AVG VIRUS FREE, checked by AVG 6.0 Checked by AVG anti-virus system. ...
    (microsoft.public.windowsmedia)
  • WMPLAYER2 ,Have I anything to worry about, as it wants my firewall to send this...
    ... Protocol: Raw Ethernet ... Ethernet II (Packet Length: 44) ... Address Resolution Protocol ... Outgoing Mail is AVG VIRUS FREE, checked by AVG 6.0 Checked by AVG anti-virus system. ...
    (microsoft.public.windowsmedia.player)
  • Re: CPU load due to IP networking
    ... Most TCP/IP stack use mbuf or chained buffers to ... separate memory for separate protocol layers. ... them realize this was impossible [hint: Ethernet is 10Mbps]. ... Small packet versus large packet protocols will affect figures. ...
    (comp.os.linux.networking)
  • Re: raw ethernet packets
    ... >> What do I need to do to process this packet at destination? ... > you can specify the protocol number when you create the socket. ... The protocol number specifies an *IP* protocol, not an Ethernet ...
    (comp.os.linux.development.system)