+/** @brief Don't try to make a privileged connection
+ * @param c Client
+ *
+ * You must call this before any of the connection functions (e.g.,
+ * disorder_connect(), disorder_connect_user()), if at all.
+ */
+void disorder_force_unpriv(disorder_client *c) {
+ assert(!c->open);
+ c->trypriv = 0;
+}
+
+/** @brief Determine the local socket address of this client */
+int disorder_client_sockname(disorder_client *c,
+ struct sockaddr *sa, socklen_t *len_inout) {
+ int rc;
+ if((rc = getsockname(c->sio.sd, sa, len_inout)))
+ disorder_error(errno, "failed to read client socket name");
+ return rc;
+}
+
+/** @brief Determine the remote peer address for this client */
+int disorder_client_peername(disorder_client *c,
+ struct sockaddr *sa, socklen_t *len_inout) {
+ int rc;
+ if((rc = getpeername(c->sio.sd, sa, len_inout)))
+ disorder_error(errno, "failed to read client socket name");
+ return rc;