I'm writing a utility which uses SSH as the transport, much like Git uses SSH for pushes. Additionally I wrote a utility which executes a command and then captures the STDIN, STDOUT, and STDERR to the executed command. The capture utility currently writes the dump file so that it appears as a RAW link type and UDP packets. Is it possible to create a new link type code for raw file handles? I'm envisioning a packet structure which contains: 4 byte file descriptor 1 byte (0x01 == read data, 0x02 == write data, 0x03 == UTF8 error message) 3 byte errno code (if error) ? byte data This would remove the confusion of the source/destination IP address and ports when I send the capture to co-workers. It would also allow future development to create a Follow Shell session for file descriptors STDIN_FILENO, STDOUT_FILENO, and STDERR_FILENO much like the follow TCP or follow UDP features. asked 26 Oct '13, 21:48 syzdek |
2 Answers:
Here is how I understand what you are trying to do.
Here is what you could do
If that's is not what you are trying to do: please add more details, as I might not fully understand your intention. Regards answered 27 Oct '13, 11:09 Kurt Knochner ♦ |
The tcpdump/libpcap folks are the ones who look after this. See here. answered 27 Oct '13, 07:02 grahamb ♦ |
When looking at the tcpdump link types, I missed the user defined types and they were not mentioned in the PCAP Next Generation Format. I wanted a link type which would not require me to encapsulate the data within bogus IP/UDP or IP/TCP packets. Briefly scanning the linked wiki article,it appears the user defined link layer types should work perfectly. Thanks.