Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions oui.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const struct tok oui_values[] = {
{ OUI_IANA, "IANA" },
{ OUI_NORTEL, "Nortel Networks SONMP" },
{ OUI_CISCO_90, "Cisco bridged" },
{ OUI_ITU_T, "ITU-T" },
{ OUI_RFC2684, "Ethernet bridged" },
{ OUI_ATM_FORUM, "ATM Forum" },
{ OUI_CABLE_BPDU, "DOCSIS Spanning Tree" },
Expand Down
1 change: 1 addition & 0 deletions oui.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extern const struct tok smi_values[];
#define OUI_IANA 0x00005E /* IANA */
#define OUI_NORTEL 0x000081 /* Nortel SONMP */
#define OUI_CISCO_90 0x0000f8 /* Cisco bridging */
#define OUI_ITU_T 0x0019a7 /* International Telecommunication Union - Telecommunication Standardization Sector */
#define OUI_RFC2684 0x0080c2 /* RFC 2427/2684 bridged Ethernet */
#define OUI_ATM_FORUM 0x00A03E /* ATM Forum */
#define OUI_CABLE_BPDU 0x00E02F /* DOCSIS spanning tree BPDU */
Expand Down
29 changes: 28 additions & 1 deletion print-slow.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#define SLOW_PROTO_LACP 1
#define SLOW_PROTO_MARKER 2
#define SLOW_PROTO_OAM 3
#define SLOW_PROTO_OSSP 10

#define LACP_VERSION 1
#define MARKER_VERSION 1
Expand All @@ -42,6 +43,7 @@ static const struct tok slow_proto_values[] = {
{ SLOW_PROTO_LACP, "LACP" },
{ SLOW_PROTO_MARKER, "MARKER" },
{ SLOW_PROTO_OAM, "OAM" },
{ SLOW_PROTO_OSSP, "OSSP" },
{ 0, NULL}
};

Expand Down Expand Up @@ -239,6 +241,7 @@ struct lacp_marker_tlv_terminator_t {

static void slow_marker_lacp_print(netdissect_options *, const u_char *, u_int, u_int);
static void slow_oam_print(netdissect_options *, const u_char *, u_int);
static void slow_ossp_print(netdissect_options *, const u_char *, u_int);

void
slow_print(netdissect_options *ndo,
Expand Down Expand Up @@ -278,7 +281,8 @@ slow_print(netdissect_options *ndo,
print_version = 1;
break;

case SLOW_PROTO_OAM: /* fall through */
case SLOW_PROTO_OAM:
case SLOW_PROTO_OSSP:
print_version = 0;
break;

Expand Down Expand Up @@ -313,6 +317,13 @@ slow_print(netdissect_options *ndo,
default: /* should not happen */
break;

case SLOW_PROTO_OSSP:
/* skip subtype */
len -= 1;
pptr += 1;
slow_ossp_print(ndo, pptr, len);
break;

case SLOW_PROTO_OAM:
/* skip subtype */
len -= 1;
Expand Down Expand Up @@ -733,3 +744,19 @@ slow_oam_print(netdissect_options *ndo,
tooshort:
ND_PRINT("\n\t\t packet is too short");
}

static void
slow_ossp_print(netdissect_options *ndo,
const u_char *tptr, u_int tlen)
{
uint32_t oui;

oui = GET_BE_U_3(tptr);
ND_PRINT("\n\tOUI: %s (0x%06x)",
tok2str(oui_values, "Unknown", oui),
oui);
tlen -= 3;
tptr += 3;

print_unknown_data(ndo, tptr, "\n\t", tlen);
}
1 change: 1 addition & 0 deletions tests/TESTLIST
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ lldp_mud-v lldp_mudurl.pcap lldp_mudurl-v.out -e -v
lldp_mud-vv lldp_mudurl.pcap lldp_mudurl-vv.out -e -vv
lldp_8021_linkagg-v lldp_8021_linkagg.pcap lldp_8021_linkagg-v.out -v
lldp_8021_linkagg-vv lldp_8021_linkagg.pcap lldp_8021_linkagg-vv.out -vv
slow-ossp slow-ossp.pcap slow-ossp.out -v
# fuzzed pcap
udld-inf-loop-1-v udld-inf-loop-1.pcapng udld-inf-loop-1-v.out -v

Expand Down
5 changes: 5 additions & 0 deletions tests/slow-ossp.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1 2025-09-23 15:00:00.000000 OSSP, length 52
OUI: ITU-T (0x0019a7)
0x0000: 0001 1000 0000 0100 0404 0000 0000 0000
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000
0x0020: 0000 0000 0000 0000 0000 0000 0000 0000
Binary file added tests/slow-ossp.pcap
Binary file not shown.