Skip to content

Commit 9ec8667

Browse files
committed
[receiver/netflow] Add common EtherTypes
Adds some common EtherTypes to the parser.
1 parent 5fa847a commit 9ec8667

File tree

4 files changed

+294
-2
lines changed

4 files changed

+294
-2
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: receiver/netflow
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Adds additional common EtherTypes for `network.type`.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [40219]
14+
15+
subtext:
16+
17+
# If your change doesn't affect end users or the exported elements of any package,
18+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
19+
# Optional: The change log or logs in which this entry should be included.
20+
# e.g. '[user]' or '[user, api]'
21+
# Include 'user' if the change is relevant to end users.
22+
# Include 'api' if there is a change to a library API.
23+
# Default: '[user]'
24+
change_logs: [user]

Makefile.Common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# the value `-o pipefail` (or `set -o pipefail`) is added to each shell command that make runs
33
# otherwise in the example command pipe, only the exit code of `tee` is recorded instead of `go test` which can cause
44
# test to pass in CI when they should not.
5-
SHELL = /bin/bash
5+
SHELL = /usr/bin/env bash
66
.SHELLFLAGS = -o pipefail -c
77

88
# SRC_ROOT is the top of the source tree.

flake.lock

Lines changed: 260 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/netflowreceiver/parser.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,19 @@ import (
1717

1818
var (
1919

20-
// https://en.wikipedia.org/wiki/EtherType
20+
// https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xhtml#ieee-802-numbers-1
2121
etypeNames = map[uint32]string{
2222
0x806: "arp",
2323
0x800: "ipv4",
24+
0x814c: "snmp",
2425
0x86dd: "ipv6",
26+
0x8847: "mpls",
27+
0x888e: "eapol",
28+
0x88cc: "lldp",
29+
0x88e5: "macsec",
30+
0x88f5: "mvrp",
31+
0x88f7: "ptp",
32+
0xa0ed: "6lowpan",
2533
}
2634

2735
// https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml

0 commit comments

Comments
 (0)