1// +build !aix,!darwin,!linux,!freebsd,!openbsd,!windows 2 3package net 4 5import ( 6 "context" 7 8 "github.com/shirou/gopsutil/internal/common" 9) 10 11func IOCounters(pernic bool) ([]IOCountersStat, error) { 12 return IOCountersWithContext(context.Background(), pernic) 13} 14 15func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) { 16 return []IOCountersStat{}, common.ErrNotImplementedError 17} 18 19func FilterCounters() ([]FilterStat, error) { 20 return FilterCountersWithContext(context.Background()) 21} 22 23func FilterCountersWithContext(ctx context.Context) ([]FilterStat, error) { 24 return []FilterStat{}, common.ErrNotImplementedError 25} 26 27func ConntrackStats(percpu bool) ([]ConntrackStat, error) { 28 return ConntrackStatsWithContext(context.Background(), percpu) 29} 30 31func ConntrackStatsWithContext(ctx context.Context, percpu bool) ([]ConntrackStat, error) { 32 return nil, common.ErrNotImplementedError 33} 34 35func ProtoCounters(protocols []string) ([]ProtoCountersStat, error) { 36 return ProtoCountersWithContext(context.Background(), protocols) 37} 38 39func ProtoCountersWithContext(ctx context.Context, protocols []string) ([]ProtoCountersStat, error) { 40 return []ProtoCountersStat{}, common.ErrNotImplementedError 41} 42 43func Connections(kind string) ([]ConnectionStat, error) { 44 return ConnectionsWithContext(context.Background(), kind) 45} 46 47func ConnectionsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { 48 return []ConnectionStat{}, common.ErrNotImplementedError 49} 50 51func ConnectionsMax(kind string, max int) ([]ConnectionStat, error) { 52 return ConnectionsMaxWithContext(context.Background(), kind, max) 53} 54 55func ConnectionsMaxWithContext(ctx context.Context, kind string, max int) ([]ConnectionStat, error) { 56 return []ConnectionStat{}, common.ErrNotImplementedError 57} 58 59// Return a list of network connections opened, omitting `Uids`. 60// WithoutUids functions are reliant on implementation details. They may be altered to be an alias for Connections or be 61// removed from the API in the future. 62func ConnectionsWithoutUids(kind string) ([]ConnectionStat, error) { 63 return ConnectionsWithoutUidsWithContext(context.Background(), kind) 64} 65 66func ConnectionsWithoutUidsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { 67 return ConnectionsMaxWithoutUidsWithContext(ctx, kind, 0) 68} 69 70func ConnectionsMaxWithoutUidsWithContext(ctx context.Context, kind string, max int) ([]ConnectionStat, error) { 71 return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, 0, max) 72} 73 74func ConnectionsPidWithoutUids(kind string, pid int32) ([]ConnectionStat, error) { 75 return ConnectionsPidWithoutUidsWithContext(context.Background(), kind, pid) 76} 77 78func ConnectionsPidWithoutUidsWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { 79 return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, 0) 80} 81 82func ConnectionsPidMaxWithoutUids(kind string, pid int32, max int) ([]ConnectionStat, error) { 83 return ConnectionsPidMaxWithoutUidsWithContext(context.Background(), kind, pid, max) 84} 85 86func ConnectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, max int) ([]ConnectionStat, error) { 87 return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, max) 88} 89 90func connectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, max int) ([]ConnectionStat, error) { 91 return []ConnectionStat{}, common.ErrNotImplementedError 92} 93