AnsweredAssumed Answered

Is protocol type limited to 8 bit in socket creation?

Question asked by zekelandon on Apr 20, 2020
Latest reply on Apr 22, 2020 by Kerry Zhou

Hi There,

 

I am Zeke, working on sample projects to understand the capability of NXP MIMXRT1064 board and FreeRTOS. In this process, I was creating a raw socket with custom protocol say 0xFFFF (more than 8 bits). In case of raw socket, netconn_new_with_proto_and_callback() method typecasts the protocol to uint8_t hence I am losing 8 bits in my protocol type thus resulting in different one than I intended.

 

Protocol intended: 0xFFFF

Protocol created:  0xFF (lost 8 bits in typecasting)

 

Is this a limitation? Or there exists a way to handle protocol type of more than 8 bits in raw socket?

 

Regards,

Zeke

Outcomes