github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/net/ipv6/dgramopt_stub.go (about) 1 // Copyright 2013 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 // +build nacl plan9 solaris 6 7 package ipv6 8 9 import "net" 10 11 // MulticastHopLimit returns the hop limit field value for outgoing 12 // multicast packets. 13 func (c *dgramOpt) MulticastHopLimit() (int, error) { 14 return 0, errOpNoSupport 15 } 16 17 // SetMulticastHopLimit sets the hop limit field value for future 18 // outgoing multicast packets. 19 func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error { 20 return errOpNoSupport 21 } 22 23 // MulticastInterface returns the default interface for multicast 24 // packet transmissions. 25 func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { 26 return nil, errOpNoSupport 27 } 28 29 // SetMulticastInterface sets the default interface for future 30 // multicast packet transmissions. 31 func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { 32 return errOpNoSupport 33 } 34 35 // MulticastLoopback reports whether transmitted multicast packets 36 // should be copied and send back to the originator. 37 func (c *dgramOpt) MulticastLoopback() (bool, error) { 38 return false, errOpNoSupport 39 } 40 41 // SetMulticastLoopback sets whether transmitted multicast packets 42 // should be copied and send back to the originator. 43 func (c *dgramOpt) SetMulticastLoopback(on bool) error { 44 return errOpNoSupport 45 } 46 47 // JoinGroup joins the group address group on the interface ifi. 48 // By default all sources that can cast data to group are accepted. 49 // It's possible to mute and unmute data transmission from a specific 50 // source by using ExcludeSourceSpecificGroup and 51 // IncludeSourceSpecificGroup. 52 // JoinGroup uses the system assigned multicast interface when ifi is 53 // nil, although this is not recommended because the assignment 54 // depends on platforms and sometimes it might require routing 55 // configuration. 56 func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { 57 return errOpNoSupport 58 } 59 60 // LeaveGroup leaves the group address group on the interface ifi 61 // regardless of whether the group is any-source group or 62 // source-specific group. 63 func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { 64 return errOpNoSupport 65 } 66 67 // JoinSourceSpecificGroup joins the source-specific group comprising 68 // group and source on the interface ifi. 69 // JoinSourceSpecificGroup uses the system assigned multicast 70 // interface when ifi is nil, although this is not recommended because 71 // the assignment depends on platforms and sometimes it might require 72 // routing configuration. 73 func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { 74 return errOpNoSupport 75 } 76 77 // LeaveSourceSpecificGroup leaves the source-specific group on the 78 // interface ifi. 79 func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { 80 return errOpNoSupport 81 } 82 83 // ExcludeSourceSpecificGroup excludes the source-specific group from 84 // the already joined any-source groups by JoinGroup on the interface 85 // ifi. 86 func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { 87 return errOpNoSupport 88 } 89 90 // IncludeSourceSpecificGroup includes the excluded source-specific 91 // group by ExcludeSourceSpecificGroup again on the interface ifi. 92 func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { 93 return errOpNoSupport 94 } 95 96 // Checksum reports whether the kernel will compute, store or verify a 97 // checksum for both incoming and outgoing packets. If on is true, it 98 // returns an offset in bytes into the data of where the checksum 99 // field is located. 100 func (c *dgramOpt) Checksum() (on bool, offset int, err error) { 101 return false, 0, errOpNoSupport 102 } 103 104 // SetChecksum enables the kernel checksum processing. If on is ture, 105 // the offset should be an offset in bytes into the data of where the 106 // checksum field is located. 107 func (c *dgramOpt) SetChecksum(on bool, offset int) error { 108 return errOpNoSupport 109 } 110 111 // ICMPFilter returns an ICMP filter. 112 func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) { 113 return nil, errOpNoSupport 114 } 115 116 // SetICMPFilter deploys the ICMP filter. 117 func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error { 118 return errOpNoSupport 119 }