TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip6Icmp.c
Go to the documentation of this file.
1
11#include "Ip6Impl.h"
12
13EFI_IP6_ICMP_TYPE mIp6SupportedIcmp[23] = {
14 {
17 },
18 {
20 ICMP_V6_COMM_PROHIBITED
21 },
22 {
24 ICMP_V6_BEYOND_SCOPE
25 },
26 {
28 ICMP_V6_ADDR_UNREACHABLE
29 },
30 {
32 ICMP_V6_PORT_UNREACHABLE
33 },
34 {
36 ICMP_V6_SOURCE_ADDR_FAILED
37 },
38 {
40 ICMP_V6_ROUTE_REJECTED
41 },
42
43 {
44 ICMP_V6_PACKET_TOO_BIG,
45 ICMP_V6_DEFAULT_CODE
46 },
47
48 {
49 ICMP_V6_TIME_EXCEEDED,
51 },
52 {
53 ICMP_V6_TIME_EXCEEDED,
54 ICMP_V6_TIMEOUT_REASSEMBLE
55 },
56
57 {
58 ICMP_V6_PARAMETER_PROBLEM,
60 },
61 {
62 ICMP_V6_PARAMETER_PROBLEM,
63 ICMP_V6_UNRECOGNIZE_NEXT_HDR
64 },
65 {
66 ICMP_V6_PARAMETER_PROBLEM,
67 ICMP_V6_UNRECOGNIZE_OPTION
68 },
69
70 {
72 ICMP_V6_DEFAULT_CODE
73 },
74 {
75 ICMP_V6_ECHO_REPLY,
76 ICMP_V6_DEFAULT_CODE
77 },
78
79 {
80 ICMP_V6_LISTENER_QUERY,
81 ICMP_V6_DEFAULT_CODE
82 },
83 {
84 ICMP_V6_LISTENER_REPORT,
85 ICMP_V6_DEFAULT_CODE
86 },
87 {
88 ICMP_V6_LISTENER_REPORT_2,
89 ICMP_V6_DEFAULT_CODE
90 },
91 {
92 ICMP_V6_LISTENER_DONE,
93 ICMP_V6_DEFAULT_CODE
94 },
95
96 {
97 ICMP_V6_ROUTER_SOLICIT,
98 ICMP_V6_DEFAULT_CODE
99 },
100 {
101 ICMP_V6_ROUTER_ADVERTISE,
102 ICMP_V6_DEFAULT_CODE
103 },
104 {
105 ICMP_V6_NEIGHBOR_SOLICIT,
106 ICMP_V6_DEFAULT_CODE
107 },
108 {
109 ICMP_V6_NEIGHBOR_ADVERTISE,
110 ICMP_V6_DEFAULT_CODE
111 },
112};
113
129 IN IP6_SERVICE *IpSb,
130 IN EFI_IP6_HEADER *Head,
131 IN NET_BUF *Packet
132 )
133{
135 NET_BUF *Data;
136 EFI_STATUS Status;
137 EFI_IP6_HEADER ReplyHead;
138
139 Status = EFI_OUT_OF_RESOURCES;
140 //
141 // make a copy the packet, it is really a bad idea to
142 // send the MNP's buffer back to MNP.
143 //
144 Data = NetbufDuplicate (Packet, NULL, IP6_MAX_HEADLEN);
145 if (Data == NULL) {
146 goto Exit;
147 }
148
149 //
150 // Change the ICMP type to echo reply, exchange the source
151 // and destination, then send it. The source is updated to
152 // use specific destination. See RFC1122. SRR/RR option
153 // update is omitted.
154 //
155 Icmp = (IP6_ICMP_INFORMATION_HEAD *)NetbufGetByte (Data, 0, NULL);
156 if (Icmp == NULL) {
157 NetbufFree (Data);
158 goto Exit;
159 }
160
161 Icmp->Head.Type = ICMP_V6_ECHO_REPLY;
162 Icmp->Head.Checksum = 0;
163
164 //
165 // Generate the IPv6 basic header
166 // If the Echo Reply is a response to a Echo Request sent to one of the node's unicast address,
167 // the Source address of the Echo Reply must be the same address.
168 //
169 ZeroMem (&ReplyHead, sizeof (EFI_IP6_HEADER));
170
171 ReplyHead.PayloadLength = HTONS ((UINT16)(Packet->TotalSize));
172 ReplyHead.NextHeader = IP6_ICMP;
173 ReplyHead.HopLimit = IpSb->CurHopLimit;
174 IP6_COPY_ADDRESS (&ReplyHead.DestinationAddress, &Head->SourceAddress);
175
176 if (Ip6IsOneOfSetAddress (IpSb, &Head->DestinationAddress, NULL, NULL)) {
177 IP6_COPY_ADDRESS (&ReplyHead.SourceAddress, &Head->DestinationAddress);
178 }
179
180 //
181 // If source is unspecified, Ip6Output will select a source for us
182 //
183 Status = Ip6Output (
184 IpSb,
185 NULL,
186 NULL,
187 Data,
188 &ReplyHead,
189 NULL,
190 0,
192 NULL
193 );
194
195Exit:
196 NetbufFree (Packet);
197 return Status;
198}
199
220 IN IP6_SERVICE *IpSb,
221 IN EFI_IP6_HEADER *Head,
222 IN NET_BUF *Packet
223 )
224{
226 UINT32 Mtu;
227 IP6_ROUTE_ENTRY *RouteEntry;
228 EFI_IPv6_ADDRESS *DestAddress;
229
230 NetbufCopy (Packet, 0, sizeof (Icmp), (UINT8 *)&Icmp);
231 Mtu = NTOHL (Icmp.Fourth);
232 DestAddress = &Icmp.IpHead.DestinationAddress;
233
234 if (Mtu < IP6_MIN_LINK_MTU) {
235 //
236 // Normally the multicast address is considered to be on-link and not recorded
237 // in route table. Here it is added into the table since the MTU information
238 // need be recorded.
239 //
240 if (IP6_IS_MULTICAST (DestAddress)) {
241 RouteEntry = Ip6CreateRouteEntry (DestAddress, 128, NULL);
242 if (RouteEntry == NULL) {
243 NetbufFree (Packet);
244 return EFI_OUT_OF_RESOURCES;
245 }
246
247 RouteEntry->Flag = IP6_DIRECT_ROUTE | IP6_PACKET_TOO_BIG;
248 InsertHeadList (&IpSb->RouteTable->RouteArea[128], &RouteEntry->Link);
249 IpSb->RouteTable->TotalNum++;
250 } else {
251 RouteEntry = Ip6FindRouteEntry (IpSb->RouteTable, DestAddress, NULL);
252 if (RouteEntry == NULL) {
253 NetbufFree (Packet);
254 return EFI_NOT_FOUND;
255 }
256
257 RouteEntry->Flag = RouteEntry->Flag | IP6_PACKET_TOO_BIG;
258
259 Ip6FreeRouteEntry (RouteEntry);
260 }
261 }
262
263 NetbufFree (Packet);
264 return EFI_SUCCESS;
265}
266
282 IN IP6_SERVICE *IpSb,
283 IN EFI_IP6_HEADER *Head,
284 IN NET_BUF *Packet
285 )
286{
288
289 //
290 // Check the validity of the packet
291 //
292 if (Packet->TotalSize < sizeof (Icmp)) {
293 goto DROP;
294 }
295
296 NetbufCopy (Packet, 0, sizeof (Icmp), (UINT8 *)&Icmp);
297 if (Icmp.Head.Type == ICMP_V6_PACKET_TOO_BIG) {
298 return Ip6ProcessPacketTooBig (IpSb, Head, Packet);
299 }
300
301 //
302 // Notify the upper-layer process that an ICMPv6 error message is received.
303 //
304 IP6_GET_CLIP_INFO (Packet)->Status = EFI_ICMP_ERROR;
305 return Ip6Demultiplex (IpSb, Head, Packet);
306
307DROP:
308 NetbufFree (Packet);
309 Packet = NULL;
310 return EFI_INVALID_PARAMETER;
311}
312
331 IN IP6_SERVICE *IpSb,
332 IN EFI_IP6_HEADER *Head,
333 IN NET_BUF *Packet
334 )
335{
337 EFI_STATUS Status;
338
339 NET_CHECK_SIGNATURE (IpSb, IP6_SERVICE_SIGNATURE);
340 NET_CHECK_SIGNATURE (Packet, NET_BUF_SIGNATURE);
341 ASSERT (Head != NULL);
342
343 NetbufCopy (Packet, 0, sizeof (Icmp), (UINT8 *)&Icmp);
344 Status = EFI_INVALID_PARAMETER;
345
346 switch (Icmp.Head.Type) {
348 //
349 // If ICMPv6 echo, reply it
350 //
351 if (Icmp.Head.Code == 0) {
352 Status = Ip6IcmpReplyEcho (IpSb, Head, Packet);
353 }
354
355 break;
356 case ICMP_V6_LISTENER_QUERY:
357 Status = Ip6ProcessMldQuery (IpSb, Head, Packet);
358 break;
359 case ICMP_V6_LISTENER_REPORT:
360 case ICMP_V6_LISTENER_REPORT_2:
361 Status = Ip6ProcessMldReport (IpSb, Head, Packet);
362 break;
363 case ICMP_V6_NEIGHBOR_SOLICIT:
364 Status = Ip6ProcessNeighborSolicit (IpSb, Head, Packet);
365 break;
366 case ICMP_V6_NEIGHBOR_ADVERTISE:
367 Status = Ip6ProcessNeighborAdvertise (IpSb, Head, Packet);
368 break;
369 case ICMP_V6_ROUTER_ADVERTISE:
370 Status = Ip6ProcessRouterAdvertise (IpSb, Head, Packet);
371 break;
372 case ICMP_V6_REDIRECT:
373 Status = Ip6ProcessRedirect (IpSb, Head, Packet);
374 break;
375 case ICMP_V6_ECHO_REPLY:
376 Status = Ip6Demultiplex (IpSb, Head, Packet);
377 break;
378 default:
379 Status = EFI_INVALID_PARAMETER;
380 break;
381 }
382
383 return Status;
384}
385
403 IN IP6_SERVICE *IpSb,
404 IN EFI_IP6_HEADER *Head,
405 IN NET_BUF *Packet
406 )
407{
408 IP6_ICMP_HEAD Icmp;
409 UINT16 PseudoCheckSum;
410 UINT16 CheckSum;
411
412 //
413 // Check the validity of the incoming packet.
414 //
415 if (Packet->TotalSize < sizeof (Icmp)) {
416 goto DROP;
417 }
418
419 NetbufCopy (Packet, 0, sizeof (Icmp), (UINT8 *)&Icmp);
420
421 //
422 // Make sure checksum is valid.
423 //
424 PseudoCheckSum = NetIp6PseudoHeadChecksum (
425 &Head->SourceAddress,
426 &Head->DestinationAddress,
427 IP6_ICMP,
428 Packet->TotalSize
429 );
430 CheckSum = (UINT16) ~NetAddChecksum (PseudoCheckSum, NetbufChecksum (Packet));
431 if (CheckSum != 0) {
432 goto DROP;
433 }
434
435 //
436 // According to the packet type, call corresponding process
437 //
438 if (Icmp.Type <= ICMP_V6_ERROR_MAX) {
439 return Ip6ProcessIcmpError (IpSb, Head, Packet);
440 } else {
441 return Ip6ProcessIcmpInformation (IpSb, Head, Packet);
442 }
443
444DROP:
445 NetbufFree (Packet);
446 return EFI_INVALID_PARAMETER;
447}
448
459VOID
461 IN UINT8 PrefixLength,
462 IN OUT EFI_IPv6_ADDRESS *Prefix
463 )
464{
465 UINT8 Byte;
466 UINT8 Bit;
467 UINT8 Mask;
468 UINT8 Value;
469
470 ASSERT ((Prefix != NULL) && (PrefixLength < IP6_PREFIX_MAX));
471
472 if (PrefixLength == 0) {
473 ZeroMem (Prefix, sizeof (EFI_IPv6_ADDRESS));
474 return;
475 }
476
477 if (PrefixLength >= IP6_PREFIX_MAX) {
478 return;
479 }
480
481 Byte = (UINT8)(PrefixLength / 8);
482 Bit = (UINT8)(PrefixLength % 8);
483 Value = Prefix->Addr[Byte];
484
485 if (Byte > 0) {
486 ZeroMem (Prefix->Addr + Byte, 16 - Byte);
487 }
488
489 if (Bit > 0) {
490 Mask = (UINT8)(0xFF << (8 - Bit));
491 Prefix->Addr[Byte] = (UINT8)(Value & Mask);
492 }
493}
494
505BOOLEAN
507 IN IP6_SERVICE *IpSb,
508 IN EFI_IPv6_ADDRESS *DestinationAddress
509 )
510{
511 IP6_PREFIX_LIST_ENTRY *PrefixEntry;
512 EFI_IPv6_ADDRESS Prefix;
513 BOOLEAN Flag;
514
515 ZeroMem (&Prefix, sizeof (EFI_IPv6_ADDRESS));
516
517 Flag = FALSE;
518
519 //
520 // If the address is known as on-link or autonomous prefix, record it as
521 // anycast address.
522 //
523 do {
524 PrefixEntry = Ip6FindPrefixListEntry (IpSb, Flag, 255, DestinationAddress);
525 if (PrefixEntry != NULL) {
526 IP6_COPY_ADDRESS (&Prefix, &PrefixEntry->Prefix);
527 Ip6GetPrefix (PrefixEntry->PrefixLength, &Prefix);
528 if (EFI_IP6_EQUAL (&Prefix, DestinationAddress)) {
529 return TRUE;
530 }
531 }
532
533 Flag = (BOOLEAN) !Flag;
534 } while (Flag);
535
536 return FALSE;
537}
538
565 IN IP6_SERVICE *IpSb,
566 IN NET_BUF *Packet,
567 IN EFI_IPv6_ADDRESS *SourceAddress OPTIONAL,
568 IN EFI_IPv6_ADDRESS *DestinationAddress,
569 IN UINT8 Type,
570 IN UINT8 Code,
571 IN UINT32 *Pointer OPTIONAL
572 )
573{
574 UINT32 PacketLen;
575 NET_BUF *ErrorMsg;
576 UINT16 PayloadLen;
577 EFI_IP6_HEADER Head;
579 UINT8 *ErrorBody;
580
581 if (DestinationAddress == NULL) {
582 return EFI_INVALID_PARAMETER;
583 }
584
585 //
586 // An ICMPv6 error message must not be originated as a result of receiving
587 // a packet whose source address does not uniquely identify a single node --
588 // e.g., the IPv6 Unspecified Address, an IPv6 multicast address, or an address
589 // known by the ICMP message originator to be an IPv6 anycast address.
590 //
591 if (NetIp6IsUnspecifiedAddr (DestinationAddress) ||
592 IP6_IS_MULTICAST (DestinationAddress) ||
593 Ip6IsAnycast (IpSb, DestinationAddress)
594 )
595 {
596 return EFI_INVALID_PARAMETER;
597 }
598
599 switch (Type) {
601 case ICMP_V6_TIME_EXCEEDED:
602 break;
603
604 case ICMP_V6_PARAMETER_PROBLEM:
605 if (Pointer == NULL) {
606 return EFI_INVALID_PARAMETER;
607 }
608
609 break;
610
611 default:
612 return EFI_INVALID_PARAMETER;
613 }
614
615 PacketLen = sizeof (IP6_ICMP_ERROR_HEAD) + Packet->TotalSize;
616
617 if (PacketLen > IpSb->MaxPacketSize) {
618 PacketLen = IpSb->MaxPacketSize;
619 }
620
621 ErrorMsg = NetbufAlloc (PacketLen);
622 if (ErrorMsg == NULL) {
623 return EFI_OUT_OF_RESOURCES;
624 }
625
626 PayloadLen = (UINT16)(PacketLen - sizeof (EFI_IP6_HEADER));
627
628 //
629 // Create the basic IPv6 header.
630 //
631 ZeroMem (&Head, sizeof (EFI_IP6_HEADER));
632
633 Head.PayloadLength = HTONS (PayloadLen);
634 Head.NextHeader = IP6_ICMP;
635 Head.HopLimit = IpSb->CurHopLimit;
636
637 if (SourceAddress != NULL) {
638 IP6_COPY_ADDRESS (&Head.SourceAddress, SourceAddress);
639 } else {
640 ZeroMem (&Head.SourceAddress, sizeof (EFI_IPv6_ADDRESS));
641 }
642
643 IP6_COPY_ADDRESS (&Head.DestinationAddress, DestinationAddress);
644
645 NetbufReserve (ErrorMsg, sizeof (EFI_IP6_HEADER));
646
647 //
648 // Fill in the ICMP error message head
649 //
651 if (IcmpHead == NULL) {
652 NetbufFree (ErrorMsg);
653 return EFI_OUT_OF_RESOURCES;
654 }
655
656 ZeroMem (IcmpHead, sizeof (IP6_ICMP_INFORMATION_HEAD));
657 IcmpHead->Head.Type = Type;
658 IcmpHead->Head.Code = Code;
659
660 if (Pointer != NULL) {
661 IcmpHead->Fourth = HTONL (*Pointer);
662 }
663
664 //
665 // Fill in the ICMP error message body
666 //
667 PayloadLen -= sizeof (IP6_ICMP_INFORMATION_HEAD);
668 ErrorBody = NetbufAllocSpace (ErrorMsg, PayloadLen, FALSE);
669 if (ErrorBody != NULL) {
670 ZeroMem (ErrorBody, PayloadLen);
671 NetbufCopy (Packet, 0, PayloadLen, ErrorBody);
672 }
673
674 //
675 // Transmit the packet
676 //
677 return Ip6Output (IpSb, NULL, NULL, ErrorMsg, &Head, NULL, 0, Ip6SysPacketSent, NULL);
678}
LIST_ENTRY *EFIAPI InsertHeadList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
Definition: LinkedList.c:218
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define ICMP_V6_TIMEOUT_HOP_LIMIT
Definition: Ip6.h:120
#define ICMP_V6_NO_ROUTE_TO_DEST
Definition: Ip6.h:107
#define ICMP_V6_ERRONEOUS_HEADER
Definition: Ip6.h:128
#define ICMP_V6_DEST_UNREACHABLE
Definition: Ip6.h:80
#define ICMP_V6_ECHO_REQUEST
Definition: Ip6.h:90
BOOLEAN Ip6IsOneOfSetAddress(IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Address, OUT IP6_INTERFACE **Interface OPTIONAL, OUT IP6_ADDRESS_INFO **AddressInfo OPTIONAL)
Definition: Ip6Common.c:504
BOOLEAN Ip6IsAnycast(IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *DestinationAddress)
Definition: Ip6Icmp.c:506
EFI_STATUS Ip6IcmpReplyEcho(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Icmp.c:128
EFI_STATUS Ip6ProcessIcmpError(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Icmp.c:281
EFI_STATUS Ip6ProcessIcmpInformation(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Icmp.c:330
VOID Ip6GetPrefix(IN UINT8 PrefixLength, IN OUT EFI_IPv6_ADDRESS *Prefix)
Definition: Ip6Icmp.c:460
EFI_STATUS Ip6SendIcmpError(IN IP6_SERVICE *IpSb, IN NET_BUF *Packet, IN EFI_IPv6_ADDRESS *SourceAddress OPTIONAL, IN EFI_IPv6_ADDRESS *DestinationAddress, IN UINT8 Type, IN UINT8 Code, IN UINT32 *Pointer OPTIONAL)
Definition: Ip6Icmp.c:564
EFI_STATUS Ip6ProcessPacketTooBig(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Icmp.c:219
EFI_STATUS Ip6IcmpHandle(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Icmp.c:402
EFI_STATUS Ip6Demultiplex(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Input.c:1651
EFI_STATUS Ip6ProcessMldReport(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Mld.c:835
EFI_STATUS Ip6ProcessMldQuery(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Mld.c:746
EFI_STATUS Ip6ProcessRedirect(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Nd.c:2416
IP6_PREFIX_LIST_ENTRY * Ip6FindPrefixListEntry(IN IP6_SERVICE *IpSb, IN BOOLEAN OnLinkOrAuto, IN UINT8 PrefixLength, IN EFI_IPv6_ADDRESS *Prefix)
Definition: Ip6Nd.c:337
EFI_STATUS Ip6ProcessNeighborAdvertise(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Nd.c:1708
EFI_STATUS Ip6ProcessNeighborSolicit(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Nd.c:1476
EFI_STATUS Ip6ProcessRouterAdvertise(IN IP6_SERVICE *IpSb, IN EFI_IP6_HEADER *Head, IN NET_BUF *Packet)
Definition: Ip6Nd.c:1943
EFI_STATUS Ip6Output(IN IP6_SERVICE *IpSb, IN IP6_INTERFACE *Interface OPTIONAL, IN IP6_PROTOCOL *IpInstance OPTIONAL, IN NET_BUF *Packet, IN EFI_IP6_HEADER *Head, IN UINT8 *ExtHdrs, IN UINT32 ExtHdrsLen, IN IP6_FRAME_CALLBACK Callback, IN VOID *Context)
Definition: Ip6Output.c:476
VOID Ip6SysPacketSent(NET_BUF *Packet, EFI_STATUS IoStatus, UINT32 LinkFlag, VOID *Context)
Definition: Ip6Output.c:337
IP6_ROUTE_ENTRY * Ip6CreateRouteEntry(IN EFI_IPv6_ADDRESS *Destination OPTIONAL, IN UINT8 PrefixLength, IN EFI_IPv6_ADDRESS *GatewayAddress OPTIONAL)
Definition: Ip6Route.c:51
IP6_ROUTE_ENTRY * Ip6FindRouteEntry(IN IP6_ROUTE_TABLE *RtTable, IN EFI_IPv6_ADDRESS *Destination OPTIONAL, IN EFI_IPv6_ADDRESS *NextHop OPTIONAL)
Definition: Ip6Route.c:118
VOID Ip6FreeRouteEntry(IN OUT IP6_ROUTE_ENTRY *RtEntry)
Definition: Ip6Route.c:87
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
VOID EFIAPI NetbufFree(IN NET_BUF *Nbuf)
Definition: NetBuffer.c:195
VOID EFIAPI NetbufReserve(IN OUT NET_BUF *Nbuf, IN UINT32 Len)
Definition: NetBuffer.c:984
UINT16 EFIAPI NetIp6PseudoHeadChecksum(IN EFI_IPv6_ADDRESS *Src, IN EFI_IPv6_ADDRESS *Dst, IN UINT8 NextHeader, IN UINT32 Len)
Definition: NetBuffer.c:1777
UINT16 EFIAPI NetbufChecksum(IN NET_BUF *Nbuf)
Definition: NetBuffer.c:1687
UINT32 EFIAPI NetbufCopy(IN NET_BUF *Nbuf, IN UINT32 Offset, IN UINT32 Len, IN UINT8 *Dest)
Definition: NetBuffer.c:1206
UINT16 EFIAPI NetAddChecksum(IN UINT16 Checksum1, IN UINT16 Checksum2)
Definition: NetBuffer.c:1658
NET_BUF *EFIAPI NetbufAlloc(IN UINT32 Len)
Definition: NetBuffer.c:89
BOOLEAN EFIAPI NetIp6IsUnspecifiedAddr(IN EFI_IPv6_ADDRESS *Ip6)
Definition: DxeNetLib.c:766
UINT8 *EFIAPI NetbufAllocSpace(IN OUT NET_BUF *Nbuf, IN UINT32 Len, IN BOOLEAN FromHead)
Definition: NetBuffer.c:1015
NET_BUF *EFIAPI NetbufDuplicate(IN NET_BUF *Nbuf, IN OUT NET_BUF *Duplicate OPTIONAL, IN UINT32 HeadSpace)
Definition: NetBuffer.c:280
UINT8 *EFIAPI NetbufGetByte(IN NET_BUF *Nbuf, IN UINT32 Offset, OUT UINT32 *Index OPTIONAL)
Definition: NetBuffer.c:359
VOID EFIAPI Exit(IN EFI_STATUS Status)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112