-unsigned int packet_get_int(void);
-
-/* Returns an arbitrary precision integer from the packet data. The integer
- must have been initialized before this call. */
-void packet_get_bignum(BIGNUM *value, int *length_ptr);
-
-/* Returns a string from the packet data. The string is allocated using
- xmalloc; it is the responsibility of the calling program to free it when
- no longer needed. The length_ptr argument may be NULL, or point to an
- integer into which the length of the string is stored. */
-char *packet_get_string(unsigned int *length_ptr);
-
-/* Logs the error in syslog using LOG_INFO, constructs and sends a disconnect
- packet, closes the connection, and exits. This function never returns.
- The error message should not contain a newline. The total length of the
- message must not exceed 1024 bytes. */
-void packet_disconnect(const char *fmt, ...);
-
-/* Sends a diagnostic message to the other side. This message
- can be sent at any time (but not while constructing another message).
- The message is printed immediately, but only if the client is being
- executed in verbose mode. These messages are primarily intended to
- ease debugging authentication problems. The total length of the message
- must not exceed 1024 bytes. This will automatically call
- packet_write_wait. If the remote side protocol flags do not indicate
- that it supports SSH_MSG_DEBUG, this will do nothing. */
-void packet_send_debug(const char *fmt, ...);
-
-/* Checks if there is any buffered output, and tries to write some of the
- output. */
-void packet_write_poll(void);
+u_int packet_get_int(void);
+
+/*
+ * Returns an arbitrary precision integer from the packet data. The integer
+ * must have been initialized before this call.
+ */
+void packet_get_bignum(BIGNUM * value, int *length_ptr);
+void packet_get_bignum2(BIGNUM * value, int *length_ptr);
+char *packet_get_raw(int *length_ptr);
+
+/*
+ * Returns a string from the packet data. The string is allocated using
+ * xmalloc; it is the responsibility of the calling program to free it when
+ * no longer needed. The length_ptr argument may be NULL, or point to an
+ * integer into which the length of the string is stored.
+ */
+char *packet_get_string(u_int *length_ptr);
+
+/*
+ * Logs the error in syslog using LOG_INFO, constructs and sends a disconnect
+ * packet, closes the connection, and exits. This function never returns.
+ * The error message should not contain a newline. The total length of the
+ * message must not exceed 1024 bytes.
+ */
+void packet_disconnect(const char *fmt,...) __attribute__((format(printf, 1, 2)));
+
+/*
+ * Sends a diagnostic message to the other side. This message can be sent at
+ * any time (but not while constructing another message). The message is
+ * printed immediately, but only if the client is being executed in verbose
+ * mode. These messages are primarily intended to ease debugging
+ * authentication problems. The total length of the message must not exceed
+ * 1024 bytes. This will automatically call packet_write_wait. If the
+ * remote side protocol flags do not indicate that it supports SSH_MSG_DEBUG,
+ * this will do nothing.
+ */
+void packet_send_debug(const char *fmt,...) __attribute__((format(printf, 1, 2)));
+
+/* Checks if there is any buffered output, and tries to write some of the output. */
+void packet_write_poll(void);