Skip to content

sipcapture/hepagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HEPagent

Next-Generation HEP Capture Agent in Rust

Instructions

Requirements
  • Install rustup
  • Install libluajit
    • Debian: apt install libluajit-5.1-dev
    • CentOS: yum install libluajit-5.1-devel

Build

  • Run cargo build --release

Docker Build

  • Dynamic docker build -t sipcapture/hepagent -f docker/Dockerfile .
  • Static (work in progress) docker build -t sipcapture/hepagent-static -f docker/Dockerfile-static .

Usage

# hepagent --help
Usage: hepagent [options] (-i <intf> | -r <pcap>)
       hepagent --version
       hepagent --help

Options:
    -i <intf>, --interface <intf>    Listen on interface. [default: any]
    -r <pcap>, --read-file <pcap>    Read pcap file.
    --hep-server <server>            HEP UDP server address. [default: 127.0.0.1:9060]

Developers

Contributors and Contributions to our project are always welcome! If you intend to participate and help us improve by sending patches, we kindly ask you to sign a standard CLA (Contributor License Agreement) which enables us to distribute your code alongside the project without restrictions present or future. It doesn’t require you to assign to us any copyright you have, the ownership of which remains in full with you. Developers can coordinate with the existing team via the homer-dev mailing list. If you'd like to join our internal team and volunteer to help with the project's many needs, feel free to contact us anytime!

Architecture
bpf -> pnet -> packets mod 
               - pre-parse a packet
               - if it's one of the types we want, TCP/UDP etc, pass it to lua capture plan
               -> capplan.lua
                  - run parsing logic
                  - call into rust module callbacks when need to do certain actions
                      -> sip rust module: parse, check method, parse out session params
                      -> hep rust module: send prepared HEP packet
                         -> calls into the publish module via mpsc channel
                      -> json rust module: send prepared json payload
                         -> should call into the json publish mpsc channel too
Modules

Rust modules register using register_module functions passing in Scripting instance - which allows to register in Lua.

For dynamic module loading those could be compiled as dynamic libs and register_module exported as #[no_mangle] symbol, making it an entry point for each module registration.


License & Copyright

H5

Code released under the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

(C) 2020 QXIP BV


Made by Humans

This Open-Source project is made possible by actual Humans without corporate sponsors, angels or patreons.
If you use this software in production, please consider supporting its development with contributions or donations

Donate