=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/plugin/oxmisc2.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -p -r1.10 -r1.11 --- OpenXM/src/kan96xx/plugin/oxmisc2.c 2000/12/05 12:03:43 1.10 +++ OpenXM/src/kan96xx/plugin/oxmisc2.c 2000/12/06 00:29:52 1.11 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc2.c,v 1.9 2000/12/05 11:20:26 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc2.c,v 1.10 2000/12/05 12:03:43 takayama Exp $ */ #include #include "ox_kan.h" #include "oxmisc2.h" /* This file requires sm1 object description. */ @@ -1065,7 +1065,6 @@ struct object KoxPushCMO(struct object client,struct o return(ob); } -/* ------------- TODO ----------------- */ oxclientp oxCreateControl_RFC_101(int fdstream,int portStream, int ipmask,char *pass); struct object KoxCreateControl_RFC_101(struct object peer,struct object ipmask,struct object pass) @@ -1172,6 +1171,121 @@ oxclientp oxCreateControl_RFC_101(int fdstream,int por client->controlport = -1; client->controlfd = -1; client->id = clnum; clnum++; + client->type = CLIENT_SOCKET; /* socket */ + client->engineByteOrder = engineByteOrder; + client->controlByteOrder = -1; + return(client); +} + +oxclientp oxCreateEngine_RFC_101(int fdstream,int portStream, + int ipmask,char *pass, int engineID); +struct object KoxCreateEngine_RFC_101(struct object peer,struct object ipmask,struct object pass, struct object engineID) +{ + struct object rob; + oxclientp client; + int fdStream, portStream; + int i; + struct object ob1; + rob.tag = Snull; + if (peer.tag != Sarray) { + errorOxmisc2("KoxCreateEngine_RFC_101(): The first argument must be an array [fdStream, portStream]"); + return(rob); + } + if (getoaSize(peer) != 2 ) { + errorOxmisc2("KoxCreateEngine_RFC_101(): The first argument must be an array [fdStream, portStream] of size 2."); + return(rob); + } + for (i=0; idatafp2 = fp2open(fdStream); + if (client->datafp2 == NULL) { + fprintf(stderr,"oxCreateEngine_RFC_101(): fp2open(fd) failed.\n"); + return(NULL); + } + client->dataport = portStream; + client->controlport = -1; + client->controlfd = -1; + client->id = engineID; client->type = CLIENT_SOCKET; /* socket */ client->engineByteOrder = engineByteOrder; client->controlByteOrder = -1;