Lines Matching defs:to

40  * Use is subject to license terms.
88 * writing. These can be the same descriptor, in which case it is assumed to
106 /* Buffer for raw output data going to the socket. */
128 /* Set to true if the connection is interactive. */
146 /* roundup current message to extra_pad bytes */
158 * will force it to daemonize itself. Due to the fork safety rules inherent in
160 * before forking a child to negotiate the new keys. Those keys will be used to
213 * socket on which to do a getpeername().
217 /* Kludge: arrange the close function to be called from fatal(). */
226 struct sockaddr_storage from, to;
236 tolen = sizeof(to);
237 memset(&to, 0, sizeof(to));
238 if (getpeername(connection_out, (struct sockaddr *)&to, &tolen) < 0)
240 if (fromlen != tolen || memcmp(&from, &to, fromlen) != 0)
252 struct sockaddr_storage to;
253 socklen_t tolen = sizeof(to);
255 memset(&to, 0, sizeof(to));
256 if (getsockname(connection_out, (struct sockaddr *)&to, &tolen) < 0)
258 if (to.ss_family == AF_INET)
261 if (to.ss_family == AF_INET6 &&
262 IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)&to)->sin6_addr))
375 * Causes any further packets to be encrypted using the given key. The same
407 /* Start constructing a packet to send. */
516 /* Insert padding. Initialized to zero in packet_start1() */
540 /* Append to output. */
625 * In accordance to the RFCs listed below we enforce the key
631 * if the cipher block size is greater than or equal to 16 bytes (AES)
639 * This means that we can be always forced by the opposite side to never
748 debug("plain output packet to be processed (%d bytes):\n",
814 /* encrypt packet and append to output buffer. */
852 * SSH2_MSG_NEWKEYS is read from the monitor and forwarded to
866 * then sent to the other side. However, what can happen here is that we get
868 * packet_send2() anyway to empty the queue, and set the rekey flag to the
937 * The function is also used in the monitor to read the authentication context
957 /* Try to read a packet from the buffer. */
971 * Otherwise, wait for some data to arrive, add it to the
978 /* Wait for some data to arrive. */
1002 /* Append it to the buffer. */
1036 * to higher levels.
1083 /* Decrypt data to incoming_packet. */
1240 * dispatch function for SSH2_MSG_NEWKEYS in contrast to the
1259 * This tries to read a packet from the buffer of received data. Note that it
1336 * Buffers the given amount of input characters. This is intended to be used
1400 * xmalloc; it is the responsibility of the calling program to free it when
1401 * no longer needed. The length_ptr argument may be NULL, or point to an
1421 * Sends a diagnostic message from the server to the client. This message
1424 * in verbose mode. These messages are primarily intended to ease debugging
1502 /* Send the disconnect message to the other side, and wait for it to get sent. */
1529 /* Checks if there is any buffered output, and tries to write some of the output. */
1545 debug("in packet_write_poll, %d bytes just sent to the "
1577 /* Returns true if there is buffered data to write to the connection. */
1585 /* Returns true if there is not too much data to write to the connection. */
1671 debug("packet_set_maxsize: setting to %d", s);
1676 /* roundup current message to pad bytes */
1691 * required to send them. This message can be used as an additional
1760 * ALTPRIVSEP packets. We take advantage of that here to keep changes
1761 * to packet.c to a minimum by using the SSHv2 binary packet protocol,
1763 * basis for the monitor protocol. And so to force packet.c to treat
1766 * For completeness and to help future developers catch this we also
1785 fatal("Monitor failed to start: %s", strerror(errno));
1789 * when we packet_close(). Setting connection_out to -1 will take care
1796 * Now clean up the state related to the server socket. As a side
1807 * that connection_in and connection_out will be set to the
1814 * We temporarily need to set connection_in and connection_out descriptors so
1816 * of the peer to write a login/logout record. It's not nice but we would have
1817 * to change more code when implementing the PKCS#11 engine support.
1835 debug3("restoring %d to connection_in/out", stored_fd);