Lines Matching defs:input

103 /* Buffer for raw input data from the socket. */
104 Buffer input;
199 buffer_init(&input);
205 buffer_clear(&input);
314 buffer_free(&input);
1046 /* Check if input size is less than minimum packet size. */
1047 if (buffer_len(&input) < 4 + 8)
1050 cp = buffer_ptr(&input);
1057 if (buffer_len(&input) < 4 + padded_len)
1063 buffer_consume(&input, 4);
1071 switch (detect_attack(buffer_ptr(&input), padded_len, NULL)) {
1086 cipher_crypt(&receive_context, cp, buffer_ptr(&input), padded_len);
1088 buffer_consume(&input, padded_len);
1110 packet_disconnect("Corrupted check bytes on input.");
1145 * check if input size is less than the cipher block size,
1148 if (buffer_len(&input) < block_size)
1152 buffer_len(&input));
1153 buffer_dump(&input);
1157 cipher_crypt(&receive_context, cp, buffer_ptr(&input),
1164 DBG(debug("input: packet len %u", packet_length + 4));
1165 buffer_consume(&input, block_size);
1177 if (buffer_len(&input) < need + maclen)
1180 debug("in read_poll, the encrypted input queue now contains "
1181 "(%d bytes):\n", buffer_len(&input));
1182 buffer_dump(&input);
1185 cipher_crypt(&receive_context, cp, buffer_ptr(&input), need);
1186 buffer_consume(&input, need);
1195 if (memcmp(macbuf, buffer_ptr(&input), mac->mac_len) != 0)
1196 packet_disconnect("Corrupted MAC on input.");
1198 buffer_consume(&input, mac->mac_len);
1214 DBG(debug("input: padlen %d", padlen));
1216 packet_disconnect("Corrupted padlen %d on input.", padlen);
1222 DBG(debug("input: len before de-compress %d", buffer_len(&incoming_packet)));
1229 DBG(debug("input: len after de-compress %d",
1250 debug("decrypted input packet [type %d]:\n", type);
1336 * Buffers the given amount of input characters. This is intended to be used
1343 buffer_append(&input, buf, len);