2021-05-22 16:12:26 -07:00
|
|
|
syntax = "proto3";
|
|
|
|
package flowpb;
|
2021-06-07 22:43:09 -07:00
|
|
|
option go_package = "github.com/netsampler/goflow2/pb;flowpb";
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
message FlowMessage {
|
|
|
|
|
|
|
|
enum FlowType {
|
|
|
|
FLOWUNKNOWN = 0;
|
|
|
|
SFLOW_5 = 1;
|
|
|
|
NETFLOW_V5 = 2;
|
|
|
|
NETFLOW_V9 = 3;
|
|
|
|
IPFIX = 4;
|
|
|
|
}
|
2022-10-08 15:47:31 -07:00
|
|
|
FlowType type = 1;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
2023-08-09 19:47:20 -07:00
|
|
|
uint64 time_received_ns = 110;
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 sequence_num = 4;
|
|
|
|
uint64 sampling_rate = 3;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
2023-08-09 19:47:20 -07:00
|
|
|
//uint32 flow_direction = 42;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Sampler information
|
2022-10-08 15:47:31 -07:00
|
|
|
bytes sampler_address = 11;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Found inside packet
|
2023-08-09 19:47:20 -07:00
|
|
|
uint64 time_flow_start_ns = 111;
|
|
|
|
uint64 time_flow_end_ns = 112;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Size of the sampled packet
|
2022-10-08 15:47:31 -07:00
|
|
|
uint64 bytes = 9;
|
|
|
|
uint64 packets = 10;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Source/destination addresses
|
2022-10-08 15:47:31 -07:00
|
|
|
bytes src_addr = 6;
|
|
|
|
bytes dst_addr = 7;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Layer 3 protocol (IPv4/IPv6/ARP/MPLS...)
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 etype = 30;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Layer 4 protocol
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 proto = 20;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Ports for UDP and TCP
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 src_port = 21;
|
|
|
|
uint32 dst_port = 22;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Interfaces
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 in_if = 18;
|
|
|
|
uint32 out_if = 19;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Ethernet information
|
2022-10-08 15:47:31 -07:00
|
|
|
uint64 src_mac = 27;
|
|
|
|
uint64 dst_mac = 28;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Vlan
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 src_vlan = 33;
|
|
|
|
uint32 dst_vlan = 34;
|
2021-05-22 16:12:26 -07:00
|
|
|
// 802.1q VLAN in sampled packet
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 vlan_id = 29;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// IP and TCP special flags
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 ip_tos = 23;
|
|
|
|
uint32 forwarding_status = 24;
|
|
|
|
uint32 ip_ttl = 25;
|
2023-09-01 14:18:18 -07:00
|
|
|
uint32 ip_flags = 38;
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 tcp_flags = 26;
|
|
|
|
uint32 icmp_type = 31;
|
|
|
|
uint32 icmp_code = 32;
|
|
|
|
uint32 ipv6_flow_label = 37;
|
2021-05-22 16:12:26 -07:00
|
|
|
// Fragments (IPv4/IPv6)
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 fragment_id = 35;
|
|
|
|
uint32 fragment_offset = 36;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Autonomous system information
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 src_as = 14;
|
|
|
|
uint32 dst_as = 15;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
2022-10-08 15:47:31 -07:00
|
|
|
bytes next_hop = 12;
|
|
|
|
uint32 next_hop_as = 13;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
|
|
|
// Prefix size
|
2022-10-08 15:47:31 -07:00
|
|
|
uint32 src_net = 16;
|
|
|
|
uint32 dst_net = 17;
|
2021-05-22 16:12:26 -07:00
|
|
|
|
2022-07-20 22:04:43 -07:00
|
|
|
// BGP information
|
2022-10-08 15:47:31 -07:00
|
|
|
bytes bgp_next_hop = 100;
|
|
|
|
repeated uint32 bgp_communities = 101;
|
|
|
|
repeated uint32 as_path = 102;
|
2022-07-20 22:04:43 -07:00
|
|
|
|
2021-05-22 16:12:26 -07:00
|
|
|
// MPLS information
|
2023-08-09 19:47:20 -07:00
|
|
|
repeated uint32 mpls_ttl = 80;
|
|
|
|
repeated uint32 mpls_label = 81;
|
|
|
|
repeated bytes mpls_ip = 82;
|
2022-10-08 15:47:31 -07:00
|
|
|
|
|
|
|
uint32 observation_domain_id = 70;
|
|
|
|
uint32 observation_point_id = 71;
|
2021-05-22 16:12:26 -07:00
|
|
|
}
|