Skip to content

Add information to associate packets with processes #164

@prakharPant

Description

@prakharPant

I have modified the wireshark code to include the process information for the packets that it captures.

I want to add this issue to suggest support for capturing process information through pcapng.

https://gitlab.com/wireshark/wireshark/-/merge_requests/17737

Currently I have modified the pcapng and pcapio code. In my merge request. (Linked above)

I still have a lot of work to do but if you could guide me on whether this is the right way to approach the issue then that would be very helpful.

I've created struct process info -

struct process_info {
__u32 pid; // Current process ID
__u32 ppid; // Parent process ID
__u32 gpid; // Grandparent process ID
char comm[TASK_COMM_LEN]; // Command name of the process
char p_comm[TASK_COMM_LEN]; // Command name of the parent process
char gp_comm[TASK_COMM_LEN]; // Command name of the grandparent process
};

I am passing the struct from dumpcap in wireshark and have modified the pcapng_write_enhanced_packet_block to include the struct.

Further I add the option for the struct and pass it off along with the enhanced packet block.

Then parse the option in pcapng and store it against the modified wtap_rec struct that includes the process_info struct.

How should I go about getting this implemented?

Thanks

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