MCPcopy Index your code
hub / github.com/secdev/scapy / _create_fifo

Function _create_fifo

scapy/utils.py:234–249  ·  view source on GitHub ↗

Creates a temporary fifo. You must then use open_fifo() on the server_fd once the client is connected to use it. :returns: (client_file, server_fd)

()

Source from the content-addressed store, hash-verified

232
233
234def _create_fifo() -> Tuple[str, Any]:
235 """Creates a temporary fifo.
236
237 You must then use open_fifo() on the server_fd once
238 the client is connected to use it.
239
240 :returns: (client_file, server_fd)
241 """
242 if WINDOWS:
243 from scapy.arch.windows.structures import _get_win_fifo
244 return _get_win_fifo()
245 else:
246 f = get_temp_file()
247 os.unlink(f)
248 os.mkfifo(f)
249 return f, f
250
251
252def _open_fifo(fd: Any, mode: str = "rb") -> IO[bytes]:

Callers 1

__init__Method · 0.90

Calls 2

_get_win_fifoFunction · 0.90
get_temp_fileFunction · 0.85

Tested by

no test coverage detected