Re: arbitrary packets on an ethernet network
- From: "Sebastian" <bastisoft@xxxxxxxx>
- Date: Fri, 19 Jan 2007 16:09:43 +0100
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
.
- Follow-Ups:
- References:
- Prev by Date: Re: Tasklet questions
- Next by Date: Re: arbitrary packets on an ethernet network
- Previous by thread: arbitrary packets on an ethernet network
- Next by thread: Re: arbitrary packets on an ethernet network
- Index(es):
Relevant Pages
|
|