#this file parses the trace file and measures the throughput of udp flow at the destination # You are required to add code to it so that it also measures the goodput of tcp flow and tcp/udp bytes ratio BEGIN {udppkts_sent=0; udppkts_rcvd=0;} #initialize $1=="+" && ( $3=="1" || $3=="5" ) && $5 == "cbr" {udppkts_sent++;} #if packet is sent from node 1 or 5, increment the total number of packets sent $1=="r" && $4=="7" && $5 == "cbr" {udppkts_rcvd++;} #if packet is received at node 7, increment the total number of packets received # At the end of parsing, calculate the throughput and write it to hw2.log file END { udp_thru = udppkts_rcvd / udppkts_sent * 100; print udp_thru >> "hw2.log" }