inlet: decode MPLS labels

They are stored in an array and there are some aliases to get 1st, 2nd
and third label. Support for sFlow would need a test to ensure it works
as expected.

Fix #960
This commit is contained in:
Vincent Bernat
2023-11-24 19:42:36 +01:00
parent f950c7988a
commit 82051b552f
10 changed files with 129 additions and 0 deletions

View File

@@ -92,6 +92,12 @@ func TestQueryColumnSQLSelect(t *testing.T) {
}, {
Input: schema.ColumnDstMAC,
Expected: `MACNumToString(DstMAC)`,
}, {
Input: schema.ColumnMPLSLabels,
Expected: `arrayStringConcat(MPLSLabels, ' ')`,
}, {
Input: schema.ColumnMPLS3rdLabel,
Expected: `toString(MPLS3rdLabel)`,
}, {
Input: schema.ColumnTCPFlags,
// Can be tested with "WITH 16 AS TCPFlags SELECT ..."