]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Library/NetLib.h
Move Undi driver to common section.
[mirror_edk2.git] / MdeModulePkg / Include / Library / NetLib.h
CommitLineData
cbf316f2 1/** @file
2
3Copyright (c) 2005 - 2007, Intel Corporation
4All rights reserved. This program and the accompanying materials
5are licensed and made available under the terms and conditions of the BSD License
6which accompanies this distribution. The full text of the license may be found at
7http://opensource.org/licenses/bsd-license.php
8
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12Module Name:
13
14 NetLib.h
15
16Abstract:
17
18 Library for the UEFI network stack.
19
20
21**/
22
23#ifndef _NET_LIB_H_
24#define _NET_LIB_H_
25
26#include <PiDxe.h>
6a690e23 27#include <Library/BaseMemoryLib.h>
28#include <Library/MemoryAllocationLib.h>
cbf316f2 29#include <Protocol/DriverBinding.h>
30#include <Protocol/ComponentName.h>
31#include <Protocol/DriverConfiguration.h>
32#include <Protocol/DriverDiagnostics.h>
36ee91ca 33#include <Protocol/Dpc.h>
34
36ee91ca 35typedef UINT32 IP4_ADDR;
36typedef UINT32 TCP_SEQNO;
37typedef UINT16 TCP_PORTNO;
38
39enum {
40 NET_ETHER_ADDR_LEN = 6,
41 NET_IFTYPE_ETHERNET = 0x01,
42
43 EFI_IP_PROTO_UDP = 0x11,
44 EFI_IP_PROTO_TCP = 0x06,
45 EFI_IP_PROTO_ICMP = 0x01,
46
47 //
48 // The address classfication
49 //
50 IP4_ADDR_CLASSA = 1,
51 IP4_ADDR_CLASSB,
52 IP4_ADDR_CLASSC,
53 IP4_ADDR_CLASSD,
54 IP4_ADDR_CLASSE,
55
56 IP4_MASK_NUM = 33,
57};
58
59#pragma pack(1)
60
61//
62// Ethernet head definition
63//
64typedef struct {
65 UINT8 DstMac [NET_ETHER_ADDR_LEN];
66 UINT8 SrcMac [NET_ETHER_ADDR_LEN];
67 UINT16 EtherType;
68} ETHER_HEAD;
69
70
71//
72// The EFI_IP4_HEADER is hard to use because the source and
73// destination address are defined as EFI_IPv4_ADDRESS, which
74// is a structure. Two structures can't be compared or masked
75// directly. This is why there is an internal representation.
76//
77typedef struct {
36ee91ca 78 UINT8 HeadLen : 4;
79 UINT8 Ver : 4;
36ee91ca 80 UINT8 Tos;
81 UINT16 TotalLen;
82 UINT16 Id;
83 UINT16 Fragment;
84 UINT8 Ttl;
85 UINT8 Protocol;
86 UINT16 Checksum;
87 IP4_ADDR Src;
88 IP4_ADDR Dst;
89} IP4_HEAD;
90
91
92//
93// ICMP head definition. ICMP message is categoried as either an error
94// message or query message. Two message types have their own head format.
95//
96typedef struct {
97 UINT8 Type;
98 UINT8 Code;
99 UINT16 Checksum;
100} IP4_ICMP_HEAD;
101
102typedef struct {
103 IP4_ICMP_HEAD Head;
104 UINT32 Fourth; // 4th filed of the head, it depends on Type.
105 IP4_HEAD IpHead;
106} IP4_ICMP_ERROR_HEAD;
107
108typedef struct {
109 IP4_ICMP_HEAD Head;
110 UINT16 Id;
111 UINT16 Seq;
112} IP4_ICMP_QUERY_HEAD;
113
114
115//
116// UDP header definition
117//
118typedef struct {
119 UINT16 SrcPort;
120 UINT16 DstPort;
121 UINT16 Length;
122 UINT16 Checksum;
123} EFI_UDP4_HEADER;
124
125
126//
127// TCP header definition
128//
129typedef struct {
130 TCP_PORTNO SrcPort;
131 TCP_PORTNO DstPort;
132 TCP_SEQNO Seq;
133 TCP_SEQNO Ack;
36ee91ca 134 UINT8 Res : 4;
135 UINT8 HeadLen : 4;
36ee91ca 136 UINT8 Flag;
137 UINT16 Wnd;
138 UINT16 Checksum;
139 UINT16 Urg;
140} TCP_HEAD;
141
142#pragma pack()
143
144#define NET_MAC_EQUAL(pMac1, pMac2, Len) \
e48e37fc 145 (CompareMem ((pMac1), (pMac2), Len) == 0)
36ee91ca 146
147#define NET_MAC_IS_MULTICAST(Mac, BMac, Len) \
148 (((*((UINT8 *) Mac) & 0x01) == 0x01) && (!NET_MAC_EQUAL (Mac, BMac, Len)))
149
36ee91ca 150#define NTOHL(x) (UINT32)((((UINT32) (x) & 0xff) << 24) | \
151 (((UINT32) (x) & 0xff00) << 8) | \
152 (((UINT32) (x) & 0xff0000) >> 8) | \
153 (((UINT32) (x) & 0xff000000) >> 24))
154
155#define HTONL(x) NTOHL(x)
156
157#define NTOHS(x) (UINT16)((((UINT16) (x) & 0xff) << 8) | \
158 (((UINT16) (x) & 0xff00) >> 8))
159
160#define HTONS(x) NTOHS(x)
36ee91ca 161
162//
163// Test the IP's attribute, All the IPs are in host byte order.
164//
165#define IP4_IS_MULTICAST(Ip) (((Ip) & 0xF0000000) == 0xE0000000)
166#define IP4_IS_LOCAL_BROADCAST(Ip) ((Ip) == 0xFFFFFFFF)
167#define IP4_NET_EQUAL(Ip1, Ip2, NetMask) (((Ip1) & (NetMask)) == ((Ip2) & (NetMask)))
168#define IP4_IS_VALID_NETMASK(Ip) (NetGetMaskLength (Ip) != IP4_MASK_NUM)
169
170//
171// Convert the EFI_IP4_ADDRESS to plain UINT32 IP4 address.
172//
173#define EFI_IP4(EfiIpAddr) (*(IP4_ADDR *) ((EfiIpAddr).Addr))
174#define EFI_NTOHL(EfiIp) (NTOHL (EFI_IP4 ((EfiIp))))
e48e37fc 175#define EFI_IP4_EQUAL(Ip1, Ip2) (CompareMem ((Ip1), (Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)
36ee91ca 176
177INTN
178NetGetMaskLength (
179 IN IP4_ADDR Mask
180 );
181
182INTN
183NetGetIpClass (
184 IN IP4_ADDR Addr
185 );
186
187BOOLEAN
188Ip4IsUnicast (
189 IN IP4_ADDR Ip,
190 IN IP4_ADDR NetMask
191 );
cbf316f2 192
cbf316f2 193extern IP4_ADDR mIp4AllMasks [IP4_MASK_NUM];
194
cbf316f2 195
772db4bb 196extern EFI_IPv4_ADDRESS mZeroIp4Addr;
197
c4a62a12 198#define NET_IS_DIGIT(Ch) (('0' <= (Ch)) && ((Ch) <= '9'))
199#define NET_ROUNDUP(size, unit) (((size) + (unit) - 1) & (~((unit) - 1)))
6a690e23 200#define NET_IS_LOWER_CASE_CHAR(Ch) (('a' <= (Ch)) && ((Ch) <= 'z'))
201#define NET_IS_UPPER_CASE_CHAR(Ch) (('A' <= (Ch)) && ((Ch) <= 'Z'))
c4a62a12 202
cbf316f2 203#define TICKS_PER_MS 10000U
204#define TICKS_PER_SECOND 10000000U
205
84b5c78e 206#define NET_RANDOM(Seed) ((UINT32) ((UINT32) (Seed) * 1103515245UL + 12345) % 4294967295UL)
cbf316f2 207
208
209UINT32
210NetGetUint32 (
211 IN UINT8 *Buf
212 );
213
214VOID
215NetPutUint32 (
216 IN UINT8 *Buf,
217 IN UINT32 Data
218 );
219
220UINT32
221NetRandomInitSeed (
222 VOID
223 );
224
225
cbf316f2 226#define NET_LIST_USER_STRUCT(Entry, Type, Field) \
227 _CR(Entry, Type, Field)
228
229#define NET_LIST_USER_STRUCT_S(Entry, Type, Field, Sig) \
230 CR(Entry, Type, Field, Sig)
231
232//
233// Iterate through the doule linked list. It is NOT delete safe
234//
235#define NET_LIST_FOR_EACH(Entry, ListHead) \
236 for(Entry = (ListHead)->ForwardLink; Entry != (ListHead); Entry = Entry->ForwardLink)
237
238//
239// Iterate through the doule linked list. This is delete-safe.
240// Don't touch NextEntry. Also, don't use this macro if list
241// entries other than the Entry may be deleted when processing
242// the current Entry.
243//
244#define NET_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead) \
245 for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink; \
246 Entry != (ListHead); \
247 Entry = NextEntry, NextEntry = Entry->ForwardLink \
248 )
249
250//
251// Make sure the list isn't empty before get the frist/last record.
252//
253#define NET_LIST_HEAD(ListHead, Type, Field) \
254 NET_LIST_USER_STRUCT((ListHead)->ForwardLink, Type, Field)
255
256#define NET_LIST_TAIL(ListHead, Type, Field) \
257 NET_LIST_USER_STRUCT((ListHead)->BackLink, Type, Field)
258
cbf316f2 259
e733f542 260LIST_ENTRY *
cbf316f2 261NetListRemoveHead (
e48e37fc 262 LIST_ENTRY *Head
cbf316f2 263 );
264
e733f542 265LIST_ENTRY *
cbf316f2 266NetListRemoveTail (
e48e37fc 267 LIST_ENTRY *Head
cbf316f2 268 );
269
270VOID
271NetListInsertAfter (
e48e37fc 272 IN LIST_ENTRY *PrevEntry,
273 IN LIST_ENTRY *NewEntry
cbf316f2 274 );
275
276VOID
277NetListInsertBefore (
e48e37fc 278 IN LIST_ENTRY *PostEntry,
279 IN LIST_ENTRY *NewEntry
cbf316f2 280 );
281
282
283//
284// Object container: EFI network stack spec defines various kinds of
285// tokens. The drivers can share code to manage those objects.
286//
287typedef struct {
e48e37fc 288 LIST_ENTRY Link;
cbf316f2 289 VOID *Key;
290 VOID *Value;
291} NET_MAP_ITEM;
292
293typedef struct {
e48e37fc 294 LIST_ENTRY Used;
295 LIST_ENTRY Recycled;
cbf316f2 296 UINTN Count;
297} NET_MAP;
298
299#define NET_MAP_INCREAMENT 64
300
301VOID
302NetMapInit (
303 IN NET_MAP *Map
304 );
305
306VOID
307NetMapClean (
308 IN NET_MAP *Map
309 );
310
311BOOLEAN
312NetMapIsEmpty (
313 IN NET_MAP *Map
314 );
315
316UINTN
317NetMapGetCount (
318 IN NET_MAP *Map
319 );
320
321EFI_STATUS
322NetMapInsertHead (
323 IN NET_MAP *Map,
324 IN VOID *Key,
325 IN VOID *Value OPTIONAL
326 );
327
328EFI_STATUS
329NetMapInsertTail (
330 IN NET_MAP *Map,
331 IN VOID *Key,
332 IN VOID *Value OPTIONAL
333 );
334
335NET_MAP_ITEM *
336NetMapFindKey (
337 IN NET_MAP *Map,
338 IN VOID *Key
339 );
340
341VOID *
342NetMapRemoveItem (
343 IN NET_MAP *Map,
344 IN NET_MAP_ITEM *Item,
345 OUT VOID **Value OPTIONAL
346 );
347
348VOID *
349NetMapRemoveHead (
350 IN NET_MAP *Map,
351 OUT VOID **Value OPTIONAL
352 );
353
354VOID *
355NetMapRemoveTail (
356 IN NET_MAP *Map,
357 OUT VOID **Value OPTIONAL
358 );
359
360typedef
361EFI_STATUS
362(*NET_MAP_CALLBACK) (
363 IN NET_MAP *Map,
364 IN NET_MAP_ITEM *Item,
365 IN VOID *Arg
366 );
367
368EFI_STATUS
369NetMapIterate (
370 IN NET_MAP *Map,
371 IN NET_MAP_CALLBACK CallBack,
372 IN VOID *Arg OPTIONAL
373 );
374
375
376//
377// Helper functions to implement driver binding and service binding protocols.
378//
379EFI_STATUS
380NetLibCreateServiceChild (
381 IN EFI_HANDLE ControllerHandle,
382 IN EFI_HANDLE ImageHandle,
383 IN EFI_GUID *ServiceBindingGuid,
384 OUT EFI_HANDLE *ChildHandle
385 );
386
387EFI_STATUS
388NetLibDestroyServiceChild (
389 IN EFI_HANDLE ControllerHandle,
390 IN EFI_HANDLE ImageHandle,
391 IN EFI_GUID *ServiceBindingGuid,
392 IN EFI_HANDLE ChildHandle
393 );
394
395EFI_STATUS
396NetLibGetMacString (
397 IN EFI_HANDLE SnpHandle,
398 IN EFI_HANDLE ImageHandle,
4eb65aff 399 IN OUT CHAR16 **MacString
cbf316f2 400 );
401
e5e12de7 402VOID
403NetLibCreateIPv4DPathNode (
404 IN OUT IPv4_DEVICE_PATH *Node,
405 IN EFI_HANDLE Controller,
406 IN IP4_ADDR LocalIp,
407 IN UINT16 LocalPort,
408 IN IP4_ADDR RemoteIp,
409 IN UINT16 RemotePort,
410 IN UINT16 Protocol,
411 IN BOOLEAN UseDefaultAddress
412 );
413
cbf316f2 414EFI_HANDLE
415NetLibGetNicHandle (
416 IN EFI_HANDLE Controller,
417 IN EFI_GUID *ProtocolGuid
418 );
419
36ee91ca 420EFI_STATUS
421NetLibQueueDpc (
422 IN EFI_TPL DpcTpl,
423 IN EFI_DPC_PROCEDURE DpcProcedure,
424 IN VOID *DpcContext OPTIONAL
425 );
426
427EFI_STATUS
428NetLibDispatchDpc (
429 VOID
430 );
431
cbf316f2 432EFI_STATUS
433EFIAPI
434NetLibDefaultUnload (
435 IN EFI_HANDLE ImageHandle
436 );
437
cbf316f2 438enum {
439 //
440 //Various signatures
441 //
442 NET_BUF_SIGNATURE = EFI_SIGNATURE_32 ('n', 'b', 'u', 'f'),
443 NET_VECTOR_SIGNATURE = EFI_SIGNATURE_32 ('n', 'v', 'e', 'c'),
444 NET_QUE_SIGNATURE = EFI_SIGNATURE_32 ('n', 'b', 'q', 'u'),
445
446
447 NET_PROTO_DATA = 64, // Opaque buffer for protocols
448 NET_BUF_HEAD = 1, // Trim or allocate space from head
449 NET_BUF_TAIL = 0, // Trim or allocate space from tail
450 NET_VECTOR_OWN_FIRST = 0x01, // We allocated the 1st block in the vector
451};
452
453#define NET_CHECK_SIGNATURE(PData, SIGNATURE) \
454 ASSERT (((PData) != NULL) && ((PData)->Signature == (SIGNATURE)))
455
456#define NET_SWAP_SHORT(Value) \
457 ((((Value) & 0xff) << 8) | (((Value) >> 8) & 0xff))
458
459//
460// Single memory block in the vector.
461//
462typedef struct {
463 UINT32 Len; // The block's length
464 UINT8 *Bulk; // The block's Data
465} NET_BLOCK;
466
467typedef VOID (*NET_VECTOR_EXT_FREE) (VOID *Arg);
468
469//
470//NET_VECTOR contains several blocks to hold all packet's
471//fragments and other house-keeping stuff for sharing. It
472//doesn't specify the where actual packet fragment begins.
473//
474typedef struct {
475 UINT32 Signature;
476 INTN RefCnt; // Reference count to share NET_VECTOR.
477 NET_VECTOR_EXT_FREE Free; // external function to free NET_VECTOR
478 VOID *Arg; // opeque argument to Free
479 UINT32 Flag; // Flags, NET_VECTOR_OWN_FIRST
480 UINT32 Len; // Total length of the assocated BLOCKs
481
482 UINT32 BlockNum;
483 NET_BLOCK Block[1];
484} NET_VECTOR;
485
486//
487//NET_BLOCK_OP operate on the NET_BLOCK, It specifies
488//where the actual fragment begins and where it ends
489//
490typedef struct {
491 UINT8 *BlockHead; // Block's head, or the smallest valid Head
492 UINT8 *BlockTail; // Block's tail. BlockTail-BlockHead=block length
493 UINT8 *Head; // 1st byte of the data in the block
494 UINT8 *Tail; // Tail of the data in the block, Tail-Head=Size
495 UINT32 Size; // The size of the data
496} NET_BLOCK_OP;
497
498
499//
500//NET_BUF is the buffer manage structure used by the
501//network stack. Every network packet may be fragmented,
502//and contains multiple fragments. The Vector points to
503//memory blocks used by the each fragment, and BlockOp
504//specifies where each fragment begins and ends.
505//
506//It also contains a opaque area for protocol to store
507//per-packet informations. Protocol must be caution not
508//to overwrite the members after that.
509//
510typedef struct {
511 UINT32 Signature;
512 INTN RefCnt;
e48e37fc 513 LIST_ENTRY List; // The List this NET_BUF is on
cbf316f2 514
515 IP4_HEAD *Ip; // Network layer header, for fast access
516 TCP_HEAD *Tcp; // Transport layer header, for fast access
517 UINT8 ProtoData [NET_PROTO_DATA]; //Protocol specific data
518
519 NET_VECTOR *Vector; // The vector containing the packet
520
521 UINT32 BlockOpNum; // Total number of BlockOp in the buffer
522 UINT32 TotalSize; // Total size of the actual packet
523 NET_BLOCK_OP BlockOp[1]; // Specify the position of actual packet
524} NET_BUF;
525
526
527//
528//A queue of NET_BUFs, It is just a thin extension of
529//NET_BUF functions.
530//
531typedef struct {
532 UINT32 Signature;
533 INTN RefCnt;
e48e37fc 534 LIST_ENTRY List; // The List this buffer queue is on
cbf316f2 535
e48e37fc 536 LIST_ENTRY BufList; // list of queued buffers
cbf316f2 537 UINT32 BufSize; // total length of DATA in the buffers
538 UINT32 BufNum; // total number of buffers on the chain
539} NET_BUF_QUEUE;
540
541//
542// Pseudo header for TCP and UDP checksum
543//
544#pragma pack(1)
545typedef struct {
546 IP4_ADDR SrcIp;
547 IP4_ADDR DstIp;
548 UINT8 Reserved;
549 UINT8 Protocol;
550 UINT16 Len;
551} NET_PSEUDO_HDR;
552#pragma pack()
553
554//
555// The fragment entry table used in network interfaces. This is
556// the same as NET_BLOCK now. Use two different to distinguish
557// the two in case that NET_BLOCK be enhanced later.
558//
559typedef struct {
560 UINT32 Len;
561 UINT8 *Bulk;
562} NET_FRAGMENT;
563
564#define NET_GET_REF(PData) ((PData)->RefCnt++)
565#define NET_PUT_REF(PData) ((PData)->RefCnt--)
566#define NETBUF_FROM_PROTODATA(Info) _CR((Info), NET_BUF, ProtoData)
567
568#define NET_BUF_SHARED(Buf) \
569 (((Buf)->RefCnt > 1) || ((Buf)->Vector->RefCnt > 1))
570
571#define NET_VECTOR_SIZE(BlockNum) \
572 (sizeof (NET_VECTOR) + ((BlockNum) - 1) * sizeof (NET_BLOCK))
573
574#define NET_BUF_SIZE(BlockOpNum) \
575 (sizeof (NET_BUF) + ((BlockOpNum) - 1) * sizeof (NET_BLOCK_OP))
576
577#define NET_HEADSPACE(BlockOp) \
578 (UINTN)((BlockOp)->Head - (BlockOp)->BlockHead)
579
580#define NET_TAILSPACE(BlockOp) \
581 (UINTN)((BlockOp)->BlockTail - (BlockOp)->Tail)
582
583NET_BUF *
584NetbufAlloc (
585 IN UINT32 Len
586 );
587
588VOID
589NetbufFree (
590 IN NET_BUF *Nbuf
591 );
592
593
594UINT8 *
595NetbufGetByte (
596 IN NET_BUF *Nbuf,
597 IN UINT32 Offset,
598 OUT UINT32 *Index OPTIONAL
599 );
600
601NET_BUF *
602NetbufClone (
603 IN NET_BUF *Nbuf
604 );
605
606NET_BUF *
607NetbufDuplicate (
608 IN NET_BUF *Nbuf,
609 IN NET_BUF *Duplicate OPTIONAL,
610 IN UINT32 HeadSpace
611 );
612
613NET_BUF *
614NetbufGetFragment (
615 IN NET_BUF *Nbuf,
616 IN UINT32 Offset,
617 IN UINT32 Len,
618 IN UINT32 HeadSpace
619 );
620
621VOID
622NetbufReserve (
623 IN NET_BUF *Nbuf,
624 IN UINT32 Len
625 );
626
627UINT8 *
628NetbufAllocSpace (
629 IN NET_BUF *Nbuf,
630 IN UINT32 Len,
631 IN BOOLEAN FromHead
632 );
633
634UINT32
635NetbufTrim (
636 IN NET_BUF *Nbuf,
637 IN UINT32 Len,
638 IN BOOLEAN FromHead
639 );
640
641UINT32
642NetbufCopy (
643 IN NET_BUF *Nbuf,
644 IN UINT32 Offset,
645 IN UINT32 Len,
646 IN UINT8 *Dest
647 );
648
649NET_BUF *
650NetbufFromExt (
651 IN NET_FRAGMENT *ExtFragment,
652 IN UINT32 ExtNum,
653 IN UINT32 HeadSpace,
654 IN UINT32 HeadLen,
655 IN NET_VECTOR_EXT_FREE ExtFree,
656 IN VOID *Arg OPTIONAL
657 );
658
659EFI_STATUS
660NetbufBuildExt (
661 IN NET_BUF *Nbuf,
662 IN NET_FRAGMENT *ExtFragment,
663 IN UINT32 *ExtNum
664 );
665
666NET_BUF *
667NetbufFromBufList (
e48e37fc 668 IN LIST_ENTRY *BufList,
cbf316f2 669 IN UINT32 HeadSpace,
670 IN UINT32 HeaderLen,
671 IN NET_VECTOR_EXT_FREE ExtFree,
672 IN VOID *Arg OPTIONAL
673 );
674
675VOID
676NetbufFreeList (
e48e37fc 677 IN LIST_ENTRY *Head
cbf316f2 678 );
679
680VOID
681NetbufQueInit (
682 IN NET_BUF_QUEUE *NbufQue
683 );
684
685NET_BUF_QUEUE *
686NetbufQueAlloc (
687 VOID
688 );
689
690VOID
691NetbufQueFree (
692 IN NET_BUF_QUEUE *NbufQue
693 );
694
695NET_BUF *
696NetbufQueRemove (
697 IN NET_BUF_QUEUE *NbufQue
698 );
699
700VOID
701NetbufQueAppend (
702 IN NET_BUF_QUEUE *NbufQue,
703 IN NET_BUF *Nbuf
704 );
705
706UINT32
707NetbufQueCopy (
708 IN NET_BUF_QUEUE *NbufQue,
709 IN UINT32 Offset,
710 IN UINT32 Len,
711 IN UINT8 *Dest
712 );
713
714UINT32
715NetbufQueTrim (
716 IN NET_BUF_QUEUE *NbufQue,
717 IN UINT32 Len
718 );
719
720VOID
721NetbufQueFlush (
722 IN NET_BUF_QUEUE *NbufQue
723 );
724
725UINT16
726NetblockChecksum (
727 IN UINT8 *Bulk,
728 IN UINT32 Len
729 );
730
731UINT16
732NetAddChecksum (
733 IN UINT16 Checksum1,
734 IN UINT16 Checksum2
735 );
736
737UINT16
738NetbufChecksum (
739 IN NET_BUF *Nbuf
740 );
741
742UINT16
743NetPseudoHeadChecksum (
744 IN IP4_ADDR Src,
745 IN IP4_ADDR Dst,
746 IN UINT8 Proto,
747 IN UINT16 Len
748 );
8a67d61d 749
cbf316f2 750#endif