joelagnel / bpfd

BPFd (Deprecated, please see README.md) : Berkeley Packet Filter daemon (BPFd). Makes it possible to run BCC tools across systems.
Apache License 2.0
95 stars 23 forks source link

Allow for BPFd commands to be able to accept 0 or 1 arguments #16

Closed jcanseco closed 6 years ago

jcanseco commented 6 years ago

Currently, the parser in BPFd expects at least 2 arguments or it breaks. This forces users of the BPFd interface to pass at least two arguments even when none or only 1 is needed.

For example:

BPF_DETACH_UPROBE "evname" 0

In the above example, the 0 is only passed in to satisfy the "at least 2 arg" requirement of the parser.