93 lines
3.9 KiB
HTML
93 lines
3.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<meta name="generator" content="AsciiDoc 8.6.9" />
|
|
<title>Shellcode Compiler Runtime</title>
|
|
<link rel="stylesheet" href="lib/v35.css" type="text/css" />
|
|
<link rel="stylesheet" href="lib/layout2v35.css" type="text/css" />
|
|
<script type="text/javascript" src="lib/asciidoc.js"></script>
|
|
<script type="text/javascript">
|
|
/*<![CDATA[*/
|
|
asciidoc.install();
|
|
/*]]>*/
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="layout-menu-box">
|
|
<div id="layout-menu">
|
|
<div>»<a href="index.html">Home</a></div>
|
|
<div>»<a href="examples.html">Examples</a></div>
|
|
<div>»<a href="scc.html">Invocation</a></div>
|
|
<div>»<a href="runtime.html">Runtime Library</a></div>
|
|
<div>»<a href="python.html">Python Bindings</a></div>
|
|
<div>»<a href="issues.html">Known Issues</a></div>
|
|
</div>
|
|
</div>
|
|
<div id="layout-content-box">
|
|
<div id="layout-banner">
|
|
<div id="layout-title">Shellcode Compiler</div>
|
|
<div id="layout-description">A custom shellcode compiler for Binary Ninja</div>
|
|
</div>
|
|
<div id="layout-content">
|
|
<div id="header">
|
|
<h1>sendto</h1>
|
|
</div>
|
|
<div id="content">
|
|
<div id="preamble">
|
|
<div class="sectionbody">
|
|
<div class="listingblock">
|
|
<div class="content monospaced">
|
|
<pre>ssize_t sendto(int fd, const void* buf, size_t n, int flags, const struct sockaddr* addr, socklen_t addrlen);</pre>
|
|
</div></div>
|
|
<div class="paragraph"><p>Sends <span class="monospaced">n</span> bytes from the buffer <span class="monospaced">buf</span> over the socket <span class="monospaced">fd</span>. If <span class="monospaced">addr</span> is not <span class="monospaced">NULL</span>, specifies the address that the
|
|
data will be sent to. Returns the number of bytes sent, or the negation of the error code on error. It is possible
|
|
for the number of bytes sent to be smaller than the number of bytes requested.</p></div>
|
|
<div class="paragraph"><p>The supported address types for the <span class="monospaced">addr</span> parameter are below:</p></div>
|
|
<div class="listingblock">
|
|
<div class="content monospaced">
|
|
<pre>struct sockaddr_in;
|
|
struct sockaddr_in6;
|
|
struct sockaddr_un;</pre>
|
|
</div></div>
|
|
<div class="admonitionblock">
|
|
<table><tr>
|
|
<td class="icon">
|
|
<img src="./images/icons/important.png" alt="Important">
|
|
</td>
|
|
<td class="content">The socket family member of the address structure must use the <span class="monospaced">AF_*</span> constants. The
|
|
<span class="monospaced">PF_*</span> constants must only be used when creating sockets. This is to automatically set the length
|
|
field present only on BSD. The length fields are not explicitly present in this runtime.</td>
|
|
</tr></table>
|
|
</div>
|
|
<div class="admonitionblock">
|
|
<table><tr>
|
|
<td class="icon">
|
|
<img src="./images/icons/important.png" alt="Important">
|
|
</td>
|
|
<td class="content">If the system call is interrupted, this function will return <span class="monospaced">-EINTR</span>. This differs from most C runtimes,
|
|
where <span class="monospaced">-1</span> is returned with <span class="monospaced">errno</span> set to <span class="monospaced">EINTR</span>. As this runtime does not have <span class="monospaced">errno</span>, callers should check
|
|
for <span class="monospaced">-EINTR</span> and a result less than zero in the error checking code.</td>
|
|
</tr></table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_see_also">See also</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph"><p><a href="recv.html">recv</a>,
|
|
<a href="recv_all.html">recv_all</a>,
|
|
<a href="recvfrom.html">recvfrom</a>,
|
|
<a href="send.html">send</a>,
|
|
<a href="send_all.html">send_all</a>,
|
|
<a href="send_string.html">send_string</a></p></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="footnotes"><hr /></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|