You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

107 lines
3.6 KiB

  1. // Copyright 2012 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
  5. package ipv4
  6. import "net"
  7. // MulticastTTL returns the time-to-live field value for outgoing
  8. // multicast packets.
  9. func (c *dgramOpt) MulticastTTL() (int, error) {
  10. return 0, errOpNoSupport
  11. }
  12. // SetMulticastTTL sets the time-to-live field value for future
  13. // outgoing multicast packets.
  14. func (c *dgramOpt) SetMulticastTTL(ttl 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. // ICMPFilter returns an ICMP filter.
  81. // Currently only Linux supports this.
  82. func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
  83. return nil, errOpNoSupport
  84. }
  85. // SetICMPFilter deploys the ICMP filter.
  86. // Currently only Linux supports this.
  87. func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
  88. return errOpNoSupport
  89. }