Changeset 1764

Show
Ignore:
Timestamp:
08/25/08 15:20:21 (3 months ago)
Author:
xkovah
Message:

code as of last friday

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • capture-mod/trunk/Analyzer.cpp

    r1586 r1764  
    305305                    wstring* object, vector<wstring>* extra) 
    306306{ 
    307     /* FIXME: for now HC doesn't care about attributes...fix these if and when we use the C code  
    308         for sending stuff to the server. 
    309     */ 
    310     Attribute att; 
     307 
     308    Attribute att; 
    311309    queue<Attribute> vAttributes; 
    312310    att.name = L"time"; 
  • capture-mod/trunk/CaptureSoapServer.cpp

    r1763 r1764  
    44*/ 
    55 
    6  
    76#include "CaptureSoapServer.h" 
    8  
    97#include "soapH.h"  
    108#include "capture.nsmap"  
    119#include "Visitor.h" 
    12 #include "b64.h" 
    13 //#include <winbase.h> //Shouldn't need to include this 
     10#include "b64.h" //nice small 3rd party lib for base64 encode/decode 
    1411 
    1512CaptureSoapServer::CaptureSoapServer(Visitor* v){ 
     
    2724   struct soap soap; 
    2825   SOCKET m, s; // master and slave sockets 
    29  
    3026 
    3127   soap_init(&soap); 
     
    5551   } 
    5652   soap_done(&soap); // close master socket and detach environment 
    57  
    5853} 
    5954 
     
    6661} 
    6762 
    68 int ns__visit(struct soap *soap, char * url, char ** result){ 
     63int ns__visitURL(struct soap *soap, char * url, char ** result){ 
    6964    wchar_t xURL[1024]; 
    7065    wsprintf(xURL, L"%hs", url); 
     
    105100                                    NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); 
    106101    if(myHandle == INVALID_HANDLE_VALUE){ 
    107         printf("couldn't open the file. Exiting\n"); 
     102        printf("CreateFile failed with %d\n", GetLastError()); 
    108103        return SOAP_ERR; 
    109104    } 
     
    185180} 
    186181 
    187 //After we have sent a document into the VM, open it 
     182//After we have sent a document into the VM, we need a way to open it. 
    188183//We want to do this in a generic way, so rather than calling specific applications with the 
    189184//document as the parameter, we instead exploit the fact that as long as default handlers are  
     
    191186//Thus we run cmd.exe with the /K option and the document name as a parameter. 
    192187//From cmd.exe help: "/K      Carries out the command specified by string but remains" 
    193 int ns__openDocument(struct soap *soap, char * fileName, int &result){ 
     188 
     189//fileName = absolute or relative file name you want to open 
     190//waitTimeMillisec = milliseconds to Sleep() for. Should be unsigned int but SOAP::Lite doesn't 
     191// have an 'unsigned int' type by default, and I didn't want to make one. Make sure you cast it to DWORD. 
     192int ns__openDocument(struct soap *soap, char * fileName, int waitTimeMillisec, int &result){ 
    194193    int debug = 1; 
    195     if(debug) printf("in ns__openDocument\n"); 
     194    if(debug) printf("in ns__openDocument, waitTimeMillisec = %d\n", waitTimeMillisec); 
    196195 
    197196    //Create the string for the parameters 
     
    200199 
    201200    //Create a job object to bind the processes I launch to 
     201    //This lets us get around the problem of Windows not having good ways of determining 
     202    //parent/child relationships, so that we don't have to care, and can for all intents 
     203    //and purposes, terminate the entire process tree starting with the cmd.exe we're launching 
    202204    HANDLE myJobObj = CreateJobObject(NULL, NULL); 
    203205    if(myJobObj == NULL){ 
     
    224226 
    225227    if(debug) printf("dwProcessId = %d, dwThreadId = %d\n", procInfo.dwProcessId, procInfo.dwThreadId); 
    226     if(debug) printf("Sleeping for 15 seconds\n"); 
    227     Sleep(15000); 
     228    if(debug) printf("Sleeping for %d seconds\n", (DWORD)waitTimeMillisec/1000); 
     229    Sleep((DWORD)waitTimeMillisec); 
    228230    if(debug) printf("\n\nDone sleeping\n\n"); 
    229231     
    230     //Nt/ZwQuerySystemInformation? 
    231  
    232     /* 
    233     b = TerminateProcess(procInfo.hProcess, 0); 
    234     if(!b){ 
    235         printf("TerminateProcess failed with error %d\n", GetLastError()); 
    236         return SOAP_ERR; 
    237     } 
    238     */ 
     232    //TODO: Before we terminate the jobs, see if it created any events. If so, leave it run, and tell the 
     233    //HC Manager about it. The Manager should then request the information about events separately. 
     234 
    239235    b = TerminateJobObject(myJobObj, 0); 
    240236    if(!b){ 
     
    242238        return SOAP_ERR; 
    243239    } 
     240    //Just incase. I don't know if this is still needed 
    244241    CloseHandle(procInfo.hProcess); 
    245242    CloseHandle(procInfo.hThread); 
    246243 
    247244    result = 1; 
     245    return SOAP_OK; 
     246} 
     247 
     248//If maxEventsReturned == -1, then then send as many as possible. 
     249int ns__receiveEventsBase64(struct soap *soap, int maxEventsReturned, ns__receiveEventsStruct &result){ 
     250 
     251 
    248252    return SOAP_OK; 
    249253} 
  • capture-mod/trunk/CaptureSoapServer.h

    r1763 r1764  
    44 
    55#pragma once 
    6 #include "CaptureGlobal.h" 
    7 #include "Thread.h" 
    8 #include <string> 
    9 #include <queue> 
    10 #include <list> 
    11 #include <iostream> 
    12 #include <fstream> 
    13 #include <vector> 
    14 #include <hash_map> 
    15 #include <boost/signal.hpp> 
    16 #include <boost/bind.hpp> 
    17 #include <boost/regex.hpp> 
    18 #include <boost/algorithm/string/classification.hpp> 
    19 #include <boost/algorithm/string/find_iterator.hpp> 
    20 #include <boost/algorithm/string/finder.hpp>  
    21 #include <boost/lexical_cast.hpp> 
    22 #include <boost/tokenizer.hpp> 
    23 #include "Url.h" 
    24 #include "ApplicationPlugin.h" 
     6#include "CaptureGlobal.h" //This needs to be first, due to a macro it defines 
    257#include "Visitor.h" 
    268 
     
    2810using namespace boost; 
    2911 
    30 typedef split_iterator<string::iterator> sf_it; 
    31  
    32  
    3312class CaptureSoapServer : public Runnable 
    3413{ 
    3514public: 
    3615    typedef boost::signal<void (DWORD, DWORD, wstring, wstring)> signal_visitEvent; 
    37 /// typedef pair <HMODULE, std::list<ApplicationPlugin*>*> PluginPair; 
    38 /// typedef pair <wstring, ApplicationPlugin*> ApplicationPair; 
    39 /// typedef pair <ApplicationPlugin*, Url*> VisitPair; 
    40 public: 
     16 
    4117    CaptureSoapServer(Visitor *); 
    4218    ~CaptureSoapServer(); 
    4319 
    4420    void run(); 
    45  
    46     //Stolen from Visitor 
    47     ///void loadClientPlugins(); 
    48     ///ApplicationPlugin* createApplicationPluginObject(HMODULE hPlugin); 
    49     ///void onServerEvent(Element* pElement); 
    50  
    51  
    5221    Thread * CaptureSoapServerThread; 
    53  
    54     /* 
    55     signal_visitEvent signalVisitEvent; 
    56     stdext::hash_map<HMODULE, std::list<ApplicationPlugin*>*> applicationPlugins; 
    57     boost::signals::connection onServerVisitEventConnection; 
    58     stdext::hash_map<wstring, ApplicationPlugin*> applicationMap; 
    59     */ 
    60  
    6122    static Visitor * myVisitor; 
    6223 
  • capture-mod/trunk/capture.wsdl

    r1762 r1764  
    2626  attributeFormDefault="unqualified"> 
    2727  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> 
     28  <complexType name="fileEvent-t"> 
     29   <complexContent> 
     30    <restriction base="ns:fe"> 
     31    </restriction> 
     32   </complexContent> 
     33  </complexType> 
     34  <complexType name="regEvent-t"> 
     35   <complexContent> 
     36    <restriction base="ns:re"> 
     37    </restriction> 
     38   </complexContent> 
     39  </complexType> 
     40  <complexType name="procEvent-t"> 
     41   <complexContent> 
     42    <restriction base="ns:pe"> 
     43    </restriction> 
     44   </complexContent> 
     45  </complexType> 
    2846  <complexType name="receiveFileStruct"> 
    2947   <complexContent> 
    30     <restriction base="ns:rcvS"> 
    31     </restriction> 
    32    </complexContent> 
    33   </complexType> 
    34   <complexType name="rcvS"> 
     48    <restriction base="ns:s1"> 
     49    </restriction> 
     50   </complexContent> 
     51  </complexType> 
     52  <complexType name="receiveEventsStruct"> 
     53   <complexContent> 
     54    <restriction base="ns:s2"> 
     55    </restriction> 
     56   </complexContent> 
     57  </complexType> 
     58  <complexType name="fe"> 
     59   <sequence> 
     60     <element name="time" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     61     <element name="eventType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     62     <element name="procPID" type="xsd:int" minOccurs="1" maxOccurs="1"/> 
     63     <element name="procName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     64     <element name="fileName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     65   </sequence> 
     66  </complexType> 
     67  <complexType name="re"> 
     68   <sequence> 
     69     <element name="time" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     70     <element name="eventType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     71     <element name="procPID" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     72     <element name="procName" type="xsd:int" minOccurs="1" maxOccurs="1"/> 
     73     <element name="keyName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     74     <element name="valueName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     75     <element name="valueType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     76   </sequence> 
     77  </complexType> 
     78  <complexType name="pe"> 
     79   <sequence> 
     80     <element name="time" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     81     <element name="eventType" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     82     <element name="parentPID" type="xsd:int" minOccurs="1" maxOccurs="1"/> 
     83     <element name="parentName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     84     <element name="procPID" type="xsd:int" minOccurs="1" maxOccurs="1"/> 
     85     <element name="procName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     86   </sequence> 
     87  </complexType> 
     88  <complexType name="s1"> 
    3589   <sequence> 
    3690     <element name="data" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     
    3993   </sequence> 
    4094  </complexType> 
     95  <complexType name="s2"> 
     96   <sequence> 
     97     <element name="data" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     98     <element name="interEventDelimiter" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     99     <element name="intraEventDelimiter" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 
     100     <element name="numEvents" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/> 
     101     <element name="moreEvents" type="xsd:byte" minOccurs="1" maxOccurs="1"/> 
     102   </sequence> 
     103  </complexType> 
    41104 </schema> 
    42105 
    43106</types> 
     107 
     108<message name="pingRequest"> 
     109 <part name="a" type="xsd:string"/> 
     110</message> 
     111 
     112<message name="pingResponse"> 
     113 <part name="result" type="xsd:string"/> 
     114</message> 
     115 
     116<message name="visitURLRequest"> 
     117 <part name="a" type="xsd:string"/> 
     118</message> 
     119 
     120<message name="visitURLResponse"> 
     121 <part name="result" type="xsd:string"/> 
     122</message> 
    44123 
    45124<message name="sendFileBase64Request"> 
     
    58137</message> 
    59138 
    60 <message name="rcvS"> 
     139<message name="s1"> 
    61140 <part name="data" type="xsd:string"/> 
    62141 <part name="encodedLength" type="xsd:unsignedInt"/> 
     
    74153<message name="openDocumentRequest"> 
    75154 <part name="fileName" type="xsd:string"/> 
     155 <part name="waitTimeMillisec" type="xsd:int"/> 
    76156</message> 
    77157 
     
    80160</message> 
    81161 
    82 <message name="pingRequest"> 
    83  <part name="a" type="xsd:string"/> 
    84 </message> 
    85  
    86 <message name="pingResponse"> 
    87  <part name="result" type="xsd:string"/> 
    88 </message> 
    89  
    90 <message name="visitRequest"> 
    91  <part name="a" type="xsd:string"/> 
    92 </message> 
    93  
    94 <message name="visitResponse"> 
    95  <part name="result" type="xsd:string"/> 
    96 </message> 
    97  
    98162<portType name="capturePortType"> 
     163 <operation name="ping"> 
     164  <documentation>Service definition of function ns__ping</documentation> 
     165  <input message="tns:pingRequest"/> 
     166  <output message="tns:pingResponse"/> 
     167 </operation> 
     168 <operation name="visitURL"> 
     169  <documentation>Service definition of function ns__visitURL</documentation> 
     170  <input message="tns:visitURLRequest"/> 
     171  <output message="tns:visitURLResponse"/> 
     172 </operation> 
    99173 <operation name="sendFileBase64"> 
    100174  <documentation>Service definition of function ns__sendFileBase64</documentation> 
     
    105179  <documentation>Service definition of function ns__receiveFileBase64</documentation> 
    106180  <input message="tns:receiveFileBase64"/> 
    107   <output message="tns:rcvS"/> 
     181  <output message="tns:s1"/> 
    108182 </operation> 
    109183 <operation name="sendMIME"> 
     
    117191  <output message="tns:openDocumentResponse"/> 
    118192 </operation> 
    119  <operation name="ping"> 
    120   <documentation>Service definition of function ns__ping</documentation> 
    121   <input message="tns:pingRequest"/> 
    122   <output message="tns:pingResponse"/> 
    123  </operation> 
    124  <operation name="visit"> 
    125   <documentation>Service definition of function ns__visit</documentation> 
    126   <input message="tns:visitRequest"/> 
    127   <output message="tns:visitResponse"/> 
    128  </operation> 
    129193</portType> 
    130194 
    131195<binding name="capture" type="tns:capturePortType"> 
    132196 <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> 
     197 <operation name="ping"> 
     198  <SOAP:operation style="rpc" soapAction=""/> 
     199  <input> 
     200     <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
     201  </input> 
     202  <output> 
     203     <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
     204  </output> 
     205 </operation> 
     206 <operation name="visitURL"> 
     207  <SOAP:operation style="rpc" soapAction=""/> 
     208  <input> 
     209     <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
     210  </input> 
     211  <output> 
     212     <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
     213  </output> 
     214 </operation> 
    133215 <operation name="sendFileBase64"> 
    134216  <SOAP:operation style="rpc" soapAction=""/> 
     
    159241 </operation> 
    160242 <operation name="openDocument"> 
    161   <SOAP:operation style="rpc" soapAction=""/> 
    162   <input> 
    163      <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
    164   </input> 
    165   <output> 
    166      <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
    167   </output> 
    168  </operation> 
    169  <operation name="ping"> 
    170   <SOAP:operation style="rpc" soapAction=""/> 
    171   <input> 
    172      <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
    173   </input> 
    174   <output> 
    175      <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
    176   </output> 
    177  </operation> 
    178  <operation name="visit"> 
    179243  <SOAP:operation style="rpc" soapAction=""/> 
    180244  <input> 
  • capture-mod/trunk/captureGSOAP.h

    r1762 r1764  
    22**Created by Xeno Kovah of the MITRE HoneyClient Project 5/20/2008 
    33*/ 
     4 
     5//NOTE: these comments are used by soapcpp2.exe. Changing them changes the auto-generated code 
    46//gsoap ns service name: capture 
    57//gsoap ns service style: rpc 
     
    810//gsoap ns service namespace: capture 
    911 
     12//structures for events 
     13//Names of fields used in structs are what will show up in XML 
    1014 
    11 typedef struct rcvS{ 
    12     char * data;  
     15//Just using similar to previous perl names 
     16typedef struct fe{ 
     17    char *  time; 
     18    char *  eventType; 
     19    int     procPID; 
     20    char *  procName; 
     21    char *  fileName; 
     22}ns__fileEvent_t; 
     23 
     24typedef struct re{ 
     25    char *  time; 
     26    char *  eventType; 
     27    char *  procPID; 
     28    int     procName; 
     29    char *  keyName; 
     30    char *  valueName; 
     31    char *  valueType; 
     32}ns__regEvent_t; 
     33 
     34typedef struct pe{ 
     35    char *  time; 
     36    char *  eventType; 
     37    int     parentPID; 
     38    char *  parentName; 
     39    int     procPID; 
     40    char *  procName; 
     41}ns__procEvent_t; 
     42 
     43 
     44typedef struct s1{ 
     45    char * data; 
    1346    unsigned int encodedLength; 
    1447    unsigned int decodedLength; 
    1548} ns__receiveFileStruct; 
    1649 
     50typedef struct s2{ 
     51    char * data; 
     52    char * interEventDelimiter; //potentially multi-byte delimeter used to concatenate events 
     53    char * intraEventDelimiter; //potentially multi-byte delimeter used to concatenate fields of events 
     54    unsigned int numEvents; //For sanity checking 
     55    char moreEvents;    //1 if there is more data which can be sent to the Manager after this, 0 otherwise 
     56                        //It is the Manager's responsibility to request the additional data. 
     57} ns__receiveEventsStruct; 
     58 
     59int ns__ping(char * a, char ** result); 
     60int ns__visitURL(char * a, char ** result); 
    1761int ns__sendFileBase64(char * fileName, char * data, unsigned int encodedLength, unsigned int decodedLength, int &result); 
    1862int ns__receiveFileBase64(char * fileName, ns__receiveFileStruct &result); 
    1963int ns__sendMIME(int magicNumber, int &result); 
    20 int ns__openDocument(char * fileName, int &result); 
    21 int ns__ping(char * a, char ** result); 
    22 int ns__visit(char * a, char ** result); 
     64int ns__openDocument(char * fileName, int waitTimeMillisec, int &result); 
     65int ns__receiveEventsBase64(struct soap *soap, int maxEventsReturned, ns__receiveEventsStruct &result); 
     66 
  • capture-mod/trunk/client.pl

    r1761 r1764  
    3434 
    3535$fileNameSOAP = SOAP::Data->name(fileName => $ARGV[0]); 
     36$waitFileSOAP = SOAP::Data->name(waitTime => 15); 
    3637$dataSOAP = SOAP::Data->name(data => $encoded); 
    3738$encodedLengthSOAP = SOAP::Data->name(encodedLength => $encodedLength); 
  • capture-mod/trunk/soapC.cpp

    r1762 r1764  
    88#include "soapH.h" 
    99 
    10 SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-21 03:00:07 GMT") 
     10SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-08-22 06:31:12 GMT") 
    1111 
    1212 
     
    162162    case SOAP_TYPE_unsignedInt: 
    163163        return soap_in_unsignedInt(soap, NULL, NULL, "xsd:unsignedInt"); 
    164     case SOAP_TYPE_ns__visit: 
    165         return soap_in_ns__visit(soap, NULL, NULL, "ns:visit"); 
    166     case SOAP_TYPE_ns__visitResponse: 
    167         return soap_in_ns__visitResponse(soap, NULL, NULL, "ns:visitResponse"); 
    168     case SOAP_TYPE_ns__ping: 
    169         return soap_in_ns__ping(soap, NULL, NULL, "ns:ping"); 
    170     case SOAP_TYPE_ns__pingResponse: 
    171         return soap_in_ns__pingResponse(soap, NULL, NULL, "ns:pingResponse"); 
    172164    case SOAP_TYPE_ns__openDocument: 
    173165        return soap_in_ns__openDocument(soap, NULL, NULL, "ns:openDocument"); 
     
    184176    case SOAP_TYPE_ns__sendFileBase64Response: 
    185177        return soap_in_ns__sendFileBase64Response(soap, NULL, NULL, "ns:sendFileBase64Response"); 
     178    case SOAP_TYPE_ns__visitURL: 
     179        return soap_in_ns__visitURL(soap, NULL, NULL, "ns:visitURL"); 
     180    case SOAP_TYPE_ns__visitURLResponse: 
     181        return soap_in_ns__visitURLResponse(soap, NULL, NULL, "ns:visitURLResponse"); 
     182    case SOAP_TYPE_ns__ping: 
     183        return soap_in_ns__ping(soap, NULL, NULL, "ns:ping"); 
     184    case SOAP_TYPE_ns__pingResponse: 
     185        return soap_in_ns__pingResponse(soap, NULL, NULL, "ns:pingResponse"); 
     186    case SOAP_TYPE_ns__receiveEventsStruct: 
     187        return soap_in_ns__receiveEventsStruct(soap, NULL, NULL, "ns:receiveEventsStruct"); 
     188    case SOAP_TYPE_s2: 
     189        return soap_in_s2(soap, NULL, NULL, "s2"); 
    186190    case SOAP_TYPE_ns__receiveFileStruct: 
    187191        return soap_in_ns__receiveFileStruct(soap, NULL, NULL, "ns:receiveFileStruct"); 
    188     case SOAP_TYPE_rcvS: 
    189         return soap_in_rcvS(soap, NULL, NULL, "rcvS"); 
     192    case SOAP_TYPE_s1: 
     193        return soap_in_s1(soap, NULL, NULL, "s1"); 
     194    case SOAP_TYPE_ns__procEvent_t: 
     195        return soap_in_ns__procEvent_t(soap, NULL, NULL, "ns:procEvent-t"); 
     196    case SOAP_TYPE_pe: 
     197        return soap_in_pe(soap, NULL, NULL, "pe"); 
     198    case SOAP_TYPE_ns__regEvent_t: 
     199        return soap_in_ns__regEvent_t(soap, NULL, NULL, "ns:regEvent-t"); 
     200    case SOAP_TYPE_re: 
     201        return soap_in_re(soap, NULL, NULL, "re"); 
     202    case SOAP_TYPE_ns__fileEvent_t: 
     203        return soap_in_ns__fileEvent_t(soap, NULL, NULL, "ns:fileEvent-t"); 
     204    case SOAP_TYPE_fe: 
     205        return soap_in_fe(soap, NULL, NULL, "fe"); 
    190206    case SOAP_TYPE_PointerTostring: 
    191207        return soap_in_PointerTostring(soap, NULL, NULL, "xsd:string"); 
     
    211227            return soap_in_unsignedInt(soap, NULL, NULL, NULL); 
    212228        } 
    213         if (!soap_match_tag(soap, t, "ns:visit")) 
    214         {   *type = SOAP_TYPE_ns__visit; 
    215             return soap_in_ns__visit(soap, NULL, NULL, NULL); 
    216         } 
    217         if (!soap_match_tag(soap, t, "ns:visitResponse")) 
    218         {   *type = SOAP_TYPE_ns__visitResponse; 
    219             return soap_in_ns__visitResponse(soap, NULL, NULL, NULL); 
     229        if (!soap_match_tag(soap, t, "ns:openDocument")) 
     230        {   *type = SOAP_TYPE_ns__openDocument; 
     231            return soap_in_ns__openDocument(soap, NULL, NULL, NULL); 
     232        } 
     233        if (!soap_match_tag(soap, t, "ns:openDocumentResponse")) 
     234        {   *type = SOAP_TYPE_ns__openDocumentResponse; 
     235            return soap_in_ns__openDocumentResponse(soap, NULL, NULL, NULL); 
     236        } 
     237        if (!soap_match_tag(soap, t, "ns:sendMIME")) 
     238        {   *type = SOAP_TYPE_ns__sendMIME; 
     239            return soap_in_ns__sendMIME(soap, NULL, NULL, NULL); 
     240        } 
     241        if (!soap_match_tag(soap, t, "ns:sendMIMEResponse")) 
     242        {   *type = SOAP_TYPE_ns__sendMIMEResponse; 
     243            return soap_in_ns__sendMIMEResponse(soap, NULL, NULL, NULL); 
     244        } 
     245        if (!soap_match_tag(soap, t, "ns:receiveFileBase64")) 
     246        {   *type = SOAP_TYPE_ns__receiveFileBase64; 
     247            return soap_in_ns__receiveFileBase64(soap, NULL, NULL, NULL); 
     248        } 
     249        if (!soap_match_tag(soap, t, "ns:sendFileBase64")) 
     250        {   *type = SOAP_TYPE_ns__sendFileBase64; 
     251            return soap_in_ns__sendFileBase64(soap, NULL, NULL, NULL); 
     252        } 
     253        if (!soap_match_tag(soap, t, "ns:sendFileBase64Response")) 
     254        {   *type = SOAP_TYPE_ns__sendFileBase64Response; 
     255            return soap_in_ns__sendFileBase64Response(soap, NULL, NULL, NULL); 
     256        } 
     257        if (!soap_match_tag(soap, t, "ns:visitURL")) 
     258        {   *type = SOAP_TYPE_ns__visitURL; 
     259            return soap_in_ns__visitURL(soap, NULL, NULL, NULL); 
     260        } 
     261        if (!soap_match_tag(soap, t, "ns:visitURLResponse")) 
     262        {   *type = SOAP_TYPE_ns__visitURLResponse; 
     263            return soap_in_ns__visitURLResponse(soap, NULL, NULL, NULL); 
    220264        } 
    221265        if (!soap_match_tag(soap, t, "ns:ping")) 
     
    227271            return soap_in_ns__pingResponse(soap, NULL, NULL, NULL); 
    228272        } 
    229         if (!soap_match_tag(soap, t, "ns:openDocument")) 
    230         {   *type = SOAP_TYPE_ns__openDocument; 
    231             return soap_in_ns__openDocument(soap, NULL, NULL, NULL); 
    232         } 
    233         if (!soap_match_tag(soap, t, "ns:openDocumentResponse")) 
    234         {   *type = SOAP_TYPE_ns__openDocumentResponse; 
    235             return soap_in_ns__openDocumentResponse(soap, NULL, NULL, NULL); 
    236         } 
    237         if (!soap_match_tag(soap, t, "ns:sendMIME")) 
    238         {   *type = SOAP_TYPE_ns__sendMIME; 
    239             return soap_in_ns__sendMIME(soap, NULL, NULL, NULL); 
    240         } 
    241         if (!soap_match_tag(soap, t, "ns:sendMIMEResponse")) 
    242         {   *type = SOAP_TYPE_ns__sendMIMEResponse; 
    243             return soap_in_ns__sendMIMEResponse(soap, NULL, NULL, NULL); 
    244         } 
    245         if (!soap_match_tag(soap, t, "ns:receiveFileBase64")) 
    246         {   *type = SOAP_TYPE_ns__receiveFileBase64; 
    247             return soap_in_ns__receiveFileBase64(soap, NULL, NULL, NULL); 
    248         } 
    249         if (!soap_match_tag(soap, t, "ns:sendFileBase64")) 
    250         {   *type = SOAP_TYPE_ns__sendFileBase64; 
    251             return soap_in_ns__sendFileBase64(soap, NULL, NULL, NULL); 
    252         } 
    253         if (!soap_match_tag(soap, t, "ns:sendFileBase64Response")) 
    254         {   *type = SOAP_TYPE_ns__sendFileBase64Response; 
    255             return soap_in_ns__sendFileBase64Response(soap, NULL, NULL, NULL); 
     273        if (!soap_match_tag(soap, t, "ns:receiveEventsStruct")) 
     274        {   *type = SOAP_TYPE_ns__receiveEventsStruct; 
     275            return soap_in_ns__receiveEventsStruct(soap, NULL, NULL, NULL); 
     276        } 
     277        if (!soap_match_tag(soap, t, "s2")) 
     278        {   *type = SOAP_TYPE_s2; 
     279            return soap_in_s2(soap, NULL, NULL, NULL); 
    256280        } 
    257281        if (!soap_match_tag(soap, t, "ns:receiveFileStruct")) 
     
    259283            return soap_in_ns__receiveFileStruct(soap, NULL, NULL, NULL); 
    260284        } 
    261         if (!soap_match_tag(soap, t, "rcvS")) 
    262         {   *type = SOAP_TYPE_rcvS; 
    263             return soap_in_rcvS(soap, NULL, NULL, NULL); 
     285        if (!soap_match_tag(soap, t, "s1")) 
     286        {   *type = SOAP_TYPE_s1; 
     287            return soap_in_s1(soap, NULL, NULL, NULL); 
     288        } 
     289        if (!soap_match_tag(soap, t, "ns:procEvent-t")) 
     290        {   *type = SOAP_TYPE_ns__procEvent_t; 
     291            return soap_in_ns__procEvent_t(soap, NULL, NULL, NULL); 
     292        } 
     293        if (!soap_match_tag(soap, t, "pe")) 
     294        {   *type = SOAP_TYPE_pe; 
     295            return soap_in_pe(soap, NULL, NULL, NULL); 
     296        } 
     297        if (!soap_match_tag(soap, t, "ns:regEvent-t")) 
     298        {   *type = SOAP_TYPE_ns__regEvent_t; 
     299            return soap_in_ns__regEvent_t(soap, NULL, NULL, NULL); 
     300        } 
     301        if (!soap_match_tag(soap, t, "re")) 
     302        {   *type = SOAP_TYPE_re; 
     303            return soap_in_re(soap, NULL, NULL, NULL); 
     304        } 
     305        if (!soap_match_tag(soap, t, "ns:fileEvent-t")) 
     306        {   *type = SOAP_TYPE_ns__fileEvent_t; 
     307            return soap_in_ns__fileEvent_t(soap, NULL, NULL, NULL); 
     308        } 
     309        if (!soap_match_tag(soap, t, "fe")) 
     310        {   *type = SOAP_TYPE_fe; 
     311            return soap_in_fe(soap, NULL, NULL, NULL); 
    264312        } 
    265313        if (!soap_match_tag(soap, t, "xsd:string")) 
     
    347395    case SOAP_TYPE_unsignedInt: 
    348396        return soap_out_unsignedInt(soap, tag, id, (const unsigned int *)ptr, "xsd:unsignedInt"); 
    349     case SOAP_TYPE_ns__visit: 
    350         return soap_out_ns__visit(soap, tag, id, (const struct ns__visit *)ptr, "ns:visit"); 
    351     case SOAP_TYPE_ns__visitResponse: 
    352         return soap_out_ns__visitResponse(soap, tag, id, (const struct ns__visitResponse *)ptr, "ns:visitResponse"); 
    353     case SOAP_TYPE_ns__ping: 
    354         return soap_out_ns__ping(soap, tag, id, (const struct ns__ping *)ptr, "ns:ping"); 
    355     case SOAP_TYPE_ns__pingResponse: 
    356         return soap_out_ns__pingResponse(soap, tag, id, (const struct ns__pingResponse *)ptr, "ns:pingResponse"); 
    357397    case SOAP_TYPE_ns__openDocument: 
    358398        return soap_out_ns__openDocument(soap, tag, id, (const struct ns__openDocument *)ptr, "ns:openDocument"); 
     
    369409    case SOAP_TYPE_ns__sendFileBase64Response: 
    370410        return soap_out_ns__sendFileBase64Response(soap, tag, id, (const struct ns__sendFileBase64Response *)ptr, "ns:sendFileBase64Response"); 
     411    case SOAP_TYPE_ns__visitURL: 
     412        return soap_out_ns__visitURL(soap, tag, id, (const struct ns__visitURL *)ptr, "ns:visitURL"); 
     413    case SOAP_TYPE_ns__visitURLResponse: 
     414        return soap_out_ns__visitURLResponse(soap, tag, id, (const struct ns__visitURLResponse *)ptr, "ns:visitURLResponse"); 
     415    case SOAP_TYPE_ns__ping: 
     416        return soap_out_ns__ping(soap, tag, id, (const struct ns__ping *)ptr, "ns:ping"); 
     417    case SOAP_TYPE_ns__pingResponse: 
     418        return soap_out_ns__pingResponse(soap, tag, id, (const struct ns__pingResponse *)ptr, "ns:pingResponse"); 
     419    case SOAP_TYPE_ns__receiveEventsStruct: 
     420        return soap_out_ns__receiveEventsStruct(soap, tag, id, (const struct s2 *)ptr, "ns:receiveEventsStruct"); 
     421    case SOAP_TYPE_s2: 
     422        return soap_out_s2(soap, tag, id, (const struct s2 *)ptr, "s2"); 
    371423    case SOAP_TYPE_ns__receiveFileStruct: 
    372         return soap_out_ns__receiveFileStruct(soap, tag, id, (const struct rcvS *)ptr, "ns:receiveFileStruct"); 
    373     case SOAP_TYPE_rcvS: 
    374         return soap_out_rcvS(soap, tag, id, (const struct rcvS *)ptr, "rcvS"); 
     424        return soap_out_ns__receiveFileStruct(soap, tag, id, (const struct s1 *)ptr, "ns:receiveFileStruct"); 
     425    case SOAP_TYPE_s1: 
     426        return soap_out_s1(soap, tag, id, (const struct s1 *)ptr, "s1"); 
     427    case SOAP_TYPE_ns__procEvent_t: 
     428        return soap_out_ns__procEvent_t(soap, tag, id, (const struct pe *)ptr, "ns:procEvent-t"); 
     429    case SOAP_TYPE_pe: 
     430        return soap_out_pe(soap, tag, id, (const struct pe *)ptr, "pe"); 
     431    case SOAP_TYPE_ns__regEvent_t: 
     432        return soap_out_ns__regEvent_t(soap, tag, id, (const struct re *)ptr, "ns:regEvent-t"); 
     433    case SOAP_TYPE_re: 
     434        return soap_out_re(soap, tag, id, (const struct re *)ptr, "re"); 
     435    case SOAP_TYPE_ns__fileEvent_t: 
     436        return soap_out_ns__fileEvent_t(soap, tag, id, (const struct fe *)ptr, "ns:fileEvent-t"); 
     437    case SOAP_TYPE_fe: 
     438        return soap_out_fe(soap, tag, id, (const struct fe *)ptr, "fe"); 
    375439    case SOAP_TYPE_PointerTostring: 
    376440        return soap_out_PointerTostring(soap, tag, id, (char **const*)ptr, "xsd:string"); 
     
    398462    switch (type) 
    399463    { 
    400     case SOAP_TYPE_ns__visit: 
    401         soap_serialize_ns__visit(soap, (const struct ns__visit *)ptr); 
    402         break; 
    403     case SOAP_TYPE_ns__visitResponse: 
    404         soap_serialize_ns__visitResponse(soap, (const struct ns__visitResponse *)ptr); 
     464    case SOAP_TYPE_ns__openDocument: 
     465        soap_serialize_ns__openDocument(soap, (const struct ns__openDocument *)ptr); 
     466        break; 
     467    case SOAP_TYPE_ns__openDocumentResponse: 
     468        soap_serialize_ns__openDocumentResponse(soap, (const struct ns__openDocumentResponse *)ptr); 
     469        break; 
     470    case SOAP_TYPE_ns__sendMIME: 
     471        soap_serialize_ns__sendMIME(soap, (const struct ns__sendMIME *)ptr); 
     472        break; 
     473    case SOAP_TYPE_ns__sendMIMEResponse: 
     474        soap_serialize_ns__sendMIMEResponse(soap, (const struct ns__sendMIMEResponse *)ptr); 
     475        break; 
     476    case SOAP_TYPE_ns__receiveFileBase64: 
     477        soap_serialize_ns__receiveFileBase64(soap, (const struct ns__receiveFileBase64 *)ptr); 
     478        break; 
     479    case SOAP_TYPE_ns__sendFileBase64: 
     480        soap_serialize_ns__sendFileBase64(soap, (const struct ns__sendFileBase64 *)ptr); 
     481        break; 
     482    case SOAP_TYPE_ns__sendFileBase64Response: 
     483        soap_serialize_ns__sendFileBase64Response(soap, (const struct ns__sendFileBase64Response *)ptr); 
     484        break; 
     485    case SOAP_TYPE_ns__visitURL: 
     486        soap_serialize_ns__visitURL(soap, (const struct ns__visitURL *)ptr); 
     487        break; 
     488    case SOAP_TYPE_ns__visitURLResponse: 
     489        soap_serialize_ns__visitURLResponse(soap, (const struct ns__visitURLResponse *)ptr); 
    405490        break; 
    406491    case SOAP_TYPE_ns__ping: 
     
    410495        soap_serialize_ns__pingResponse(soap, (const struct ns__pingResponse *)ptr); 
    411496        break; 
    412     case SOAP_TYPE_ns__openDocument: 
    413         soap_serialize_ns__openDocument(soap, (const struct ns__openDocument *)ptr); 
    414         break; 
    415     case SOAP_TYPE_ns__openDocumentResponse: 
    416         soap_serialize_ns__openDocumentResponse(soap, (const struct ns__openDocumentResponse *)ptr); 
    417         break; 
    418     case SOAP_TYPE_ns__sendMIME: 
    419         soap_serialize_ns__sendMIME(soap, (const struct ns__sendMIME *)ptr); 
    420         break; 
    421     case SOAP_TYPE_ns__sendMIMEResponse: 
    422         soap_serialize_ns__sendMIMEResponse(soap, (const struct ns__sendMIMEResponse *)ptr); 
    423         break; 
    424     case SOAP_TYPE_ns__receiveFileBase64: 
    425         soap_serialize_ns__receiveFileBase64(soap, (const struct ns__receiveFileBase64 *)ptr); 
    426         break; 
    427     case SOAP_TYPE_ns__sendFileBase64: 
    428         soap_serialize_ns__sendFileBase64(soap, (const struct ns__sendFileBase64 *)ptr); 
    429         break; 
    430     case SOAP_TYPE_ns__sendFileBase64Response: 
    431         soap_serialize_ns__sendFileBase64Response(soap, (const struct ns__sendFileBase64Response *)ptr); 
     497    case SOAP_TYPE_ns__receiveEventsStruct: 
     498        soap_serialize_ns__receiveEventsStruct(soap, (const struct s2 *)ptr); 
     499        break; 
     500    case SOAP_TYPE_s2: 
     501        soap_serialize_s2(soap, (const struct s2 *)ptr); 
    432502        break; 
    433503    case SOAP_TYPE_ns__receiveFileStruct: 
    434         soap_serialize_ns__receiveFileStruct(soap, (const struct rcvS *)ptr); 
    435         break; 
    436     case SOAP_TYPE_rcvS: 
    437         soap_serialize_rcvS(soap, (const struct rcvS *)ptr); 
     504        soap_serialize_ns__receiveFileStruct(soap, (const struct s1 *)ptr); 
     505        break; 
     506    case SOAP_TYPE_s1: 
     507        soap_serialize_s1(soap, (const struct s1 *)ptr); 
     508        break; 
     509    case SOAP_TYPE_ns__procEvent_t: 
     510        soap_serialize_ns__procEvent_t(soap, (const struct pe *)ptr); 
     511        break; 
     512    case SOAP_TYPE_pe: 
     513        soap_serialize_pe(soap, (const struct pe *)ptr); 
     514        break; 
     515    case SOAP_TYPE_ns__regEvent_t: 
     516        soap_serialize_ns__regEvent_t(soap, (const struct re *)ptr); 
     517        break; 
     518    case SOAP_TYPE_re: 
     519        soap_serialize_re(soap, (const struct re *)ptr); 
     520        break; 
     521    case SOAP_TYPE_ns__fileEvent_t: 
     522        soap_serialize_ns__fileEvent_t(soap, (const struct fe *)ptr); 
     523        break; 
     524    case SOAP_TYPE_fe: 
     525        soap_serialize_fe(soap, (const struct fe *)ptr); 
    438526        break; 
    439527    case SOAP_TYPE_PointerTostring: 
     
    458546    switch (t) 
    459547    { 
    460     case SOAP_TYPE_rcvS: 
    461         return (void*)soap_instantiate_rcvS(soap, -1, type, arrayType, n); 
     548    case SOAP_TYPE_fe: 
     549        return (void*)soap_instantiate_fe(soap, -1, type, arrayType, n); 
     550    case SOAP_TYPE_re: 
     551        return (void*)soap_instantiate_re(soap, -1, type, arrayType, n); 
     552    case SOAP_TYPE_pe: 
     553        return (void*)soap_instantiate_pe(soap, -1, type, arrayType, n); 
     554    case SOAP_TYPE_s1: 
     555        return (void*)soap_instantiate_s1(soap, -1, type, arrayType, n); 
     556    case SOAP_TYPE_s2: 
     557        return (void*)soap_instantiate_s2(soap, -1, type, arrayType, n); 
     558    case SOAP_TYPE_ns__pingResponse: 
     559        return (void*)soap_instantiate_ns__pingResponse(soap, -1, type, arrayType, n); 
     560    case SOAP_TYPE_ns__ping: 
     561        return (void*)soap_instantiate_ns__ping(soap, -1, type, arrayType, n); 
     562    case SOAP_TYPE_ns__visitURLResponse: 
     563        return (void*)soap_instantiate_ns__visitURLResponse(soap, -1, type, arrayType, n); 
     564    case SOAP_TYPE_ns__visitURL: 
     565        return (void*)soap_instantiate_ns__visitURL(soap, -1, type, arrayType, n); 
    462566    case SOAP_TYPE_ns__sendFileBase64Response: 
    463567        return (void*)soap_instantiate_ns__sendFileBase64Response(soap, -1, type, arrayType, n); 
     
    474578    case SOAP_TYPE_ns__openDocument: 
    475579        return (void*)soap_instantiate_ns__openDocument(soap, -1, type, arrayType, n); 
    476     case SOAP_TYPE_ns__pingResponse: 
    477         return (void*)soap_instantiate_ns__pingResponse(soap, -1, type, arrayType, n); 
    478     case SOAP_TYPE_ns__ping: 
    479         return (void*)soap_instantiate_ns__ping(soap, -1, type, arrayType, n); 
    480     case SOAP_TYPE_ns__visitResponse: 
    481         return (void*)soap_instantiate_ns__visitResponse(soap, -1, type, arrayType, n); 
    482     case SOAP_TYPE_ns__visit: 
    483         return (void*)soap_instantiate_ns__visit(soap, -1, type, arrayType, n); 
    484580#ifndef WITH_NOGLOBAL 
    485581    case SOAP_TYPE_SOAP_ENV__Header: 
     
    502598        return (void*)soap_instantiate_SOAP_ENV__Fault(soap, -1, type, arrayType, n); 
    503599#endif 
     600    case SOAP_TYPE_ns__fileEvent_t: 
     601        return (void*)soap_instantiate_ns__fileEvent_t(soap, -1, type, arrayType, n); 
     602    case SOAP_TYPE_ns__regEvent_t: 
     603        return (void*)soap_instantiate_ns__regEvent_t(soap, -1, type, arrayType, n); 
     604    case SOAP_TYPE_ns__procEvent_t: 
     605        return (void*)soap_instantiate_ns__procEvent_t(soap, -1, type, arrayType, n); 
    504606    case SOAP_TYPE_ns__receiveFileStruct: 
    505607        return (void*)soap_instantiate_ns__receiveFileStruct(soap, -1, type, arrayType, n); 
     608    case SOAP_TYPE_ns__receiveEventsStruct: 
     609        return (void*)soap_instantiate_ns__receiveEventsStruct(soap, -1, type, arrayType, n); 
    506610    } 
    507611    return NULL; 
     
    511615{   switch (p->type) 
    512616    { 
    513     case SOAP_TYPE_rcvS
     617    case SOAP_TYPE_fe
    514618        if (p->size < 0) 
    515             delete (struct rcvS*)p->ptr; 
     619            delete (struct fe*)p->ptr; 
    516620        else 
    517             delete[] (struct rcvS*)p->ptr; 
     621            delete[] (struct fe*)p->ptr; 
     622        break; 
     623    case SOAP_TYPE_re: 
     624        if (p->size < 0) 
     625            delete (struct re*)p->ptr; 
     626        else 
     627            delete[] (struct re*)p->ptr; 
     628        break; 
     629    case SOAP_TYPE_pe: 
     630        if (p->size < 0) 
     631            delete (struct pe*)p->ptr; 
     632        else 
     633            delete[] (struct pe*)p->ptr; 
     634        break; 
     635    case SOAP_TYPE_s1: 
     636        if (p->size < 0) 
     637            delete (struct s1*)p->ptr; 
     638        else 
     639            delete[] (struct s1*)p->ptr; 
     640        break; 
     641    case SOAP_TYPE_s2: 
     642        if (p->size < 0) 
     643            delete (struct s2*)p->ptr; 
     644        else 
     645            delete[] (struct s2*)p->ptr; 
     646        break; 
     647    case SOAP_TYPE_ns__pingResponse: 
     648        if (p->size < 0) 
     649            delete (struct ns__pingResponse*)p->ptr; 
     650        else 
     651            delete[] (struct ns__pingResponse*)p->ptr; 
     652        break; 
     653    case SOAP_TYPE_ns__ping: 
     654        if (p->size < 0) 
     655            delete (struct ns__ping*)p->ptr; 
     656        else 
     657            delete[] (struct ns__ping*)p->ptr; 
     658        break; 
     659    case SOAP_TYPE_ns__visitURLResponse: 
     660        if (p->size < 0) 
     661            delete (struct ns__visitURLResponse*)p->ptr; 
     662        else 
     663            delete[] (struct ns__visitURLResponse*)p->ptr; 
     664        break; 
     665    case SOAP_TYPE_ns__visitURL: 
     666        if (p->size < 0) 
     667            delete (struct ns__visitURL*)p->ptr; 
     668        else 
     669            delete[] (struct ns__visitURL*)p->ptr; 
    518670        break; 
    519671    case SOAP_TYPE_ns__sendFileBase64Response: 
     
    559711            delete[] (struct ns__openDocument*)p->ptr; 
    560712        break; 
    561     case SOAP_TYPE_ns__pingResponse: 
    562         if (p->size < 0) 
    563             delete (struct ns__pingResponse*)p->ptr; 
    564         else 
    565             delete[] (struct ns__pingResponse*)p->ptr; 
    566         break; 
    567     case SOAP_TYPE_ns__ping: 
    568         if (p->size < 0) 
    569             delete (struct ns__ping*)p->ptr; 
    570         else 
    571             delete[] (struct ns__ping*)p->ptr; 
    572         break; 
    573     case SOAP_TYPE_ns__visitResponse: 
    574         if (p->size < 0) 
    575             delete (struct ns__visitResponse*)p->ptr; 
    576         else 
    577             delete[] (struct ns__visitResponse*)p->ptr; 
    578         break; 
    579     case SOAP_TYPE_ns__visit: 
    580         if (p->size < 0) 
    581             delete (struct ns__visit*)p->ptr; 
    582         else 
    583             delete[] (struct ns__visit*)p->ptr; 
    584         break; 
    585713    case SOAP_TYPE_SOAP_ENV__Header: 
    586714        if (p->size < 0) 
     
    613741            delete[] (struct SOAP_ENV__Fault*)p->ptr; 
    614742        break; 
     743    case SOAP_TYPE_ns__fileEvent_t: 
     744        if (p->size < 0) 
     745