diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-09-03 14:56:07 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-09-03 14:56:07 +0100 |
commit | 799966fcb3067fe4e4ded62ee74e0f86a8c482ec (patch) | |
tree | 614eae1545487e2eea40651db11f817f4f192d4e /src/include/bits/tcpip.h | |
parent | 7f75d320f6d8ac7ec5185b2145da87f698aec273 (diff) | |
download | ipxe-riscv64.tar.gz |
[build] Centralise dummy architecture-specific headersriscv64
Simplify the process of adding a new CPU architecture by providing
common implementations of typically empty architecture-specific header
files.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/bits/tcpip.h')
-rw-r--r-- | src/include/bits/tcpip.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/include/bits/tcpip.h b/src/include/bits/tcpip.h new file mode 100644 index 000000000..9cb54d432 --- /dev/null +++ b/src/include/bits/tcpip.h @@ -0,0 +1,32 @@ +#ifndef _BITS_TCPIP_H +#define _BITS_TCPIP_H + +/** @file + * + * Generic architecture-specific transport-network layer interface + * + * This file is included only if the architecture does not provide its + * own version of this file. + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <stdint.h> + +/** + * Calculate continued TCP/IP checkum + * + * @v partial Checksum of already-summed data, in network byte order + * @v data Data buffer + * @v len Length of data buffer + * @ret cksum Updated checksum, in network byte order + */ +static inline __attribute__ (( always_inline )) uint16_t +tcpip_continue_chksum ( uint16_t partial, const void *data, size_t len ) { + + /* Not yet optimised */ + return generic_tcpip_continue_chksum ( partial, data, len ); +} + +#endif /* _BITS_TCPIP_H */ |