throbber
sesM9r__sérver.c
`
`?I5f11 2:57 PM
`
`(shastra1dTag *) bunch~>things{a]);
`ShastraIdTag0ut(fd,
`ShastraInt0ut(fd, &pShmInfo—>shmId);
`cmF1ush(fd);
`return;
`
`}
`/* USESHAREDMEMFORPICT */
`#endif
`putstringonchannelifd, REQ_SEND_MSGPICT, “putco11SendMsgPictHandler{1")
`
`shas§ra1dTagout(fd, {shastraIdTag-x) bunch¥>things[B]);
`PictData8ites0ut(fd, pPCBites):
`cmF1ush(fd):
`
`-
`
`Function
`

`
`}f
`
`**
`
`*1
`int
`
`putCol1RecvdMsgPictHand1er(fd, buf)
`int
`fd:
`char
`*buf;
`
`putString0nChannel(fd, REQ_RECVB_MSGPICT, "putCo11RecvdMsgPictHandler(
`J"):
`_
`'
`putStringOhChanne1(fd, buf, "putCo11RecvdMsgPictHand1er(J"):
`cmF1ush(fd);
`
`Function
`
`{
`
`} /
`
`*x
`
`*/
`
`_
`int
`putcollstartXSCnt1Hand1er(fd, pSIdTag)
`int
`fd;
`shastraIdTag
`*pSIdTag;
`
`{
`
`put5tringOnChannel(fd, REQmSTART_XScNTL, "putcollstartxscntlfiandler()“}
`
`shas{raIaTagout(fd, pSIdTag):
`cmF1ush(fd};
`
`Function
`
`}f
`
`* *
`
`*1
`_
`_
`_

`int
`putCo1lEndXSCnt1Hand1er{fd, pSIdTag}
`int
`_
`fd;
`shastraIdTag
`*pSIdTag;
`
`{
`
`putStringUnChanne1(fd, REQ_ENfl_XSCNTL, "putCoI1EndXSCnt1Hand1er()");
`ShastraIdTag0ut(fd, pSIdTag);
`cmFlush(fd):
`
`} /
`
`*
`
`Pageseoras
`
`Face-book's Exhibit No. 1002
`
`Page2001
`
`

`
`sesMgr__server.c
`
`7I5f'11 2:57 PM
`
`* Function
`*/
`int
`patcollsendxscntlflandler(fd, huf)
`int
`fd;
`char
`*buf:
`
`*bunch;
`bunch0fThings
`_
`bunch m (hunch0fThings *) buf:
`putstringonchanneltfd, RE0PSEND_XSCNTL, ”putcollsendxscntlflandler()"};
`ShastraIdTag0ut(fd,
`(shastra1dTag *) bunch~>things[%]):
`putString0nChanne1(fd, bunch->thing5[1], "putcollsendxscntlfiandler(J"):
`cmF1ush(fd):
`
`Function
`
`{
`
`}1
`
`**
`
`*/
`int
`
`putcollsendflsgxscntlfiandler(fd,.buf)
`=int
`fd;
`char
`*huf;
`
`{
`
`bunchGfThings
`xscntloatas
`int
`shminfo
`
`*bunch:
`*pXSCBites;
`n;
`*pShmInfo;
`
`bunch = (bunch0fThings *) buf:
`pxscaites 2 (xscntlnatas *) bunch~>thingsE1]:
`#ifdef USESHAREDMEM FORKS CD
`_
`if (kerne1ShastraId.1IPAddr == 1oca1ShaIdIn[fd].1IPAddr) {
`pshmlnfo = psesflgrCo11Data—>pShmInfo0ut;
`if (lpshminfo->shmDirty) {
`pshmlnfo->shmDirty : 1;
`
`/*CHECK*f
`
`? n : 16240)) ==
`
`((n > 16240)
`
`n = 8;
`if (shMemReuseSegment(pshminfo;
`'
`) {
`fprintfistderr, “putcollsendmsgxscntIflandtert)—>cou1dn‘t
`shMemReuseSegment!\n”):
`}
`xscntlpatasmemflut(pShmInfo—>shmAddr,.pShmInfo~>shmSize,
`pXSCBite5);
`}
`putString0nChanne1(fd, REQ_SEND_MSGSHMXSCNTL,
`_
`"putCo11SendMsgXScntlHand1er(3“);
`ShastraIdTag0ut(fd,
`(shastraIdTag *) bunch—>thingsi9]);
`Shastralntuuttfd, &pShmInfo—>shmId);
`cmF1ush(fd):
`return;
`
`}
`la: USESHAREDMEMFORXSCD *._r
`#endif
`putStringOnChanneI(fd, REQ_SEND_MSGXSCNTL, ”putCollsendfisgxscntlflandler
`
`Page70o!83
`
`Facebook's Exhibit No. 1002
`
`Page20U2
`
`

`
`sea-M9?_server.c
`
`‘
`
`7I5I11 2:57 PM
`
`()“J:
`(shastraIdTag *) bunch—>things[B]):
`ShastraIdTag0ut(fd,
`XSCnf1Bité50ut{fd, pXSCBites):
`cmF1ush(fd):
`
`}
`l*
`* Function
`*/
`int
`
`{_
`
`putColIRecvdMsgXSCnt1Hand1er(fd, buf}
`int
`fd;
`char
`*buf;
`putstringonchannelifd, REQmRECVDmMSGXSCNTL,
`“putcol1RecvdHsgX$Cnt1Hand1er(J“):
`put5tring0nChanne1{fd, buf,‘"putcollaecvdflsgxscntlflandIer(}");
`cmF1ush(fd);
`
`’
`
`Function
`
`} /
`
`* *
`
`*/
`
`int
`
`putCO11StartPntrHandler(fd, pSIdTag}
`-int
`fd:
`shastraIdTag
`*pSIdTag;
`
`{
`
`put5tring0nChanne1(fd, REGWSTARTMPNTR, "putcoltstartPntrHand1er(}"):
`ShastraIdTag0ut(fd, pSIdTag}:
`cmF1uSh(fd):
`
`Function
`
`}/
`
`* *
`
`*1
`int
`putCo11EndPntrHandIer(fd, pSIdTag)
`int
`fd;
`shastraIdTag
`$pSIdTag;
`
`{
`
`.
`putString0nChanne1(fd, REQ_END_PNTR, “putCo11EndPntrHand1er()"J:
`ShastraIdTag0ut{fd, pSIdTag);
`~cmF1ush(fd);
`
`Page 71 0!. 83
`
`Facei3ook's Exhibit No. 1002
`Page20U3
`
`Function
`
`} /
`
`**
`
`*/
`_
`int
`putCo11SendPntrHand1er(fd, buf)
`int
`fd;
`char
`*buf;
`
`{
`
`_ bunchOfThings. *bunch;
`
`

`
`sesMgr_server.c
`
`‘H5111 2:5? PM
`
`bunch = (bunchOfThings *) buf:
`putString0nChanne1(fd, REG_SEND_PNTR, "putCo11SendPntrHand1er{)");
`ShastraIdTagOut(fd,
`(shastraIdTag *) bunch~>things{@]};
`putString0nChanne1(fd, bunch—>things[1], "putCo11SendPntrfiandler()"):
`cmF1ush(fd);
`
`}
`/*
`* Function
`*/
`int
`putCo1ISendMsgPntrHand1er(fd, buf}
`int
`fd;
`char
`*buf;
`bunch0fThings
`*bunch;
`shaboubles
`*pPntrD:
`int
`n:
`shmlnfo
`*p5hmInfo;
`
`{
`
`bunch = (bunch0fThings *} buf;
`pPntrD = (shafioubles *} bunch—>thingsE1]:
`#ifdef USESHAREDMEflFDRPNTR
`if (kerneIShastraId.1IPAddr == 1oca1ShaIdIn[fd].1IPAddr} {
`pshmznfo = psesngrCo11Data—>pShmInfo0ut;
`if (!pShmInfo~>shmflirty) {
`pshmInfoe>shmDirty = 1;
`_
`n 2 strlenfmsg) + 1:
`if (shMemReuseSegment(pShmInfo, {(n > 16249)
`}
`{
`fprintf(stderr, ”putCo11SendMsgPntrHand1er()~>cou1dn't
`shMemReuseSegment!\n“}:
`}
`memcpy{pShmInfo—>shmAddr, msg. n):
`
`? n : 10240)) ==
`
`putString0nChanne1(fd, REQ“SEND“MSGSHMPNTR,
`"putCo11SendMsgPntrHand1er()"13
`ShastraIdTag0ut(fd.
`(shastraIdTag *) bunch—>things[0]);
`$hastraEntOut(fd, &pShmInfo~>shmId);
`cmF1ush(fd};
`return:
`
`}
`#endif
`
`1* USESHAREDMEMFORFNTR */
`
`putString0nChanne1(fd, REO_S£ND_MSGPNTR, "putCo11SendM5gPnfrHand1er()"}
`1'
`
`(shastraIdTag *) bunch~>thingsE@]}:
`$hastraIdTag0ut(fd,
`PntrBite6ut(fd, pPntrD};
`cmF1ush(fd}:
`
`Function
`
`}/
`
`*3
`
`*1
`int
`
`Page 72 ol"83
`
`Facebook’s Exhibit No. 1002
`
`Page2004
`
`

`
`sesfi-"F§?_sewe:.c
`
`7f5I11 2:57 PM
`
`putCc11RecvdMsgPntrfiandlerifd. Kufl
`int
`fd:
`char
`*buf;
`
`putS§r§ng0nChanne1(fd, REQ_RECVD_MSGPNTR, "putCo11RecvdM5gPntrHand1er{
`putstrifigonchannellfd, buf, "putCo11RecvdMsgPntrHand1er{)"}:
`cmF1ush(fd);
`
`/*
`* Function
`*1
`
`int
`putcollstartcursorflandlertfd, pSIdTag)
`int
`fd;
`shastraIdTag
`*pSIdTag;
`
`putstringonchanneltfd, REO_START_CURSOR, ”putCo11StartCursorHand1er()")
`
`ShastraIdTag0ut{fd, pSIdTag}:
`CmF1ushifd):
`
`}
`/*
`* Function
`*f
`int
`
`putCo11EndCursorHand1er(fd, pSIdTag)
`int
`fd:
`shastraIdTag
`*pSIdTag;
`
`putstringflnchannelifd, REO_END;CURSOR, "putEo11EndCursorHand1er{)");
`Shastra1dTag0ut(fd, pSIdTag);
`cmF1ush(fd);
`
`}
`/=9:
`* Function
`*1
`int
`putcullsendcursorflandler(fd, buf)
`int
`fd:
`char
`*buf:
`
`xbunch;
`bunch0fThings
`_
`bunch = (bunchOfThings *) buf;
`putString0nChannel(fd, REO_SEND_CURSOR, "putcollsendcur5orHand1er{)“}:
`ShastraIdTag0uf(fq' £shastraIdTag *) bunch—>things[@]):
`_
`putstringonchanneltfd, bunch—>things[1}, "putcoltsendcursorHand1er()"):
`cmF1ush(fdJ:
`
`Page 73 of 83
`
`Facebook's Exhibit No. 1002
`
`Page2D05
`
`

`
`sesMg:_servé:.c
`
`* Function
`*/
`int
`
`{
`
`putcoltsendmsgcursorfiandlerifd, buf)
`int
`fd;
`char
`*buf:
`bunch0fThings
`*bunch;
`shafloubles
`*pCur5orD:
`int
`_
`n;_
`shmlnfo
`*pShmInfo;
`
`715111" 2:57 PM
`
`bunch ='(bunch0fThings *) huf:
`pcursorb = (shanoublés *) bunch~>things[I};
`#ifdef USESHAREDMEMFGRCURSDR
`_
`if (kerne1ShastraId.lIPAddr == Iocaishaldlnifdi.1IPAddr) {
`pshmlnfo = psesflgrCo1lData->pShmInfo0ut;
`if (!pShmInfo~>shmDirty)
`{
`_
`pShmInfo—>shmDirty = 1;
`n-= str1en(m5g) + 1;
`if (shHemReuseSegment(pshmlnfo,
`J {
`fprintf(stderr, “putcollsendflsgcursorflandlerf)—>cou1dn‘t
`shMemReuseSegment!\n“);
`}
`.
`memcpyipShmInfon>shmAddr, msg. n):
`
`((n > 18240)
`
`? n : 19240)) an
`
`putString0nChanne1(fd, REQ_SEND_MSGSHMCURSOR,
`_
`"putcollsendfisgcursorHand{er()"};
`ShastraIdTag0ut(fd, {shastraIdTag *) bunch->things[B]);
`ShastraInt0ut{fd, &pShmInfo->shmId);
`'
`cmF1ush(fd}:
`return:
`
`}
`#endif
`
`/ac USESHAREDMEMFORCURSOR =:=/
`
`putString0nChafine1(fd, REQ_SENDmM5GCURSDR, "putcallsendnsgcursorfiandler
`()“)'
`ShastraIaTag0utffd,
`(shastraIdTag $) bunch~>things{0}};
`CursorBiteGut{fd, pcursoro);
`cmF1ush(fd):
`
`Function
`
`}/
`
`* *
`
`*1
`int
`putCq11RecvdMsgCursorHand1er(fd, buf}
`int
`fd;
`char
`*buf;
`putStringOnChanne1(fd, REO_RECVD_MSGCURSOR,
`“putCo11RecvdMsgCursorHandler(}"3:
`putString0nChanne1{fd, buf, “putCol1RecvdMsgCursoraandleri)"):
`
`{
`
`Page 74 of 83'
`
`Facébook's Exhibit No. 1002
`Page 2006
`
`

