--- /dev/null
+#ifndef _BITS_TCPIP_H
+#define _BITS_TCPIP_H
+
+/** @file
+ *
+ * Transport-network layer interface
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+#endif /* _BITS_TCPIP_H */
#include <ipxe/socket.h>
#include <ipxe/in.h>
#include <ipxe/tables.h>
+#include <bits/tcpip.h>
struct io_buffer;
struct net_device;
struct sockaddr_tcpip *st_dest,
struct net_device *netdev,
uint16_t *trans_csum );
-extern uint16_t tcpip_continue_chksum ( uint16_t partial,
- const void *data, size_t len );
+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 );
+/* 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 */
* or both. Deciding which to swap is left as an exercise for the
* interested reader.
*/
-uint16_t tcpip_continue_chksum ( uint16_t partial, const void *data,
- size_t len ) {
+uint16_t generic_tcpip_continue_chksum ( uint16_t partial,
+ const void *data, size_t len ) {
unsigned int cksum = ( ( ~partial ) & 0xffff );
unsigned int value;
unsigned int i;