dgramopt_plan9.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. package ipv6
  5. import (
  6. "net"
  7. "syscall"
  8. )
  9. // MulticastHopLimit returns the hop limit field value for outgoing
  10. // multicast packets.
  11. func (c *dgramOpt) MulticastHopLimit() (int, error) {
  12. // TODO(mikio): Implement this
  13. return 0, syscall.EPLAN9
  14. }
  15. // SetMulticastHopLimit sets the hop limit field value for future
  16. // outgoing multicast packets.
  17. func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error {
  18. // TODO(mikio): Implement this
  19. return syscall.EPLAN9
  20. }
  21. // MulticastInterface returns the default interface for multicast
  22. // packet transmissions.
  23. func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
  24. // TODO(mikio): Implement this
  25. return nil, syscall.EPLAN9
  26. }
  27. // SetMulticastInterface sets the default interface for future
  28. // multicast packet transmissions.
  29. func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
  30. // TODO(mikio): Implement this
  31. return syscall.EPLAN9
  32. }
  33. // MulticastLoopback reports whether transmitted multicast packets
  34. // should be copied and send back to the originator.
  35. func (c *dgramOpt) MulticastLoopback() (bool, error) {
  36. // TODO(mikio): Implement this
  37. return false, syscall.EPLAN9
  38. }
  39. // SetMulticastLoopback sets whether transmitted multicast packets
  40. // should be copied and send back to the originator.
  41. func (c *dgramOpt) SetMulticastLoopback(on bool) error {
  42. // TODO(mikio): Implement this
  43. return syscall.EPLAN9
  44. }
  45. // JoinGroup joins the group address group on the interface ifi.
  46. // It uses the system assigned multicast interface when ifi is nil,
  47. // although this is not recommended because the assignment depends on
  48. // platforms and sometimes it might require routing configuration.
  49. func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
  50. // TODO(mikio): Implement this
  51. return syscall.EPLAN9
  52. }
  53. // LeaveGroup leaves the group address group on the interface ifi.
  54. func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
  55. // TODO(mikio): Implement this
  56. return syscall.EPLAN9
  57. }
  58. // Checksum reports whether the kernel will compute, store or verify a
  59. // checksum for both incoming and outgoing packets. If on is true, it
  60. // returns an offset in bytes into the data of where the checksum
  61. // field is located.
  62. func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
  63. // TODO(mikio): Implement this
  64. return false, 0, syscall.EPLAN9
  65. }
  66. // SetChecksum enables the kernel checksum processing. If on is ture,
  67. // the offset should be an offset in bytes into the data of where the
  68. // checksum field is located.
  69. func (c *dgramOpt) SetChecksum(on bool, offset int) error {
  70. // TODO(mikio): Implement this
  71. return syscall.EPLAN9
  72. }
  73. // ICMPFilter returns an ICMP filter.
  74. func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
  75. // TODO(mikio): Implement this
  76. return nil, syscall.EPLAN9
  77. }
  78. // SetICMPFilter deploys the ICMP filter.
  79. func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
  80. // TODO(mikio): Implement this
  81. return syscall.EPLAN9
  82. }