@@ -32,14 +32,14 @@ const (
3232)
3333
3434var (
35- errSrcIP = errors .New ("invalid source IP" )
36- errSrcMAC = errors .New ("invalid source MAC" )
37- errSrcInterface = errors .New ("invalid source interface" )
38- errRateLimit = errors .New ("invalid ratelimit" )
39- errTermStdin = errors .New ("stdin is from a terminal " )
40- errIPFlags = errors .New ("invalid ip flags" )
41- errNoDstIP = errors .New ("requires one ip subnet argument or file with ip/port pairs" )
42- errARPStdin = errors .New ("ARP cache and IP file can not be read from stdin at the same time" )
35+ errSrcIP = errors .New ("invalid source IP" )
36+ errSrcMAC = errors .New ("invalid source MAC" )
37+ errSrcInterface = errors .New ("invalid source interface" )
38+ errRateLimit = errors .New ("invalid ratelimit" )
39+ errARPCacheStdin = errors .New ("ARP cache is expected from file or stdin pipe " )
40+ errIPFlags = errors .New ("invalid ip flags" )
41+ errNoDstIP = errors .New ("requires one ip subnet argument or file with ip/port pairs" )
42+ errARPStdin = errors .New ("ARP cache and IP file can not be read from stdin at the same time" )
4343)
4444
4545type packetScanCmdOpts struct {
@@ -279,7 +279,7 @@ func (o *ipScanCmdOpts) openARPCache() (r io.ReadCloser, err error) {
279279 // only data being piped to stdin is valid
280280 if (info .Mode () & os .ModeCharDevice ) != 0 {
281281 // stdin from terminal is not valid
282- return nil , errTermStdin
282+ return nil , errARPCacheStdin
283283 }
284284 r = io .NopCloser (os .Stdin )
285285 return
0 commit comments