Layer 2 802.3, RTCSCFG_LINKOPT_8023

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Layer 2 802.3, RTCSCFG_LINKOPT_8023

682 Views
kfranz
Contributor III

Per 8.3.10 of the MQXRTOS RTCS User's Guide, you can define RTCSCFG_LINKOPT_8023 to a '1' to:

"By default, RTCS sends and receives Ethernet II frames. Set this value to 1 (one) to have

RTCS send and receive both Ethernet 802.3 and Ethernet II frames."

There are also two setsockopt() commands, RTCS_SO_LINK_TX_8023 and RTCS_SO_LINK_TX_8023.

How do I use the above options to send/receive Layer 2, 802.3 packets? Where is there some example code?

Labels (1)
Tags (1)
0 Kudos
1 Reply

431 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi kfranz,

As you said, RTCSCFG_LINKOPT_8023 will enable IEEE 802.3 Ethernet frames transmission. You must set this macro in the user_config.h file that belongs to the board you are using. E.g. C:\Freescale\Freescale_MQX_4_2\config\frdmk64f\user_config.h and the rebuild BSP, PSP and RTCS.

pastedImage_2.png

On the other hand you can configure the sockets you create to Send Ethernet 802.3 Frames using setsockopt() with option RTCS_SO_LINK_TX_8023. You may call setsockopt() just once after creating the socket. The API is described in chapter 7.164 setsockopt().

For receiving Ethernet 802.3 Frames there is no option, RTCS_SO_LINK_RX_8023 is only used by function getsockopt() and it returns TRUE if last received frame was an 802.3 frame. Please note that returned information is for the last frame that the socket received.

In summary, settings RTCSCFG_LINKOPT_8023 macro in user_config.h and rebuilding the libraries must enable IEEE 802.3 transfers. This must be transparent for the user, if you search 8023 in tcp_send.c in the RTCS project you will see that there are some conditions that depend on this macro that affect the connection PCB. but at user level there is no difference.

Please give a try and let me know if you have any question.


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos