netinet: Remove in_cksum_update()
It was never implemented on powerpc or riscv and appears to have been unused since it was added in 1998. No functional change intended. Reviewed by: kp, glebius, cy MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33093
This commit is contained in:
parent
00dbcdbe0a
commit
09100f936b
@ -45,35 +45,6 @@
|
||||
|
||||
#define in_cksum(m, len) in_cksum_skip(m, len, 0)
|
||||
|
||||
#if defined(IPVERSION) && (IPVERSION == 4)
|
||||
/*
|
||||
* It it useful to have an Internet checksum routine which is inlineable
|
||||
* and optimized specifically for the task of computing IP header checksums
|
||||
* in the normal case (where there are no options and the header length is
|
||||
* therefore always exactly five 32-bit words.
|
||||
*/
|
||||
#ifdef __CC_SUPPORTS___INLINE
|
||||
|
||||
static __inline void
|
||||
in_cksum_update(struct ip *ip)
|
||||
{
|
||||
int __tmpsum;
|
||||
__tmpsum = (int)ntohs(ip->ip_sum) + 256;
|
||||
ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define in_cksum_update(ip) \
|
||||
do { \
|
||||
int __tmpsum; \
|
||||
__tmpsum = (int)ntohs(ip->ip_sum) + 256; \
|
||||
ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
#if defined(IPVERSION) && (IPVERSION == 4)
|
||||
u_int in_cksum_hdr(const struct ip *ip);
|
||||
|
@ -83,14 +83,6 @@ in_cksum_hdr(const struct ip *ip)
|
||||
|
||||
return ~sum & 0xffff;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
in_cksum_update(struct ip *ip)
|
||||
{
|
||||
int __tmpsum;
|
||||
__tmpsum = (int)ntohs(ip->ip_sum) + 256;
|
||||
ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline u_short
|
||||
@ -123,17 +115,6 @@ in_pseudo(u_int sum, u_int b, u_int c)
|
||||
sum -= 0xffff;
|
||||
return (sum);
|
||||
}
|
||||
|
||||
#else
|
||||
#if defined(IPVERSION) && (IPVERSION == 4)
|
||||
#define in_cksum_update(ip) \
|
||||
do { \
|
||||
int __tmpsum; \
|
||||
__tmpsum = (int)ntohs(ip->ip_sum) + 256; \
|
||||
ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
@ -42,35 +42,6 @@
|
||||
|
||||
#define in_cksum(m, len) in_cksum_skip(m, len, 0)
|
||||
|
||||
#if defined(IPVERSION) && (IPVERSION == 4)
|
||||
/*
|
||||
* It it useful to have an Internet checksum routine which is inlineable
|
||||
* and optimized specifically for the task of computing IP header checksums
|
||||
* in the normal case (where there are no options and the header length is
|
||||
* therefore always exactly five 32-bit words.
|
||||
*/
|
||||
#ifdef __CC_SUPPORTS___INLINE
|
||||
|
||||
static __inline void
|
||||
in_cksum_update(struct ip *ip)
|
||||
{
|
||||
int __tmpsum;
|
||||
__tmpsum = (int)ntohs(ip->ip_sum) + 256;
|
||||
ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define in_cksum_update(ip) \
|
||||
do { \
|
||||
int __tmpsum; \
|
||||
__tmpsum = (int)ntohs(ip->ip_sum) + 256; \
|
||||
ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
#if defined(IPVERSION) && (IPVERSION == 4)
|
||||
u_int in_cksum_hdr(const struct ip *ip);
|
||||
|
@ -41,35 +41,6 @@
|
||||
|
||||
#define in_cksum(m, len) in_cksum_skip(m, len, 0)
|
||||
|
||||
#if defined(IPVERSION) && (IPVERSION == 4)
|
||||
/*
|
||||
* It it useful to have an Internet checksum routine which is inlineable
|
||||
* and optimized specifically for the task of computing IP header checksums
|
||||
* in the normal case (where there are no options and the header length is
|
||||
* therefore always exactly five 32-bit words.
|
||||
*/
|
||||
#ifdef __CC_SUPPORTS___INLINE
|
||||
|
||||
static __inline void
|
||||
in_cksum_update(struct ip *ip)
|
||||
{
|
||||
int __tmpsum;
|
||||
__tmpsum = (int)ntohs(ip->ip_sum) + 256;
|
||||
ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define in_cksum_update(ip) \
|
||||
do { \
|
||||
int __tmpsum; \
|
||||
__tmpsum = (int)ntohs(ip->ip_sum) + 256; \
|
||||
ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
#if defined(IPVERSION) && (IPVERSION == 4)
|
||||
u_int in_cksum_hdr(const struct ip *ip);
|
||||
|
Loading…
Reference in New Issue
Block a user