Documentation ¶
Index ¶
- Constants
- func BPFFilter(r *scan.Range) (filter string, maxPacketLength int)
- func FillCache(cache *Cache, r io.Reader) error
- func NewCacheRequestGenerator(reqgen scan.RequestGenerator, gatewayMAC net.HardwareAddr, cache *Cache) scan.RequestGenerator
- type Cache
- type PacketFiller
- type ScanMethod
- type ScanResult
Constants ¶
View Source
const MaxPacketLength = 64
For ARP packets: Ethernet header (14 bytes) + ARP packet (28 bytes) + FCS (4 bytes) = 46 bytes So it is less than Ethernet minimum frame size = 64 bytes
Variables ¶
This section is empty.
Functions ¶
func NewCacheRequestGenerator ¶
func NewCacheRequestGenerator(reqgen scan.RequestGenerator, gatewayMAC net.HardwareAddr, cache *Cache) scan.RequestGenerator
Types ¶
type PacketFiller ¶
type PacketFiller struct{}
func NewPacketFiller ¶
func NewPacketFiller() *PacketFiller
func (*PacketFiller) Fill ¶
func (*PacketFiller) Fill(packet gopacket.SerializeBuffer, r *scan.Request) error
type ScanMethod ¶
type ScanMethod struct { scan.PacketSource // contains filtered or unexported fields }
func NewScanMethod ¶
func NewScanMethod(psrc scan.PacketSource, results scan.ResultChan) *ScanMethod
func (*ScanMethod) ProcessPacketData ¶
func (s *ScanMethod) ProcessPacketData(data []byte, _ *gopacket.CaptureInfo) error
func (*ScanMethod) Results ¶
func (s *ScanMethod) Results() <-chan scan.Result
type ScanResult ¶
type ScanResult struct { IP string `json:"ip"` MAC string `json:"mac"` Vendor string `json:"vendor"` }
func (*ScanResult) ID ¶
func (r *ScanResult) ID() string
func (ScanResult) MarshalEasyJSON ¶
func (v ScanResult) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ScanResult) MarshalJSON ¶
func (v ScanResult) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ScanResult) String ¶
func (r *ScanResult) String() string
func (*ScanResult) UnmarshalEasyJSON ¶
func (v *ScanResult) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ScanResult) UnmarshalJSON ¶
func (v *ScanResult) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.