repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
Montimage/mmt-probe | src/modules/dpi/report/query/op_var.c | /*
* op_var.c
*
* Created on: Mar 31, 2022
* Author: nhnghia
*/
#include "operator.h"
#define ELEMENTS_SIZE 500000
typedef struct _op_var{
data_types_t data_type;
uint32_t counter;
uint32_t elements_size; //number of elements
uint32_t data_size; //memory size of one element
uint8_t *elements;
union... |
Montimage/mmt-probe | src/modules/dpi/lte/topology_report.c | /*
* topology_report.c
*
* Created on: Dec 13, 2018
* by: Huu-Nghia
*/
#include <mmt_core.h>
#include <tcpip/mmt_tcpip.h>
#include <mobile/mmt_mobile.h>
#include<pthread.h>
#include <stdint.h>
#include "topology_report.h"
#include "../dpi.h"
#include "../dpi_tool.h"
#include "../../../lib/string_buil... |
Montimage/mmt-probe | src/modules/dpi/dpi_tool.h | /*
* dpi_tool.h
*
* Created on: Dec 19, 2017
* by: <NAME>
* Collection of functions for registering or unregistering for MMT-DPI some attributes to extract
*/
#ifndef SRC_MODULES_DPI_DPI_TOOL_H_
#define SRC_MODULES_DPI_DPI_TOOL_H_
#include <arpa/inet.h>
#include <stdbool.h>
#include <stdint.h>
#inclu... |
Montimage/mmt-probe | test/perf/gettimeofday.c | <filename>test/perf/gettimeofday.c
/*
* gettimeofday.c
*
* Created on: Oct 5, 2018
* Author: nhnghia
*
*
* Benchmark performance of `gettimeofday` function.
* Compile: gcc gettimeofday.c -o ben_gettimeofday
*/
#include <stdio.h>
#include <sys/time.h>
#define MICRO_PER_SEC 1000000
int main(void)
{
... |
Montimage/mmt-probe | src/modules/license/license.h | <reponame>Montimage/mmt-probe
/*
* license.h
*
* Created on: Apr 16, 2018
* by: <NAME>
*/
#ifndef SRC_LIB_LICENSE_H_
#define SRC_LIB_LICENSE_H_
#include "../output/output.h"
/**
* This function checks MAC address, license expiry dates to validate the MMT license.
* @return
* - true if license is v... |
Montimage/mmt-probe | src/modules/dpi/reconstruct/http/http_reconstruct.h | /*
* html_reconstruct.h
*
* Created on: Apr 17, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_DPI_RECONSTRUCT_HTTP_HTTP_RECONSTRUCT_H_
#define SRC_MODULES_DPI_RECONSTRUCT_HTTP_HTTP_RECONSTRUCT_H_
#include <mmt_core.h>
#include "../../../../configure.h"
typedef struct http_reconstruct_struct http_reconstruc... |
Montimage/mmt-probe | src/_old/condition_based_reporting.c | <filename>src/_old/condition_based_reporting.c
/*
* condition_based_reporting.c
*
* Created on: Mar 29, 2017
* Author: montimage
*/
#include "processing.h"
/* This function returns the function handler corresponding to a particular func_name.
* If a func_name does not exist it returns 0.
* */
void * get_ha... |
Montimage/mmt-probe | src/modules/output/socket/socket_output.h | /*
* socket_output.h
*
* Created on: May 30, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_OUTPUT_SOCKET_OUTPUT_H_
#define SRC_MODULES_OUTPUT_SOCKET_OUTPUT_H_
#include "../../../configure.h"
typedef struct socket_output_struct socket_output_t;
socket_output_t* socket_output_init( const socket_output_conf_... |
Montimage/mmt-probe | src/modules/packet_capture/dpdk/dpdk_malloc.h | <gh_stars>1-10
/*
* dpdk_malloc.h
*
* Created on: Aug 23, 2018
* by: <NAME>
*
* Include this file to .c file to use DPDK memory allocation.
* The functions in this file must not be called before rte_eal_init.
*/
#ifndef SRC_MODULES_PACKET_CAPTURE_DPDK_DPDK_MALLOC_H_
#define SRC_MODULES_PACKET_CAPTURE... |
Montimage/mmt-probe | src/modules/dpi/pcap_dump/pcap_dump.c | /*
* dump_data.c
*
* Created on: Jan 12, 2018
* by: <NAME>
*/
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include "../dpi_tool.h"
#include "../../../lib/malloc_ext.h"
#include "../../../lib/memory.h"
typedef struct pcap_dump_context_struct{
FILE *file;
const pcap_dump_conf_t *config;
... |
Montimage/mmt-probe | src/_old/multisession_reporting.c | <gh_stars>1-10
/*
* multisession_reporting.c
*
* Created on: Mar 29, 2017
* Author: montimage
*/
#include "processing.h"
/* This function extracts the required information from the #ipacket, which is required to create
* a multi_session report and then sends the message/report through redis in a particula... |
Montimage/mmt-probe | src/modules/dpi/reconstruct/http/http_reconstruct.c | <reponame>Montimage/mmt-probe
/** Dependencies
* zlib
* sudo apt-get install zlib1g zlib1g-dev
*
* June 15 2018 supports:
* - Content-Encoding: gzip
* - Transfer-Encoding: chunked
*/
#ifndef HTTP_RECONSTRUCT_MODULE
#define HTTP_RECONSTRUCT_MODULE
#endif
#include <stdio.h>
#include <string.h>
#include <time... |
Montimage/mmt-probe | src/modules/output/output.h | <gh_stars>1-10
/*
* output.h
*
* Created on: Dec 18, 2017
* by: <NAME>
*
* This can be seen as an abstract output channel (an interface) or a dispatcher that dispatches reports to the output channels.
* MMT-Probe does not work directly with output channels. It works only with this.
*/
#ifndef SRC_MOD... |
Montimage/mmt-probe | src/configure_override.h | /*
* configure_override.h
*
* Created on: Apr 23, 2018
* by: <NAME>
*/
#ifndef SRC_CONFIGURE_OVERRIDE_H_
#define SRC_CONFIGURE_OVERRIDE_H_
#include "configure.h"
#include "lib/macro_apply.h"
//TODO: remove the following defines
#if 0
#define MONGODB_MODULE
#define PCAP_DUMP_MODULE
#define KAFKA_MODULE... |
Montimage/mmt-probe | src/_old/smp_main.c | /*
* File: main.c
* Author: montimage
*
* Created on 31 mai 2011, 14:09
*/
//TODO:
//Debug MMT_Security for multi-threads
#ifdef linux
#include <syscall.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <pthread.h>
#include <errno.h>
#include <signal.h>
#include <u... |
Montimage/mmt-probe | src/modules/dpi/lte/lte_qos_report.h | /*
* lte_qos_report.h
*
* Created on: Jun 25, 2019
* by: Huu-Nghia
*/
#ifndef SRC_MODULES_DPI_LTE_LTE_QOS_REPORT_H_
#define SRC_MODULES_DPI_LTE_LTE_QOS_REPORT_H_
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <mmt_core.h>
#include "../../output/output.h"
typedef struct lte_qos_r... |
Montimage/mmt-probe | src/modules/dpi/lte/lte_qos_report.c | /*
* lte_qos_report.c
*
* Created on: Jun 25, 2019
* by: Huu-Nghia
*/
#include <mmt_core.h>
#include <tcpip/mmt_tcpip.h>
#include <mobile/mmt_mobile.h>
#include<pthread.h>
#include <stdint.h>
#include "lte_qos_report.h"
#include "../dpi.h"
#include "../dpi_tool.h"
#include "../../../lib/string_buil... |
Montimage/mmt-probe | src/modules/dpi/report/session_report_rtp.c | /*
* session_report_rtp.c
*
* Created on: May 04, 2018
* by: <NAME>
*/
#include "session_report.h"
#include "../../../lib/malloc_ext.h"
struct session_rtp_stat_struct {
/* The reason we need this is that RTP flows may contain STUN messages. We follow here RTP packets only */
uint32_t packets_nb;
uin... |
Montimage/mmt-probe | src/_old/http_reconstruct.c | /** Dependencies
* HTML parser
* git clone https://github.com/luongnv89/htmlstreamparser.git
* cd htmlstreamparser/
* ./configure
* make
* sudo make install
*
* zlib
* sudo apt-get install zlib1g zlib1g-dev
*/
//TODOs: content reconstruction
// - add user data at session detection - OK
/... |
Montimage/mmt-probe | src/_old/microflows_session_report.c | #include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <errno.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "mmt_core.h"
#include "tcpip/mmt_tcpip_protocols.h"
#include "processing.h"
/**
* Returns 1 if the given session is a microflow, O otherwise
* @param expired_s... |
Montimage/mmt-probe | src/modules/dpi/reconstruct/ftp/ftp_reconstruct.c | <filename>src/modules/dpi/reconstruct/ftp/ftp_reconstruct.c
/*
* ftp_reconstruct.c
*
* Created on: May 29, 2018
* by: <NAME>
*/
#include "ftp_reconstruct.h"
#include <tcpip/mmt_tcpip.h>
#include "../../../../lib/tools.h"
#include "../../../../lib/limit.h"
#include "../../dpi_tool.h"
struct ftp_reconstr... |
Montimage/mmt-probe | src/lib/unit.h | <reponame>Montimage/mmt-probe
/*
* unit.h
*
* Created on: Apr 24, 2018
* by: <NAME>
*/
#ifndef SRC_LIB_UNIT_H_
#define SRC_LIB_UNIT_H_
#define KILO 1000
#define MEGA (1000000)
#define GIGA (1000000000)
#define TERA (1000000000000)
#endif /* SRC_LIB_UNIT_H_ */
|
Montimage/mmt-probe | src/worker.h | /*
* worker.h
*
* Created on: Dec 18, 2017
* by: <NAME>
*/
#ifndef SRC_LIB_WORKER_H_
#define SRC_LIB_WORKER_H_
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h> //for uint64_t PRIu64
#include <stdbool.h>
#include <signal.h>
#include <mmt_core.h>
#include "context.h"
#i... |
Montimage/mmt-probe | src/modules/security/security.h | <filename>src/modules/security/security.h
/*
* security.h
*
* Created on: Mar 17, 2017
* Created by: <NAME> <<EMAIL>>
*/
#ifndef SRC_LIB_SECURITY_SECURITY_H_
#define SRC_LIB_SECURITY_SECURITY_H_
#include <pthread.h>
#include <mmt_core.h>
#include <mmt_security.h>
#include "../../configure.h"
#include "../outpu... |
Montimage/mmt-probe | src/lib/inet.h | <reponame>Montimage/mmt-probe
/*
* inet.h
*
* Created on: Jun 5, 2018
* by: <NAME>
*/
#ifndef SRC_LIB_INET_H_
#define SRC_LIB_INET_H_
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stdint.h>
#include "string_builder.h"
#define INET_ADDRSTRL... |
Montimage/mmt-probe | src/_old/init_socket.c | <filename>src/_old/init_socket.c<gh_stars>1-10
/*
* init_socket.c
*
* Created on: Mar 29, 2017
* Author: montimage
*/
#include "processing.h"
#include <netinet/in.h>
#include <netdb.h>
void error(const char *msg)
{
perror(msg);
exit(1);
}
/* This function creates socket, UNIX or Internet domain */
void ... |
Montimage/mmt-probe | src/modules/dpi/report/no_session_report.h | /*
* no_session_report.h
*
* Created on: Apr 18, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_DPI_REPORT_NO_SESSION_REPORT_H_
#define SRC_MODULES_DPI_REPORT_NO_SESSION_REPORT_H_
#include <mmt_core.h>
#include <stdbool.h>
#include "../../output/output.h"
typedef struct no_session_report_context_struct no_... |
Montimage/mmt-probe | src/lib/ms_timer.h | <filename>src/lib/ms_timer.h
/*
* ms_timer.h
*
* A timer fires each millisecond
*
* Created on: Apr 6, 2022
* Author: nhnghia
*/
#ifndef SRC_LIB_MS_TIMER_H_
#define SRC_LIB_MS_TIMER_H_
#include "stdint.h"
#include "stdlib.h"
//1 second = 1M microsecond
#define S2US 1000000
//1 millisecond = 1K microsec... |
Montimage/mmt-probe | src/modules/dynamic_conf/dynamic_conf.h | /*
* dynamic_conf.h
*
* Created on: Dec 26, 2017
* by: <NAME>
*/
#ifndef SRC_MODULES_DYNAMIC_CONF_DYNAMIC_CONF_H_
#define SRC_MODULES_DYNAMIC_CONF_DYNAMIC_CONF_H_
#include <stdbool.h>
#include "agency.h"
typedef struct dynamic_conf_struct dynamic_config_context_t;
bool dynamic_conf_alloc_and_init( p... |
Montimage/mmt-probe | src/modules/output/socket/socket_output.c | /*
* socket_output.c
*
* Created on: May 30, 2018
* by: <NAME>
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
#include <unistd.h>
#include "socket_output.h"
#include "../../../l... |
Montimage/mmt-probe | src/modules/dpi/report/event_based_report.c | /*
* event_based_report.c
*
* Created on: Dec 19, 2017
* by: <NAME>
*/
#include <mmt_core.h>
#include "../dpi_tool.h"
#include "../../output/output.h"
#include "../../../lib/malloc_ext.h"
#include "event_based_report.h"
typedef struct event_based_report_context_struct {
const event_report_conf_t *confi... |
Montimage/mmt-probe | test/perf/combinator.c | <filename>test/perf/combinator.c<gh_stars>1-10
/*
* combinator.c
*
* Created on: Jun 27, 2018
* by: <NAME>
*
* Program to generate all permutation of a set with distinct strings.
* The set of strings is given via input parameter of the program.
*/
#include <stdio.h>
#include <string.h>
#include <stdl... |
Montimage/mmt-probe | src/_old/parseoptions.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h> //usleep, sleep
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "mmt_core.h"
#include "processing.h"
#include "confuse.h"
#include "lib/security.h"
//normally GIT_VERSION must be given by Makefile
#ifndef G... |
Montimage/mmt-probe | src/modules/dpi/report/query/operator_stack.c | /*
* operator_stack.c
*
* Created on: Apr 5, 2022
* Author: nhnghia
*/
#include "operator_stack.h"
struct _query_operator_stack{
size_t size;
query_operator_t **operators;
data_types_t result_data_type;
};
data_types_t query_operator_stack_get_data_type( const query_operator_stack_t* st){
return st->r... |
Montimage/mmt-probe | src/modules/dpi/dpi.h | /*
* dpi.h
*
* Created on: Dec 20, 2017
* by: <NAME>
*
* This file coordinates the different usages of DPI, such as,
* - to create statistic reports
* - to reassembly TCP streams
* - to reconstruct FTP or HTTP data
* - to dump traffic to pcap files
*/
#ifndef SRC_MODULES_DPI_STAT_H_
#define SRC_MO... |
Montimage/mmt-probe | src/context.h | /*
* context.h
*
* Created on: Dec 13, 2017
* by: <NAME>
*/
#ifndef SRC_LIB_CONTEXT_H_
#define SRC_LIB_CONTEXT_H_
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h> //for uint64_t PRIu64
#include <stdbool.h>
#include <signal.h>
#include <mmt_core.h>
#include "configure.h"
... |
Montimage/mmt-probe | src/_old/dynamic_conf.c | <gh_stars>1-10
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include "processing.h"
#include <signal.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <sysrepo.h>
static void mmt_cleanup(sr_conn_ctx_t *connection, sr_session_ctx_t *session, s... |
Montimage/mmt-probe | src/modules/dpi/report/query/operator.h | <reponame>Montimage/mmt-probe
/*
* operation.h
*
* Created on: Mar 30, 2022
* Author: nhnghia
*/
#ifndef SRC_MODULES_DPI_REPORT_QUERY_OPERATOR_H_
#define SRC_MODULES_DPI_REPORT_QUERY_OPERATOR_H_
#include "../../../../lib/memory.h"
#include "../../../../lib/malloc.h"
#include <mmt_core.h>
typedef enum {
Q... |
Montimage/mmt-probe | src/_old/radius_reporting.c | #include <stdio.h>
#include <string.h>
#include <time.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "mmt_core.h"
#include "tcpip/mmt_tcpip_protocols.h"
#include "processing.h"
struct mmt_location_info_struct {
uint32_t field_len;
uint32_t opaque;
uint16_t cell_lac;
uint16_t cell_id;
}... |
Montimage/mmt-probe | src/modules/dpi/reconstruct/http/decode.h | /*
* decode.h
*
* Created on: Jun 14, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_DPI_RECONSTRUCT_HTTP_DECODE_H_
#define SRC_MODULES_DPI_RECONSTRUCT_HTTP_DECODE_H_
#include <stdint.h>
#include <stdbool.h>
/**
* De-chunk data from chunks to buffer
* @param buffer must have size bigger than or equal chun... |
Montimage/mmt-probe | src/modules/dpi/report/tcp_rtt.h | <filename>src/modules/dpi/report/tcp_rtt.h<gh_stars>1-10
/*
* tcp_rtt.h
*
* Created on: May 31, 2019
* by: Huu-Nghia
*
*
* This module calculates RTT of data packets in a TCP stream.
* - tcp_rtt_init must be called when stream is initialized
* - tcp_rtt_add_packet must be called on each packet of ... |
Montimage/mmt-probe | src/lib/hash.h | /*
* hash.h
*
* This file implements a really simple hash table
*
* Created on: Apr 4, 2022
* Author: nhnghia
*/
#ifndef SRC_LIB_HASH_H_
#define SRC_LIB_HASH_H_
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "log.h"
#define HASH_TABLE_SIZE 10000
/**
* djb2 hash http://www.cse.yor... |
Montimage/mmt-probe | src/modules/output/mongodb/mongodb.c | <reponame>Montimage/mmt-probe
/*
* mongodb.c
*
* Created on: Apr 11, 2018
* by: <NAME>
*/
#include <bcon.h>
#include <mongoc.h>
#include <pthread.h>
#include "mongodb.h"
#include "../../../lib/malloc.h"
struct mongodb_output_struct{
uint32_t messages_max_limit;
uint32_t messages_count;
bson_t **me... |
Montimage/mmt-probe | src/modules/packet_capture/dpdk/dpdk_capture.c | <filename>src/modules/packet_capture/dpdk/dpdk_capture.c
/*
* dpdk_capture.c
*
* Created on: Dec 20, 2016
* Author: montimage
*
* We use:
* - A NIC has "n" queues corresponding "n" workers
* - "m" Readers.
* Each Reader reads traffic from n/m queues and distributes packets to the private queue of the cor... |
Montimage/mmt-probe | src/modules/dpi/report/query/op_count.c | <reponame>Montimage/mmt-probe
/*
* op_count.c
*
* Created on: Mar 29, 2022
* Author: nhnghia
*/
#include "operator.h"
typedef struct _op_count{
uint64_t counter;
}op_count_t;
//this operator can handle any kind of data type
bool op_count_can_handle( data_types_t data_type ){
return true;
}
data_types_t... |
Montimage/mmt-probe | src/modules/dpi/report/micro_flow_report.c | /*
* micro_flow_report.c
*
* Created on: Apr 24, 2018
* by: <NAME>
*/
#include "micro_flow_report.h"
#include "../../../lib/malloc_ext.h"
#include "../dpi_tool.h"
#include "../../../lib/string_builder.h"
micro_flow_report_context_t *micro_flow_report_alloc_init( const micro_flow_conf_t *config, outpu... |
Montimage/mmt-probe | src/_old/security_msg_reporting.c | /*
* security_msg_reporting.c
*
* Created on: Mar 29, 2017
* Author: montimage
*/
#include "processing.h"
/* This function extracts the required information from the #ipacket, which is required to create
* a security report and then sends the message/report to mmt-security through socket.
* */
void get_s... |
Montimage/mmt-probe | src/lib/memory.h | <gh_stars>1-10
/*
* alloc.h
*
* Created on: Dec 13, 2017
* by: <NAME>
*/
#ifndef SRC_LIB_MEMORY_H_
#define SRC_LIB_MEMORY_H_
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <inttypes.h> //for uint64_t PRIu64
#include <stdbool.h>
#include "optimization.h"
#include ... |
Montimage/mmt-probe | src/modules/dpi/dpi.c | /*
* dpi.c
*
* Created on: Dec 20, 2017
* by: <NAME>
*/
#include "dpi.h"
#include <tcpip/mmt_tcpip.h>
#include "../../lib/limit.h"
#include "../../lib/malloc_ext.h"
#ifdef STAT_REPORT
#include "report/event_based_report.h"
#include "report/query_based_report.h"
#include "report/no_session_report.h"
#... |
Montimage/mmt-probe | src/modules/dpi/report/no_session_report.c | /*
* no_session_report.c
*
* Created on: Dec 27, 2017
* by: <NAME>
*/
#include <stdint.h>
#include <string.h>
#include <mmt_core.h>
#include <tcpip/mmt_tcpip.h>
#include "no_session_report.h"
#include "../dpi_tool.h"
#include "../../../lib/malloc_ext.h"
struct no_session_report_context_struct{
mmt_... |
Montimage/mmt-probe | src/modules/dpi/report/query/operator.c | <gh_stars>1-10
/*
* operator.c
*
* Created on: Mar 30, 2022
* Author: nhnghia
*/
#include "operator.h"
#define DECLARE_OP_HEADER( OP ) \
int op_## OP ##_get_data_type(int); \
bool op_## OP ##_can_handle(int); \
void* op_##... |
Montimage/mmt-probe | src/_old/security_analysis.c | #include <stdio.h>
#include <string.h>
#include <time.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "mmt_core.h"
#include "processing.h"
//Begin for MMT_Security
#define OPTION_SATISFIED 1 //if = 1 then yes, output when rule satisfied
#define OPTION_NOT_SATISFIED 0 //if = 1 then yes, output when... |
Montimage/mmt-probe | src/modules/license/license.c | <reponame>Montimage/mmt-probe
#include <stdio.h>
#include <time.h>
#include <string.h>
//#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <stdlib.h>
#include <ifaddrs.h>
#include <netpacket/packet.h>
#include <mmt_core.h>
#include "../../lib/limit.h"
#include "../../lib/version.h"
#include "... |
Montimage/mmt-probe | src/lib/optimization.h | <reponame>Montimage/mmt-probe<gh_stars>1-10
/*
* optimization.h
*
* Created on: 14 avr. 2016
* by: <NAME>
*/
#ifndef SRC_LIB_OPTIMIZATION_H_
#define SRC_LIB_OPTIMIZATION_H_
#ifndef likely
#define likely(x) __builtin_expect(!!(x), 1)
#endif
#ifndef unlikely
#define unlikely(x) __builtin_expect... |
Montimage/mmt-probe | src/modules/output/file/file_output.h | <reponame>Montimage/mmt-probe
/*
* file_output.h
*
* Created on: Dec 19, 2017
* by: <NAME>
*/
#ifndef SRC_MODULES_OUTPUT_FILE_FILE_OUTPUT_H_
#define SRC_MODULES_OUTPUT_FILE_FILE_OUTPUT_H_
#include "../../../configure.h"
typedef struct file_output_struct file_output_t;
file_output_t* file_output_alloc... |
Montimage/mmt-probe | src/lib/malloc.h | <reponame>Montimage/mmt-probe<gh_stars>1-10
/*
* malloc.h
*
* Created on: Aug 24, 2018
* by: <NAME>
*/
#ifndef SRC_LIB_MALLOC_H_
#define SRC_LIB_MALLOC_H_
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "optimization.h"
#include "log.h"
/**
... |
Montimage/mmt-probe | src/modules/routine/system_stats.c | <filename>src/modules/routine/system_stats.c
/*
* system_stats.c
*
* Created on: Dec 21, 2017
* by: <NAME>
*/
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include "system_stats.h"
#include "pthread.h"
#include "../../lib/malloc.h"
#include "../../lib/string_builder.h... |
Montimage/mmt-probe | src/modules/dynamic_conf/command.h | /*
* command.h
*
* Created on: May 16, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_DYNAMIC_CONF_COMMAND_H_
#define SRC_MODULES_DYNAMIC_CONF_COMMAND_H_
#include <stdint.h>
#define MMT_CMD_PARAM_MAX_LENGTH 10000
enum{
DYN_CONF_CMD_STOP = 1,
DYN_CONF_CMD_START = 2,
DYN_CONF_CMD_UPDATE = 3
};
enum{
D... |
Montimage/mmt-probe | src/modules/dpi/report/query_based_report.h | /*
* query_based_report.h
*
* Created on: Mar 31, 2022
* Author: nhnghia
*/
#ifndef SRC_MODULES_DPI_REPORT_QUERY_BASED_REPORT_H_
#define SRC_MODULES_DPI_REPORT_QUERY_BASED_REPORT_H_
#include <stdbool.h>
typedef struct list_query_based_report_context_struct list_query_based_report_context_t;
list_query_ba... |
Montimage/mmt-probe | key_generator.c | <filename>key_generator.c
/**
* gcc -o key_generator key_generator.c
*
* Information that needs to be changed in the code for generating new license
* Provide expiry date of the license in year (4-digits),month(2-digits) and date(2-digits)
* Provide number of mac address (3 digits) and 12 digit MAC addresses (12 d... |
Montimage/mmt-probe | src/_old/send_msg_to_kafka.c | /*
* send_msg_to_kafka.c
*
* Created on: Apr 6, 2017
* Author: montimage
*/
//#include "rdkafka.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "processing.h"
rd_kafka_conf_t *conf = NULL;
char *topic; /* Argument: topic to produce to */
/**
* @brief Message delivery report ca... |
Montimage/mmt-probe | src/modules/dpi/pcap_dump/pcap_dump.h | /*
* pcap_dump.h
*
* Created on: Apr 18, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_DPI_PCAP_DUMP_PCAP_DUMP_H_
#define SRC_MODULES_DPI_PCAP_DUMP_PCAP_DUMP_H_
#include "../dpi.h"
typedef struct pcap_dump_context_struct pcap_dump_context_t;
pcap_dump_context_t* pcap_dump_start( uint16_t worker_index, con... |
Montimage/mmt-probe | src/_old/ftp_session_report.c | #include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "mmt_core.h"
#include "tcpip/mmt_tcpip.h"
#include "processing.h"
/* This function writes FTP data t... |
Montimage/mmt-probe | src/modules/output/kafka/kafka_output.c | <filename>src/modules/output/kafka/kafka_output.c
/*
* kafka_output.c
*
* Created on: May 29, 2018
* by: <NAME>
*/
#include <rdkafka.h>
#include "kafka_output.h"
#include "../../../lib/log.h"
#include "../../../lib/malloc.h"
struct kafka_output_struct{
rd_kafka_topic_t *rd_topic;
rd_kafka_conf_t *rd_... |
Montimage/mmt-probe | test/perf/configure.c | <filename>test/perf/configure.c
/*
* configure.c
*
* Created on: Dec 12, 2017
* by: <NAME>
*/
#include <stdio.h>
#include "../src/lib/configure.h"
int main( int argc, const char **argv){
if( argc != 2 ){
printf("Usage: %s config_file\n", argv[0] );
exit( 1 );
}
probe_conf_t *conf = conf_load_fr... |
Montimage/mmt-probe | src/modules/routine/routine.c | /*
* routine.c
*
* Created on: Apr 10, 2018
* by: <NAME>
*/
#include "routine.h"
#include "system_stats.h"
#include "../../lib/malloc.h"
#include "../output/output.h"
struct routine_struct{
system_stats_context_t *system_stats;
output_t *output;
};
routine_t *routine_create_and_start( probe_context... |
Montimage/mmt-probe | src/modules/dpi/report/radius_report.h | /*
* radius_report.h
*
* Created on: May 7, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_DPI_REPORT_RADIUS_REPORT_H_
#define SRC_MODULES_DPI_REPORT_RADIUS_REPORT_H_
#include "../dpi.h"
typedef struct radius_report_context_struct radius_report_context_t;
radius_report_context_t *radius_report_register( mm... |
Montimage/mmt-probe | src/lib/tools.h | <filename>src/lib/tools.h<gh_stars>1-10
/*
* tools.h
*
* Created on: Dec 15, 2017
* by: <NAME>
*
* This file implements some utility functions
*/
#ifndef SRC_LIB_TOOLS_H_
#define SRC_LIB_TOOLS_H_
#include <sys/time.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#inc... |
Montimage/mmt-probe | src/_old/ssl_session_report.c | <reponame>Montimage/mmt-probe
#include <stdio.h>
#include <string.h>
#include <time.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "mmt_core.h"
//#include "mmt/tcpip/mmt_tcpip_protocols.h"
#include "tcpip/mmt_tcpip.h"
#include "processing.h"
/* This function is called by mmt-dpi for reporting ssl ser... |
Montimage/mmt-probe | src/modules/dynamic_conf/server.c | <gh_stars>1-10
/*
* server.c
*
* Created on: May 16, 2018
* by: <NAME>
*/
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
#includ... |
Montimage/mmt-probe | src/_old/send_msg_to_file.c | <filename>src/_old/send_msg_to_file.c<gh_stars>1-10
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <inttypes.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <unistd.h>
#include "mmt_core.h"
#include "processing.h"
#include <pthread.h>
#include <sys/timerfd.h>
#include "confuse.... |
Montimage/mmt-probe | test/perf/dpdk_rdtsc/dpdk_rdtsc.c | /*
* dpdk_rdtsc.c
*
* Created on: Oct 10, 2018
* Author: nhnghia
*
* Performance of rte_rdtsc
*/
#include <rte_cycles.h>
#include <stdio.h>
#include <sys/time.h>
#include <stdint.h>
#define MICRO_PER_SEC 1000000
static uint64_t nb_cycles_per_second;
static inline void _gettimeofday( struct timeval *tim... |
Montimage/mmt-probe | src/modules/dpi/report/query/op_sum.c | /*
* op_sump.c
*
* Created on: Mar 30, 2022
* Author: nhnghia
*/
#include "operator.h"
typedef struct _op_sum{
data_types_t data_type;
union{
uint64_t i;
float f;
} total;
}op_sum_t;
data_types_t op_sum_get_data_type( data_types_t data_type ){
//depending on input data type, the output data t... |
Montimage/mmt-probe | src/modules/dpi/report/query/op_first.c | <gh_stars>1-10
/*
* op_diff.c
*
* Created on: Mar 30, 2022
* Author: nhnghia
*/
#include "operator.h"
typedef struct _op{
data_types_t data_type;
bool hash_first_value;
void *result;
uint32_t data_size;
}op_first_t;
data_types_t op_first_get_data_type( data_types_t data_type ){
//the result should ... |
Montimage/mmt-probe | src/_old/rtp_session_report.c | <gh_stars>1-10
#include <stdio.h>
#include <string.h>
#include <time.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "mmt_core.h"
#include "tcpip/mmt_tcpip_protocols.h"
#include "processing.h"
/* This function resets rtp statistics */
void reset_rtp (session_struct_t *temp_session){
((rtp_session_a... |
Montimage/mmt-probe | src/lib/system_info.h | /*
* system_info.h
*
* Created on: 15 avr. 2016
* by: <NAME>
*/
#ifndef SRC_LIB_SYSTEM_INFO_H_
#define SRC_LIB_SYSTEM_INFO_H_
#include <stdint.h>
#include <sys/types.h>
/**
* Fix the thread that calls this function on a (logical) processor, then
* set its priority
* @param proc_index: index of proc... |
Montimage/mmt-probe | src/modules/dpi/report/event_based_report.h | /*
* event_based_report.h
*
* Created on: Apr 18, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_DPI_REPORT_EVENT_BASED_REPORT_H_
#define SRC_MODULES_DPI_REPORT_EVENT_BASED_REPORT_H_
typedef struct list_event_based_report_context_struct list_event_based_report_context_t;
/**
* Register a list of event repo... |
Montimage/mmt-probe | src/modules/packet_capture/pcap/pcap_capture.h | /*
* pcap_capture.h
*
* Created on: Dec 13, 2017
* by: <NAME>
*/
#ifndef SRC_MODULES_PCAP_PCAP_CAPTURE_H_
#define SRC_MODULES_PCAP_PCAP_CAPTURE_H_
#include "../../../context.h"
void pcap_capture_start( probe_context_t *context );
void pcap_capture_stop( probe_context_t *context );
void pcap_capture_... |
Montimage/mmt-probe | src/test_case/test_case.h | <filename>src/test_case/test_case.h
/*
* test_case.h
*
* Created on: Jun 4, 2018
* by: <NAME>
*/
#ifndef SRC_TEST_CASE_TEST_CASE_H_
#define SRC_TEST_CASE_TEST_CASE_H_
#endif /* SRC_TEST_CASE_TEST_CASE_H_ */
|
Montimage/mmt-probe | src/modules/security/security.c | /*
* security.c
*
* Created on: Mar 17, 2017
* Created by: <NAME> <<EMAIL>>
*
* One MMT-Probe worker thread will create n security thread by calling security_worker_alloc_init.
* Number of security thread is designed by config->threads_size when passing to the function above.
*
* +--------+ +------... |
Montimage/mmt-probe | src/modules/dpi/report/query/op_diff.c | <filename>src/modules/dpi/report/query/op_diff.c
/*
* op_diff.c
*
* Currently diff operator does not take into account the negative number:
* it requires that the next value must be greater than or equal to the current value
*
* Created on: Mar 30, 2022
* Author: nhnghia
*/
#include "operator.h"
typed... |
Montimage/mmt-probe | src/_old/protocols_report.c | <reponame>Montimage/mmt-probe<gh_stars>1-10
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <errno.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "mmt_core.h"
#include "tcpip/mmt_tcpip_protocols.h"
#include "processing.h"
#include <pthread.h>
/* This function is ... |
Montimage/mmt-probe | src/modules/dpi/report/session_report.c | <filename>src/modules/dpi/report/session_report.c
/*
* session_report.c
*
* Created on: Dec 28, 2017
* by: <NAME>
*/
#define BEHAVIOUR_REPORT_ID 101
#include <arpa/inet.h>
#include "session_report.h"
#include "../../../lib/string_builder.h"
#include "../../../lib/log.h"
#include "../../../lib/inet.h"... |
Montimage/mmt-probe | src/lib/malloc_ext.h | /*
* malloc_ext.h
*
* Created on: Aug 24, 2018
* by: <NAME>
*
* This is a wrapper of malloc.h
* This enables using DPDK memory allocation.
* The functions in this file must not be called before rte_eal_init.
*/
#ifndef SRC_LIB_MEMORY_EXT_H_
#define SRC_LIB_MEMORY_EXT_H_
/*
* Do not use dpdk_mal... |
Montimage/mmt-probe | src/modules/dpi/report/session_report_gtp.c | <filename>src/modules/dpi/report/session_report_gtp.c
/*
* session_report_gtp.c
*
* Created on: Jun 22, 2018
* by: <NAME>
*/
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <arpa/inet.... |
Montimage/mmt-probe | src/_old/dpdk_capture.c | /*
* dpdk_capture.c
*
* Created on: Dec 20, 2016
* Author: montimage
*/
#include "mmt_core.h"
#include "tcpip/mmt_tcpip.h"
#include "processing.h"
#include "lib/security.h"
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <locale.h>
#include <signal.h>
#include <unistd.h>
#include <ti... |
Montimage/mmt-probe | src/modules/packet_capture/pcap/data_spsc_ring.h | /*
* data_spsc_ring.h
*
* Created on: 14 avr. 2016
* by: <NAME>
*/
#ifndef SRC_QUEUE_DATA_SPSC_RING_H_
#define SRC_QUEUE_DATA_SPSC_RING_H_
#include <stdint.h>
#include "data_spsc_ring.h"
#include "lock_free_spsc_ring.h"
#include "../../../lib/optimization.h"
#include "../../../lib/valgrind.h"
typedef ... |
Montimage/mmt-probe | src/_old/processing.c | <gh_stars>1-10
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <time.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "mmt_core.h"
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <arpa/inet.h> //inet_ntop
#include <netinet/in.h>
#endif
#ifdef _WIN32
#include <time.h>
#include <window... |
Montimage/mmt-probe | src/modules/packet_capture/dpdk/dpdk_malloc.c | <reponame>Montimage/mmt-probe
/*
* dpdk_malloc.c
*
* Created on: Aug 23, 2018
* by: <NAME>
*/
#include <stdlib.h>
#include <string.h>
#include "dpdk_malloc.h"
|
Montimage/mmt-probe | src/modules/packet_capture/pcap/pcap_capture.c | <filename>src/modules/packet_capture/pcap/pcap_capture.c<gh_stars>1-10
/*
* pcap_capture.h
*
* Created on: Dec 13, 2017
* by: <NAME>
*/
#ifndef PCAP_MODULE
#define PCAP_MODULE
#endif
#include <pthread.h>
#include <pcap.h>
#include <time.h>
#include <assert.h>
#include <unistd.h>
#include <signal.h>
#in... |
Montimage/mmt-probe | src/modules/output/kafka/kafka_output.h | /*
* kafka_output.h
*
* Created on: May 29, 2018
* by: <NAME>
*/
#ifndef SRC_MODULES_OUTPUT_KAFKA_KAFKA_OUTPUT_H_
#define SRC_MODULES_OUTPUT_KAFKA_KAFKA_OUTPUT_H_
#include "../../../configure.h"
typedef struct kafka_output_struct kafka_output_t;
kafka_output_t *kafka_output_init( const kafka_output_c... |
Montimage/mmt-probe | src/lib/system_info.c | <gh_stars>1-10
/*
* system_info.c
*
* Created on: 15 avr. 2016
* by: <NAME>
*/
#ifndef __USE_GNU
#define __USE_GNU
#endif
#define _GNU_SOURCE
#include <sched.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <errno.h>... |
Montimage/mmt-probe | src/modules/output/redis/thredis.h | #ifndef THREDIS_H
#define THREDIS_H
#include <hiredis/hiredis.h>
typedef struct
thredis
thredis_t;
thredis_t* thredis_new(redisContext* redis_ctx);
void thredis_close(thredis_t* thredis);
redisReply* thredis_command(thredis_t* thredis, const char* format, ...);
#endif
|
Montimage/mmt-probe | test/tools/stat_period.c | /*
* stat_period.c
*
* Created on: Oct 29, 2018
* Author: nhnghia
*
* gcc -g -o stat stat_period.c -I /opt/mmt/dpi/include -L /opt/mmt/dpi/lib -lmmt_core -ldl -lpcap
*
* Usage:
* ./stat PATH_TO_PCAP_FILE
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/t... |
Montimage/mmt-probe | src/modules/routine/system_stats.h | <reponame>Montimage/mmt-probe
/*
* system_stats.h
*
* Created on: Dec 22, 2017
* by: <NAME>
*/
#ifndef SRC_MODUELS_ROUTINE_SYSTEM_STATS_H_
#define SRC_MODUELS_ROUTINE_SYSTEM_STATS_H_
#include "../../configure.h"
#include "../output/output.h"
typedef struct system_stats_context_struct system_stats_cont... |
Montimage/mmt-probe | src/modules/dpi/report/session_report.h | /*
* header.h
*
* Created on: Dec 28, 2017
* by: <NAME>
*/
#ifndef SRC_MODULES_DPI_HEADER_H_
#define SRC_MODULES_DPI_HEADER_H_
#ifndef STAT_REPORT
#define STAT_REPORT
#endif
#include "../dpi.h"
#include "../dpi_tool.h"
#include "tcp_rtt.h"
#include <mmt_core.h>
#include <tcpip/mmt_tcpip.h>
#define ... |
Montimage/mmt-probe | src/modules/dpi/report/query/op_last.c | /*
* op_diff.c
*
* Created on: Mar 30, 2022
* Author: nhnghia
*/
#include "operator.h"
typedef struct _op{
data_types_t data_type;
bool has_last_value;
void *result;
uint32_t data_size;
}op_last_t;
data_types_t op_last_get_data_type( data_types_t data_type ){
//the result should be the same
return... |
Montimage/mmt-probe | src/modules/packet_capture/pcap/data_spsc_ring.c | /*
* data_spsc_ring.c
*
* Created on: 14 avr. 2016
* by: <NAME>
*/
#include <stdlib.h>
#include "data_spsc_ring.h"
#include "lock_free_spsc_ring.h"
static inline void __free_data_spsc_ring( data_spsc_ring_t *q){
uint32_t i;
if( q == NULL ) return;
if( q->_data != NULL ){
for( i=0; i<q->_size; i++... |
Montimage/mmt-probe | src/modules/dpi/report/tcp_rtt.c | /*
* tcp_rtt.c
*
* Created on: May 31, 2019
* by: Huu-Nghia
*/
#include "tcp_rtt.h"
#include "../../../lib/string_builder.h"
#include "../../../lib/log.h"
#include "../../../lib/inet.h"
#include "../../../lib/malloc_ext.h"
#include "../../../lib/memory.h"
struct pkt_node{
uint32_t seq_number;
uint16... |
Montimage/mmt-probe | src/modules/dpi/report/radius_report.c | /*
*radius_report.c
*
* Created on: May 7, 2018
* by: <NAME>
*/
#include <arpa/inet.h>
#include "../dpi_tool.h"
#include "../dpi.h"
#include <tcpip/mmt_tcpip.h>
#include "radius_report.h"
#include "../../../lib/limit.h"
#include "../../../lib/malloc_ext.h"
#define MMT_RADIUS_REPORT_ALL 0
struct radius_rep... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.