LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Network interface identification | 5 // Network interface identification |
6 | 6 |
7 package net | 7 package net |
8 | 8 |
9 import "os" | 9 import "os" |
| 10 |
| 11 // IsUp returns true if ifi is up. |
| 12 func (ifi *Interface) IsUp() bool { |
| 13 return false |
| 14 } |
| 15 |
| 16 // IsLoopback returns true if ifi is a loopback interface. |
| 17 func (ifi *Interface) IsLoopback() bool { |
| 18 return false |
| 19 } |
| 20 |
| 21 // CanBroadcast returns true if ifi supports a broadcast access |
| 22 // capability. |
| 23 func (ifi *Interface) CanBroadcast() bool { |
| 24 return false |
| 25 } |
| 26 |
| 27 // IsPointToPoint returns true if ifi belongs to a point-to-point |
| 28 // link. |
| 29 func (ifi *Interface) IsPointToPoint() bool { |
| 30 return false |
| 31 } |
| 32 |
| 33 // CanMulticast returns true if ifi supports a multicast access |
| 34 // capability. |
| 35 func (ifi *Interface) CanMulticast() bool { |
| 36 return false |
| 37 } |
10 | 38 |
11 // If the ifindex is zero, interfaceTable returns mappings of all | 39 // If the ifindex is zero, interfaceTable returns mappings of all |
12 // network interfaces. Otheriwse it returns a mapping of a specific | 40 // network interfaces. Otheriwse it returns a mapping of a specific |
13 // interface. | 41 // interface. |
14 func interfaceTable(ifindex int) ([]Interface, os.Error) { | 42 func interfaceTable(ifindex int) ([]Interface, os.Error) { |
15 return nil, nil | 43 return nil, nil |
16 } | 44 } |
17 | 45 |
18 // If the ifindex is zero, interfaceAddrTable returns addresses | 46 // If the ifindex is zero, interfaceAddrTable returns addresses |
19 // for all network interfaces. Otherwise it returns addresses | 47 // for all network interfaces. Otherwise it returns addresses |
20 // for a specific interface. | 48 // for a specific interface. |
21 func interfaceAddrTable(ifindex int) ([]Addr, os.Error) { | 49 func interfaceAddrTable(ifindex int) ([]Addr, os.Error) { |
22 return nil, nil | 50 return nil, nil |
23 } | 51 } |
LEFT | RIGHT |