yeungalan %!s(int64=5) %!d(string=hai) anos
pai
achega
fa3f898c2e
Modificáronse 2 ficheiros con 14 adicións e 12 borrados
  1. 14 12
      main.go
  2. BIN=BIN
      vnet.exe

+ 14 - 12
main.go

@@ -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()
+				}
+		*/
 	}
 }
 

BIN=BIN
vnet.exe