ping(6): use htons instead of SWAP_BE.

This commit is contained in:
Denis Vlasenko
2006-09-02 16:57:59 +00:00
parent 2cbe6e6eb2
commit e0b7f71d26
2 changed files with 6 additions and 6 deletions

View File

@@ -209,7 +209,7 @@ static void sendping(int junk)
pkt->icmp_type = ICMP_ECHO;
pkt->icmp_code = 0;
pkt->icmp_cksum = 0;
pkt->icmp_seq = SWAP_BE16(ntransmitted++);
pkt->icmp_seq = htons(ntransmitted++);
pkt->icmp_id = myid;
CLR(ntohs(pkt->icmp_seq) % MAX_DUP_CHK);

View File

@@ -198,7 +198,7 @@ static void sendping(int junk)
pkt->icmp6_type = ICMP6_ECHO_REQUEST;
pkt->icmp6_code = 0;
pkt->icmp6_cksum = 0;
pkt->icmp6_seq = SWAP_BE16(ntransmitted++);
pkt->icmp6_seq = htons(ntransmitted++);
pkt->icmp6_id = myid;
CLR(pkt->icmp6_seq % MAX_DUP_CHK);