Skip to content

Commit

Permalink
15327 add misc datalink class
Browse files Browse the repository at this point in the history
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Patrick Mooney <pmooney@pfmooney.com>
  • Loading branch information
luqmana authored and pfmooney committed Jan 26, 2023
1 parent 73b80b8 commit aa33dce
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 4 additions & 0 deletions usr/src/lib/libdladm/common/libdladm.c
Expand Up @@ -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>
Expand Down Expand Up @@ -685,6 +686,9 @@ dladm_class2str(datalink_class_t class, char *buf)
case DATALINK_CLASS_OVERLAY:
s = "overlay";
break;
case DATALINK_CLASS_MISC:
s = "misc";
break;
default:
s = "unknown";
break;
Expand Down
15 changes: 14 additions & 1 deletion usr/src/man/man8/dladm.8
Expand Up @@ -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
Expand Down Expand Up @@ -471,6 +472,18 @@ A virtual network interface. The \fBshow-vnic\fR subcommand displays more
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
Expand Down
6 changes: 4 additions & 2 deletions usr/src/uts/common/sys/dls_mgmt.h
Expand Up @@ -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
Expand Down Expand Up @@ -48,14 +49,15 @@ typedef enum {
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.
Expand Down

0 comments on commit aa33dce

Please sign in to comment.