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.
5
// +build darwin freebsd linux netbsd openbsd windows
11
// TrafficClass returns the traffic class field value for outgoing
13
func (c *genericOpt) TrafficClass() (int, error) {
15
return 0, syscall.EINVAL
21
return ipv6TrafficClass(fd)
24
// SetTrafficClass sets the traffic class field value for future
26
func (c *genericOpt) SetTrafficClass(tclass int) error {
34
return setIPv6TrafficClass(fd, tclass)
37
// HopLimit returns the hop limit field value for outgoing packets.
38
func (c *genericOpt) HopLimit() (int, error) {
40
return 0, syscall.EINVAL
46
return ipv6HopLimit(fd)
49
// SetHopLimit sets the hop limit field value for future outgoing
51
func (c *genericOpt) SetHopLimit(hoplim int) error {
59
return setIPv6HopLimit(fd, hoplim)