summaryrefslogtreecommitdiff
path: root/networking/ping6.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-09-02 16:57:59 +0000
committerDenis Vlasenko2006-09-02 16:57:59 +0000
commite0b7f71d26d224bd8304d9dfcac3fe9b9d862cd2 (patch)
tree682ff0c7ef630f2e115b6fbe35d4fed561d06cc5 /networking/ping6.c
parent2cbe6e6eb237a8f51139be4d450997a0317ec593 (diff)
downloadbusybox-e0b7f71d26d224bd8304d9dfcac3fe9b9d862cd2.zip
busybox-e0b7f71d26d224bd8304d9dfcac3fe9b9d862cd2.tar.gz
ping(6): use htons instead of SWAP_BE.
Diffstat (limited to 'networking/ping6.c')
-rw-r--r--networking/ping6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/ping6.c b/networking/ping6.c
index 267109c..990328a 100644
--- a/networking/ping6.c
+++ b/networking/ping6.c
@@ -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);
@@ -234,7 +234,7 @@ static void sendping(int junk)
#ifndef MLD_LISTENER_REDUCTION
# define MLD_LISTENER_REDUCTION ICMP6_MEMBERSHIP_REDUCTION
#endif
-static char *icmp6_type_name (int id)
+static char *icmp6_type_name(int id)
{
switch (id) {
case ICMP6_DST_UNREACH: return "Destination Unreachable";
@@ -309,7 +309,7 @@ static void unpack(char *packet, int sz, struct sockaddr_in6 *from, int hoplimit
} else
if (icmppkt->icmp6_type != ICMP6_ECHO_REQUEST)
bb_error_msg("Warning: Got ICMP %d (%s)",
- icmppkt->icmp6_type, icmp6_type_name (icmppkt->icmp6_type));
+ icmppkt->icmp6_type, icmp6_type_name(icmppkt->icmp6_type));
}
static void ping(const char *host)