Developing lightweight computation at the DSG edge

Commit e69c7d9c authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files
parent e33cfb8a
...@@ -66,7 +66,7 @@ func main() { ...@@ -66,7 +66,7 @@ func main() {
pinger.OnRecv = func(pkt *ping.Packet) { pinger.OnRecv = func(pkt *ping.Packet) {
fmt.Printf("%d bytes from %s: icmp_seq=%d time=%v ttl=%v\n", fmt.Printf("%d bytes from %s: icmp_seq=%d time=%v ttl=%v\n",
pkt.Nbytes, pkt.IPAddr, pkt.Seq, pkt.Rtt, pkt.Ttl) pkt.Nbytes, pkt.IPAddr, pkt.Seq, pkt.Rtt, pkt.TTL)
} }
pinger.OnFinish = func(stats *ping.Statistics) { pinger.OnFinish = func(stats *ping.Statistics) {
fmt.Printf("\n--- %s ping statistics ---\n", stats.Addr) fmt.Printf("\n--- %s ping statistics ---\n", stats.Addr)
......
...@@ -179,7 +179,7 @@ type Packet struct { ...@@ -179,7 +179,7 @@ type Packet struct {
Seq int Seq int
// TTL is the Time To Live on the packet. // TTL is the Time To Live on the packet.
Ttl int TTL int
} }
// Statistics represent the stats of a currently running or finished // Statistics represent the stats of a currently running or finished
...@@ -470,7 +470,7 @@ func (p *Pinger) processPacket(recv *packet) error { ...@@ -470,7 +470,7 @@ func (p *Pinger) processPacket(recv *packet) error {
Nbytes: recv.nbytes, Nbytes: recv.nbytes,
IPAddr: p.ipaddr, IPAddr: p.ipaddr,
Addr: p.addr, Addr: p.addr,
Ttl: recv.ttl, TTL: recv.ttl,
} }
switch pkt := m.Body.(type) { switch pkt := m.Body.(type) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment