Fork me on GitHub
Data Structures | Macros | Typedefs | Functions | Variables

Helper tool to convert .pcap files to Janus .mjr recordings. More...

#include <arpa/inet.h>
#include <endian.h>
#include <inttypes.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/time.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netinet/udp.h>
#include <errno.h>
#include <glib.h>
#include <jansson.h>
#include <pcap.h>
#include <pcap/sll.h>
#include "../debug.h"
#include "p2m-cmdline.h"
#include "pp-rtp.h"
Include dependency graph for pcap2mjr.c:

Data Structures

struct  pcap2mjr_ethernet_header
 

Macros

#define htonll(x)   ((1==htonl(1)) ? (x) : ((gint64)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))
 
#define ntohll(x)   ((1==ntohl(1)) ? (x) : ((gint64)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))
 

Typedefs

typedef struct pcap2mjr_ethernet_header pcap2mjr_ethernet_header
 

Functions

int main (int argc, char *argv[])
 

Variables

int janus_log_level = 4
 
gboolean janus_log_timestamps = FALSE
 
gboolean janus_log_colors = TRUE
 
char * janus_log_global_prefix = NULL
 
int lock_debug = 0
 
int working = 0
 

Detailed Description

Helper tool to convert .pcap files to Janus .mjr recordings.

Author
Lorenzo Miniero loren.nosp@m.zo@m.nosp@m.eetec.nosp@m.ho.c.nosp@m.om

Using the utility is quite simple. Just pass, as arguments to the tool, the SSRC to extract, the codec used for the RTP packets originally, the path to the .pcap source file, and the path to the destination file, e.g.:

./pcap2mjr -c vp8 -s 12345678 /path/to/source.pcap /path/to/destination.mjr

If the tool can't detect any RTP packet with that SSRC, it will result in an error.

Recordings post-processing utility

Macro Definition Documentation

◆ htonll

#define htonll (   x)    ((1==htonl(1)) ? (x) : ((gint64)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))

◆ ntohll

#define ntohll (   x)    ((1==ntohl(1)) ? (x) : ((gint64)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))

Typedef Documentation

◆ pcap2mjr_ethernet_header

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Variable Documentation

◆ janus_log_colors

gboolean janus_log_colors = TRUE

◆ janus_log_global_prefix

char* janus_log_global_prefix = NULL

◆ janus_log_level

int janus_log_level = 4

◆ janus_log_timestamps

gboolean janus_log_timestamps = FALSE

◆ lock_debug

int lock_debug = 0

◆ working

int working = 0