iPXE
tcpip.h
Go to the documentation of this file.
1#ifndef _BITS_TCPIP_H
2#define _BITS_TCPIP_H
3
4/** @file
5 *
6 * Generic architecture-specific transport-network layer interface
7 *
8 * This file is included only if the architecture does not provide its
9 * own version of this file.
10 *
11 */
12
13FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
14FILE_SECBOOT ( PERMITTED );
15
16#include <stdint.h>
17
18/**
19 * Calculate continued TCP/IP checkum
20 *
21 * @v partial Checksum of already-summed data, in network byte order
22 * @v data Data buffer
23 * @v len Length of data buffer
24 * @ret cksum Updated checksum, in network byte order
25 */
26static inline __attribute__ (( always_inline )) uint16_t
27tcpip_continue_chksum ( uint16_t partial, const void *data, size_t len ) {
28
29 /* Not yet optimised */
30 return generic_tcpip_continue_chksum ( partial, data, len );
31}
32
33#endif /* _BITS_TCPIP_H */
unsigned short uint16_t
Definition stdint.h:11
uint16_t tcpip_continue_chksum(uint16_t partial, const void *data, size_t len)
Calculate continued TCP/IP checkum.
Definition x86_tcpip.c:46
ring len
Length.
Definition dwmac.h:226
uint8_t data[48]
Additional event data.
Definition ena.h:11
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define __attribute__(x)
Definition compiler.h:10
uint16_t generic_tcpip_continue_chksum(uint16_t partial, const void *data, size_t len)
Calculate continued TCP/IP checkum.
Definition tcpip.c:171