Lines Matching +full:port +full:- +full:def
2 # SPDX-License-Identifier: GPL-2.0
12 def require_devmem(cfg):
14 probe_command = f"{cfg.bin_local} -f {cfg.ifname}"
23 def check_rx(cfg) -> None:
26 port = rand_port()
27 socat = f"socat -u - TCP{cfg.addr_ipver}:{cfg.baddr}:{port},bind={cfg.remote_baddr}:{port}"
28 listen_cmd = f"{cfg.bin_local} -l -f {cfg.ifname} -s {cfg.addr} -p {port} -c {cfg.remote_addr} -v 7"
31 wait_port_listen(port)
32 cmd(f"yes $(echo -e \x01\x02\x03\x04\x05\x06) | \
33 head -c 1K | {socat}", host=cfg.remote, shell=True)
39 def check_tx(cfg) -> None:
42 port = rand_port()
43 listen_cmd = f"socat -U - TCP{cfg.addr_ipver}-LISTEN:{port}"
46 wait_port_listen(port, host=cfg.remote)
47 cmd(f"echo -e \"hello\\nworld\"| {cfg.bin_local} -f {cfg.ifname} -s {cfg.remote_addr} -p {port}", shell=True)
53 def check_tx_chunks(cfg) -> None:
56 port = rand_port()
57 listen_cmd = f"socat -U - TCP{cfg.addr_ipver}-LISTEN:{port}"
60 wait_port_listen(port, host=cfg.remote)
61 cmd(f"echo -e \"hello\\nworld\"| {cfg.bin_local} -f {cfg.ifname} -s {cfg.remote_addr} -p {port} -z 3", shell=True)
66 def main() -> None: