40 ASSERT (BlockOpNum >= 1);
51 Nbuf->Signature = NET_BUF_SIGNATURE;
53 Nbuf->BlockOpNum = BlockOpNum;
63 Vector->Signature = NET_VECTOR_SIGNATURE;
65 Vector->BlockNum = BlockNum;
66 Nbuf->Vector = Vector;
111 Vector = Nbuf->Vector;
114 Vector->Block[0].Bulk = Bulk;
115 Vector->Block[0].Len = Len;
117 Nbuf->BlockOp[0].BlockHead = Bulk;
118 Nbuf->BlockOp[0].BlockTail = Bulk + Len;
120 Nbuf->BlockOp[0].Head = Bulk;
121 Nbuf->BlockOp[0].Tail = Bulk;
122 Nbuf->BlockOp[0].Size = 0;
148 ASSERT (Vector !=
NULL);
149 NET_CHECK_SIGNATURE (Vector, NET_VECTOR_SIGNATURE);
150 ASSERT (Vector->RefCnt > 0);
154 if (Vector->RefCnt > 0) {
158 if (Vector->Free !=
NULL) {
164 if ((Vector->Flag & NET_VECTOR_OWN_FIRST) != 0) {
165 gBS->FreePool (Vector->Block[0].Bulk);
168 Vector->Free (Vector->Arg);
173 for (Index = 0; Index < Vector->BlockNum; Index++) {
174 gBS->FreePool (Vector->Block[Index].Bulk);
199 ASSERT (Nbuf !=
NULL);
200 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
201 ASSERT (Nbuf->RefCnt > 0);
205 if (Nbuf->RefCnt == 0) {
235 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
243 Clone->Signature = NET_BUF_SIGNATURE;
247 Clone->Ip = Nbuf->Ip;
248 Clone->Tcp = Nbuf->Tcp;
250 CopyMem (Clone->ProtoData, Nbuf->ProtoData, NET_PROTO_DATA);
252 NET_GET_REF (Nbuf->Vector);
254 Clone->Vector = Nbuf->Vector;
255 Clone->BlockOpNum = Nbuf->BlockOpNum;
256 Clone->TotalSize = Nbuf->TotalSize;
288 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
290 if (Duplicate ==
NULL) {
291 Duplicate =
NetbufAlloc (Nbuf->TotalSize + HeadSpace);
294 if (Duplicate ==
NULL) {
302 CopyMem (Duplicate->ProtoData, Nbuf->ProtoData, NET_PROTO_DATA);
327 Entry = Head->ForwardLink;
329 NET_LIST_FOR_EACH_SAFE (Entry, Next, Head) {
330 Nbuf = NET_LIST_USER_STRUCT (Entry,
NET_BUF, List);
331 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
362 OUT UINT32 *Index OPTIONAL
369 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
371 if (Offset >= Nbuf->TotalSize) {
375 BlockOp = Nbuf->BlockOp;
378 for (Loop = 0; Loop < Nbuf->BlockOpNum; Loop++) {
379 if (Len + BlockOp[Loop].Size <= Offset) {
380 Len += BlockOp[Loop].Size;
388 return BlockOp[Loop].Head + (Offset - Len);
420 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
421 NET_CHECK_SIGNATURE (Nbuf->Vector, NET_VECTOR_SIGNATURE);
422 ASSERT (Index < Nbuf->BlockOpNum);
424 Block = &(Nbuf->Vector->Block[Index]);
425 BlockOp = &(Nbuf->BlockOp[Index]);
428 BlockOp->BlockHead = Bulk;
429 BlockOp->BlockTail = Bulk + Len;
430 BlockOp->Head = Bulk;
431 BlockOp->Tail = Bulk + Len;
459 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
460 ASSERT (Index < Nbuf->BlockOpNum);
462 BlockOp = &(Nbuf->BlockOp[Index]);
463 BlockOp->BlockHead = Bulk;
464 BlockOp->BlockTail = Bulk + Len;
465 BlockOp->Head = Bulk;
466 BlockOp->Tail = Bulk + Len;
531 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
533 if ((Len == 0) || (Offset + Len > Nbuf->TotalSize)) {
542 BlockOp = Nbuf->BlockOp;
545 for (Index = 0; Index < Nbuf->BlockOpNum; Index++) {
546 if (Offset < Cur + BlockOp[Index].Size) {
550 Cur += BlockOp[Index].Size;
558 FirstSkip = Offset - Cur;
559 FirstLen = BlockOp[Index].Size - FirstSkip;
564 if (Len > FirstLen) {
565 Cur += BlockOp[Index].Size;
568 for ( ; Index < Nbuf->BlockOpNum; Index++) {
569 if (Offset + Len <= Cur + BlockOp[Index].Size) {
571 LastLen = Offset + Len - Cur;
575 Cur += BlockOp[Index].Size;
583 ASSERT (Last >= First);
584 BlockOpNum = Last - First + 1;
587 if (HeadSpace != 0) {
601 if (FirstBulk ==
NULL) {
605 Vector =
Child->Vector;
607 Vector->Arg = Nbuf->Vector;
608 Vector->Flag = NET_VECTOR_OWN_FIRST;
609 Vector->Len = HeadSpace;
615 Child->BlockOp[0].Head += HeadSpace;
616 Child->BlockOp[0].Size = 0;
625 Child->Vector = Nbuf->Vector;
628 NET_GET_REF (Nbuf->Vector);
629 Child->TotalSize = Len;
637 Nbuf->BlockOp[First].Head + FirstSkip,
642 for (Index = First + 1; Index < Last; Index++) {
660 CopyMem (
Child->ProtoData, Nbuf->ProtoData, NET_PROTO_DATA);
698 IN NET_VECTOR_EXT_FREE ExtFree,
699 IN VOID *Arg OPTIONAL
709 UINT32 FirstBlockLen;
716 ASSERT ((ExtFragment !=
NULL) && (ExtNum > 0) && (ExtFree !=
NULL));
718 SavedFragment.Bulk =
NULL;
719 SavedFragment.Len = 0;
734 if ((ExtFragment[0].Len >= HeadLen) || (ExtNum == 1)) {
743 if ((HeadSpace != 0) || (HeadLen != 0)) {
744 FirstBlockLen = HeadLen + HeadSpace;
747 if (FirstBlock ==
NULL) {
761 Header = FirstBlock + HeadSpace;
763 for (Index = 0; Index < ExtNum; Index++) {
764 if (Len >= ExtFragment[Index].Len) {
765 CopyMem (Header, ExtFragment[Index].Bulk, ExtFragment[Index].Len);
767 Copied += ExtFragment[Index].Len;
768 Len -= ExtFragment[Index].Len;
769 Header += ExtFragment[Index].Len;
770 TotalLen += ExtFragment[Index].Len;
782 CopyMem (Header, ExtFragment[Index].Bulk, Len);
795 SavedFragment = ExtFragment[Index];
796 ExtFragment[Index].Bulk += Len;
797 ExtFragment[Index].Len -= Len;
809 Vector = Nbuf->Vector;
810 Vector->Free = ExtFree;
812 Vector->Flag = ((FirstBlockLen != 0) ? NET_VECTOR_OWN_FIRST : 0);
820 if (FirstBlockLen != 0) {
822 Nbuf->BlockOp[0].Head += HeadSpace;
823 Nbuf->BlockOp[0].Size = Copied;
828 for ( ; Index < ExtNum; Index++) {
829 NetbufSetBlock (Nbuf, ExtFragment[Index].Bulk, ExtFragment[Index].Len, CurBlock);
830 TotalLen += ExtFragment[Index].Len;
834 Vector->Len = TotalLen + HeadSpace;
835 Nbuf->TotalSize = TotalLen;
837 if (SavedIndex != 0) {
838 ExtFragment[SavedIndex] = SavedFragment;
844 if (FirstBlock !=
NULL) {
869 IN OUT UINT32 *ExtNum
877 for (Index = 0; (Index < Nbuf->BlockOpNum); Index++) {
878 if (Nbuf->BlockOp[Index].Size == 0) {
882 if (Current < *ExtNum) {
883 ExtFragment[Current].Bulk = Nbuf->BlockOp[Index].Head;
884 ExtFragment[Current].Len = Nbuf->BlockOp[Index].Size;
887 return EFI_BUFFER_TOO_SMALL;
918 IN NET_VECTOR_EXT_FREE ExtFree,
919 IN VOID *Arg OPTIONAL
934 NET_LIST_FOR_EACH (Entry, BufList) {
935 Nbuf = NET_LIST_USER_STRUCT (Entry,
NET_BUF, List);
936 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
937 FragmentNum += Nbuf->BlockOpNum;
945 if (Fragment ==
NULL) {
951 NET_LIST_FOR_EACH (Entry, BufList) {
952 Nbuf = NET_LIST_USER_STRUCT (Entry,
NET_BUF, List);
953 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
955 for (Index = 0; Index < Nbuf->BlockOpNum; Index++) {
956 if (Nbuf->BlockOp[Index].Size != 0) {
957 Fragment[Current].Bulk = Nbuf->BlockOp[Index].Head;
958 Fragment[Current].Len = Nbuf->BlockOp[Index].Size;
964 Nbuf =
NetbufFromExt (Fragment, Current, HeadSpace, HeaderLen, ExtFree, Arg);
989 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
990 NET_CHECK_SIGNATURE (Nbuf->Vector, NET_VECTOR_SIGNATURE);
992 ASSERT ((Nbuf->BlockOpNum == 1) && (Nbuf->TotalSize == 0));
993 ASSERT ((Nbuf->Vector->Free ==
NULL) && (Nbuf->Vector->Len >= Len));
995 Nbuf->BlockOp[0].Head += Len;
996 Nbuf->BlockOp[0].Tail += Len;
998 ASSERT (Nbuf->BlockOp[0].Tail <= Nbuf->BlockOp[0].BlockTail);
1027 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
1028 NET_CHECK_SIGNATURE (Nbuf->Vector, NET_VECTOR_SIGNATURE);
1038 if (Nbuf->TotalSize == 0) {
1043 if ((Index != 0) && (NET_HEADSPACE (&(Nbuf->BlockOp[Index])) < Len)) {
1048 BlockOp = &(Nbuf->BlockOp[Index]);
1050 if (NET_HEADSPACE (BlockOp) < Len) {
1054 BlockOp->Head -= Len;
1055 BlockOp->Size += Len;
1056 Nbuf->TotalSize += Len;
1058 return BlockOp->Head;
1065 if (Nbuf->TotalSize == 0) {
1070 if ((NET_TAILSPACE (&(Nbuf->BlockOp[Index])) < Len) &&
1071 (Index < Nbuf->BlockOpNum - 1))
1077 BlockOp = &(Nbuf->BlockOp[Index]);
1079 if (NET_TAILSPACE (BlockOp) < Len) {
1083 SavedTail = BlockOp->Tail;
1085 BlockOp->Tail += Len;
1086 BlockOp->Size += Len;
1087 Nbuf->TotalSize += Len;
1109 ASSERT ((BlockOp !=
NULL) && (BlockOp->Size >= Len));
1111 BlockOp->Size -= Len;
1114 BlockOp->Head += Len;
1116 BlockOp->Tail -= Len;
1144 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
1146 if ((Len == 0) || (Nbuf->TotalSize == 0)) {
1150 if (Len > Nbuf->TotalSize) {
1151 Len = Nbuf->TotalSize;
1162 Nbuf->TotalSize -= Len;
1164 Index = (FromHead ? 0 : Nbuf->BlockOpNum - 1);
1165 BlockOp = Nbuf->BlockOp;
1168 if (BlockOp[Index].Size == 0) {
1169 Index += (FromHead ? 1 : -1);
1173 if (Len > BlockOp[Index].Size) {
1174 Len -= BlockOp[Index].Size;
1175 Trimmed += BlockOp[Index].Size;
1176 NetblockTrim (&BlockOp[Index], BlockOp[Index].Size, FromHead);
1183 Index += (FromHead ? 1 : -1);
1220 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
1223 if ((Len == 0) || (Nbuf->TotalSize <= Offset)) {
1227 if (Nbuf->TotalSize - Offset < Len) {
1228 Len = Nbuf->TotalSize - Offset;
1231 BlockOp = Nbuf->BlockOp;
1242 for (Index = 0; Index < Nbuf->BlockOpNum; Index++) {
1243 if (BlockOp[Index].Size == 0) {
1247 if (Offset < Cur + BlockOp[Index].Size) {
1251 Cur += BlockOp[Index].Size;
1259 Skip = Offset - Cur;
1260 Left = BlockOp[Index].Size - Skip;
1263 CopyMem (Dest, BlockOp[Index].Head + Skip, Len);
1267 CopyMem (Dest, BlockOp[Index].Head + Skip, Left);
1275 for ( ; Index < Nbuf->BlockOpNum; Index++) {
1276 if (Len > BlockOp[Index].Size) {
1277 Len -= BlockOp[Index].Size;
1278 Copied += BlockOp[Index].Size;
1280 CopyMem (Dest, BlockOp[Index].Head, BlockOp[Index].Size);
1281 Dest += BlockOp[Index].Size;
1284 CopyMem (Dest, BlockOp[Index].Head, Len);
1304 NbufQue->Signature = NET_QUE_SIGNATURE;
1305 NbufQue->RefCnt = 1;
1309 NbufQue->BufSize = 0;
1310 NbufQue->BufNum = 0;
1329 if (NbufQue ==
NULL) {
1354 ASSERT (NbufQue !=
NULL);
1355 NET_CHECK_SIGNATURE (NbufQue, NET_QUE_SIGNATURE);
1359 if (NbufQue->RefCnt == 0) {
1379 NET_CHECK_SIGNATURE (NbufQue, NET_QUE_SIGNATURE);
1380 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
1384 NbufQue->BufSize += Nbuf->TotalSize;
1405 NET_CHECK_SIGNATURE (NbufQue, NET_QUE_SIGNATURE);
1407 if (NbufQue->BufNum == 0) {
1411 First = NET_LIST_USER_STRUCT (NbufQue->BufList.ForwardLink,
NET_BUF, List);
1415 NbufQue->BufSize -= First->TotalSize;
1452 NET_CHECK_SIGNATURE (NbufQue, NET_QUE_SIGNATURE);
1453 ASSERT (Dest !=
NULL);
1455 if ((Len == 0) || (NbufQue->BufSize <= Offset)) {
1459 if (NbufQue->BufSize - Offset < Len) {
1460 Len = NbufQue->BufSize - Offset;
1469 NET_LIST_FOR_EACH (Entry, &NbufQue->BufList) {
1470 Nbuf = NET_LIST_USER_STRUCT (Entry,
NET_BUF, List);
1472 if (Offset < Cur + Nbuf->TotalSize) {
1476 Cur += Nbuf->TotalSize;
1479 ASSERT (Nbuf !=
NULL);
1484 Skip = Offset - Cur;
1485 Left = Nbuf->TotalSize - Skip;
1499 Entry = Entry->ForwardLink;
1501 while ((Len > 0) && (Entry != &NbufQue->BufList)) {
1502 Nbuf = NET_LIST_USER_STRUCT (Entry,
NET_BUF, List);
1504 if (Len > Nbuf->TotalSize) {
1505 Len -= Nbuf->TotalSize;
1506 Copied += Nbuf->TotalSize;
1509 Dest += Nbuf->TotalSize;
1516 Entry = Entry->ForwardLink;
1547 NET_CHECK_SIGNATURE (NbufQue, NET_QUE_SIGNATURE);
1553 if (Len > NbufQue->BufSize) {
1554 Len = NbufQue->BufSize;
1557 NbufQue->BufSize -= Len;
1560 NET_LIST_FOR_EACH_SAFE (Entry, Next, &NbufQue->BufList) {
1561 Nbuf = NET_LIST_USER_STRUCT (Entry,
NET_BUF, List);
1563 if (Len >= Nbuf->TotalSize) {
1564 Trimmed += Nbuf->TotalSize;
1565 Len -= Nbuf->TotalSize;
1576 Trimmed +=
NetbufTrim (Nbuf, Len, NET_BUF_HEAD);
1596 NET_CHECK_SIGNATURE (NbufQue, NET_QUE_SIGNATURE);
1600 NbufQue->BufNum = 0;
1601 NbufQue->BufSize = 0;
1620 register UINT32 Sum;
1628 Sum += *(Bulk + Len - 1);
1632 Sum += *(UINT16 *)Bulk;
1640 while ((Sum >> 16) != 0) {
1641 Sum = (Sum & 0xffff) + (Sum >> 16);
1659 IN UINT16 Checksum1,
1665 Sum = Checksum1 + Checksum2;
1670 if ((Sum >> 16) != 0) {
1671 Sum = (Sum & 0xffff) + 1;
1697 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
1701 BlockOp = Nbuf->BlockOp;
1703 for (Index = 0; Index < Nbuf->BlockOpNum; Index++) {
1704 if (BlockOp[Index].Size == 0) {
1710 if ((Offset & 0x01) != 0) {
1719 Offset += BlockOp[Index].Size;
1756 Hdr.Protocol = Proto;
1757 Hdr.Len = HTONS (Len);
1780 IN UINT8 NextHeader,
1791 IP6_COPY_ADDRESS (&Hdr.SrcIp, Src);
1792 IP6_COPY_ADDRESS (&Hdr.DstIp, Dst);
1794 Hdr.NextHeader = NextHeader;
1795 Hdr.Len = HTONL (Len);
1816 NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);
1817 ASSERT (Nbuf->RefCnt > 0);
1821 if (Nbuf->RefCnt == 0) {
1826 NET_CHECK_SIGNATURE (Nbuf->Vector, NET_VECTOR_SIGNATURE);
1827 ASSERT (Nbuf->Vector->RefCnt > 0);
1829 Nbuf->Vector->RefCnt--;
1831 if (Nbuf->Vector->RefCnt > 0) {
1839 if ((Nbuf->Vector->Flag & NET_VECTOR_OWN_FIRST) != 0) {
1840 FreePool (Nbuf->Vector->Block[0].Bulk);
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
UINT16 EFIAPI SwapBytes16(IN UINT16 Value)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
NODE Child(IN NODE LoopVar6, IN UINT8 LoopVar5)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID EFIAPI NetbufFree(IN NET_BUF *Nbuf)
VOID EFIAPI NetbufQueInit(IN OUT NET_BUF_QUEUE *NbufQue)
VOID EFIAPI NetbufReserve(IN OUT NET_BUF *Nbuf, IN UINT32 Len)
UINT16 EFIAPI NetIp6PseudoHeadChecksum(IN EFI_IPv6_ADDRESS *Src, IN EFI_IPv6_ADDRESS *Dst, IN UINT8 NextHeader, IN UINT32 Len)
VOID NetbufFreeVector(IN NET_VECTOR *Vector)
NET_BUF *EFIAPI NetbufClone(IN NET_BUF *Nbuf)
UINT32 EFIAPI NetbufTrim(IN OUT NET_BUF *Nbuf, IN UINT32 Len, IN BOOLEAN FromHead)
UINT16 EFIAPI NetbufChecksum(IN NET_BUF *Nbuf)
EFI_STATUS EFIAPI NetbufBuildExt(IN NET_BUF *Nbuf, IN OUT NET_FRAGMENT *ExtFragment, IN OUT UINT32 *ExtNum)
UINT32 EFIAPI NetbufQueTrim(IN OUT NET_BUF_QUEUE *NbufQue, IN UINT32 Len)
UINT16 EFIAPI NetblockChecksum(IN UINT8 *Bulk, IN UINT32 Len)
UINT32 EFIAPI NetbufQueCopy(IN NET_BUF_QUEUE *NbufQue, IN UINT32 Offset, IN UINT32 Len, OUT UINT8 *Dest)
VOID EFIAPI NetbufQueFlush(IN OUT NET_BUF_QUEUE *NbufQue)
UINT32 EFIAPI NetbufCopy(IN NET_BUF *Nbuf, IN UINT32 Offset, IN UINT32 Len, IN UINT8 *Dest)
VOID NetblockTrim(IN OUT NET_BLOCK_OP *BlockOp, IN UINT32 Len, IN BOOLEAN FromHead)
UINT16 EFIAPI NetAddChecksum(IN UINT16 Checksum1, IN UINT16 Checksum2)
NET_BUF_QUEUE *EFIAPI NetbufQueAlloc(VOID)
NET_BUF *EFIAPI NetbufAlloc(IN UINT32 Len)
NET_BUF *EFIAPI NetbufGetFragment(IN NET_BUF *Nbuf, IN UINT32 Offset, IN UINT32 Len, IN UINT32 HeadSpace)
NET_BUF *EFIAPI NetbufFromExt(IN NET_FRAGMENT *ExtFragment, IN UINT32 ExtNum, IN UINT32 HeadSpace, IN UINT32 HeadLen, IN NET_VECTOR_EXT_FREE ExtFree, IN VOID *Arg OPTIONAL)
VOID NetbufSetBlock(IN OUT NET_BUF *Nbuf, IN UINT8 *Bulk, IN UINT32 Len, IN UINT32 Index)
NET_BUF *EFIAPI NetbufFromBufList(IN LIST_ENTRY *BufList, IN UINT32 HeadSpace, IN UINT32 HeaderLen, IN NET_VECTOR_EXT_FREE ExtFree, IN VOID *Arg OPTIONAL)
NET_BUF * NetbufAllocStruct(IN UINT32 BlockNum, IN UINT32 BlockOpNum)
VOID NetIpSecNetbufFree(NET_BUF *Nbuf)
VOID NetbufSetBlockOp(IN OUT NET_BUF *Nbuf, IN UINT8 *Bulk, IN UINT32 Len, IN UINT32 Index)
UINT8 *EFIAPI NetbufAllocSpace(IN OUT NET_BUF *Nbuf, IN UINT32 Len, IN BOOLEAN FromHead)
NET_BUF *EFIAPI NetbufDuplicate(IN NET_BUF *Nbuf, IN OUT NET_BUF *Duplicate OPTIONAL, IN UINT32 HeadSpace)
VOID EFIAPI NetbufFreeList(IN OUT LIST_ENTRY *Head)
VOID EFIAPI NetbufQueFree(IN NET_BUF_QUEUE *NbufQue)
UINT16 EFIAPI NetPseudoHeadChecksum(IN IP4_ADDR Src, IN IP4_ADDR Dst, IN UINT8 Proto, IN UINT16 Len)
UINT8 *EFIAPI NetbufGetByte(IN NET_BUF *Nbuf, IN UINT32 Offset, OUT UINT32 *Index OPTIONAL)
VOID EFIAPI NetbufQueAppend(IN OUT NET_BUF_QUEUE *NbufQue, IN OUT NET_BUF *Nbuf)
VOID EFIAPI NetbufGetFragmentFree(IN VOID *Arg)
NET_BUF *EFIAPI NetbufQueRemove(IN OUT NET_BUF_QUEUE *NbufQue)
LIST_ENTRY *EFIAPI NetListRemoveHead(IN OUT LIST_ENTRY *Head)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)