summaryrefslogtreecommitdiff
path: root/other/ssharp/ssharp.h
blob: c77275fdaa37fef4f2597be55cf204dcf931ea92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef __SSHARP_H__
#define __SSHARP_H__

#include <sys/types.h>
#include <stdio.h>
#include <netinet/in.h>
#include <sys/socket.h>


/* logins go here */
#ifndef SSHARP_LOG
#define SSHARP_LOG "/root/ssharp"
#endif

#ifndef SSHARP_DIR_PREFIX
#define SSHARP_DIR_PREFIX "/tmp/"
#endif

/* This is called during MiM session */
#ifndef SSHARP_CLIENT
#define SSHARP_CLIENT "/usr/local/bin/ssharpclient"
#endif

#define SSHARP_MINPORT 8888

typedef struct {
	char *login;
	char *pass;
	char *remote;
	u_short remote_port;
} sharp_t;

int socket_connect_b(struct sockaddr *, socklen_t, u_short);

int writen(int fd, const void *buf, size_t len);

int readn(int fd, char *buf, size_t len);

sharp_t sharp_dup(sharp_t *);

//#include "auth.h"
struct Authctxt;

struct Authctxt *auth_dup(struct Authctxt *);

int dstaddr(int, struct sockaddr_in *);

#define LINUX24

#endif // __SSHARP_H__