Skip to content

Commit

Permalink
Merge pull request #15 from elrik75/master
Browse files Browse the repository at this point in the history
fix pcaptest.go example according to new Time API
  • Loading branch information
akrennmair committed Aug 15, 2012
2 parents db5c518 + ec277ab commit 066cff1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/pcaptest/pcaptest.go
Expand Up @@ -64,8 +64,8 @@ func main() {


for pkt := h.Next(); pkt != nil; pkt = h.Next() { for pkt := h.Next(); pkt != nil; pkt = h.Next() {
fmt.Printf("time: %d.%06d (%s) caplen: %d len: %d\nData:", fmt.Printf("time: %d.%06d (%s) caplen: %d len: %d\nData:",
int64(pkt.Time.Sec), int64(pkt.Time.Usec), int64(pkt.Time.Second()), int64(pkt.Time.Nanosecond()),
time.Unix(int64(pkt.Time.Sec), 0).String(), int64(pkt.Caplen), int64(pkt.Len)) time.Unix(int64(pkt.Time.Second()), 0).String(), int64(pkt.Caplen), int64(pkt.Len))
for i := uint32(0); i < pkt.Caplen; i++ { for i := uint32(0); i < pkt.Caplen; i++ {
if i%32 == 0 { if i%32 == 0 {
fmt.Printf("\n") fmt.Printf("\n")
Expand Down

0 comments on commit 066cff1

Please sign in to comment.