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.
 
 
 

47 lines
1.7 KiB

  1. // Copyright 2014 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 ipv4
  5. // Sticky socket options
  6. const (
  7. ssoTOS = iota // header field for unicast packet
  8. ssoTTL // header field for unicast packet
  9. ssoMulticastTTL // header field for multicast packet
  10. ssoMulticastInterface // outbound interface for multicast packet
  11. ssoMulticastLoopback // loopback for multicast packet
  12. ssoReceiveTTL // header field on received packet
  13. ssoReceiveDst // header field on received packet
  14. ssoReceiveInterface // inbound interface on received packet
  15. ssoPacketInfo // incbound or outbound packet path
  16. ssoHeaderPrepend // ipv4 header prepend
  17. ssoStripHeader // strip ipv4 header
  18. ssoICMPFilter // icmp filter
  19. ssoJoinGroup // any-source multicast
  20. ssoLeaveGroup // any-source multicast
  21. ssoJoinSourceGroup // source-specific multicast
  22. ssoLeaveSourceGroup // source-specific multicast
  23. ssoBlockSourceGroup // any-source or source-specific multicast
  24. ssoUnblockSourceGroup // any-source or source-specific multicast
  25. ssoMax
  26. )
  27. // Sticky socket option value types
  28. const (
  29. ssoTypeByte = iota + 1
  30. ssoTypeInt
  31. ssoTypeInterface
  32. ssoTypeICMPFilter
  33. ssoTypeIPMreq
  34. ssoTypeIPMreqn
  35. ssoTypeGroupReq
  36. ssoTypeGroupSourceReq
  37. )
  38. // A sockOpt represents a binding for sticky socket option.
  39. type sockOpt struct {
  40. name int // option name, must be equal or greater than 1
  41. typ int // option value type, must be equal or greater than 1
  42. }