FlowMon IPv6 Tunnel Monitoring Plugin
FlowMon IPv6 Tunnel Monitoring Plugin
|
IPv6 Tunnels Monitoring Plugin - input plugin. More...
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pcap.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netinet/ether.h>
#include <poll.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <sys/types.h>
#include <endian.h>
#include <openssl/md5.h>
#include <flowmonexp/plugin_input.h>
#include "input-ip6tun.h"
#include <byteswap.h>
Go to the source code of this file.
Data Structures | |
struct | ip6tun_record_t |
Structure to hold ip6tun specific record. More... |
Macros | |
#define | VERSION "0.1" |
#define | le32toh(x) (x) |
Functions | |
unsigned int | __attribute__ ((used)) |
Structure to hold ip6tun internal data. | |
plugin_desc_t * | plugin_input_desc () |
API for flowmonexp to get plugin description structure. | |
int | parse_ipv6 (unsigned char *buf, uint32_t caplen, flow_record_t *record, ip6tun_record_t *ip6tun_record, int teredo) |
Parse IPv6 header and fill required information into the flow record. | |
int | parse_proto41 (unsigned char *buf, uint32_t caplen, flow_record_t *record, ip6tun_record_t *ip6tun_record) |
Parse possible proto 41 headers and fill required information into the flow record. | |
int | parse_teredo (unsigned char *buf, uint32_t caplen, flow_record_t *record, ip6tun_record_t *ip6tun_record) |
Parse possible teredo header and fill required information into the flow record. | |
int | parse_ayiya (unsigned char *buf, uint32_t caplen, flow_record_t *record, ip6tun_record_t *ip6tun_record) |
Parse possible ayiya header and fill required information into the flow record. | |
int | parse_eth (unsigned char *buf, uint32_t caplen, flow_record_t *record, ip6tun_record_t *ip6tun_record) |
Parse ethernet header and fill required information into the flow record. | |
void | value_fill_srcaddr6 (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun source address. | |
void | value_fill_dstaddr6 (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun destination address. | |
void | value_fill_srcport (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun source port. | |
void | value_fill_icmp_type_code (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun icmp type and code. | |
void | value_fill_dstport (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun destination port. | |
void | value_fill_tcp_flags (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun tcp flags. | |
void | value_fill_teredo_headers (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun teredo headers. | |
void | value_fill_teredo_trailers (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun teredo trailers. | |
void | value_fill_ttl_hop (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ttl. | |
void | value_fill_hop (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ttl. | |
void | value_fill_l4protocol (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun L4 protocol number. | |
void | value_fill_mechnism (void *self, flow_record_t *record, void *dst, int len, int to_network_byte_order) |
Get/Fill value of the ip6tun mechanism mask. | |
int | validity_addr6 (void *self, flow_record_t *record) |
Validity checker for ip6tun record's address fields. | |
int | validity_port (void *self, flow_record_t *record) |
Validity checker for ip6tun record's port fields. | |
int | validity_tcp_flags (void *self, flow_record_t *record) |
Validity checker for ip6tun record's tcp flags field. | |
int | validity_teredo_headers (void *self, flow_record_t *record) |
Validity checker for ip6tun record's teredo headers field. | |
int | validity_teredo_trailers (void *self, flow_record_t *record) |
Validity checker for ip6tun record's tteredo trailers field. | |
int | validity_ttl_hop (void *self, flow_record_t *record) |
Validity checker for ip6tun record's tteredo trailers field. | |
int | validity_hop (void *self, flow_record_t *record) |
Validity checker for ip6tun record's tteredo trailers field. | |
int | validity_l4protocol (void *self, flow_record_t *record) |
Validity checker for ip6tun record's L4 protocol field. | |
int | validity_icmp_type_code (void *self, flow_record_t *record) |
Validity checker for ip6tun record's L4 protocol field. | |
int | validity_mechanism (void *self, flow_record_t *record) |
Validity checker for ip6tun record's mechanism fields. | |
int | value_length_mechanism (void *self, flow_record_t *record) |
Get actual length for ip6tun record's mechanism field. | |
int | value_length_ttl_hop (void *self, flow_record_t *record) |
Get actual length for ip6tun record's tcp flags fields. | |
int | value_length_tcp_flags (void *self, flow_record_t *record) |
Get actual length for ip6tun record's tcp flags fields. | |
int | value_length_protocol (void *self, flow_record_t *record) |
Get actual length for ip6tun record's protocol fields. | |
int | value_length_port (void *self, flow_record_t *record) |
Get actual length for ip6tun record's port fields. | |
int | value_length_teredo_headers_trailers (void *self, flow_record_t *record) |
Get actual length for ip6tun record's teredo trailers and headers fields. | |
int | value_length_icmp_type_code (void *self, flow_record_t *record) |
Get actual length for icmp type and code fields. | |
int | value_length_addr6 (void *self, flow_record_t *record) |
Get actual length for ip6tun record's IPv6 address fields. | |
void | plugin_input_getter_init (void *plugin_private, flow_record_getter_t **getter_list) |
Init flowmonexp's getters for ip6tun record's fields. | |
int | ip6tun_init_pcap_file (ip6tun_input_private_t *plugin_private, char *source) |
Initialize PCAP file as a source of packets. | |
int | ip6tun_init_pcap_if (ip6tun_input_private_t *plugin_private, char *source) |
Initialize PCAP interface as a source of packets. | |
int | ip6tun_shutdown_uni (ip6tun_input_private_t *plugin_private) |
int | ip6tun_get_packet_pcap_file (unsigned char **buf, packet_info_t *packet_info, ip6tun_input_private_t *plugin_private) |
Get packet from initialized PCAP file source. | |
int | ip6tun_get_packet_pcap_if (unsigned char **buf, packet_info_t *packet_info, ip6tun_input_private_t *plugin_private) |
Get packet from initialized PCAP interface source. | |
void * | plugin_input_init (char *params, flow_record_getter_t **getter_list, int full_packet, int data_offset) |
Initialize all needed structures/devices/files etc. The function is called once as the first part of the plugin. | |
uint64_t | plugin_input_get_flow (void *plugin_private, flow_record_t *record) |
Get flow record implementation - add flow record into the flowmonexp's flow cache. | |
unsigned char * | plugin_input_get_flow_packet (void *plugin_private, unsigned int *length, unsigned int *data_offset) |
Get flow packet implementation. | |
int | plugin_input_shutdown (void *plugin_private) |
Shutdown function. |
Variables | |
ip6tun_input_private_t | |
int | ip6tun_input_record_offset |
ip6tun record offset |
IPv6 Tunnels Monitoring Plugin - input plugin.
IPv6 Tunnels Monitoring Plugin - input plugin.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
This software is provided ``as is'', and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the company or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
Copyright (C) 2012 Masaryk University, Institute of Computer Science
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
This software is provided ``as is'', and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the company or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
Definition in file input-ip6tun.c.
#define VERSION "0.1" |
Plugin version
Definition at line 39 of file input-ip6tun.c.
#define le32toh | ( | x | ) | (x) |
include for le32toh macro to convert little endian (read from COMBO) to host endianity
Definition at line 86 of file input-ip6tun.c.
unsigned int __attribute__ | ( | (used) | ) |
Structure to hold ip6tun internal data.
< PCAP handler for interface
< PCAP handler for file
< interface id
< packet getter
< shutdown function pointer
< ip6tun record offset
< packet pointer for get_flow_packet function
< packet data offset
< 'brief packet length
Definition at line 93 of file input-ip6tun.c.
plugin_desc_t* plugin_input_desc | ( | ) |
API for flowmonexp to get plugin description structure.
Definition at line 177 of file input-ip6tun.c.
int parse_ipv6 | ( | unsigned char * | buf, |
uint32_t | caplen, | ||
flow_record_t * | record, | ||
ip6tun_record_t * | ip6tun_record, | ||
int | teredo | ||
) |
Parse IPv6 header and fill required information into the flow record.
[in] | buf | Data buffer. |
[in] | caplen | Length of portion present. |
[in,out] | record | Flow record structure. |
[in] | ip6tun_record | Plugin's private structure with ip6tun specific record offset |
[in] | teredo | set to 1 if this called from parse_teredo |
0 | on success, nonzero otherwise. |
Definition at line 1556 of file input-ip6tun.c.
int parse_proto41 | ( | unsigned char * | buf, |
uint32_t | caplen, | ||
flow_record_t * | record, | ||
ip6tun_record_t * | ip6tun_record | ||
) |
Parse possible proto 41 headers and fill required information into the flow record.
[in] | buf | Data buffer. |
[in] | caplen | Length of portion present. |
[in,out] | record | Flow record structure. |
[in] | ip6tun_record | Plugin's private structure with ip6tun specific record offset |
0 | on success, nonzero otherwise. |
Definition at line 1724 of file input-ip6tun.c.
int parse_teredo | ( | unsigned char * | buf, |
uint32_t | caplen, | ||
flow_record_t * | record, | ||
ip6tun_record_t * | ip6tun_record | ||
) |
Parse possible teredo header and fill required information into the flow record.
[in] | buf | Data buffer. |
[in] | caplen | Length of portion present. |
[in,out] | record | Flow record structure. |
[in] | ip6tun_record | Plugin's private structure with ip6tun specific record offset |
0 | on success, nonzero otherwise. |
Definition at line 1799 of file input-ip6tun.c.
int parse_ayiya | ( | unsigned char * | buf, |
uint32_t | caplen, | ||
flow_record_t * | record, | ||
ip6tun_record_t * | ip6tun_record | ||
) |
Parse possible ayiya header and fill required information into the flow record.
[in] | buf | Data buffer. |
[in] | caplen | Length of portion present. |
[in,out] | record | Flow record structure. |
[in] | ip6tun_record | Plugin's private structure with ip6tun specific record offset |
0 | on success, nonzero otherwise. |
Definition at line 1885 of file input-ip6tun.c.
int parse_eth | ( | unsigned char * | buf, |
uint32_t | caplen, | ||
flow_record_t * | record, | ||
ip6tun_record_t * | ip6tun_record | ||
) |
Parse ethernet header and fill required information into the flow record.
[in] | buf | Data buffer. |
[in] | caplen | Length of portion present. |
[in,out] | record | Flow record structure. |
[in] | ip6tun_record | Plugin's private structure with ip6tun specific record offset |
0 | on success, nonzero otherwise. |
Definition at line 1369 of file input-ip6tun.c.
void value_fill_srcaddr6 | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun source address.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 251 of file input-ip6tun.c.
void value_fill_dstaddr6 | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun destination address.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 267 of file input-ip6tun.c.
void value_fill_srcport | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun source port.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 283 of file input-ip6tun.c.
void value_fill_icmp_type_code | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun icmp type and code.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 299 of file input-ip6tun.c.
void value_fill_dstport | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun destination port.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 315 of file input-ip6tun.c.
void value_fill_tcp_flags | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun tcp flags.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 331 of file input-ip6tun.c.
void value_fill_teredo_headers | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun teredo headers.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 347 of file input-ip6tun.c.
void value_fill_teredo_trailers | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun teredo trailers.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 363 of file input-ip6tun.c.
void value_fill_ttl_hop | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ttl.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 379 of file input-ip6tun.c.
void value_fill_hop | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ttl.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 395 of file input-ip6tun.c.
void value_fill_l4protocol | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun L4 protocol number.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 411 of file input-ip6tun.c.
void value_fill_mechnism | ( | void * | self, |
flow_record_t * | record, | ||
void * | dst, | ||
int | len, | ||
int | to_network_byte_order | ||
) |
Get/Fill value of the ip6tun mechanism mask.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
[in] | dst | Where to copy resulted data |
[in] | len | Data length |
[in] | to_network_byte_order | if other than zero, convert value to network byte order (work only for lengths: 1,2,4,8) |
Definition at line 427 of file input-ip6tun.c.
int validity_addr6 | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's address fields.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 550 of file input-ip6tun.c.
int validity_port | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's port fields.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 570 of file input-ip6tun.c.
int validity_tcp_flags | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's tcp flags field.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 590 of file input-ip6tun.c.
int validity_teredo_headers | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's teredo headers field.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 609 of file input-ip6tun.c.
int validity_teredo_trailers | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's tteredo trailers field.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 629 of file input-ip6tun.c.
int validity_ttl_hop | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's tteredo trailers field.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 649 of file input-ip6tun.c.
int validity_hop | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's tteredo trailers field.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 669 of file input-ip6tun.c.
int validity_l4protocol | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's L4 protocol field.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 689 of file input-ip6tun.c.
int validity_icmp_type_code | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's L4 protocol field.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 709 of file input-ip6tun.c.
int validity_mechanism | ( | void * | self, |
flow_record_t * | record | ||
) |
Validity checker for ip6tun record's mechanism fields.
[in] | self | Plugin's specific record part (ip6tun_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 729 of file input-ip6tun.c.
int value_length_mechanism | ( | void * | self, |
flow_record_t * | record | ||
) |
Get actual length for ip6tun record's mechanism field.
[in] | self | Plugin's specific record part (bacnet_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 764 of file input-ip6tun.c.
int value_length_ttl_hop | ( | void * | self, |
flow_record_t * | record | ||
) |
Get actual length for ip6tun record's tcp flags fields.
[in] | self | Plugin's specific record part (bacnet_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 777 of file input-ip6tun.c.
int value_length_tcp_flags | ( | void * | self, |
flow_record_t * | record | ||
) |
Get actual length for ip6tun record's tcp flags fields.
[in] | self | Plugin's specific record part (bacnet_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 790 of file input-ip6tun.c.
int value_length_protocol | ( | void * | self, |
flow_record_t * | record | ||
) |
Get actual length for ip6tun record's protocol fields.
[in] | self | Plugin's specific record part (bacnet_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 803 of file input-ip6tun.c.
int value_length_port | ( | void * | self, |
flow_record_t * | record | ||
) |
Get actual length for ip6tun record's port fields.
[in] | self | Plugin's specific record part (bacnet_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 816 of file input-ip6tun.c.
int value_length_teredo_headers_trailers | ( | void * | self, |
flow_record_t * | record | ||
) |
Get actual length for ip6tun record's teredo trailers and headers fields.
[in] | self | Plugin's specific record part (bacnet_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 829 of file input-ip6tun.c.
int value_length_icmp_type_code | ( | void * | self, |
flow_record_t * | record | ||
) |
Get actual length for icmp type and code fields.
[in] | self | Plugin's specific record part (bacnet_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 842 of file input-ip6tun.c.
int value_length_addr6 | ( | void * | self, |
flow_record_t * | record | ||
) |
Get actual length for ip6tun record's IPv6 address fields.
[in] | self | Plugin's specific record part (bacnet_record_t) allocated after standard flow record |
[in] | record | Standard flowmonexp's flow record |
Definition at line 855 of file input-ip6tun.c.
void plugin_input_getter_init | ( | void * | plugin_private, |
flow_record_getter_t ** | getter_list | ||
) |
Init flowmonexp's getters for ip6tun record's fields.
[in] | plugin_private | Plugin's private structure from init with all necessary information |
[in,out] | getter_list | List of available getters for a complete flow record |
Definition at line 866 of file input-ip6tun.c.
int ip6tun_init_pcap_file | ( | ip6tun_input_private_t * | plugin_private, |
char * | source | ||
) |
Initialize PCAP file as a source of packets.
[in,out] | plugin_private | Plugin's private structure with ip6tun specific record offset |
[in] | source | Data buffer. |
EXIT_SUCCESS | on success, EXIT_FAILURE otherwise. |
Definition at line 905 of file input-ip6tun.c.
int ip6tun_init_pcap_if | ( | ip6tun_input_private_t * | plugin_private, |
char * | source | ||
) |
Initialize PCAP interface as a source of packets.
[in,out] | plugin_private | Plugin's private structure with ip6tun specific record offset |
[in] | source | Data buffer. |
EXIT_SUCCESS | on success, EXIT_FAILURE otherwise. |
Definition at line 925 of file input-ip6tun.c.
int ip6tun_shutdown_uni | ( | ip6tun_input_private_t * | plugin_private | ) |
Definition at line 1011 of file input-ip6tun.c.
int ip6tun_get_packet_pcap_file | ( | unsigned char ** | buf, |
packet_info_t * | packet_info, | ||
ip6tun_input_private_t * | plugin_private | ||
) |
Get packet from initialized PCAP file source.
[in,out] | buf | Data buffer. |
[in,out] | packet_info | Packet info structure. |
[in] | plugin_private | Plugin's private structure with ip6tun specific record offset |
EXIT_SUCCESS | on success, EXIT_FAILURE otherwise. |
Definition at line 1024 of file input-ip6tun.c.
int ip6tun_get_packet_pcap_if | ( | unsigned char ** | buf, |
packet_info_t * | packet_info, | ||
ip6tun_input_private_t * | plugin_private | ||
) |
Get packet from initialized PCAP interface source.
[in,out] | buf | Data buffer. |
[in,out] | packet_info | Packet info structure. |
[in] | plugin_private | Plugin's private structure with ip6tun specific record offset |
EXIT_SUCCESS | on success, EXIT_FAILURE otherwise. |
Definition at line 1054 of file input-ip6tun.c.
void* plugin_input_init | ( | char * | params, |
flow_record_getter_t ** | getter_list, | ||
int | full_packet, | ||
int | data_offset | ||
) |
Initialize all needed structures/devices/files etc. The function is called once as the first part of the plugin.
[in] | params | Plugin parameters as string from command line |
[in] | full_packet | Specify if plugin_input_get_packet() function (if implemented) is forced to return full packet or some cropping can be done |
[in] | getter_list | Global list of getters, used for getter registration |
[in] | data_offset | Offset of the plugin specific data (bacnet_record_t) in flowmonexp's standard flow record |
Definition at line 1154 of file input-ip6tun.c.
uint64_t plugin_input_get_flow | ( | void * | plugin_private, |
flow_record_t * | record | ||
) |
Get flow record implementation - add flow record into the flowmonexp's flow cache.
[in] | plugin_private | Plugin's private structure from init with all necessary information |
[in,out] | record | Flow record from input plugin(s) |
Definition at line 1286 of file input-ip6tun.c.
unsigned char* plugin_input_get_flow_packet | ( | void * | plugin_private, |
unsigned int * | length, | ||
unsigned int * | data_offset | ||
) |
Get flow packet implementation.
Returns full packet for further processing if necessary
Definition at line 1339 of file input-ip6tun.c.
int plugin_input_shutdown | ( | void * | plugin_private | ) |
Shutdown function.
Definition at line 1352 of file input-ip6tun.c.
ip6tun_input_private_t |
Definition at line 113 of file input-ip6tun.c.
int ip6tun_input_record_offset |
ip6tun record offset
Definition at line 140 of file input-ip6tun.c.