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.
5
// +build nacl plan9 solaris
11
// MulticastHopLimit returns the hop limit field value for outgoing
13
func (c *dgramOpt) MulticastHopLimit() (int, error) {
14
return 0, errOpNoSupport
17
// SetMulticastHopLimit sets the hop limit field value for future
18
// outgoing multicast packets.
19
func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error {
23
// MulticastInterface returns the default interface for multicast
24
// packet transmissions.
25
func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
26
return nil, errOpNoSupport
29
// SetMulticastInterface sets the default interface for future
30
// multicast packet transmissions.
31
func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
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
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 {
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
56
func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
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 {
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 {
77
// LeaveSourceSpecificGroup leaves the source-specific group on the
79
func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
83
// ExcludeSourceSpecificGroup excludes the source-specific group from
84
// the already joined any-source groups by JoinGroup on the interface
86
func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
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 {
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
100
func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
101
return false, 0, errOpNoSupport
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
111
// ICMPFilter returns an ICMP filter.
112
func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
113
return nil, errOpNoSupport
116
// SetICMPFilter deploys the ICMP filter.
117
func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
118
return errOpNoSupport