From patchwork Sat Oct 30 15:00:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 502 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by open-mesh.org (Postfix) with SMTP id 7A3571542FA for ; Sat, 30 Oct 2010 16:59:32 +0200 (CEST) Received: (qmail invoked by alias); 30 Oct 2010 14:59:31 -0000 Received: from unknown (EHLO sven-desktop.lazhur.ath.cx) [89.246.213.145] by mail.gmx.net (mp011) with SMTP; 30 Oct 2010 16:59:31 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1++1QZKDgu+OTOYH/0MDgtogAvqAAHA+KrXYo4exT kHmiqWFPc45aoc From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 30 Oct 2010 17:00:53 +0200 Message-Id: <1288450858-14753-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.2.3 X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH 1/6] batctl: Correct format strings for 8 bit ttl X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2010 14:59:33 -0000 Signed-off-by: Sven Eckelmann --- batctl/tcpdump.c | 4 ++-- batctl/traceroute.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/batctl/tcpdump.c b/batctl/tcpdump.c index 0f62e65..8898cf8 100644 --- a/batctl/tcpdump.c +++ b/batctl/tcpdump.c @@ -335,7 +335,7 @@ static void dump_batman_ucast(unsigned char *packet_buff, ssize_t buff_len, int printf("BAT %s > ", get_name_by_macaddr((struct ether_addr *)ether_header->ether_shost, read_opt)); - printf("%s: UCAST, ttl %hu, ", + printf("%s: UCAST, ttl %hhu, ", get_name_by_macaddr((struct ether_addr *)unicast_packet->dest, read_opt), unicast_packet->ttl); @@ -388,7 +388,7 @@ static void dump_batman_frag(unsigned char *packet_buff, ssize_t buff_len, int r printf("BAT %s > ", get_name_by_macaddr((struct ether_addr *)unicast_frag_packet->orig, read_opt)); - printf("%s: FRAG, seq %hu, ttl %hu, flags [%c], ", + printf("%s: FRAG, seq %hu, ttl %hhu, flags [%c], ", get_name_by_macaddr((struct ether_addr *)unicast_frag_packet->dest, read_opt), ntohs(unicast_frag_packet->seqno), unicast_frag_packet->ttl, (unicast_frag_packet->flags & UNI_FRAG_HEAD ? 'H' : '.')); diff --git a/batctl/traceroute.c b/batctl/traceroute.c index dc97a01..0dc796a 100644 --- a/batctl/traceroute.c +++ b/batctl/traceroute.c @@ -199,9 +199,9 @@ int traceroute(char *mesh_iface, int argc, char **argv) } if (!bat_host) - printf("%2hu: %s", icmp_packet_out.ttl, (return_mac ? return_mac : "*")); + printf("%2hhu: %s", icmp_packet_out.ttl, (return_mac ? return_mac : "*")); else - printf("%2hu: %s (%s)", icmp_packet_out.ttl, bat_host->name, return_mac); + printf("%2hhu: %s (%s)", icmp_packet_out.ttl, bat_host->name, return_mac); for (i = 0; i < NUM_PACKETS; i++) { if (time_delta[i])