`
`sesMg:__server.c
`
`715111 2:57 PM
`
`cmF1ush(fdJ:
`
`f*
`* Function
`*1
`int
`
`putSetCo1lPerm5Hand1er{fd, arg)
`int
`.
`fd;
`char
`*arg:
`
`'sfiastraIdTag
`shastraIdTag
`bunch0fThings
`
`*pSIdTag;
`*pPermTag;
`*bunch = (hunch0fThings *) arg;
`
`pSIdTag = (shastraIdTag *J bunch»>things{B]:
`pPermTag = (shastraIdTag $3 bunch~>things[1};
`putStringOnChanne1(fd, REQ_SET;COLLPERMS, “putSetCo1lPermsHand1er(J");
`ShastraIdTag0ut(fd, pSIdTag):
`ShastraIdTag0ut(fd, pPermTag):
`cmF1ush{fd);
`
`Function
`
`} f
`
`* *
`
`*/
`_
`int
`putSetSesmCo11PermsHand1er{fd, arg}
`int
`fd:
`char
`*arg:
`
`shastraIdTag
`shastraIdTags
`bunch0fThings
`
`*pSIdTag;
`*pPermTags;
`*bunch = (bunch0fThings *) arg;
`
`pSIdTag = (5hastraIdTag *) bunch—>things[0};
`pPermTags = (shastraIdTags *) bunch—>things[1];
`putStringDnChanne1(fd, REQ_SET_5ESMCOLLPERMS,
`"putSetSesmCo11PermsHandler(}"):
`ShastraIdTag0ut(fd, pSIdTag):
`ShastraIdTags0ut(fd, pPermTags};
`cmF1ush(fd}:
`
`}
`
`/2+:
`* Functian
`*/
`int
`
`putcollsetlxnnodeflandler(fd, plxnflode)
`int
`fd;
`unsigned long
`$pIxnfiode:
`
`Page 75 0! 83
`
`Facebook's Exhibit No. 1002
`
`Page2007
`
`

`
`ses'.Mgr,,senrer.c
`
`7i5f11 2:57 PM
`
`{
`
`-
`'
`putString0nChanne1(fd, REQ_SET_IXNMGDE, "putcollsetlxnmodefiandler()");
`ShastraULong0ut(fd, pIxnMode):
`cmF1ush(fd);
`
`} /
`
`ak
`* Function
`*1
`int
`_
`putCo11SetF1oornodeflagdlerifd, pF1oerMode)
`int
`f ;
`unsigned long
`*pFloorMode;
`
`putString0nChanne1(fd, REQ_SET;FLO0RM6DE, “putcoilsetFloorModeHand1er(
`)"};
`'
`ShastraULong0ut(fd, pF1oorMode);
`cmF1ush(fd):
`
`Function
`
`} /
`
`*3
`
`*/
`
`_
`int
`putCo11SetSesFormatHand1er(fd, pSesFormat)
`int
`fd;
`unsigned long
`*pSesFormat:
`
`H
`-
`put5§r§ng0nChanne1(fd, REQ_5ET_SESFORMAT, "putto11SetSe5FormatHand1er(
`ShastraULong0ut(fd, psesFormat);
`cmF1ush(fd);
`
`} /
`
`2:
`* Function
`*/

`int
`putCu1lGrabTckenHand1er(fd, pSIdTagToken)
`int
`fd;
`shastraIdTag
`*pSIdTagToken:
`
`putString0nChanne1(fd, REQ_GRAB_TOKEN, "putCo11GrahTokenHand1er(J“);
`ShastraIdTag0ut{fd, pSIdTagToken):
`cmF1ush(fd}:
`
`Function
`
`} /
`
`* *
`
`*1
`int
`
`putCo11FreeTokenHand1er(fd, pSIdTagToken}
`int
`fd;
`
`Page 76 0! 83
`
`Facebook's Exhibit No. 1002
`
`Page2008
`
`

`
`sesMg:_,serve:.c
`
`735:1: 2:57 PM
`
`shastraIdTag
`
`*pSIdTagToken;
`
`putStringDnChanne1(fd, REQ_FREE_TOKEN, "putCo11FreeTokenHand1er()”):
`ShastraIdTag0ut(fd, pSIdTagToken);
`cmF1ush{fd):
`
`Function
`
`} !
`
`* *
`
`*1
`int
`
`putCo11Te11TokenHand1er(fd, psIdTagToken)
`int
`fd;
`shastraIdTag
`*pSIdTagToken;
`
`putStringDnChanne1(fd, REQ_TELL_TOKEN, "putCo11Te11TokenHand1er{)");
`ShastraIdTagOut(fd, pSIdTagToken};
`cmF1ush(fd):
`
`function
`
`} /
`
`**
`
`#/
`int
`
`putCo11AskTokenHand1erifd, pSIdTagToken}
`int
`fd;
`shastraIdTag
`*pSIdTagToken;
`
`putString0nChanne1(fd, REQ_ASKwTOKEN; “putCo11AskTokenHand1er()"):
`ShastraIdTag0ut(fd, pSIdTagToken);
`cmF1ush(fd}:
`
`/*
`* Function
`*/
`closedchannetcleanflpflandleF!fd}
`int
`fd:
`
`{
`
`== SHAFRBNT) {
`if (shaKernF1ags[fd
`collteavecleanupfiandlertfd}3
`} else {
`mptexUnRegisterChanne1(fd):
`_
`/* CHECK actually initiate retry~connection sequence */
`}
`
`Function
`
`} /
`
`**
`
`Page 77 of 83
`
`Facebook's Exhibit No. 1002
`
`Page20D9
`
`

`
`sesMgr_server.c
`
`735/11 23.57 PM
`
`-
`*1
`int putCo11CommMsgTextHand1erIfd, pSmSIdTag, pTo5IdTag, pSIdTag,
`int fd;
`shastraIdTag *pSmSIdTag;
`shastraIdTag *pToSIdTag;
`sha5traIdTag *pSIdTag;
`char $sbMsg:
`
`sbMsg}
`
`putstringonchannellfd, REQUCOMMHMSGTEXT. “putco1{CommMsgTextHand1er(}“)
`
`ShastraIdTag0ut(fd, pSmSIdTag};
`ShastraIdTag0ut(fd, p{oSIdTag);
`ShastraIdTag0ut(fd, pSIdTag);
`sendDataString(fd, sbnsg);
`cmF1ush(fd):
`
`‘
`
`}
`
`1*
`* Function
`*1
`int co1lCommM5gTextfiandler(fd}
`int fd;
`
`{
`
`shastraIdTag
`5hastraIdTag
`shastraIdTag
`char msmsg;
`int outFd;
`
`smSIdTag:
`tuSIdTag:
`sIdTag;
`
`ShastraIdTagIn(fd, &5mSIdTag);
`ShastraIdTagIn(fd, &toSIdTag):
`ShastraIdTagIn(fd, &sIdTag};
`smsg = cmReceiveString{fd):
`cmAck0k(fd);
`cmF1ush(fd);'
`
`switch(routeFront5IdTagToFd(&to$IdTag, &outFd,
`"col1CommM5gTextHand1er()")){
`case route_FRONT:
`putCo11CummMsgTextHand1er(0utFd, &smSIdTag, &toSIdTag,
`_
`&sIdTag, smsg):
`break;
`case route“ERROR:
`default:
`break;
`
`} s
`
`printf(sb0utMsgBuf, “Done nu %s\n", REQ_COMM_MSGTEXT};
`showInfo(sb0utMsgBuf);
`
`Function
`
`} /
`
`**
`
`*/
`
`Page 1'8 of 83
`
`Facebook's Exhibit No. 1002
`
`Page201O
`
`

`
`sesMgr_server.c
`
`int putcot1CommMsgTextFi1eHand1er(fd, pSmSIdTag, pToSIdTag, pSIdTag,
`int fd:
`shasfraIdTag $pSmSIdTag:
`shastraIdTag *pToSIdTag:
`shastraIdTag *pSIdTag:
`char kshflsg;
`
`putstringonchanneltfd, REQ_COMM_MSGTEXTFILE:,
`“putCol1CommMsgTextFi1eHandler()"):
`5hastraIdTagOut(fd, pSmSIdTag);
`ShastraIdTag0ut(fd, pToSIdTag):
`ShastraIdTag0ut(fd, pSIdTag);
`sendDataString{fd. sbMsg):
`cmF1ush(fd};
`
`vism 2:57 PM
`
`sbmsg)
`
`} /
`
`*
`* Function
`*1
`int
`
`co11CommMsgTextFi1eHand1ertfd)
`int fd;
`
`{
`
`shastraIdTag
`shastraIdTag
`shastraIdTag
`char *sMsg:
`int outfid;
`
`smsxdfag;
`toSIdTag:
`sIdTag;
`
`ShastraIdTagIn(fd, &smSIdTag):
`ShastraIdTagIn(fd, &toSIdTag}:
`ShastraIdTagIn(fd, &sIdTag);
`sMsgj= cmReceiveString(fd);
`cmhckfiktfdiz
`cmF1ush(fd);
`
`switch(routeFrontSIdTagToFd(&toSIdTeg,_&outFd,
`"col1CommMsgTextFi1eHand1er(}“5){
`case FOUTC-___FRONTI
`pufcol1CommMsgTextFileHand1er(outFd, &smSIdTag, &toSIdTag,
`&sIdTag,
`sMsg):
`
`break;
`case.route_ERROR:
`default:
`break:
`
`} s
`
`printf(sb0utMsgBuf, "Done mm %s\n", REQ_COMM“M$GTEXTFILE):
`showInfo(sbDutMsgBuf);
`
`} /
`
`*
`* Function
`*1
`
`int putCo11CommMsgAudioHandIertfd, pSmSIdTag, pToSIdTag, pSIdTag, sbfisg)
`
`Page79of83
`
`Facebook's Exhibit No. 1002
`
`Page2011
`
`

