* Fix in SkCsGetSendInfo():
* - function did not return ProtocolFlags in every case.
* - pseudo header csum calculated wrong for big endian.
- *
+ *
* Revision 1.9 2001/06/13 07:42:08 gklug
* fix: NetNumber was wrong in CLEAR_STAT event
* add: check for good NetNumber in Clear STAT
- *
+ *
* Revision 1.8 2001/02/06 11:15:36 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.7 2000/06/29 13:17:05 rassmann
* Corrected reception of a packet with UDP checksum == 0 (which means there
* is no UDP checksum).
- *
+ *
* Revision 1.6 2000/02/21 12:35:10 cgoos
* Fixed license header comment.
- *
+ *
* Revision 1.5 2000/02/21 11:05:19 cgoos
* Merged changes back to common source.
* Fixed rx path for BIG ENDIAN architecture.
- *
+ *
* Revision 1.1 1999/07/26 15:28:12 mkarl
* added return SKCS_STATUS_IP_CSUM_ERROR_UDP and
* SKCS_STATUS_IP_CSUM_ERROR_TCP to pass the NidsTester
* changed from common source to windows specific source
* therefore restarting with v1.0
- *
+ *
* Revision 1.3 1999/05/10 08:39:33 mkarl
* prevent overflows in SKCS_HTON16
* fixed a bug in pseudo header checksum calculation
* added some comments
- *
+ *
* Revision 1.2 1998/10/22 11:53:28 swolf
* Now using SK_DBG_MSG.
- *
+ *
* Revision 1.1 1998/09/01 15:35:41 swolf
* initial revision
*
*
******************************************************************************/
+#include <config.h>
+
+#ifdef CONFIG_SK98
+
#ifdef SK_USE_CSUM /* Check if CSUM is to be used. */
#ifndef lint
SKCS_OFS_IP_DESTINATION_ADDRESS + 2) +
(unsigned long) SKCS_HTON16(NextLevelProtocol) +
(unsigned long) SKCS_HTON16(IpDataLength);
-
+
/* Add-in any carries. */
SKCS_OC_ADD(PseudoHeaderChecksum, PseudoHeaderChecksum, 0);
* us to check upper-layer checksums, because we cannot do any further
* processing of the packet without a valid IP checksum.
*/
-
+
/* Get the next level protocol identifier. */
-
+
NextLevelProtocol = *(SK_U8 *)
SKCS_IDX(pIpHeader, SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL);
*(SK_U16*)SKCS_IDX(pIpHeader, IpHeaderLength + 6) == 0x0000) {
NextLevelProtoStats->RxOkCts++;
-
+
return (SKCS_STATUS_IP_CSUM_OK_NO_UDP);
}
return (NextLevelProtocol == SKCS_PROTO_ID_TCP ?
SKCS_STATUS_TCP_CSUM_OK : SKCS_STATUS_UDP_CSUM_OK);
}
-
+
/* TCP/UDP checksum error. */
NextLevelProtoStats->RxErrCts++;
} /* SkCsEvent */
#endif /* SK_USE_CSUM */
+
+#endif /* CONFIG_SK98 */