Karl Reichert wrote: > Jan Kiszka wrote: >> Karl Reichert wrote: >>> Hi, >>> >>> have again a small question concerning rt data frames: >>> Which EtherType do they have, if no upper protocol (like IP) is >> following? I'm talking about the case, that just plain payload data is in >> payload >> part of ethernet frame (raw packet access). >>> As I saw in rtnet/examples/xenomai/posix/raw-ethernet.c, EtherType is >> 0x1234. Is this the 'offical' type for plain data in RTnet or is it just sth >> I can choose on my own (with respect to collision with already given >> EtherTypes, like 0x0800 for IP). >> >> You may choose 0x0815 or 0x4711 as well :), ie. the type is up to the >> user minus those types that are otherwise present on the real-time >> network segment (eg. RTmac, RTcfg, or IPv4/ARP). >> >> Jan >> > And how does the receiver knows which size my payload has? Every > Ethernetframe consists at least of 64 Byte, so I send a payload of 5 Byte, he > always gets 50 Bytes of Payload. > I could use the EtherType field as a Length field, as made by Novell (IPX). > But I think this isn't working, because how does the receiver app get's the > data then - socket() wnats to know the protocol. > > Conclusion: I have to define my EtherType (like 0x1234) and start my data > with a length field. > > Right? Or any other way I don't see yet?
Yes, you have to take care for defining the packet length implicitly (via the Ethernet type if it's fixed) or explicitly (via some frame field) - just like any other protocol over Ethernet does (including IPX, by the way). Jan
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users