gBS->SignalEvent (RxData->RecycleSignal);\r
goto ON_EXIT;\r
}\r
-\r
- if (RxData->Header->Protocol != EFI_IP_PROTO_ICMP) {\r
- //\r
- // The protocol value in the header of the receveid packet should be EFI_IP_PROTO_ICMP.\r
- //\r
- gBS->SignalEvent (RxData->RecycleSignal);\r
- goto ON_EXIT;\r
- }\r
+ \r
+ //\r
+ // The protocol has been configured to only receive ICMP packet.\r
+ //\r
+ ASSERT (RxData->Header->Protocol == EFI_IP_PROTO_ICMP);\r
\r
Type = *((UINT8 *) RxData->FragmentTable[0].FragmentBuffer);\r
\r
goto ON_EXIT;\r
}\r
\r
- if (RxData->Header->NextHeader != IP6_ICMP) {\r
- //\r
- // The nextheader in the header of the receveid packet should be IP6_ICMP.\r
- //\r
- gBS->SignalEvent (RxData->RecycleSignal);\r
- goto ON_EXIT;\r
- }\r
+ //\r
+ // The protocol has been configured to only receive ICMP packet.\r
+ //\r
+ ASSERT (RxData->Header->NextHeader == IP6_ICMP);\r
\r
Type = *((UINT8 *) RxData->FragmentTable[0].FragmentBuffer);\r
\r