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

Add separate ENABLE_RPCAPD option to build rpcapd #961

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

netrounds-fredrik
Copy link

This PR is related to #955 and shows how rpcapd can be build without having to enable the new and experimental "remote" libpcap API (ENABLE_REMOTE).

@guyharris
Copy link
Member

So you're building the experimental daemon for a protocol, but not the client code for that protocol? :-)

@guyharris
Copy link
Member

  1. This should be supported both by CMake and autotools.

  2. There should be a single flag that enables both client and server, with a flag that enables just the server, and perhaps another flag to enable just the client. (Either that, or a single flag that can specify "don't enable any remote capture", "enable only the client", "enable only the server", or "enable both".)

@netrounds-fredrik
Copy link
Author

So you're building the experimental daemon for a protocol, but not the client code for that protocol? :-)

Yes. A use-case for this is to run rpcapd on a Linux machine and Wireshark on Windows which has support for the rpcap protocol (https://qnaplus.com/capture-protocol-packets-from-remote-windows-or-linux-computer-using-wireshark/).

Copy link
Member

@mcr mcr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not seeing ./configure changes here. I guess they are coming.
I believe that we will eventually drop autoconf, but it hasn't happened yet.

@@ -205,9 +205,11 @@ set(PCAP_TYPE "" CACHE STRING "Packet capture type")
# not having it on UN*X.
#
if(WIN32)
option(ENABLE_REMOTE "Enable remote capture" ON)
option(ENABLE_RPCAPD "Enable building of rpcapd" ON)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
option(ENABLE_RPCAPD "Enable building of rpcapd" ON)
option(ENABLE_RPCAPD "Enable building of remote capture daemon (rpcapd)" ON)

else()
option(ENABLE_REMOTE "Enable remote capture" OFF)
option(ENABLE_RPCAPD "Enable building of rpcapd" OFF)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
option(ENABLE_RPCAPD "Enable building of rpcapd" OFF)
option(ENABLE_RPCAPD "Enable building of remote capture daemon (rpcapd)" OFF)

else()
option(ENABLE_REMOTE "Enable remote capture" OFF)
option(ENABLE_RPCAPD "Enable building of rpcapd" OFF)
option(ENABLE_REMOTE "Enable libpcap API for connecting to rpcapd" OFF)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
option(ENABLE_REMOTE "Enable libpcap API for connecting to rpcapd" OFF)
option(ENABLE_REMOTE "Enable libpcap client API for collecting remote captures via rpcapd" OFF)

@mcr
Copy link
Member

mcr commented Sep 2, 2020

  1. This should be supported both by CMake and autotools.

Yes.

  1. There should be a single flag that enables both client and server, with a flag that enables just the server, and perhaps another flag to enable just the client. (Either that, or a single flag that can specify "don't enable any remote capture", "enable only the client", "enable only the server", or "enable both".)

I think that this is a step forward, and if there is demand for that flag, I guess we can add it.

@guyharris
Copy link
Member

Yes. A use-case for this is to run rpcapd on a Linux machine and Wireshark on Windows which has support for the rpcap protocol (https://qnaplus.com/capture-protocol-packets-from-remote-windows-or-linux-computer-using-wireshark/).

That's also a use case for an option not to build libpcap at all, just rpcapd. Yes, ./configure --disable-libpcap sounds a bit weird if you're running libpcap's configure script, but.... :-)

@mcr
Copy link
Member

mcr commented Sep 3, 2020 via email

@antoniovazquezblanco
Copy link
Contributor

I have discovered rpcapd recently.

Looking at this PR I wonder if it makes sense to have a separate repos for libpcap and rpcapd. It seems that it makes sense to enable and disable both libpcap building as well as rpcapd server and client.

Please excuse me if this makes little or no sense as I am getting in touch with this tool.

Thanks!

@guyharris
Copy link
Member

Looking at this PR I wonder if it makes sense to have a separate repos for libpcap and rpcapd.

The libpcap client for the rpcap protocol, and the rpcapd server for the rpcap protocol, share:

  • the sockutils.c code that provides APIs for networking that 1) provide some convenience and 2) handle differences between UN*X sockets and WinSock and between various UN*X socket implementations;
  • the sslutils.c code that provides convenience routines for doing TLS;
  • the rpcap-protocol.c code that provides APIs for handling the rpcap protocol;
  • the fmtutils.c code for formatting error messages.

Having separate copies of those in two repositories would complicate maintenance of that code - changes to that code in one repository would have to be propagated to the other repository. There might be ways to untangle the dependencies, but it'd take more thought to come up with a good way to do it.

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

Successfully merging this pull request may close these issues.

5 participants