On Saturday 30 October 2010 17:00:55 Sven Eckelmann wrote:
-static void dump_arp(unsigned char *packet_buff, ssize_t buff_len, int time_printed) +static void dump_arp(unsigned char *packet_buff, ssize_t buff_len) { struct ether_arp *arphdr;
LEN_CHECK((size_t)buff_len, sizeof(struct ether_arp), "ARP");
if (!time_printed)
time_printed = print_time();
arphdr = (struct ether_arp *)packet_buff; switch (ntohs(arphdr->arp_op)) {
@@ -111,7 +108,7 @@ static void dump_arp(unsigned char *packet_buff, ssize_t buff_len, int time_prin } }
I don't understand why you want to remove the time_printed stuff. Maybe it is not so clear what this is good for ? At the beginning of each line batctl tcpdump prints a timestamp by caling print_time(). The various functions to analyze the headers (e.g. ARP) can be called under different conditions: Either after the encapsulating batman-adv header had been printed (including the timestamp) or without any prior prints in which case we want to output the timestamp.
Regards, Marek