proc IsPortInCaptureState { port } { # port format: 1/3 # # If port is in capture state, will return "ready" # If port is not in capture state, will return: # "::ixNet::ERROR-Data capture is not selected on the specified port." set vport [GetVportMapping $port] if {[ixNet getAttribute $vport/capture -dataCaptureState] == "ready"} { return 1 } if {[ixNet getAttribute $vport/capture -controlCaptureState] == "ready"} { return 1 } return 0 }