github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/net/ipv6/sockopt.go (about)

     1  // Copyright 2014 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package ipv6
     6  
     7  // Sticky socket options
     8  const (
     9  	ssoTrafficClass        = iota // header field for unicast packet, RFC 3542
    10  	ssoHopLimit                   // header field for unicast packet, RFC 3493
    11  	ssoMulticastInterface         // outbound interface for multicast packet, RFC 3493
    12  	ssoMulticastHopLimit          // header field for multicast packet, RFC 3493
    13  	ssoMulticastLoopback          // loopback for multicast packet, RFC 3493
    14  	ssoReceiveTrafficClass        // header field on received packet, RFC 3542
    15  	ssoReceiveHopLimit            // header field on received packet, RFC 2292 or 3542
    16  	ssoReceivePacketInfo          // incbound or outbound packet path, RFC 2292 or 3542
    17  	ssoReceivePathMTU             // path mtu, RFC 3542
    18  	ssoPathMTU                    // path mtu, RFC 3542
    19  	ssoChecksum                   // packet checksum, RFC 2292 or 3542
    20  	ssoICMPFilter                 // icmp filter, RFC 2292 or 3542
    21  	ssoJoinGroup                  // any-source multicast, RFC 3493
    22  	ssoLeaveGroup                 // any-source multicast, RFC 3493
    23  	ssoJoinSourceGroup            // source-specific multicast
    24  	ssoLeaveSourceGroup           // source-specific multicast
    25  	ssoBlockSourceGroup           // any-source or source-specific multicast
    26  	ssoUnblockSourceGroup         // any-source or source-specific multicast
    27  	ssoMax
    28  )
    29  
    30  // Sticky socket option value types
    31  const (
    32  	ssoTypeInt = iota + 1
    33  	ssoTypeInterface
    34  	ssoTypeICMPFilter
    35  	ssoTypeMTUInfo
    36  	ssoTypeIPMreq
    37  	ssoTypeGroupReq
    38  	ssoTypeGroupSourceReq
    39  )
    40  
    41  // A sockOpt represents a binding for sticky socket option.
    42  type sockOpt struct {
    43  	level int // option level
    44  	name  int // option name, must be equal or greater than 1
    45  	typ   int // option value type, must be equal or greater than 1
    46  }