Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 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 | |
Mikio Hara | c646048 | 2014-05-21 09:27:50 +0900 | [diff] [blame] | 5 | // +build nacl plan9 solaris |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 6 | |
Mikio Hara | f3b815b | 2014-01-28 22:24:32 +0100 | [diff] [blame] | 7 | package ipv4 |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 8 | |
Mikio Hara | 3809e74 | 2014-11-22 11:21:45 +0900 | [diff] [blame] | 9 | // TOS returns the type-of-service field value for outgoing packets. |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 10 | func (c *genericOpt) TOS() (int, error) { |
Mikio Hara | f3b815b | 2014-01-28 22:24:32 +0100 | [diff] [blame] | 11 | return 0, errOpNoSupport |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 12 | } |
| 13 | |
Mikio Hara | 3809e74 | 2014-11-22 11:21:45 +0900 | [diff] [blame] | 14 | // SetTOS sets the type-of-service field value for future outgoing |
| 15 | // packets. |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 16 | func (c *genericOpt) SetTOS(tos int) error { |
Mikio Hara | f3b815b | 2014-01-28 22:24:32 +0100 | [diff] [blame] | 17 | return errOpNoSupport |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 18 | } |
| 19 | |
Mikio Hara | 3809e74 | 2014-11-22 11:21:45 +0900 | [diff] [blame] | 20 | // TTL returns the time-to-live field value for outgoing packets. |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 21 | func (c *genericOpt) TTL() (int, error) { |
Mikio Hara | f3b815b | 2014-01-28 22:24:32 +0100 | [diff] [blame] | 22 | return 0, errOpNoSupport |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 23 | } |
| 24 | |
Mikio Hara | 3809e74 | 2014-11-22 11:21:45 +0900 | [diff] [blame] | 25 | // SetTTL sets the time-to-live field value for future outgoing |
| 26 | // packets. |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 27 | func (c *genericOpt) SetTTL(ttl int) error { |
Mikio Hara | f3b815b | 2014-01-28 22:24:32 +0100 | [diff] [blame] | 28 | return errOpNoSupport |
Mikio Hara | d2e5a12 | 2012-09-26 21:03:09 +0900 | [diff] [blame] | 29 | } |