File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1360,7 +1360,7 @@ void FreeRTOS_ReleaseUDPPayloadBuffer( void const * pvBuffer )
13601360
13611361 /* Fill in the basic header information. */
13621362 pxICMPHeader -> ucTypeOfMessage = ipICMP_ECHO_REQUEST ;
1363- pxICMPHeader -> ucCode = 0 ;
1363+ pxICMPHeader -> ucTypeOfService = 0 ;
13641364 pxICMPHeader -> usIdentifier = usSequenceNumber ;
13651365 pxICMPHeader -> usSequenceNumber = usSequenceNumber ;
13661366
Original file line number Diff line number Diff line change 813813
814814 /* Fill in the basic header information. */
815815 pxICMPHeader -> ucTypeOfMessage = ipICMP_PING_REQUEST_IPv6 ;
816- pxICMPHeader -> ucCode = 0 ;
816+ pxICMPHeader -> ucTypeOfService = 0 ;
817817 pxICMPHeader -> usIdentifier = FreeRTOS_htons ( usSequenceNumber );
818818 pxICMPHeader -> usSequenceNumber = FreeRTOS_htons ( usSequenceNumber );
819819
11471147 if ( xCompare == 0 )
11481148 {
11491149 pxICMPHeader_IPv6 -> ucTypeOfMessage = ipICMP_NEIGHBOR_ADVERTISEMENT_IPv6 ;
1150- pxICMPHeader_IPv6 -> ucCode = 0U ;
1150+ pxICMPHeader_IPv6 -> ucTypeOfService = 0U ;
11511151 pxICMPHeader_IPv6 -> ulReserved = ndICMPv6_FLAG_SOLICITED | ndICMPv6_FLAG_UPDATE ;
11521152 pxICMPHeader_IPv6 -> ulReserved = FreeRTOS_htonl ( pxICMPHeader_IPv6 -> ulReserved );
11531153
12801280
12811281 uxICMPSize = sizeof ( ICMPHeader_IPv6_t );
12821282 pxICMPHeader_IPv6 -> ucTypeOfMessage = ipICMP_NEIGHBOR_ADVERTISEMENT_IPv6 ;
1283- pxICMPHeader_IPv6 -> ucCode = 0 ;
1283+ pxICMPHeader_IPv6 -> ucTypeOfService = 0 ;
12841284 pxICMPHeader_IPv6 -> ulReserved = ndICMPv6_FLAG_SOLICITED | ndICMPv6_FLAG_UPDATE ;
12851285 pxICMPHeader_IPv6 -> ulReserved = FreeRTOS_htonl ( pxICMPHeader_IPv6 -> ulReserved );
12861286
Original file line number Diff line number Diff line change 461461 FreeRTOS_printf ( ( "vReceiveRA: Error: ucHopLimit equals %u\n" , ( unsigned ) pxICMPPacket -> xIPHeader .ucHopLimit ) );
462462 iptraceRA_DISCARDED ( "hop limit is not 255" );
463463 }
464- else if ( pxAdvertisement -> ucCode != 0U )
464+ else if ( pxAdvertisement -> ucTypeOfservice != 0U )
465465 {
466- FreeRTOS_printf ( ( "vReceiveRA: Error: ICMP Code = %u\n" , ( unsigned ) pxAdvertisement -> ucCode ) );
466+ FreeRTOS_printf ( ( "vReceiveRA: Error: ICMP Code = %u\n" , ( unsigned ) pxAdvertisement -> ucTypeOfservice ) );
467467 iptraceRA_DISCARDED ( "ICMP code is not zero" );
468468 }
469469
479479 {
480480 FreeRTOS_printf ( ( "RA: Type %02x Code %02x Checksum %04x Hops %d Flags %02x Life %d\n" ,
481481 pxAdvertisement -> ucTypeOfMessage ,
482- pxAdvertisement -> ucCode ,
482+ pxAdvertisement -> ucTypeOfservice ,
483483 FreeRTOS_ntohs ( pxAdvertisement -> usChecksum ),
484484 pxAdvertisement -> ucHopLimit ,
485485 pxAdvertisement -> ucFlags ,
Original file line number Diff line number Diff line change @@ -480,11 +480,6 @@ extern NetworkBufferDescriptor_t * pxNDWaitingNetworkBuffer;
480480
481481 #define FOnUdpSent FOnUDPSent_t
482482 #define FOnTcpSent FOnTCPSent_t
483-
484- /* The ICMP header field holding the Code byte was named ucTypeOfService until
485- * October 2026. ICMP has no Type-of-Service field, so it is now ucCode, matching
486- * RFC 792 and RFC 4443. No other struct has a ucTypeOfService member, so aliasing
487- * the old name keeps application and port code compiling. */
488483 #define ucTypeOfService ucCode
489484#endif /* ipconfigENABLE_BACKWARD_COMPATIBILITY */
490485
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ typedef struct xARP_HEADER ARPHeader_t;
138138struct xICMP_HEADER
139139{
140140 uint8_t ucTypeOfMessage ; /**< The ICMP type 0 + 1 = 1 */
141- uint8_t ucCode ; /**< The ICMP code field 1 + 1 = 2 */
141+ uint8_t ucTypeOfService ; /**< The ICMP subtype 1 + 1 = 2 */
142142 uint16_t usChecksum ; /**< The checksum of whole ICMP packet 2 + 2 = 4 */
143143 uint16_t usIdentifier ; /**< Used in some types of ICMP 4 + 2 = 6 */
144144 uint16_t usSequenceNumber ; /**< Used in some types of ICMP 6 + 2 = 8 */
@@ -150,7 +150,7 @@ typedef struct xICMP_HEADER ICMPHeader_t;
150150struct xICMPHeader_IPv6
151151{
152152 uint8_t ucTypeOfMessage ; /**< The message type. 0 + 1 = 1 */
153- uint8_t ucCode ; /**< The code field. 1 + 1 = 2 */
153+ uint8_t ucTypeOfService ; /**< Type of service. 1 + 1 = 2 */
154154 uint16_t usChecksum ; /**< Checksum. 2 + 2 = 4 */
155155 uint32_t ulReserved ; /**< Reserved. 4 + 4 = 8 */
156156 IPv6_Address_t xIPv6Address ; /**< The IPv6 address. 8 + 16 = 24 */
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ typedef struct xIP_EXT_HEADER_IPv6 IPExtHeader_IPv6_t;
162162struct xICMPEcho_IPv6
163163{
164164 uint8_t ucTypeOfMessage ; /**< The message type. 0 + 1 = 1 */
165- uint8_t ucCode ; /**< Code field. 1 + 1 = 2 */
165+ uint8_t ucTypeOfService ; /**< Type of service. 1 + 1 = 2 */
166166 uint16_t usChecksum ; /**< Checksum. 2 + 2 = 4 */
167167 uint16_t usIdentifier ; /**< Identifier. 4 + 2 = 6 */
168168 uint16_t usSequenceNumber ; /**< Sequence number. 6 + 2 = 8 */
@@ -174,7 +174,7 @@ typedef struct xICMPEcho_IPv6 ICMPEcho_IPv6_t;
174174struct xICMPRouterSolicitation_IPv6
175175{
176176 uint8_t ucTypeOfMessage ; /**< 0 + 1 = 1 */
177- uint8_t ucCode ; /**< 1 + 1 = 2 */
177+ uint8_t ucTypeOfService ; /**< 1 + 1 = 2 */
178178 uint16_t usChecksum ; /**< 2 + 2 = 4 */
179179 uint32_t ulReserved ; /**< 4 + 4 = 8 */
180180}
@@ -185,7 +185,7 @@ typedef struct xICMPRouterSolicitation_IPv6 ICMPRouterSolicitation_IPv6_t;
185185struct xICMPRouterAdvertisement_IPv6
186186{
187187 uint8_t ucTypeOfMessage ; /* 0 + 1 = 1 */
188- uint8_t ucCode ; /* 1 + 1 = 2 */
188+ uint8_t ucTypeOfService ; /* 1 + 1 = 2 */
189189 uint16_t usChecksum ; /* 2 + 2 = 4 */
190190 uint8_t ucHopLimit ; /* 4 + 1 = 5 */
191191 uint8_t ucFlags ; /* 5 + 1 = 6 */
Original file line number Diff line number Diff line change @@ -1170,7 +1170,7 @@ void test_FreeRTOS_SendPingRequest_HappyPath( void )
11701170
11711171 TEST_ASSERT_EQUAL ( 1 , xReturn );
11721172 TEST_ASSERT_EQUAL ( 8 /* ipICMP_ECHO_REQUEST */ , pxICMPHeader -> ucTypeOfMessage );
1173- TEST_ASSERT_EQUAL ( 0 , pxICMPHeader -> ucCode );
1173+ TEST_ASSERT_EQUAL ( 0 , pxICMPHeader -> ucTypeOfService );
11741174 TEST_ASSERT_EQUAL ( 1 , pxICMPHeader -> usIdentifier );
11751175 TEST_ASSERT_EQUAL ( 1 , pxICMPHeader -> usSequenceNumber );
11761176 TEST_ASSERT_EQUAL ( ipIPv4_FRAME_TYPE , pxEthernetHeader -> usFrameType );
@@ -1221,7 +1221,7 @@ void test_FreeRTOS_SendPingRequest_SendingToIPTaskFails( void )
12211221
12221222 TEST_ASSERT_EQUAL ( pdFAIL , xReturn );
12231223 TEST_ASSERT_EQUAL ( 8 /* ipICMP_ECHO_REQUEST */ , pxICMPHeader -> ucTypeOfMessage );
1224- TEST_ASSERT_EQUAL ( 0 , pxICMPHeader -> ucCode );
1224+ TEST_ASSERT_EQUAL ( 0 , pxICMPHeader -> ucTypeOfService );
12251225 TEST_ASSERT_EQUAL ( 1 , pxICMPHeader -> usIdentifier );
12261226 TEST_ASSERT_EQUAL ( 1 , pxICMPHeader -> usSequenceNumber );
12271227 TEST_ASSERT_EQUAL ( ipIPv4_FRAME_TYPE , pxEthernetHeader -> usFrameType );
Original file line number Diff line number Diff line change @@ -1738,7 +1738,7 @@ void test_prvProcessICMPMessage_IPv6_NeighborSolicitation( void )
17381738
17391739 TEST_ASSERT_EQUAL ( eReturn , eReleaseBuffer );
17401740 TEST_ASSERT_EQUAL ( pxICMPHeader_IPv6 -> ucTypeOfMessage , ipICMP_NEIGHBOR_ADVERTISEMENT_IPv6 );
1741- TEST_ASSERT_EQUAL ( pxICMPHeader_IPv6 -> ucCode , 0U );
1741+ TEST_ASSERT_EQUAL ( pxICMPHeader_IPv6 -> ucTypeOfService , 0U );
17421742 TEST_ASSERT_EQUAL ( pxICMPHeader_IPv6 -> ucOptionType , ndICMP_TARGET_LINK_LAYER_ADDRESS );
17431743 TEST_ASSERT_EQUAL ( pxICMPHeader_IPv6 -> ucOptionLength , 1U );
17441744 TEST_ASSERT_EQUAL_MEMORY ( pxICMPHeader_IPv6 -> ucOptionBytes , xEndPoint .xMACAddress .ucBytes , sizeof ( MACAddress_t ) );
Original file line number Diff line number Diff line change @@ -614,7 +614,7 @@ void test_vReceiveRA_NonZeroICMPCode( void )
614614 prvBuildAcceptableRA ( pxNetworkBuffer , & xICMPPacket , & xInterface );
615615
616616 /* Any code other than zero must be rejected. */
617- xICMPPacket .xAdvertisement .ucCode = 1U ;
617+ xICMPPacket .xAdvertisement .ucTypeOfService = 1U ;
618618
619619 vReceiveRA ( pxNetworkBuffer );
620620}
You can’t perform that action at this time.
0 commit comments