Questions on implementing protocol with different Ethertype

Discussion to talk about software related topics only.
Post Reply
sblair
Posts: 162
Joined: Mon Sep 12, 2011 1:54 pm

Questions on implementing protocol with different Ethertype

Post by sblair »

How difficult is it to implement a protocol using a different Ethertype on the Netburner platform? i.e. a different protocol below the IP level. I've taken for granted how easy the RTOS makes it for doing UDP/TCP packet communications. I'm faced with possibly needing to implement a proprietary protocol that is below the IP layer with a different Ethertype and just curious what experiences others here have had in doing that?

Thanks.
Scott
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: Questions on implementing protocol with different Ethert

Post by dciliske »

If my assumption is correct and you're asking about implementing a custom protocol ontop of Ethernet, but not IP. If so, it's pretty simple, though not quite as simple as it could be (isn't that most of the world?). Basically you'll want to modify the DoRX function in ethernet.cpp and add a handle of the form

Code: Select all

if ( cp[6] == MY_ETHER_TYPE )
   {
        ... Do stuff ....
   }
where 'Do stuff' either handles the received packet or hands it off appropriately. For transmitting, simply create the Ethernet packet and send it using TransmitBuffer, for the given interface.

Is that enough to get you started?
Dan Ciliske
Project Engineer
Netburner, Inc
Post Reply