 |
My Project
debian-1:4.1.1-p2+ds-4
|
Go to the source code of this file.
◆ s_si_link_extension
struct s_si_link_extension |
◆ sip_link
Definition at line 51 of file silink.h.
Data Fields |
void * |
data |
|
BITSET |
flags |
|
si_link_extension |
m |
|
char * |
mode |
|
char * |
name |
|
short |
ref |
|
◆ link_struct
◆ SI_LINK_CLOSE
◆ SI_LINK_CLOSE_P
#define SI_LINK_CLOSE_P |
( |
|
l | ) |
(!(l)->flags) |
◆ SI_LINK_OPEN
◆ SI_LINK_OPEN_P
◆ SI_LINK_R_OPEN_P
◆ SI_LINK_READ
◆ SI_LINK_RW_OPEN_P
◆ SI_LINK_SET_CLOSE_P
◆ SI_LINK_SET_OPEN_P
◆ SI_LINK_SET_R_OPEN_P
◆ SI_LINK_SET_RW_OPEN_P
◆ SI_LINK_SET_W_OPEN_P
◆ SI_LINK_W_OPEN_P
◆ SI_LINK_WRITE
◆ link_list
◆ si_link
◆ slCloseProc
◆ slDumpProc
◆ slGetDumpProc
◆ slKillProc
◆ slOpenProc
◆ slPrepCloseProc
◆ slRead2Proc
◆ slReadProc
◆ slSetRingProc
◆ slWriteProc
◆ slCleanUp()
Definition at line 127 of file silink.cc.
135 if (
l->m->Close !=
NULL)
l->m->Close(
l);
137 if ((
l->data !=
NULL) && (
l->m->Kill !=
NULL))
l->m->Kill(
l);
140 memset((
void *)
l, 0,
sizeof(ip_link));
◆ slClose()
Definition at line 242 of file silink.cc.
250 if (
l->m->Close !=
NULL)
252 res =
l->m->Close(
l);
254 Werror(
"close: Error for link of type: %s, mode: %s, name: %s",
255 l->m->type,
l->mode,
l->name);
◆ slCopy()
◆ slDump()
Definition at line 346 of file silink.cc.
357 if (
l->m->Dump !=
NULL)
363 Werror(
"dump: Error for link of type %s, mode: %s, name: %s",
364 l->m->type,
l->mode,
l->name);
370 Werror(
"dump: Error to open link of type %s, mode: %s, name: %s for writing",
371 l->m->type,
l->mode,
l->name);
◆ slGetDump()
Definition at line 376 of file silink.cc.
387 if (
l->m->GetDump !=
NULL)
388 res =
l->m->GetDump(
l);
393 Werror(
"getdump: Error for link of type %s, mode: %s, name: %s",
394 l->m->type,
l->mode,
l->name);
400 Werror(
"dump: Error open link of type %s, mode: %s, name: %s for reading",
401 l->m->type,
l->mode,
l->name);
◆ slInit()
Definition at line 48 of file silink.cc.
58 while (istr[
i] !=
':' && istr[
i] !=
'\0')
i++;
70 while (istr[
j] !=
' ' && istr[
j] !=
'\0')
j++;
77 while (istr[
j] ==
' '&& istr[
j] !=
'\0')
j++;
83 while (istr[
j] ==
' '&& istr[
j] !=
'\0')
j++;
92 si_link_extension prev =
s;
94 while (strcmp(
s->type, type) != 0)
◆ slKill()
◆ slOpen()
Definition at line 194 of file silink.cc.
209 Warn(
"open: link of type: %s, mode: %s, name: %s is already open",
210 l->m->type,
l->mode,
l->name);
213 else if (
l->m->Open !=
NULL)
215 res =
l->m->Open(
l, flag,
h);
217 Werror(
"open: Error for link %s of type: %s, mode: %s, name: %s",
218 c,
l->m->type,
l->mode,
l->name);
◆ slPrepClose()
Definition at line 225 of file silink.cc.
232 if (
l->m->PrepClose !=
NULL)
234 res =
l->m->PrepClose(
l);
236 Werror(
"close: Error for link of type: %s, mode: %s, name: %s",
237 l->m->type,
l->mode,
l->name);
◆ slRead()
Definition at line 263 of file silink.cc.
283 if (
l->m->Read !=
NULL)
v =
l->m->Read(
l);
287 if (
l->m->Read2 !=
NULL)
v =
l->m->Read2(
l,a);
292 Werror(
"read: Error to open link of type %s, mode: %s, name: %s for reading",
293 l->m->type,
l->mode,
l->name);
304 Werror(
"read: Error for link of type %s, mode: %s, name: %s",
305 l->m->type,
l->mode,
l->name);
◆ slStandardInit()
◆ slStatus()
Definition at line 156 of file silink.cc.
158 if (
l ==
NULL)
return "empty link";
159 else if (
l->m ==
NULL)
return "unknown link type";
160 else if (strcmp(request,
"type") == 0)
return l->m->type;
161 else if (strcmp(request,
"mode") == 0)
return l->mode;
162 else if (strcmp(request,
"name") == 0)
return l->name;
163 else if (strcmp(request,
"exists") ==0)
166 if (si_lstat(
l->name,&
buf)==0)
return "yes";
169 else if (strcmp(request,
"open") == 0)
174 else if (strcmp(request,
"openread") == 0)
179 else if (strcmp(request,
"openwrite") == 0)
184 else if (
l->m->Status ==
NULL)
return "unknown status request";
185 else return l->m->Status(
l, request);
◆ slStatusSsiL()
int slStatusSsiL |
( |
lists |
L, |
|
|
int |
timeout |
|
) |
| |
Definition at line 1635 of file ssiLink.cc.
1653 fd_set mask, fdmask;
1660 struct timeval *wt_ptr=&wt;
1668 wt.tv_sec = timeout / 1000000;
1669 wt.tv_usec = timeout % 1000000;
1681 for(
i=L->
nr;
i>=0;
i--)
1686 {
WerrorS(
"all elements must be of type link");
return -2;}
1689 {
WerrorS(
"all links must be open");
return -2;}
1690 if (((strcmp(
l->m->type,
"ssi")!=0) && (strcmp(
l->m->type,
"MPtcp")!=0))
1691 || ((strcmp(
l->mode,
"fork")!=0) && (strcmp(
l->mode,
"tcp")!=0)
1692 && (strcmp(
l->mode,
"launch")!=0) && (strcmp(
l->mode,
"connect")!=0)))
1694 WerrorS(
"all links must be of type ssi:fork, ssi:tcp, ssi:connect");
1697 if (strcmp(
l->m->type,
"ssi")==0)
1703 FD_SET(d_fd, &fdmask);
1704 if (d_fd > max_fd) max_fd=d_fd;
1711 Werror(
"wrong link type >>%s<<",
l->m->type);
1721 for(
k = 0;
k < max_fd;
k++)
1723 if(FD_ISSET(
k, &fdmask))
1730 s = si_select(max_fd, &mask,
NULL,
NULL, wt_ptr);
1733 WerrorS(
"error in select call");
1743 while (
j<=max_fd) {
if (FD_ISSET(
j,&mask))
break;
j++; }
1744 for(
i=L->
nr;
i>=0;
i--)
1749 if (strcmp(
l->m->type,
"ssi")==0)
1757 Werror(
"wrong link type >>%s<<",
l->m->type);
1774 for(
k = 0;
k < max_fd;
k++)
1776 if(FD_ISSET(
k, &fdmask))
1790 wt.tv_sec = timeout / 1000000;
1791 wt.tv_usec = (timeout % 1000000);
1796 else if (isdigit(c))
1800 Werror(
"unknown char in ssiLink(%d)",c);
◆ slString()
◆ slWrite()
Definition at line 309 of file silink.cc.
328 if (
l->m->Write !=
NULL)
334 Werror(
"write: Error for link of type %s, mode: %s, name: %s",
335 l->m->type,
l->mode,
l->name);
340 Werror(
"write: Error to open link of type %s, mode: %s, name: %s for writing",
341 l->m->type,
l->mode,
l->name);
◆ ssiBatch()
int ssiBatch |
( |
const char * |
host, |
|
|
const char * |
port |
|
) |
| |
Definition at line 1807 of file ssiLink.cc.
1814 sprintf(
buf,
"ssi:connect %s:%s",host,port);
◆ ip_link_bin
◆ s_si_link_extension_bin
omBin s_si_link_extension_bin |
◆ sip_link_bin
◆ slStatusProc
◆ ssiToBeClosed
◆ ssiToBeClosed_inactive
volatile BOOLEAN ssiToBeClosed_inactive |
BOOLEAN ssiWrite(si_link l, leftv data)
si_link_extension si_link_root
#define SI_LINK_SET_CLOSE_P(l)
BOOLEAN slGetDumpAscii(si_link l)
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
si_link_extension si_link_root
static si_link_extension slTypeInit(si_link_extension s, const char *type)
leftv ssiRead1(si_link l)
Class used for (list of) interpreter objects.
const char * slStatusAscii(si_link l, const char *request)
BOOLEAN slOpen(si_link l, short flag, leftv h)
#define SI_LINK_CLOSE_P(l)
volatile BOOLEAN do_shutdown
#define SI_LINK_W_OPEN_P(l)
int status int void * buf
void PrintS(const char *s)
#define omFreeSize(addr, size)
BOOLEAN slInit(si_link l, char *istr)
#define SI_LINK_R_OPEN_P(l)
leftv slReadAscii2(si_link l, leftv pr)
void s_ungetc(int c, s_buff F)
#define SI_LINK_OPEN_P(l)
omBin s_si_link_extension_bin
BOOLEAN slSetRingDummy(si_link, ring r, BOOLEAN)
volatile int defer_shutdown
static int si_max(const int a, const int b)
void Werror(const char *fmt,...)
BOOLEAN slClose(si_link l)
char name(const Variable &v)
void WerrorS(const char *s)
BOOLEAN slCloseAscii(si_link l)
void slCleanUp(si_link l)
const Variable & v
< [in] a sqrfree bivariate poly
const CanonicalForm int s
BOOLEAN slDumpAscii(si_link l)
static void * feOptValue(feOptIndex opt)
#define SI_LINK_SET_RW_OPEN_P(l)
leftv slReadAscii(si_link l)
BOOLEAN slWriteAscii(si_link l, leftv v)
#define omFreeBin(addr, bin)
BOOLEAN slOpenAscii(si_link l, short flag, leftv)