Ignore:
Timestamp:
02/07/19 14:07:07 (20 months ago)
Author:
Jacob Van Walraven <jcv9@…>
Branches:
develop
Children:
5cdb37d
Parents:
58c226e
git-author:
Jacob Van Walraven <jcv9@…> (02/07/19 14:00:51)
git-committer:
Jacob Van Walraven <jcv9@…> (02/07/19 14:07:07)
Message:

Structs mapped directly to a packet/file are now packed.
Replaced hardcoded value 27 with ERF_META_TYPE.
PCAPNG meta packets are still processed when DISCARD_META config is set in order to update the trace state, however the meta callback will not be called.
Removed INET_ADDRSTRLEN definitions and used ones provided by the standard headers.
Replaced %u, %lu in libpacketdump linktypes 21 and 23 with PRIu8, PRIu32 etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/link_21.c

    r4c88365 r4e5a51f  
    55
    66#include <arpa/inet.h>
     7#include <inttypes.h>
    78
    89DLLEXPORT void decode(int link_type UNUSED, const char *packet UNUSED, unsigned len UNUSED) {
     
    1819                                (char *)meta->items[i].data);
    1920                } else if (meta->items[i].datatype == TRACE_META_UINT8) {
    20                         printf("   %s: %u\n",
     21                        printf("   %s: %" PRIu8 "\n",
    2122                                meta->items[i].option_name,
    2223                                *(uint8_t *)meta->items[i].data);
    2324                } else if (meta->items[i].datatype == TRACE_META_UINT32) {
    24                         printf("   %s: %u\n",
     25                        printf("   %s: %" PRIu32 "\n",
    2526                                meta->items[i].option_name,
    2627                                *(uint32_t *)meta->items[i].data);
    2728                } else if (meta->items[i].datatype == TRACE_META_UINT64) {
    28                         printf("   %s: %lu\n",
     29                        printf("   %s: %" PRIu64 "\n",
    2930                                meta->items[i].option_name,
    3031                                *(uint64_t *)meta->items[i].data);
     
    4546                                mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
    4647                } else {
    47                         printf("   Unknown Option ID %u (output RAW): ", meta->items[i].option);
     48                        printf("   Unknown Option ID %" PRIu16 " (output RAW): ", meta->items[i].option);
    4849                        int k;
    4950                        unsigned char *curr = (unsigned char *)meta->items[i].data;
Note: See TracChangeset for help on using the changeset viewer.