Popularity
1.7
Growing
Activity
0.0
Stable
18
2
4

Programming language: Go
License: MIT License
Tags: Networking    

goshark alternatives and similar packages

Based on the "Networking" category.
Alternatively, view goshark alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of goshark or a related project?

Add another 'Networking' Package

README

goshark

Build Status GoDoc

Package goshark use tshark to decode IP packet and create data struct to analyse packet.

Dependency

  • tshark

Examples

file := "2.pcap"
d := goshark.NewDecoder()
if err := d.DecodeStart(file); err != nil {
    log.Println("Decode start fail:", err)
    return
}
defer d.DecodeEnd()

f, err := d.NextPacket()
if err != nil {
    log.Println("Get packet fail:", err)
    return
}

key := "igmp.maddr"
value, ok := f.Iskey(key)
if ok {
    fmt.Printf("key: %s\nvalue: %s\n", key, value)
}

Output:

key: igmp.maddr
value: 224.0.0.251