MCPcopy Create free account
hub / github.com/qilingframework/qiling / ql_syscall_send

Function ql_syscall_send

qiling/os/posix/syscall/socket.py:682–695  ·  view source on GitHub ↗
(ql: Qiling, sockfd: int, buf: int, length: int, flags: int)

Source from the content-addressed store, hash-verified

680
681
682def ql_syscall_send(ql: Qiling, sockfd: int, buf: int, length: int, flags: int):
683 sock = get_opened_socket(ql.os, sockfd)
684
685 if isinstance(sock, int):
686 return sock
687
688 content = ql.mem.read(buf, length)
689
690 try:
691 regreturn = sock.send(content, flags)
692 except IOError:
693 regreturn = 0
694
695 return regreturn
696
697
698def ql_syscall_recvmsg(ql: Qiling, sockfd: int, msg_addr: int, flags: int):

Callers 1

ql_syscall_sendtoFunction · 0.85

Calls 3

get_opened_socketFunction · 0.85
readMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected