dgramopt_stub.go 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. // It uses the system assigned multicast interface when ifi is nil,
  39. // although this is not recommended because the assignment depends on
  40. // platforms and sometimes it might require routing configuration.
  41. func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
  42. return errOpNoSupport
  43. }
  44. // LeaveGroup leaves the group address group on the interface ifi.
  45. func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
  46. return errOpNoSupport
  47. }
  48. // Checksum reports whether the kernel will compute, store or verify a
  49. // checksum for both incoming and outgoing packets. If on is true, it
  50. // returns an offset in bytes into the data of where the checksum
  51. // field is located.
  52. func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
  53. return false, 0, errOpNoSupport
  54. }
  55. // SetChecksum enables the kernel checksum processing. If on is ture,
  56. // the offset should be an offset in bytes into the data of where the
  57. // checksum field is located.
  58. func (c *dgramOpt) SetChecksum(on bool, offset int) error {
  59. return errOpNoSupport
  60. }
  61. // ICMPFilter returns an ICMP filter.
  62. func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
  63. return nil, errOpNoSupport
  64. }
  65. // SetICMPFilter deploys the ICMP filter.
  66. func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
  67. return errOpNoSupport
  68. }