Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save output of libprotoident in pcap format #35

Open
robtub14 opened this issue Aug 24, 2020 · 0 comments
Open

Save output of libprotoident in pcap format #35

robtub14 opened this issue Aug 24, 2020 · 0 comments

Comments

@robtub14
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant