Developing lightweight computation at the DSG edge

Commit 687023bd authored by Ben Kochie's avatar Ben Kochie Committed by Cameron Sparr
Browse files

Include adddress in Packet (#38)

Include the original address in the Packet type for use in
parent 74b9e0e9
......@@ -158,6 +158,9 @@ type Packet struct {
// IPAddr is the address of the host being pinged.
IPAddr *net.IPAddr
// Addr is the string address of the host being pinged.
Addr string
// NBytes is the number of bytes in the message.
Nbytes int
......@@ -436,6 +439,7 @@ func (p *Pinger) processPacket(recv *packet) error {
outPkt := &Packet{
Nbytes: recv.nbytes,
IPAddr: p.ipaddr,
Addr: p.addr,
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