Archeus 0.0.0
A C library and game engine that focuses on documentation
Loading...
Searching...
No Matches
ssh.h File Reference
#include "arc/std/string.h"

Go to the source code of this file.

Typedefs

typedef struct ARC_Ssh ARC_Ssh
 ssh type that holds ssh connection along with credentials
 
typedef void(* ARC_Ssh_SessionFn) (void *data)
 a ssh session function
 

Functions

void ARC_Ssh_Create (ARC_Ssh **ssh, char *host, char *user, char *password)
 creates ARC_Ssh type
 
void ARC_Ssh_Destroy (ARC_Ssh *ssh)
 destroyes ARC_Ssh type
 
void ARC_Ssh_RunInSession (ARC_Ssh *ssh, ARC_Ssh_SessionFn sessionFn)
 runs a callback function within a ssh session
 
void ARC_Ssh_ExecStrInNewSession (ARC_Ssh *ssh, char *command)
 
ARC_StringARC_Ssh_ExecStrInNewSessionAndGetResponse (ARC_Ssh *ssh, char *command)
 

Typedef Documentation

◆ ARC_Ssh

typedef struct ARC_Ssh ARC_Ssh

ssh type that holds ssh connection along with credentials

Definition at line 13 of file ssh.h.

◆ ARC_Ssh_SessionFn

typedef void(* ARC_Ssh_SessionFn) (void *data)

a ssh session function

Parameters
datauser data that can be used within the callback

Definition at line 20 of file ssh.h.

Function Documentation

◆ ARC_Ssh_Create()

void ARC_Ssh_Create ( ARC_Ssh ** ssh,
char * host,
char * user,
char * password )

creates ARC_Ssh type

Parameters
sshARC_Ssh to create

◆ ARC_Ssh_Destroy()

void ARC_Ssh_Destroy ( ARC_Ssh * ssh)

destroyes ARC_Ssh type

Parameters
sshARC_Ssh to destroy

◆ ARC_Ssh_ExecStrInNewSession()

void ARC_Ssh_ExecStrInNewSession ( ARC_Ssh * ssh,
char * command )

◆ ARC_Ssh_ExecStrInNewSessionAndGetResponse()

ARC_String * ARC_Ssh_ExecStrInNewSessionAndGetResponse ( ARC_Ssh * ssh,
char * command )

◆ ARC_Ssh_RunInSession()

void ARC_Ssh_RunInSession ( ARC_Ssh * ssh,
ARC_Ssh_SessionFn sessionFn )

runs a callback function within a ssh session

Parameters
sshARC_Ssh to create and run function in ssh session
sessionFNcallback to run in a ssh session