summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/tcpip.h
diff options
context:
space:
mode:
authorMichael Brown2016-05-04 14:30:37 +0200
committerMichael Brown2016-05-04 14:38:25 +0200
commit1e066431a45a67321abcd134e888205fc633bd41 (patch)
treeb627341e05eae7cdd99fc5ce6dfd9cb8ef218e0a /src/include/ipxe/tcpip.h
parent[build] Remove unnecessary dependency on zlib (diff)
downloadipxe-1e066431a45a67321abcd134e888205fc633bd41.tar.gz
ipxe-1e066431a45a67321abcd134e888205fc633bd41.tar.xz
ipxe-1e066431a45a67321abcd134e888205fc633bd41.zip
[tcpip] Do not fall back to using unoptimised TCP/IP checksumming
Require architecture-specific code to make a deliberate choice to use the unoptimised generic_tcpip_continue_chksum() function, if there is no optimised version available. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/tcpip.h')
-rw-r--r--src/include/ipxe/tcpip.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/include/ipxe/tcpip.h b/src/include/ipxe/tcpip.h
index be4ac838..414daad5 100644
--- a/src/include/ipxe/tcpip.h
+++ b/src/include/ipxe/tcpip.h
@@ -13,6 +13,10 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/socket.h>
#include <ipxe/in.h>
#include <ipxe/tables.h>
+
+extern uint16_t generic_tcpip_continue_chksum ( uint16_t partial,
+ const void *data, size_t len );
+
#include <bits/tcpip.h>
struct io_buffer;
@@ -195,17 +199,8 @@ extern int tcpip_tx ( struct io_buffer *iobuf, struct tcpip_protocol *tcpip,
extern struct tcpip_net_protocol * tcpip_net_protocol ( sa_family_t sa_family );
extern struct net_device * tcpip_netdev ( struct sockaddr_tcpip *st_dest );
extern size_t tcpip_mtu ( struct sockaddr_tcpip *st_dest );
-extern uint16_t generic_tcpip_continue_chksum ( uint16_t partial,
- const void *data, size_t len );
extern uint16_t tcpip_chksum ( const void *data, size_t len );
extern int tcpip_bind ( struct sockaddr_tcpip *st_local,
int ( * available ) ( int port ) );
-/* Use generic_tcpip_continue_chksum() if no architecture-specific
- * version is available
- */
-#ifndef tcpip_continue_chksum
-#define tcpip_continue_chksum generic_tcpip_continue_chksum
-#endif
-
#endif /* _IPXE_TCPIP_H */