dgramopt_stub.go 4.2 KB

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