`
`sesMgr,_server.c
`
`TISI11 2:57 $5M
`
`int fd:
`shastraIdTag-mpSmSIdTag;
`shastraIdTag *pTo$IdTag;
`'shastraIdTag *pSIdTag;
`char *sbMsg;
`
`ll:
`putS§r§ng0nChanne1(fd, REQ_COMH_MSGAUDIO, "putCol1CommMsgAudioHandler(
`ShastraIdTag0ut{fd, pSmSIdTa9}:
`ShastraIdTag0ut(fd, pToSIdTag};
`5hastraIdTag0ut(fd, pSIdTag);
`sendDataString(fd, sbfisg);
`cmF1ush(fd);
`
`Function
`
`} /
`
`**
`
`*1
`int col1CommMsgAudioHand1er(fd)
`int fd:
`
`{
`
`shastraIdTag
`shastraIdTag
`shastraIdTag
`char *sMsg;
`int outFd;
`
`smSIdTag:
`toSIdTag:
`sIdTag:
`
`ShastraIdTagIn(fd. &smsIdTag):
`ShastraIdTagIn(fd, &toSIdTag);
`ShastraIdTagIn(fd, &sIdTa9);
`sfisg = cmReceiveString(fd):
`cmAck0k(fd}:
`cmF1ush(fd):
`
`switch{rOuteFrontSIdTagToFd(&toSIdTag, &outFd,
`"co11CommMsgAudioHand1er()")){
`case route“FRUNT:
`putcol1CommMsgAudioHandler(outFd, &smSIdTag, &to$IdTag,
`&sIdTag, sMsg):
`
`break;
`case route;ERROR:
`default:
`break;
`
`} s
`
`printf(sb0utMsgBuf, “Done ~- %s\n”, REQ&COMMfiMSGAUDIO};
`showlnfoisbautmsgsuf):
`
`} /
`
`ac
`* Function
`*1
`int putCo11CammMsgAudiofilefland1er(fd, pSIdTag, pTaSIdTag, pSmSIdTag, sbflsg
`)
`
`Page 80 0! 83
`
`3'-‘acebook's Exhibit No- 1002
`
`Page2U12
`
`

`
`sesMgr,_$erver.c
`
`47:51:: 2:57 PM
`
`int fd;
`shastraIdTag *pSIdTag;
`5hastraIdTag $pToSIdTag;
`shastraIdTag *p5mSIdTag:
`char *sbMsg;
`
`putstringonchanneufd, REo,_,coMM,_MsGAun:xoFILE,
`"putcc11CommMsgAudioFi1eHandler()"};
`ShastraIdTag0ut(fd, pSm5IdTag}:
`ShastraIdTag0ut(fd, pToSIdTag);
`ShastraIdTag0ut(fd, pSIdTag);
`sendDataString(fd, sbmsg};
`'cmF1ush(fd):
`
`}
`
`/*
`* Function
`*/
`int‘co11CommMsgAudioFi1eHand1er{fd)
`{
`int fd:
`shastraIdTag
`shastraIdTag
`shastraIdTag
`char *sMsg;
`‘int outFd;
`
`sm$IdTag;
`toSIdTag;
`sIdTag;
`
`ShastraIdTagIn(fd, &smSIdTag):
`ShastraIdTagIn(fd, &toSIdTag):
`ShastraIdTagIn{fd, &sIdTag):
`sMsg = cmReceiveString(fd):
`cmAckOk(fd}:
`pmF1ush(fd);
`
`switchtrouteFrontSIdTagToFd(&toSIdTag, &outFd,
`"co11CommMsgAudioFi1eHand1erl}“)}{
`case route;FRONT:
`putCo11CommMsgAudioFi1eHandler(outFd, &smsIdTag, &toSIdTag,
`&sIdTag, sMsg):
`
`break;
`case route_ERROR:
`default:
`break;
`
`} s
`
`printf(shGutM5gBuf, "Done —~ %s\n", REQ_COMH_MSGAUDIOFILE);
`showlnfotsbflutflsgauf);
`
`Function
`
`} /
`
`**
`
`*/
`int putcoIlcommmsgvideoflandter(fd, pSmSIdTag, pToSIdTag, pSIdTag, shfisgi
`int fd;
`
`Page 81 of 83
`
`Facebook's Exhibit No. 1002
`
`Page2G13
`
`

