diff options
Diffstat (limited to 'usr/src/man/man7p')
-rw-r--r-- | usr/src/man/man7p/Makefile | 6 | ||||
-rw-r--r-- | usr/src/man/man7p/icmp.7p | 16 | ||||
-rw-r--r-- | usr/src/man/man7p/icmp6.7p | 15 | ||||
-rw-r--r-- | usr/src/man/man7p/vxlan.7p | 124 |
4 files changed, 143 insertions, 18 deletions
diff --git a/usr/src/man/man7p/Makefile b/usr/src/man/man7p/Makefile index 13cb58770d..f73a157f47 100644 --- a/usr/src/man/man7p/Makefile +++ b/usr/src/man/man7p/Makefile @@ -39,7 +39,8 @@ MANFILES= arp.7p \ sip.7p \ slp.7p \ tcp.7p \ - udp.7p + udp.7p \ + vxlan.7p MANLINKS= AH.7p \ ARP.7p \ @@ -51,6 +52,7 @@ MANLINKS= AH.7p \ SCTP.7p \ TCP.7p \ UDP.7p \ + VXLAN.7p \ if.7p ARP.7p := LINKSRC = arp.7p @@ -75,6 +77,8 @@ TCP.7p := LINKSRC = tcp.7p UDP.7p := LINKSRC = udp.7p +VXLAN.7p := LINKSRC = vxlan.7p + .KEEP_STATE: include $(SRC)/man/Makefile.man diff --git a/usr/src/man/man7p/icmp.7p b/usr/src/man/man7p/icmp.7p index cb2ce3ae61..1935b49f89 100644 --- a/usr/src/man/man7p/icmp.7p +++ b/usr/src/man/man7p/icmp.7p @@ -5,7 +5,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH ICMP 7P "Jul 3, 1990" +.TH ICMP 7P "Dec 03, 2015" .SH NAME icmp, ICMP \- Internet Control Message Protocol .SH SYNOPSIS @@ -19,7 +19,6 @@ t = t_open("/dev/icmp", O_RDWR); .fi .SH DESCRIPTION -.sp .LP \fBICMP\fR is the error and control message protocol used by the Internet protocol family. It is used by the kernel to handle and report errors in @@ -30,7 +29,9 @@ type is used. The protocol number for \fBICMP,\fR used in the \fIproto\fR parameter to the socket call, can be obtained from \fBgetprotobyname\fR(3SOCKET). \fBICMP\fR file descriptors and sockets are connectionless, and are normally used with the \fBt_sndudata\fR / -\fBt_rcvudata\fR and the \fBsendto()\fR / \fBrecvfrom()\fR calls. +\fBt_rcvudata\fR and the \fBsendto()\fR / \fBrecvfrom()\fR calls. In order to +send \fBICMP\fR packets, a process needs the \fBPRIV_NET_ICMPACCESS\fR +privilege. (See \fBprivileges\fR(5) for more on privileges.) .sp .LP Outgoing packets automatically have an Internet Protocol (\fBIP\fR) header @@ -39,7 +40,7 @@ header and options intact. .sp .LP \fBICMP\fR is an datagram protocol layered above \fBIP.\fR It is used -internally by the protcol code for various purposes including routing, fault +internally by the protocol code for various purposes including routing, fault isolation, and congestion control. Receipt of an \fBICMP\fR "redirect" message will add a new entry in the routing table, or modify an existing one. \fBICMP\fR messages are routinely sent by the protocol code. Received @@ -48,18 +49,16 @@ such as \fBTCP\fR or \fBUDP\fR as error returns from system calls. A copy of all \fBICMP\fR message received by the system is provided to every holder of an open \fBICMP\fR socket or \fBTLI\fR descriptor. .SH SEE ALSO -.sp .LP \fBgetprotobyname\fR(3SOCKET), \fBrecv\fR(3SOCKET), \fBsend\fR(3SOCKET), -\fBt_rcvudata\fR(3NSL), \fBt_sndudata\fR(3NSL), \fBinet\fR(7P), \fBip\fR(7P), -\fBrouting\fR(7P) +\fBt_rcvudata\fR(3NSL), \fBt_sndudata\fR(3NSL), \fBprivileges\fR(5), +\fBinet\fR(7P), \fBip\fR(7P), \fBrouting\fR(7P) .sp .LP Postel, Jon, \fIInternet Control Message Protocol \(em DARPA Internet Program Protocol Specification\fR, \fBRFC\fR 792, Network Information Center, \fBSRI\fR International, Menlo Park, Calif., September 1981. .SH DIAGNOSTICS -.sp .LP A socket operation may fail with one of the following errors returned: .sp @@ -103,7 +102,6 @@ network interface exists. .RE .SH NOTES -.sp .LP Replies to \fBICMP\fR "echo" messages which are source routed are not sent back using inverted source routes, but rather go back through the normal routing diff --git a/usr/src/man/man7p/icmp6.7p b/usr/src/man/man7p/icmp6.7p index ec4fef9adb..30134f5e9b 100644 --- a/usr/src/man/man7p/icmp6.7p +++ b/usr/src/man/man7p/icmp6.7p @@ -4,7 +4,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH ICMP6 7P "Nov 10, 1999" +.TH ICMP6 7P "Dec 03, 2015" .SH NAME icmp6 \- Internet Control Message Protocol for Internet Protocol Version 6 .SH SYNOPSIS @@ -27,7 +27,6 @@ t = t_open("/dev/icmp6", O_RDWR); .fi .SH DESCRIPTION -.sp .LP The \fBICMP6\fR protocol is the error and control message protocol used with Version 6 of the Internet Protocol. It is used by the kernel to handle and @@ -41,7 +40,9 @@ can be obtained from \fBgetprotobyname\fR(3SOCKET). \fBICMP6\fR file descriptors and sockets are connectionless and are normally used with the \fBt_sndudata\fR / \fBt_rcvudata\fR and the \fBsendto()\fR / \fBrecvfrom()\fR calls. They may also be used with the \fBsendmsg()\fR/\fBrecvgmsg()\fR calls -when sending or receiving ancillary data. +when sending or receiving ancillary data. In order to send \fBICMP6\fR packets, +a process needs the \fBPRIV_NET_ICMPACCESS\fR privilege. (See +\fBprivileges\fR(5) for more on privileges.) .sp .LP Outgoing packets automatically have an Internet Protocol Version 6 (\fBIPv6\fR) @@ -63,22 +64,20 @@ configured. \fBICMP6\fR is a datagram protocol layered above \fBIPv6\fR. Received \fBICMP6\fR messages may be reflected back to users of higher-level protocols such as \fBTCP\fR or \fBUDP\fR as error returns from system calls. A copy of -each \fBICMP6\fRerror message received by the system is provided to every +each \fBICMP6\fR error message received by the system is provided to every holder of an open \fBICMP6\fR socket or \fBTLI\fR descriptor. .SH SEE ALSO -.sp .LP \fBgetprotobyname\fR(3SOCKET), \fBrecv\fR(3SOCKET), \fBrecvmsg\fR(3SOCKET), \fBsend\fR(3SOCKET), \fBsendmsg\fR(3SOCKET), \fBsetsockopt\fR(3SOCKET), -\fBt_rcvudata\fR(3NSL), \fBt_sndudata\fR(3NSL), \fBinet6\fR(7P), \fBip6\fR(7P), -\fBrouting\fR(7P) +\fBt_rcvudata\fR(3NSL), \fBt_sndudata\fR(3NSL), \fBprivileges\fR(5), +\fBinet6\fR(7P), \fBip6\fR(7P), \fBrouting\fR(7P) .sp .LP Conta, A. and Deering, S., \fIRFC 2463, Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification\fR, The Internet Society, December 1998. .SH DIAGNOSTICS -.sp .LP A socket operation may fail with one of the following errors returned: .sp diff --git a/usr/src/man/man7p/vxlan.7p b/usr/src/man/man7p/vxlan.7p new file mode 100644 index 0000000000..a32637b484 --- /dev/null +++ b/usr/src/man/man7p/vxlan.7p @@ -0,0 +1,124 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright 2015 Joyent, Inc. +.\" +.Dd Apr 10, 2015 +.Dt VXLAN 7P +.Os +.Sh NAME +.Nm VXLAN , +.Nm vxlan +.Nd Virtual eXtensible Local Area Network +.Sh SYNOPSIS +.In sys/vxlan.h +.Sh DESCRIPTION +.Nm +(RFC 7348) is a network encapsulation protocol that is used by +.Xr overlay 5 +devices. A payload, commonly an Ethernet frame, is placed inside of a +UDP packet and prepended with an 8-byte +.Nm +header. +.Pp +The +.Nm +header contains two 32-bit words. The first word is an 8-bit flags field +followed by 24 reserved bits. The second word is a 24-bit virtual network +identifier followed by 8 reserved bits. The virtual network identifier +identifies a unique +.Nm +and +is similar in concept to an IEEE 802.1Q VLAN identifier. +.Pp +The system provides access to +.Nm +through dladm overlays. See +.Xr dladm 1M +and +.Xr overlay 5 +for more information. +.Pp +The +.In sys/vxlan.h +header provides information for working with the +.Nm +protocol. The contents of this header are +.Sy uncommitted . +The header defines a structure that may be used to encode and decode a VXLAN +header. It defines a packed structure type +.Sy vxlan_hdr_t +which represents the +.Nm +frame header and has the following members: +.Bd -literal + uint32_t vxlan_flags; /* flags in upper 8 bits */ + uint32_t vxlan_id; /* VXLAN ID in upper 24 bits */ +.Ed +.Sh EXAMPLES +.Sy Example 1 +Decoding a +.Nm +header +.Pp +The following example shows how to validate a +.Nm header. For more information on this process, see RFC 7348. +.Bd -literal -offset indent +#include <sys/types.h> +#include <netinet/in.h> +#include <inttypes.h> +#include <sys/vxlan.h> + +\&... + +/* + * Validate the following bytes as a VXLAN header. If valid, return + * 0 and store the VXLAN identifier in *vidp. Otherwise, return an + * error. + */ +int +validate_vxlan(void *buf, int len, uint32_t *vidp) +{ + vxlan_hdr_t *hdr; + + if (len < sizeof (vxlan_hdr_t)) + return (EINAVL); + + hdr = buf; + if ((ntohl(hdr->vxlan_flags) & VXLAN_MAGIC) == 0) + return (EINAVL); + + *vidp = ntohl(vxlan->vxlan_id) >> VXLAN_ID_SHIFT; + + return (0); +} +.Ed +.Sh STABILITY +The contents of +.In sys/vxlan.h +are +.Sy Uncommitted . +.Sh SEE ALSO +.Xr dladm 1M , +.Xr overlay 5 +.Rs +.%A Mahalingam, M. +.%A Dutt, D. +.%A Duda, K. +.%A Agarwal, P. +.%A Kreeger L. +.%A Sridhar, T. +.%A Bursell, M. +.%A C. Wright +.%T RFC 7348, Virtual eXtensible Local Area Network (VXLAN): A Framework +.%T for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks +.%D August 2014 +.Re |