Fix a conflict between a private in_cksum() reimplementation and the stack one.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2675 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -152,7 +152,7 @@ int bufspace = DEFAULT_BUFSPACE;
|
|||||||
|
|
||||||
void fill (char *, char *);
|
void fill (char *, char *);
|
||||||
void catcher(), prtsig(), finish(), summary(int);
|
void catcher(), prtsig(), finish(), summary(int);
|
||||||
int in_cksum (u_short *, int);
|
int compute_in_cksum (u_short *, int);
|
||||||
void pinger();
|
void pinger();
|
||||||
char *pr_addr (in_addr_t);
|
char *pr_addr (in_addr_t);
|
||||||
int check_icmph (struct ip *);
|
int check_icmph (struct ip *);
|
||||||
@@ -591,7 +591,7 @@ void pinger()
|
|||||||
cc = datalen + 8; /* skips ICMP portion */
|
cc = datalen + 8; /* skips ICMP portion */
|
||||||
|
|
||||||
/* compute ICMP checksum here */
|
/* compute ICMP checksum here */
|
||||||
icp->icmp_cksum = in_cksum((u_short *)icp, cc);
|
icp->icmp_cksum = compute_in_cksum((u_short *)icp, cc);
|
||||||
|
|
||||||
if (options & F_HDRINCL) {
|
if (options & F_HDRINCL) {
|
||||||
struct ip *ip = (struct ip*)outpackhdr;
|
struct ip *ip = (struct ip*)outpackhdr;
|
||||||
@@ -599,7 +599,7 @@ void pinger()
|
|||||||
packet = (char*)ip;
|
packet = (char*)ip;
|
||||||
cc += sizeof(struct ip);
|
cc += sizeof(struct ip);
|
||||||
ip->ip_len = htons(cc);
|
ip->ip_len = htons(cc);
|
||||||
ip->ip_sum = in_cksum((u_short *)outpackhdr, cc);
|
ip->ip_sum = compute_in_cksum((u_short *)outpackhdr, cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
i = sendto(s, (char *)packet, cc, 0, &whereto,
|
i = sendto(s, (char *)packet, cc, 0, &whereto,
|
||||||
@@ -832,11 +832,11 @@ void pr_pack(char *buf, int cc, struct sockaddr_in *from)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* in_cksum --
|
* compute_in_cksum --
|
||||||
* Checksum routine for Internet Protocol family headers (C Version)
|
* Checksum routine for Internet Protocol family headers (C Version)
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
in_cksum(addr, len)
|
compute_in_cksum(addr, len)
|
||||||
u_short *addr;
|
u_short *addr;
|
||||||
int len;
|
int len;
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user