Skip to content

Save output of libprotoident in pcap format #35

@robtub14

Description

@robtub14

In file lpi_protoident.cc under tools/protoident

Trying to access packet information that is saved in result.

Need to use the information to save result to a pcap file for further processing.

How can you get the output of libprotoident to be saved in a pcap format? Ideally I want to add the packet information output by libprotoident to the actual packet in the form of a flag.

This is the relevant function:

static void per_result(libtrace_t *trace, libtrace_thread_t *sender,
void *global, void *tls, libtrace_result_t *result) {

    char *resultstr;

    if (result->type != RESULT_USER)
            return;

    resultstr = (char *)result->value.ptr;
    printf(resultstr);
    free(resultstr);

}

Thank you for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions