~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/golang.org/x/net/ipv6/sockopt.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
}