hammer2 - Add media dump command, improve help output
[dragonfly.git] / sbin / hammer2 / hammer2.h
index d3a21f8..e7642af 100644 (file)
 #include <pthread.h>
 #include <poll.h>
 
+#include <libutil.h>
+
 #include "network.h"
 
+#define HAMMER2_DEFAULT_DIR    "/etc/hammer2"
+#define HAMMER2_PATH_REMOTE    HAMMER2_DEFAULT_DIR "/remote"
+
 extern int DebugOpt;
+extern int VerboseOpt;
 extern int NormalExit;
 
 int hammer2_ioctl_handle(const char *sel_path);
@@ -90,9 +96,13 @@ int cmd_pfs_create(const char *sel_path, const char *name,
                        uint8_t pfs_type, const char *uuid_str);
 int cmd_pfs_delete(const char *sel_path, const char *name);
 
-int cmd_node(void);
+int cmd_service(void);
 int cmd_leaf(const char *sel_path);
-int cmd_debug(void);
+int cmd_shell(const char *hostname);
+int cmd_show(const char *devpath);
+int cmd_rsainit(const char *dir_path);
+int cmd_rsaenc(const char **keys, int nkeys);
+int cmd_rsadec(const char **keys, int nkeys);
 
 void hammer2_ioq_init(hammer2_iocom_t *iocom, hammer2_ioq_t *ioq);
 void hammer2_ioq_done(hammer2_iocom_t *iocom, hammer2_ioq_t *ioq);
@@ -116,5 +126,19 @@ void hammer2_ioq_stream(hammer2_msg_t *msg, int reply);
 void hammer2_iocom_drain(hammer2_iocom_t *iocom);
 void hammer2_iocom_flush(hammer2_iocom_t *iocom);
 
-void hammer2_debug_remote(hammer2_msg_t *msg);
+void hammer2_crypto_negotiate(hammer2_iocom_t *iocom);
+void hammer2_crypto_decrypt(hammer2_iocom_t *iocom, hammer2_ioq_t *ioq);
+void hammer2_crypto_decrypt_aux(hammer2_iocom_t *iocom, hammer2_ioq_t *ioq,
+                       hammer2_msg_t *msg, int already);
+int hammer2_crypto_encrypt(hammer2_iocom_t *iocom, hammer2_ioq_t *ioq,
+                       struct iovec *iov, int n);
+void hammer2_crypto_encrypt_wrote(hammer2_iocom_t *iocom, hammer2_ioq_t *ioq,
+                       int nact);
+
+const char *hammer2_time64_to_str(uint64_t htime64, char **strp);
+const char *hammer2_uuid_to_str(uuid_t *uuid, char **strp);
+const char *hammer2_iptype_to_str(uint8_t type);
+const char *hammer2_pfstype_to_str(uint8_t type);
+
+void hammer2_shell_remote(hammer2_msg_t *msg);
 void msg_printf(hammer2_msg_t *msg, const char *ctl, ...);