|
@@ -39,20 +39,22 @@ func main() {
|
|
|
}
|
|
|
frame = frame[:n]
|
|
|
log.Println("TRSV>>", frame)
|
|
|
+
|
|
|
+ log.Printf("Dst: %s\n", frame.Destination())
|
|
|
+ log.Printf("Src: %s\n", frame.Source())
|
|
|
+ log.Printf("Ethertype: % x\n", frame.Ethertype())
|
|
|
+ log.Printf("Payload: % x\n", frame.Payload())
|
|
|
+ log.Printf("HEX: % x\n", frame)
|
|
|
/*
|
|
|
- log.Printf("Dst: %s\n", frame.Destination())
|
|
|
- log.Printf("Src: %s\n", frame.Source())
|
|
|
- log.Printf("Ethertype: % x\n", frame.Ethertype())
|
|
|
- log.Printf("Payload: % x\n", frame.Payload())
|
|
|
- */
|
|
|
- a := hex.EncodeToString(frame)
|
|
|
- resp, err := http.Get("http://" + os.Args[1] + "/rcv?packet=" + a)
|
|
|
- if err != nil {
|
|
|
- fmt.Println(err)
|
|
|
- } else {
|
|
|
- defer resp.Body.Close()
|
|
|
- }
|
|
|
+ a := hex.EncodeToString(frame)
|
|
|
|
|
|
+ resp, err := http.Get("http://" + os.Args[1] + "/rcv?packet=" + a)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ } else {
|
|
|
+ defer resp.Body.Close()
|
|
|
+ }
|
|
|
+ */
|
|
|
}
|
|
|
}
|
|
|
|