`
`$esMgr__ser\rer.c
`
`715111 2:57 PM
`
`shastraIdTag *pSmSIdTag;
`shastraIdTag $pToSIdTag;
`shastraIdTag *pSIdTag:
`char *shMsg;
`
`putS§r§ng0nChanne1(fd, REQuCOMM~MSGVIDEO, “putcollcommflsgvideofiandler(
`Sha5traIdTagGut(fd, pSmSIdTag);
`ShastraIdTag0ut(fd, pToSIdTag);
`ShastraIdTag0ut(fd, pSIdTag}:
`sendDataString(fd, sbflsg};
`cmF1ush(fd}:
`
`Function
`
`} I
`
`x*
`
`-*f
`int co11CommMsgVideoHand1er{fd)
`int fd;
`
`{
`
`shastraIdTag
`shastraIdTag
`=shastraIdTag
`char *sMsg;
`int outFd;
`
`smSIdTag;
`toSIdTag:
`sIdTag:
`
`ShastraIdTagIn(fd, &smSIdTag);
`ShastraIdTagIn(fd, &toSIdTag):
`ShastraIdTagIn(fd, &sIdTag):
`sMsg = cmReceiveString(fd}:
`cmAckDk{fd}:
`cmF1ush{fd);
`
`switch(rnuteFrontSIdTagToFd(&toSIdTag, &outFd.
`"collcommnsgvideoflandleri)")){
`case routemFRONT:
`putcollcommmsgvideofland1er(outFd, &smSIdTag, &toSIdTag,
`&sIdTag, sMsg);
`‘
`
`break:
`case raute_ERROR:
`default:
`break;
`
`} s
`
`"Done —— %s\n“, REQ*CeMM_MSGVIDEG);
`printf(sbOutMsgBuf,
`showInfo(sb0utMsgBuf);
`
`} /
`
`3:
`* Function
`#!
`int_putCo11CommMsgVideoFi1eHand1er(fd, pSmSIdTag, pToSIdTag, pSIdTag,
`
`) i
`
`nt fd;
`
`sbmsg
`
`Page82oI83
`
`Facebook's Exhibit No. 1002
`
`Page2014
`
`

`
`sesMgr__seruer.c
`
`é WSfi12£7PM
`
`shastraIdTag *pSmSIdTag;
`shastraIdTag *pToSIdTag;
`sha5traIdTag *pSIdTag:
`char *sbMsg;
`
`putString0nChanneL(fd, REQ_COMMmMSGVIDEOFILE,
`"putcol1CommMsgVideoFileHand1er{)”);
`ShastraIdTag0ut(fd, pSmSIdTag);
`ShastraIdTag0ut(fd, pToSIdTag);
`ShastraIdTag0ut(fd, pSIdTag};
`sendDataString(fd, sbMsg);
`cmF1ush(fd):
`
`Function
`
`} /
`
`**
`
`*/
`int collcemmflsgvideoFileflandler(fd}
`int fd;
`
`{
`
`shastraIdTag
`shastraIdTag
`shastraldfag
`char xsflsg:
`int outFd;
`
`smSIdTag;
`toSIdTag;
`sIdTag:
`
`ShastraIdTagIn(fd, &smSIdTag);
`ShastraIdTagIn(fd, &toSIdTag):
`ShastraIdTagIn(fd, &sIdTag):
`sfisg = cmReceiveString(fd};
`-cmhckokifdl:
`cmF1ush(fd):
`
`switchircuteFrontSIdTagToFd(&toSIdTag, &outFd,
`“collcommmsgvideoFi1eHand1er()")){
`case routewFRONT:
`putcol1CommMsgVideoFi1eHandIer(outFd, &smSIdTag, &toSIdTag,
`&sIdTag. snag}:
`
`break;
`case route,ERROR:
`default:
`break;
`
`} s
`
`printfisboutusgsuf, "Done —— %s\n“, REQ”COMM_MSGvIDEOFILE):
`showInfo{sbOutM5gBuf);
`
`Page 83 of 83
`
`Facehook's Exhibit No. 1002
`
`Page2G15
`
`

`
`sesMgrMainCB.c
`
`7fih1257PM
`
`/*7l<**>l<**=i¢****>{==!<=k*=k***>f<=i=***=!*==3#319157}!**=}<*=i¢****>E<****=i<*>!==i<*********=k*=l<3i<**>E<******=i<**
`***/
`/ =!<>l==!==!<2i<>k>l<**>k=(<>k**>k*=i<=§<$7=k***i!<**¥{<*>k=k>¥***>§=>i€*>k$***=i<>k*=+<=i¢*=i<**=k**=§=****>i==k***$$=i=***=k***
`*>i<*/
`
`/**
`
`/**
`
`/**
`
`/**
`
`/**
`
`/**
`
`/**
`
`/**
`
`*>k/
`This SHASTRA software is not
`**/
`a person to person basis, solely for educational use and permission is
`*x/
`
`in the Public Domain. It is distributed on
`
`NOT granted for its transfer to anyone or for its use in any commercial
`**I
`
`product. There is NO warranty on the available software and neither
`mwl
`
`Purdue University nor the Applied Algebra and Geometry group directed
`*#/
`'
`by C.
`**i
`
`Bajaj accept responsibility for the consequences of its use.
`
`**/
`/"*1-<>96*=§<3%>i¢**>i<31¢=}<**=l$***********=£<*3:>|<=k$39:*>$=*=i¢$36=i=>l'=*?}<>l¢*=k**=§<**=i<*>i<*=l<5k>}=******=k******>k*>i<
`*$*/
`
`1’-***=|¢**v!$>k*****>i<>1<***>i=**=I<=i=**=k>i<***********=k***#**=S<****=J=********=§=*$***=k****=k?i=*=!<
`***/
`#include
`
`<stdio.h>
`
`#include
`
`#inc1ude
`#include
`
`<X11/Intrinsic.h>
`<x11fStringDefs.h>
`<X11/She11.h>
`
`#include
`#include
`#include
`#include
`
`<Xm/Form.h>
`<Xm/Labe1.h>
`<Xm/Text.h>
`<Xm/RowCo1umn.h>
`
`#include
`#inc1ude
`#include
`#include
`#include
`
`<shastra/uitools/strListUti1ities.h>
`cshastra/uitools/buttonBox.h>
`<shastrafiuitools/confirmCB.h>
`<shastra/uitools/choose0ne.h>
`<shastra/uitools/callhackarg.h>
`
`#include
`
`#include
`
`#include
`#include
`#include
`
`#include
`#include
`#include
`#include
`
`<shastrafdatacommlshastraIdHrh>
`<shastra/datacomm/shastraIdTagH.h>
`
`<shastra/shautils/shautits.h>
`<sha5tra/shautils/kerne1Fronts.h>
`<shastra/shautils/sesmgrfironts.h>
`
`<shastra/session/sesMgrMainCB.h>
`<shastra/session/sesMgr.h>
`<shastrafsession/sesMgr*c1ient.h>
`cshastra/session/se5MgrState.h>
`
`Page 1 oi 9
`
`Facebook's Exhibit No. 1002
`
`Page2016
`
`

`
`ses~'!grMainca.c
`
`T
`
`I
`
`715111 2:57 PM
`
`/*
`* Function:.createMainCmdShe11 (private)
`*
`.
`*/
`
`widget_
`createmaincmdshell(wgParent3
`widget
`wgParent;
`
`{
`
`widget
`widget
`Xmstring
`char *sName:
`
`-
`wgfiaincmdsheil. wgMainCmdForm;
`wgwamer
`xmfiame;
`
`/* Create the menu popup'she11 */
`wgmaincmdshell = XtVaCreatePopupShe{1(”mainCmdShe11",
`topLeve1Shel1WidgetC1ass, wgParent, NULL):
`
`/*
`
`*-Create the menu form widget used to position thé widgets inside
`* the
`*1
`/* menu window *2
`wgMainCmdForm = xtvacreatenanagedwidget("mainCmdForm",
`xmFormWidgetClass,
`wgmaincmdshell, NULL);
`
`sName = reso1veNameFram2Base5{pSesMgrAppData~>sDirBase,
`pSesMgrAppData—>sDirDefs, "bitmaps/termina1.xbm“);
`wgName = Xtvacreatemanagedwidget(“hostNameLabe1“, xmLabe1widgetC1ass,
`wgMainCmdForm,
`XmNbackgroundPixmap,
`convertstringToPixmap(wgMainCmdForm,
`NULL)‘
`xmmame = XmStringCreaté3imp1e(shortenName(kernetfiastwameiJ;
`Xtvasetvaluestwgwame, Xmwlabelstring, {XtArgVa1) xmName4 NULL};
`XmStringFree(xmName):
`
`swame},
`
`_/=5:
`* Create the button box and state box objects that are inside the
`* menu
`*1
`1* window */
`
`createMainCmdButtonBox(wgMainCmdForm);
`createMainDbgButtonBox(wgMainCmdForm):
`createTextStatusBox(wgflaincmdfiorm);
`
`return'wgMainCmdShel1:
`
`Function: createfiaincmdfiuttonfiox (private)
`
`} /
`
`* *
`
`Page 2 of 9
`
`Facebook's Exhibit No. 1002
`
`Page2017
`
`

`
`set‘-MgrMa1nCB.c
`
`7a'5I11 2:57 PM
`
`*!
`widget
`Widget
`chooseflne
`chooseflne
`chooseflne
`chooseone
`char
`char
`char
`char
`char
`
`wgHainKi11:
`wgflainfiuit;
`*pcoShastraSesMgr;
`*pcqShastraKern;
`*pcoShastraFront;
`*pcoShastraSys;
`**rgsbShastraKern:
`**rgsbShastra5esMgr:
`**rgsbShastraFront;
`**rgsbShastraSys;
`*rgsbNu11[} = {NULL};
`
`_
`void
`createMainCmdButtonBox{wgParent)
`widget
`wgParent:
`
`{
`
`abuli = {
`static button
`{"ki11", &wgMainKiIl},
`{"quit". swgfiainouit},
`{NULL, NULL}
`
`}
`
`huttonBoxCreate{"mainBtnsBox", wgParent, abu, True);
`
`/* Create a choose one object to select one 5ystem-*/
`pcoShastraFronf = chooseOneCreate(NULL, coNoInitia1Highlight,
`wgMainKi11, choose0neTestCB,
`_
`(XtPointerJ pcbRrgPopup, wgMainKi11,
`"Choose Local Frontmend", 239, NULL);
`chooseOneChangeList(pcoShastraFront,
`rgsbmull, coNoInitia1High1ight):
`
`'
`
`IR treate a choose one object to select one system */
`pcoshastrasesflgr = choose0neCreate(NULL, cowolnitialflighlight,
`wgMainKi1l,_chooseBneTestCB,
`(XtPointer) pcbArgPopup, wgMainKi11,
`"Choose Remote Sesmgr", 263, NULL);
`choose0neChangeList(pcoshastrasesmgr,
`rgsbwull, coNoInitia1Highlight);
`
`R
`
`1* Create a choose one object to select one system */
`pcoShastraKern = choose0neCreate(NULL, coNoInitia1High1ighi,
`wgMainKi11, choose0neTestCB,
`(XtPointer) pcbArgPopup, wgmainxill,
`‘
`“Choose Remote Kernel", 26a,.NULL);
`choose0neChangeList(pcoShastraKern,
`rgsbmull, coNoInitialHighlight};
`
`/* Create a choose one object to select one system */
`pcoshastrasys # choose0neCreate(NULL, cowoinitialflightight,
`wgMainKi11, chooseOneTestCB.
`(XtPointer) pcbArgPopup, wgMainKi11,
`“Choose Remote System“, 206, NULL):
`choose0neChangeListtpcoshastrasys,
`rgsbwull, coNoInitia1High1ight);
`
`.
`
`Page 3 of 9
`
`Facebook's Exhibit No. 1002
`
`Page2018
`
`

`
`sesMgrMa:ncB.c
`
`7.r5i11 2:57 PM
`
`XtAddCa1lback(wgmainouit, xmNactivateCa11back, mainquitca, NULL}:
`Xtnddcallback(wgMainKi11, XmNactivateCa1lback, mainKi11CB,
`(xtPointer} pcoShastraFront);
`
`} 1
`
`* *
`
`Function: createTextStatusBox (private)
`
`wgStatusText;
`
`*/
`widget
`
`void
`createTextStatus3ox{wgParent)
`widget
`wgParent;
`
`{
`
`Arg
`int
`
`args[8]:
`n:
`
`n = 0;
`XtSetArg(args[n3, Xmwrows, 5.}:
`n++;
`XtSetArg(args{nJ; XmNcolumns, 46);
`n++;
`
`XtSetArg{args[n], Xmweditable, False);
`n++-
`XtSétA rg(args In] , Xmrdediirbiiode,
`n++;
`
`)<mMULTI_LINE_EBIT) :
`
`'XtSetArg(args[n}, XmNscro11BarDisp1ayPolicy, XmAS“NEEDED);
`n++;
`4
`wgStatusText = XmcreateScro11edText(wgParent, “mainStatusText",
`args n):
`Xtmanagechild(wgStatusTe§t)3
`
`}
`
`l*
`
`* Function: createflainDbgButtonBox (private)
`*/
`widget
`widget
`widget
`widget
`widget
`widget
`
`wgnbgchecksys;
`wgDbgGetSys:
`wgDbgGetKern:
`wgDbgCheckSmFr:
`wgDbgGetSmFr:
`wgohgeetsesm:
`
`void
`
`createmainnbgfiuttonaox§wgParent)
`widget
`wgParent;
`
`{
`
`abu[} = {
`static button
`{"getKern", &wgDbgGetKern};
`{”getSys“. &wgDbgGetSys}.
`{”checkSys", &wgDbgCheckSy5},
`{"getSosm”, &wgDbgGetSesm},
`
`Page 4 of 9
`
`Facebook's Exhibit No. 1002
`
`Page2U19
`
`

`
`sesMg:MamcB.c
`
`7i5f11 2:57 PM
`
`{“get$mFr", &wgDbgGetSmFr},
`{“checkSmFr", &wgDbgCheckSmFr}.
`{NULL, NULL}
`
`H
`
`buttonBoxCreate("dbgfitnssox", wgParent, abu, True):
`
`XtAddCa11back(wgDbgCheckSys, Xmwactivatecailback, dhgCheckSysCB,
`(XtPointer) pcushastraxern);
`XtAddCal1back(wgDhgGetSys, XmNactivateCa11back, dbgGetSysCB,
`(XtPointer) pco$hastraKern);
`XtAddCal1hack{wgDbgGetKern, Xmflactivatecallback, dbgGetKernCB,
`(XtPointer}-NULL);
`XtAddCa11back(wgDbgCheckSmFr, Xmnactivatetallback, dhgCheckSmFrCB,
`(XtPointer) pcoshastrasesngr);
`Xtnddcallback(wgDbgGetSmFr, XmNactiuateCaI1back, dbgGetSmFrCB,
`{XtPointer) pcoshastrasesflgrl;
`XtAddCa11backIwgDbgGetSesm, XmNactivateCal1back, dbgGetSesmCB,
`(XtPointer} NULL);
`
`}
`
`void
`
`mainKi1lCB(widget, xpclientnata, ca11_data)
`widget
`widget:
`XiPointer
`xpclientoata, ca11_data;
`
`chooseone
`
`*pco = (chooseone *) xpclientnata;
`
`strcpy(pcbArgPopup~>msg, “chooseSystem"};
`pcbArgPopup»>operation - endsystemoprnz
`ll!
`pcbArgPopup—>fwantGprn
`1;
`/* no call for name */
`pcbArgPopup->fwantArg = 6;
`pcbArgPcpup—>wgInitiator = widget:
`
`/* Pop up the choose one object xx
`chooseUneMobExec(pco, widget};
`
`}
`
`void
`
`main0uitCB(widget, closure, ca11_data)
`Widget
`widget:
`XtPointer
`closure, callmdata:
`
`strcpy(pcbArgPopup—>msg, “Confirm Action”):
`strcpytpcbArgPopup->prompt, "Please Confirm Action"):
`pcbArgPopup->operation
`quitoprn;
`IIII
`pcbArgFopup—>fwant0prn
`1:
`pcbArgPopup—>fWantArg = 0;
`pcbArgPopup->wgInitiator =
`ConfirmPopup(wiqget}:
`
`/* call for name */
`widget;
`
`Page 5 of 9
`
`Facebook's Exhibit No.
`
`1002
`
`Page2020
`
`

`
`sesMgrMaInCB. c
`
`void
`
`73511 2:57 PM
`
`dbgCheck5ysCB(wg, xpclientnata, callfldata)
`widget
`wg;
`XtPointer
`xpC1ientData, ca11_data;
`
`chooseflne
`
`*pco = (chooseone *) xpclientnata;
`
`strcpy(pcbArgPopup»>msg, "chooseKerne1”);
`pcbArgPopup~>operation = dbgchecksysoprn;
`pcbArgPopupm>fwant0prn = 1;
`/# no call for name */
`pcbArgPopup»>fwantArg = 6;
`pchArgPopup->wgInitiator 2 wg;
`
`1* Pop up the choose one object */
`choose0neMobExec(pcc, wg}:
`
`void
`
`dbgGetSysCB{wg, xpC1ientData, callmdata)
`widget
`wg;
`xtPointer
`xpclientvata, ca11_data;
`
`chooseone
`
`xpco
`
`(chooseene *) xpC1ientData;
`
`strcpy(pcbArgPapup~>msg, "chooseKern"}:
`pcbArgPopup—>operation = get$haKernFrId0prn:
`pcbArgPopup->fwantOprn = 1;
`/* no call for name */
`pcbArgPopup~>fwantArg m 9;
`pcbArgPopup->wgInitiator = wg:
`
`/* Pop up the chéose one object */
`chooseflneflobfixectpco, wg);
`
`} v
`
`oid
`
`dbgGetKernCB{wg, xptlientsata, ca11_data}
`widget
`wg:
`XtPoint¢r
`xpclientbata, ca11*data;
`
`getshaxernldcprntfi):
`
`{ } v
`
`oid
`dbgchecksysoprn(iflbjlndex)
`"int
`iObjIndex;
`
`{
`
`shastralds
`shastrald
`
`*pSIds:
`*pSId;
`
`Page 6 01 9
`
`Facebook's Exhibit No. 1002
`
`Page2021
`
`

`
`sesMgrMainCB.s
`
`7I5i1t 2:57 PM
`
`int
`
`kernFd;
`
`pSId = shastraKernIds.shastraIds_va1Eiobjlndexl:
`kernFd = 1ocateKernFronts(pSId);
`if (kernFd < 6)
`{
`fprintf(stderr, ”dbgCheckSys0prn{}—>kernFd = %d\n", kernFd);
`return:
`}
`pSIds = getKernFrontSIds(p5Id):
`
`.
`if trgsbshastrasys != NULL) {
`strListDestroy(rgsbshastrasys);
`
`} r
`
`gsbShastra5ys = pSIds2StrTab(pSId3, PSIDSHOWALL);
`choose0neChangeList(pcoshastrasys,
`rgsbshastrasys,-coNoInitia1Highlight
`):
`
`strcpy{pcbArgPopup~>msg, "chooseSys”);
`pcbArgPopup»>operation
`NULL;
`Ifll
`pcbArgPopup—>fwant0prn
`0;
`pcbArgPopup~>fwantArg = 0;
`
`/* no call for name */
`
`1* Pop up the choose one object */
`chouse0neMobExec(pcoshastrasys, pcbArgPopup->wgInitiator);
`
`}
`
`voidT
`dbgCheckSmFrCB(wg, xpclientflata, ca11_data)
`widget
`wg;
`XtPointer
`xpclientbata, ca11_data:
`
`{
`
`chuoseone
`
`xpco = (chooseone *) xpclientnata;
`
`strcpy(pchArgPopup—>msg, "chooseSesMgr"};
`pcbArgPopup->operation = dbgCheckSmFr0prn;
`pcbArgPopup~>fwant0prn = 1;
`It no call for name-*/
`pcbArgPapup~>fwantArg = 6;
`pcbArgPopup—>wgInitiator = wg;
`
`/* Pop up the choose one_object */
`choese0neMobExec(pco, wg};
`
`}
`
`void
`dbgGet5mFrCB(wg, xpclientnata, callwdata)
`‘widget
`wg;
`XtPointer
`xpClientData, ca1I_data;
`.
`
`{
`
`Page 7 0! 9
`
`é Facebook's Exhibit No. 1002
`
`Page2022
`
`

`
`M sesMgrMa'incs.c
`
`715:: 1' 2:57 PM
`
`chooseone
`
`*pCo
`
`: fcheoseone *) xpclientnata:
`
`strcpy{pcbArgPopup~>msg, "chooseSesmP);
`pcbArgPopup~>operation
`getShaSesmFrId0prn;
`itIt
`pchArgPopup—>fwant0prn
`1;
`/* no call for name */
`pcbArgPopup~>fwantArg = 3;
`pcbArgPopup«>wgInitiator = wg;
`
`/* Pop up the choose one_object $/
`choose0neMobExec(pco, wg);
`
`etSesmCB(wg, xpclientnata, callmdata)
`widget
`wg;
`XtPointer
`xpclientfiata, caltwdata;
`
`getshasesmldoprnia):
`
`heckSmFrUprn(i0bjIndex)
`int
`iobjlndex:
`
`shastraIdTags
`shastraIdTag
`int
`
`*pSIdTags:
`*pSIdTag:
`smindex;
`
`} v
`
`oid
`dbgG
`
`{ } v
`
`oid
`dbgc
`
`{
`
`pSIdTag m (shastraIdTag *9 & shastrasesmlds.shastraIds“va1[i0bj1ndex]~>
`1SIDTag;
`smindex 2 1ocateSesmFronts{pSIdTag);
`if (smindex < 0} {
`fprintfistderr, "dbgchecksysaprniJ«>smIndex : %d\h”, smIndex);
`return;
`
`} p
`
`SIdTags = getSesmFrontSIdTags(pSIdTag):
`
`{
`if irgsbshastrasys 2: NULL)
`strListDestroy{rgsbshastrasys);
`
`} r
`
`gsbshastrasys mapSIdTag52StrTab(pSIdTags, PSIDSHOWALL}:
`choose0neChangeList(pcoshastrasys, rgsbshastrasys, cawoinitialflighlight
`}:
`
`strcpy(pcbArgPopup—>msg, “chooseSys“};
`strcpy(pchArgPopup»>prompt, "Enter Password:“};
`'pcbArgPopup—>operation - endsystemfiprn;
`pcbArgPopup~>fwant0prn
`-1:
`pcbArgPopup~>fwantArg = 1;
`
`_/* call for name ml
`
`1* Pop up the choose one object */
`chooseonenobfixecfipcoshastrasys, pcbArgPopup~>wgInitiator);
`
`Page 8 of 9
`
`Facebook's Exhibit No. 1002
`
`Page2023
`
`

`
`sesMgrMainCB,c
`
`7I5f11 2:57 PM
`
`1*
`* Function --
`*/
`
`_
`void
`outputTextTowidget(s, wg. pCurrentPosn}
`char
`*5;
`Widget
`wg;
`XmTextPosition *pCurrentPosn;
`
`XmTextB1ock
`XmTextPosition
`
`textfllockg
`currentPosn;
`
`if (pCurrentPo5n == 9} {
`currentPosn = XmTextGetInsertionPositian(wg);
`pCurrentPosn = &currentPosn;
`} else {
`XmTextSetInsertionPosition(wg, #pCurrentPosn):
`
`}
`'XmTextRep1ace(wg, *pCurrentPosn, *pCurrentPosn, 5};
`$pCurrentPosn += 5tr1en(s):
`
`I
`#ifdef WANTTHIS
`in buffer */
`/*~Save output
`if {strIen(saveBuffer) + str1en(s) + 1 <= MAXLEN)
`strcat(savefiuffer, s):
`} else {
`}
`printf("Save-buffer overf1ow.\n");
`fendif
`7* WANTTHIS */
`
`{
`
`Page 9 of 9
`
`Facebook's Exhibit No. 1002
`
`Page2024
`
`

`
`con1oL:rIO.c
`
`715m 2:58 PM
`
`I*********************$*#******#**********x**************m***m*************
`*$#/
`/*$***$*$*****x*$**$**$**$****$*$**s********x*****$*********s******m$*e****
`***/
`
`/**
`
`a-.=a=/_
`/** This SHASTRA software is not
`**/
`/** a person to person basis, solely for educational use and permission is
`**/
`M
`l** NOT granted for its transfer to anyane or for its use in any commercial
`**/
`
`in the Public Domain. It is distributed on
`
`/** product. There is NO warranty on-the available software and neither
`**/
`_
`f** Purdue University nor the Applied Algebra and Geometry group directed
`=ic>!</
`V
`
`/$* by C. Bajaj accept responsibility for the consequences of its use.
`*#I
`r
`
`I**
`
`**X
`1**************$**********************************************$************
`***;
`/*****************************s******#*********************$*******$*******
`=k*=k/
`#include <stdio.h>
`
`#include <shastra/draw/drawdata.h>
`#inc1ude <shastra/drawfpict.h>
`#inc1ude cshastra/network/mplex.h>
`#inc1ude <shastra/network!server.h>
`#inc1ude <shastra/solid/imagelo.h>
`
`void
`
`int));
`
`generateContoursFromPict(Prot5{pictData *,
`
`int,
`
`int,
`
`int,
`
`*
`mLineData
`readLineImageF0(fd}
`int
`fd;
`I
`I.
`n
`lnt
`1, 3:
`
`{
`
`mLineData
`Iinenata
`char *sbIn;
`
`*mLine;
`*1ine;
`
`mLine = (mLineData *) ma11oc(si2eof(mLineData});
`
`sbln = cmReceiveString(fd):
`sscanfisbln,
`"%d“, &mLine~>nLines);
`free(sbIn):
`
`mLine—>1ine5 = (linevata *) ma11oc(sizeof(lineData} *
`mLine»>nLines}:
`
`Page 1 of 4
`
`Facebool-Cs Exhibit No. 1002
`
`Page2025
`
`

`
`comourIO.c
`
`735:1: 2:53 PM
`
`i++)
`
`for {i = 0; i < mLine->nLines:
`Line 2 &mLine—>Iines[i]:
`shin = cmReceiveString(fd):
`sscanf{sbIn, ”%d", &1ine—>number);
`_
`_
`_
`free(sbIn);
`line->array = (double (*){33) ma11oc(sizeof(doub1e) *
`3 * 1ine—>number):
`
`{
`
`j++) {
`j < 1ine—>number;
`for (j n 3;
`sbIn = cmReceiveString(fd);
`sscanf(sbIn, "%1f%lf%1f",
`&1ine->array[j}[@3,
`&line—>array[j}I1],
`&1ine~>array[j]{2]);
`free(sbIn);
`
`}
`
`}
`return mLine;
`}
`mLineData
`$
`readLineImage(inStream)
`FILE
`*inStream;
`
`{
`
`int
`
`mLineData
`linenata
`
`.1,
`
`j;
`
`*mLine;
`mline;
`
`mLine ='(mLineData *) ma11oc(sizeof(mLineData));
`f5canf(inStream, "%d", &mLine—>nLines):
`mLine~>1ines = (1ineData *) ma1loc(sizeof(1ineData) *
`mLine—>nLines);
`for {i = 6: i < mLine~>nLines;
`i++} {
`line = &mLine—>1inesIi};
`fscanf(inStream, "%d", &1ine~>number}:
`1ine">aFFaY = (double (*){3]} ma11oc(si2eof(doub1e} *
`3 * 1ine~>number):
`
`j++) {
`j < 1ine~>numher:
`for (j = 6;
`fscanftinstream, “%1f%1f%1f",
`&1ine—>array[j]I@],
`&1ine~>array[j]{1],
`&1ine—>array{j][2]):
`
`}
`
`} r
`
`eturn mtine;
`
`} v
`
`oid
`writeLineImageFD(fd, mtine)
`int '
`fd;
`mLineData
`*mLine;
`
`Page 2 of 4
`
`Facebook's Exhibit No. ‘E002
`
`Page2026
`
`

`
`c'ontourI0'.c
`
`715:1: 2:58 PM
`
`i, j;
`int
`mline;
`_
`linefiata
`char sbOutI256];
`
`sprintf(5bOut, "%d\n“, mLine~>nLines);
`cmSendString{fd,5b0ut}:
`for (i = 0; i < mLine~>nLines;
`line = &mLine—>1ines{iI;
`5printf(sb0ut, "%d\n", 1ine~>number};
`cmSendString(fd,sb0ut);
`
`i++)
`
`{
`
`Page 3 of 4-
`
`Facebook's Exhibit No. 1002
`
`Page2027
`
`j++) {
`j < 1ine~>number;
`for (j = 6;
`sprintf(sb0ut,
`"%1f %1f %1f\n“,
`1ine~>arrayIj][a1,
`1ine—>array{j]E1I.
`1ine«>array{j]E2]);
`cmSendString(fd,sb0ut};
`
`}
`
`}
`
`}v
`
`oid
`
`writeLineImage(outstream, mLine)
`FILE
`*outStream:
`mLineData
`*mLine:
`
`{
`
`int
`Iineoata
`
`.
`
`i, j:
`*1ine;
`
`fprintftoutstream, "%d\n", mLihe—>hLines}:
`for {i = 9:
`i < mLine—>nLines:
`i++) {
`.
`line = &mLine—>1ines{i]i
`fprintffoutstream, "%d\n”, 1ine~>numberJ;
`
`j++) {
`j < 1ine—>number;
`for (j = 9;
`fprintftoutstream, "%If %If %1f\n“,
`1ine—>array[j][B};
`1ine»>array[j][1},
`1ine~>array{j][2}):
`
`}
`
`}
`
`} v
`
`oid
`
`freeLineImage{mLine}
`mLineData
`*mLine;
`
`{.
`
`int
`lineoata
`
`j;
`i.
`*line;
`
`for (i = 0; i < mLine~>nLines;
`line = &mLine—>1ines[i];
`free(1ine—>array):
`
`i++3 {
`
`

`
`comouraos
`
`7/5111 2:58 PM
`
`free{mLine~>1ines);
`free(mLine);

This document is available on Docket Alarm but you must sign up to view it.


Or .

Accessing this document will incur an additional charge of $.

After purchase, you can access this document again without charge.

Accept $ Charge
throbber

Still Working On It

This document is taking longer than usual to download. This can happen if we need to contact the court directly to obtain the document and their servers are running slowly.

Give it another minute or two to complete, and then try the refresh button.

throbber

A few More Minutes ... Still Working

It can take up to 5 minutes for us to download a document if the court servers are running slowly.

Thank you for your continued patience.

This document could not be displayed.

We could not find this document within its docket. Please go back to the docket page and check the link. If that does not work, go back to the docket and refresh it to pull the newest information.

Your account does not support viewing this document.

You need a Paid Account to view this document. Click here to change your account type.

Your account does not support viewing this document.

Set your membership status to view this document.

With a Docket Alarm membership, you'll get a whole lot more, including:

  • Up-to-date information for this case.
  • Email alerts whenever there is an update.
  • Full text search for other cases.
  • Get email alerts whenever a new case matches your search.

Become a Member

One Moment Please

The filing “” is large (MB) and is being downloaded.

Please refresh this page in a few minutes to see if the filing has been downloaded. The filing will also be emailed to you when the download completes.

Your document is on its way!

If you do not receive the document in five minutes, contact support at support@docketalarm.com.

Sealed Document

We are unable to display this document, it may be under a court ordered seal.

If you have proper credentials to access the file, you may proceed directly to the court's system using your government issued username and password.


Access Government Site

We are redirecting you
to a mobile optimized page.





Document Unreadable or Corrupt

Refresh this Document
Go to the Docket

We are unable to display this document.

Refresh this Document
Go to the Docket