Debian Codegraph @

src/traffic_output_formats/protobuf/traffic_data.proto

raw
1 syntax = "proto3";
2
3 enum TrafficDirection {
4 // Value is not set
5 TRAFFIC_DIRECTION_UNKNOWN = 0;
6
7 // Traffic is coming to our address space
8 TRAFFIC_DIRECTION_INCOMING = 1;
9
10 // Traffic is coming from our address space
11 TRAFFIC_DIRECTION_OUTGOING = 2;
12
13 // Traffic where both source and destination IPs do not belong to our address space or non IP traffic (for example ARP)
14 TRAFFIC_DIRECTION_OTHER = 3;
15
16 // Traffic is going from our address space to our address space
17 TRAFFIC_DIRECTION_INTERNAL = 4;
18 };
19
20 enum TelemetryType {
21 TELEMETRY_TYPE_UNKNOWN = 0;
22 TELEMETRY_TYPE_MIRROR = 1;
23 TELEMETRY_TYPE_SFLOW = 2;
24 TELEMETRY_TYPE_NETFLOW = 3;
25 TELEMETRY_TYPE_TERA_FLOW = 4;
26 }
27
28 // Our unified flow - packet message
29 message TrafficData {
30 // Timestamp in seconds
31 uint64 timestamp_seconds = 1;
32
33 // Timestamp in milliseconds
34 uint64 timestamp_milliseconds = 2;
35
36 // Type of plugin which received traffic
37 TelemetryType telemetry_type = 3;
38
39 // IP protocol version: 4 or 6
40 uint32 ip_version = 4;
41
42 TrafficDirection traffic_direction = 5;
43
44 // Sampling ratio
45 uint64 sampling_ratio = 6;
46
47 // Protocol field from IP packet
48 uint32 protocol = 7;
49
50 // Source and destination IPs for IPv4 (4 bytes) and IPv6 (16 bytes)
51 bytes source_ip = 8;
52 bytes destination_ip = 9;
53
54 // Ports for UDP and TCP protocols
55 uint32 source_port = 10;
56 uint32 destination_port = 11;
57
58 // Number of transferred packets
59 uint64 packets = 12;
60
61 // Total length in bytes for transferred packets
62 uint64 octets = 13;
63
64 // TTL for IPv4 or Hop Limit for IPv6
65 uint32 ttl = 14;
66
67 // TCP flags encoded in bit set
68 uint32 tcp_flags = 15;
69
70 bool ip_fragmented = 16;
71 bool ip_dont_fragment = 17;
72
73 // Input and output interfaces
74 uint64 input_interface = 18;
75 uint64 output_interface = 19;
76
77 // Autonomous system numbers
78 uint32 source_asn = 20;
79 uint32 destination_asn = 21;
80
81 // IPv4 or IPv6 address of device which sent traffic data
82 bytes agent_address = 22;
83 }