dgramopt_stub.go 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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.
  38. // By default all sources that can cast data to group are accepted.
  39. // It's possible to mute and unmute data transmission from a specific
  40. // source by using ExcludeSourceSpecificGroup and
  41. // IncludeSourceSpecificGroup.
  42. // JoinGroup uses the system assigned multicast interface when ifi is
  43. // nil, although this is not recommended because the assignment
  44. // depends on platforms and sometimes it might require routing
  45. // configuration.
  46. func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
  47. return errOpNoSupport
  48. }
  49. // LeaveGroup leaves the group address group on the interface ifi
  50. // regardless of whether the group is any-source group or
  51. // source-specific group.
  52. func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
  53. return errOpNoSupport
  54. }
  55. // JoinSourceSpecificGroup joins the source-specific group comprising
  56. // group and source on the interface ifi.
  57. // JoinSourceSpecificGroup uses the system assigned multicast
  58. // interface when ifi is nil, although this is not recommended because
  59. // the assignment depends on platforms and sometimes it might require
  60. // routing configuration.
  61. func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
  62. return errOpNoSupport
  63. }
  64. // LeaveSourceSpecificGroup leaves the source-specific group on the
  65. // interface ifi.
  66. func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
  67. return errOpNoSupport
  68. }
  69. // ExcludeSourceSpecificGroup excludes the source-specific group from
  70. // the already joined any-source groups by JoinGroup on the interface
  71. // ifi.
  72. func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
  73. return errOpNoSupport
  74. }
  75. // IncludeSourceSpecificGroup includes the excluded source-specific
  76. // group by ExcludeSourceSpecificGroup again on the interface ifi.
  77. func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
  78. return errOpNoSupport
  79. }
  80. // Checksum reports whether the kernel will compute, store or verify a
  81. // checksum for both incoming and outgoing packets. If on is true, it
  82. // returns an offset in bytes into the data of where the checksum
  83. // field is located.
  84. func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
  85. return false, 0, errOpNoSupport
  86. }
  87. // SetChecksum enables the kernel checksum processing. If on is ture,
  88. // the offset should be an offset in bytes into the data of where the
  89. // checksum field is located.
  90. func (c *dgramOpt) SetChecksum(on bool, offset int) error {
  91. return errOpNoSupport
  92. }
  93. // ICMPFilter returns an ICMP filter.
  94. func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
  95. return nil, errOpNoSupport
  96. }
  97. // SetICMPFilter deploys the ICMP filter.
  98. func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
  99. return errOpNoSupport
  100. }