Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/cmd/cs/vcs_src/ifs_agent.h
1810 views
1
/***********************************************************************
2
* *
3
* This software is part of the ast package *
4
* Copyright (c) 1990-2011 AT&T Intellectual Property *
5
* and is licensed under the *
6
* Eclipse Public License, Version 1.0 *
7
* by AT&T Intellectual Property *
8
* *
9
* A copy of the License is available at *
10
* http://www.eclipse.org/org/documents/epl-v10.html *
11
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
12
* *
13
* Information and Software Systems Research *
14
* AT&T Research *
15
* Florham Park NJ *
16
* *
17
* Glenn Fowler <[email protected]> *
18
* *
19
***********************************************************************/
20
/*
21
* File: ifs_agent.h
22
*/
23
#include <cs.h>
24
#include <ls.h>
25
#include "ifs_errno.h"
26
27
#define PROXY_HOST "proxy.research.att.com"
28
#define PROXY_PORT 402
29
30
#define STRLEN 1024
31
#define SOCK_TIMEOUT (60*1000)
32
#define IFS_PROXY 0x01
33
34
#ifdef DEBUG
35
#define debug_logit( msg ) logit( msg )
36
#else
37
#define debug_logit( msg ) (0)
38
#endif
39
40
typedef int (FUNC)();
41
42
typedef struct sNetFile {
43
char netbuf[ STRLEN ];
44
int socket;
45
int head, size;
46
int err;
47
} NetFile;
48
49
struct agent_item {
50
struct agent_item *next;
51
char *name;
52
char *localdata;
53
FUNC *connect;
54
FUNC *disconnect;
55
FUNC *listdents;
56
FUNC *getfile;
57
FUNC *putfile;
58
FUNC *userdef;
59
};
60
61
struct mount_item {
62
struct mount_item *next;
63
NetFile *nFile;
64
int mode;
65
char *lpath;
66
char *proto;
67
char *user;
68
int pass;
69
int passlen;
70
char *host;
71
int port;
72
char *rpath;
73
char timeout[ 12 ];
74
};
75
76
struct mount_list {
77
struct mount_list *next;
78
int uid;
79
struct mount_item *mitem;
80
};
81
82
struct server_info {
83
struct agent_item *agent;
84
struct mount_item *mitem;
85
char *lpath;
86
char *proxy;
87
char rpath[ STRLEN ];
88
int flags;
89
};
90
91
extern int cserrno;
92
extern char csusrmsg[ STRLEN ];
93
extern int IfsAbortFlag;
94
95
extern void* MallocZero();
96
97
extern NetFile* NetConnect();
98
extern int NetClose();
99
extern int NetRead();
100
extern char* NetGets();
101
extern int NetWrite();
102
103
104