arbitrary packets on an ethernet network - Embedded

This is a discussion on arbitrary packets on an ethernet network - Embedded ; It's a little OT here but I think that some of you had ran in the same problem... 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: arbitrary packets on an ethernet network

  1. arbitrary packets on an ethernet network

    It's a little OT here but I think that some of you had ran in the same
    problem...

    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.

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

    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.

    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?

    Thanks in advance and sorry for my english.

    Best regards,
    BQ

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



  3. Re: arbitrary packets on an ethernet network

    Sebastian ha scritto:
    >> 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.


    [cut]
    >
    > 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
    >
    >


    This is my opinion too.
    thanks for your thoughts and advices Sebastian!

  4. Re: arbitrary packets on an ethernet network

    On Fri, 19 Jan 2007 10:12:23 GMT, BQ
    wrote:

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


    One option would be to build your own protocol upon UDP. The IP and
    UDP header overhead in the ethernet frame is quite small and you would
    avoid any future compatibility problems. For testing with any PC,
    standard socket programming could also be used.

    Paul


+ Reply to Thread