Commit Graph

5 Commits

Author SHA1 Message Date
Eyal Soha 75e864fc75 Use multierr in packetimpact Connection.Close()
PiperOrigin-RevId: 306930652
2020-04-16 15:15:50 -07:00
gVisor bot 21e438d257 Dereference pointers in Layer's Stringer impl
Dereference any fields which are pointers before string formatting so that the
value pointed to ends up in the string representation.

Tested:
  Added TestLayerStringFormat to
  //third_party/gvisor/test/packetimpact/testbench:testbench_test
PiperOrigin-RevId: 305627821
2020-04-08 23:30:09 -07:00
Eyal Soha 7482902364 Implement Stringer for Layer
Tested:
  Sample output for printing 3 different Layer structs:

  &testbench.Ether{SrcAddr:02:42:c4:77:5d:14 DstAddr:02:42:c4:77:5d:0a}
  &testbench.IPv4{SrcAddr:196.119.93.20 DstAddr:224.0.0.1}
  &testbench.UDP{SrcPort:0xc00033b260 DstPort:0xc00033b280}

  Sample output for printing a Layers struct (word-wrapped):
  [&testbench.Ether{SrcAddr:02:42:c4:77:5d:14 DstAddr:02:42:c4:77:5d:0a}
   &testbench.IPv4{SrcAddr:196.119.93.20 DstAddr:224.0.0.1}
   &testbench.UDP{SrcPort:0xc00033b260 DstPort:0xc00033b280}
   &testbench.Payload{Bytes:[104 101 108 108 111 32 119 111 114 108 100]}]

PiperOrigin-RevId: 305014376
2020-04-06 06:25:24 -07:00
Eyal Soha d25036ad17 Test receiving multicast packets over UDP
PiperOrigin-RevId: 304098611
2020-03-31 19:53:11 -07:00
Eyal Soha 3192e55ffe Packetimpact in Go with c++ stub
PiperOrigin-RevId: 301382690
2020-03-17 08:53:27 -07:00