15327 add misc datalink class
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Patrick Mooney <pmooney@pfmooney.com>
diff --git a/usr/src/lib/libdladm/common/libdladm.c b/usr/src/lib/libdladm/common/libdladm.c
index 91f0e6c..3f6d137 100644
--- a/usr/src/lib/libdladm/common/libdladm.c
+++ b/usr/src/lib/libdladm/common/libdladm.c
@@ -26,6 +26,7 @@
* Copyright (c) 2015, Joyent, Inc.
* Copyright 2020 Peter Tribble.
* Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright 2023 Oxide Computer Company
*/
#include <unistd.h>
@@ -685,6 +686,9 @@
case DATALINK_CLASS_OVERLAY:
s = "overlay";
break;
+ case DATALINK_CLASS_MISC:
+ s = "misc";
+ break;
default:
s = "unknown";
break;
diff --git a/usr/src/man/man8/dladm.8 b/usr/src/man/man8/dladm.8
index b18a9d7..ab787ec 100644
--- a/usr/src/man/man8/dladm.8
+++ b/usr/src/man/man8/dladm.8
@@ -44,8 +44,9 @@
.\" Copyright 2016 Joyent, Inc.
.\" Copyright 2020 RackTop Systems, Inc.
.\" Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
+.\" Copyright 2023 Oxide Computer Company
.\"
-.TH DLADM 8 "February 01, 2022"
+.TH DLADM 8 "January 23, 2023"
.SH NAME
dladm \- administer data links
.SH SYNOPSIS
@@ -471,6 +472,18 @@
detail for this class of datalink.
.RE
+.sp
+.ne 2
+.na
+\fB\fBmisc\fR\fR
+.ad
+.sp .6
+.RS 4n
+A generic datalink without any other class-specific properties. Generally used
+to indicate a pseudo device that doesn't otherwise correspond to one of the
+above classes.
+.RE
+
.RE
.sp
diff --git a/usr/src/uts/common/sys/dls_mgmt.h b/usr/src/uts/common/sys/dls_mgmt.h
index b60e53b..c522b4c 100644
--- a/usr/src/uts/common/sys/dls_mgmt.h
+++ b/usr/src/uts/common/sys/dls_mgmt.h
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2015, Joyent, Inc.
+ * Copyright 2023 Oxide Computer Company
*/
#ifndef _DLS_MGMT_H
@@ -48,14 +49,15 @@
DATALINK_CLASS_BRIDGE = 0x40,
DATALINK_CLASS_IPTUN = 0x80,
DATALINK_CLASS_PART = 0x100,
- DATALINK_CLASS_OVERLAY = 0x200
+ DATALINK_CLASS_OVERLAY = 0x200,
+ DATALINK_CLASS_MISC = 0x400
} datalink_class_t;
#define DATALINK_CLASS_ALL (DATALINK_CLASS_PHYS | \
DATALINK_CLASS_VLAN | DATALINK_CLASS_AGGR | DATALINK_CLASS_VNIC | \
DATALINK_CLASS_ETHERSTUB | DATALINK_CLASS_SIMNET | \
DATALINK_CLASS_BRIDGE | DATALINK_CLASS_IPTUN | DATALINK_CLASS_PART | \
- DATALINK_CLASS_OVERLAY)
+ DATALINK_CLASS_OVERLAY | DATALINK_CLASS_MISC)
/*
* A combination of flags and media.