예제 #1
0
 protected TSIP_Event(TSip_Session sipSession, ushort code, String phrase, TSIP_Message sipMessage, tsip_event_type_t type)
 {
     mSipSession = sipSession;
     mCode = code;
     mPhrase = phrase;
     mSipMessage = sipMessage;
     mType = type;
 }
예제 #2
0
 protected TSIP_Event(TSip_Session sipSession, ushort code, String phrase, TSIP_Message sipMessage, tsip_event_type_t type)
 {
     mSipSession = sipSession;
     mCode       = code;
     mPhrase     = phrase;
     mSipMessage = sipMessage;
     mType       = type;
 }
예제 #3
0
 // internal construction used to create server-side session
 protected TSip_Session(TSIP_Stack stack, TSIP_Message message)
     : this(stack)
 {
     if (message != null)
     {
         /* From: */
         if (message.From != null && message.From.Uri != null)
         { /* MUST be not null */
             mUriFrom = message.From.Uri;
         }
         /* To: */
         if (message.To != null && message.To.Uri != null)
         { /* MUST be not null */
             mUriTo = message.To.Uri;
         }
     }
 }
    /* #line 930 "./ragel/tsip_parser_header.rl" */
    public static Boolean Parse(TSK_RagelState state, ref TSIP_Message message)
    {
        int cs = 0;
        int p = state.TagStart;
        int pe = state.TagEnd;
        int eof = pe;
        byte[] data = state.Data;

        /* #line 5426 "../Parsers/TSIP_ParserHeader.cs" */
        {
        cs = tsip_machine_parser_headers_start;
        }

        /* #line 940 "./ragel/tsip_parser_header.rl" */

        /* #line 5433 "../Parsers/TSIP_ParserHeader.cs" */
        {
        sbyte _klen;
        short _trans;
        int _widec;
        byte _acts;
        sbyte _nacts;
        short _keys;

        if ( p == pe )
        goto _test_eof;
        if ( cs == 0 )
        goto _out;
        _resume:
        _widec = data[p];
        _klen = _tsip_machine_parser_headers_cond_lengths[cs];
        _keys = (short) (_tsip_machine_parser_headers_cond_offsets[cs]*2);
        if ( _klen > 0 ) {
        short _lower = _keys;
        short _mid;
        short _upper = (short) (_keys + (_klen<<1) - 2);
        while (true) {
            if ( _upper < _lower )
                break;

            _mid = (short) (_lower + (((_upper-_lower) >> 1) & ~1));
            if ( _widec < _tsip_machine_parser_headers_cond_keys[_mid] )
                _upper = (short) (_mid - 2);
            else if ( _widec > _tsip_machine_parser_headers_cond_keys[_mid+1] )
                _lower = (short) (_mid + 2);
            else {
                switch ( _tsip_machine_parser_headers_cond_spaces[_tsip_machine_parser_headers_cond_offsets[cs] + ((_mid - _keys)>>1)] ) {
        case 0: {
        _widec = (int)(65536u + (data[p] - 0u));
        if (
        /* #line 906 "./ragel/tsip_parser_header.rl" */

        PrevNotComma(state, p)
         ) _widec += 65536;
        break;
        }
        default: break;
                }
                break;
            }
        }
        }

        _keys = _tsip_machine_parser_headers_key_offsets[cs];
        _trans = (short)_tsip_machine_parser_headers_index_offsets[cs];

        _klen = _tsip_machine_parser_headers_single_lengths[cs];
        if ( _klen > 0 ) {
        short _lower = _keys;
        short _mid;
        short _upper = (short) (_keys + _klen - 1);
        while (true) {
            if ( _upper < _lower )
                break;

            _mid = (short) (_lower + ((_upper-_lower) >> 1));
            if ( _widec < _tsip_machine_parser_headers_trans_keys[_mid] )
                _upper = (short) (_mid - 1);
            else if ( _widec > _tsip_machine_parser_headers_trans_keys[_mid] )
                _lower = (short) (_mid + 1);
            else {
                _trans += (short) (_mid - _keys);
                goto _match;
            }
        }
        _keys += (short) _klen;
        _trans += (short) _klen;
        }

        _klen = _tsip_machine_parser_headers_range_lengths[cs];
        if ( _klen > 0 ) {
        short _lower = _keys;
        short _mid;
        short _upper = (short) (_keys + (_klen<<1) - 2);
        while (true) {
            if ( _upper < _lower )
                break;

            _mid = (short) (_lower + (((_upper-_lower) >> 1) & ~1));
            if ( _widec < _tsip_machine_parser_headers_trans_keys[_mid] )
                _upper = (short) (_mid - 2);
            else if ( _widec > _tsip_machine_parser_headers_trans_keys[_mid+1] )
                _lower = (short) (_mid + 2);
            else {
                _trans += (short)((_mid - _keys)>>1);
                goto _match;
            }
        }
        _trans += (short) _klen;
        }

        _match:
        _trans = (short)_tsip_machine_parser_headers_indicies[_trans];
        cs = _tsip_machine_parser_headers_trans_targs[_trans];

        if ( _tsip_machine_parser_headers_trans_actions[_trans] == 0 )
        goto _again;

        _acts = _tsip_machine_parser_headers_trans_actions[_trans];
        _nacts = _tsip_machine_parser_headers_actions[_acts++];
        while ( _nacts-- > 0 )
        {
        switch ( _tsip_machine_parser_headers_actions[_acts++] )
        {
        case 0:
        /* #line 31 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Accept NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 1:
        /* #line 42 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Accept_Contact NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 2:
        /* #line 53 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Accept_Encoding NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 3:
        /* #line 64 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Accept_Language NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 4:
        /* #line 75 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Accept_Resource_Priority NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 5:
        /* #line 86 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Alert_Info NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 6:
        /* #line 97 "./ragel/tsip_parser_header.rl" */
        {
        TSIP_HeaderAllow header = TSIP_HeaderAllow.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 7:
        /* #line 104 "./ragel/tsip_parser_header.rl" */
        {
        TSIP_HeaderAllowEvents header = TSIP_HeaderAllowEvents.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 8:
        /* #line 111 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Authentication_Info NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 9:
        /* #line 119 "./ragel/tsip_parser_header.rl" */
        {
        TSIP_HeaderAuthorization header = TSIP_HeaderAuthorization.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 10:
        /* #line 126 "./ragel/tsip_parser_header.rl" */
        {
        if(message.CallId == null)
        {
            message.CallId = TSIP_HeaderCallId.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        }
        else
        {
            TSK_Debug.Warn("The message already have 'Call-ID' header.");
            TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
            message.AddHeader(header);
        }
        }
        break;
        case 11:
        /* #line 141 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Call_Info NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 12:
        /* #line 152 "./ragel/tsip_parser_header.rl" */
        {
        List<TSIP_HeaderContact> headers = TSIP_HeaderContact.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(headers != null)
        {
            message.AddHeaders(headers.ToArray());
        }
        }
        break;
        case 13:
        /* #line 162 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Content_Disposition NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 14:
        /* #line 173 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Content_Encoding NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 15:
        /* #line 184 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Content_Language NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(header != null)
        {
            message.AddHeader(header);
        }
        }
        break;
        case 16:
        /* #line 195 "./ragel/tsip_parser_header.rl" */
        {
        if(message.ContentLength == null)
        {
            message.ContentLength = TSIP_HeaderContentLength.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        }
        else
        {
            TSK_Debug.Warn("The message already have 'Content-Length' header.");
            TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
            message.AddHeader(header);
        }
        }
        break;
        case 17:
        /* #line 210 "./ragel/tsip_parser_header.rl" */
        {
        if(message.ContentType == null)
        {
            message.ContentType = TSIP_HeaderContentType.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        }
        else
        {
            TSK_Debug.Warn("The message already have 'Content-Length' header.");
            TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
            message.AddHeader(header);
        }
        }
        break;
        case 18:
        /* #line 225 "./ragel/tsip_parser_header.rl" */
        {
        if(message.CSeq == null)
        {
            message.CSeq = TSIP_HeaderCSeq.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        }
        else
        {
            TSK_Debug.Warn("The message already have 'CSeq' header.");
            TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
            message.AddHeader(header);
        }
        }
        break;
        case 19:
        /* #line 240 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Date NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 20:
        /* #line 248 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Error_Info NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 21:
        /* #line 256 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Event NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Event_t *header = tsip_header_Event_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 22:
        /* #line 266 "./ragel/tsip_parser_header.rl" */
        {
        if(message.Expires == null)
        {
            message.Expires = TSIP_HeaderExpires.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        }
        else
        {
            TSK_Debug.Warn("The message already have 'Expires' header.");
            TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
            message.AddHeader(header);
        }
        }
        break;
        case 23:
        /* #line 281 "./ragel/tsip_parser_header.rl" */
        {
        if(message.From == null)
        {
            message.From = TSIP_HeaderFrom.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        }
        else
        {
            TSK_Debug.Warn("The message already have 'From' header.");
            TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
            message.AddHeader(header);
        }
        }
        break;
        case 24:
        /* #line 296 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_History_Info NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 25:
        /* #line 304 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Identity NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 26:
        /* #line 312 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Identity_Info NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 27:
        /* #line 320 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_In_Reply_To NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 28:
        /* #line 328 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Join NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 29:
        /* #line 336 "./ragel/tsip_parser_header.rl" */
        {
        TSIP_HeaderMaxForwards header = TSIP_HeaderMaxForwards.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 30:
        /* #line 343 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_MIME_Version NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 31:
        /* #line 351 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Min_Expires NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Min_Expires_t *header = tsip_header_Min_Expires_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 32:
        /* #line 361 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Min_SE NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Min_SE_t *header = tsip_header_Min_SE_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 33:
        /* #line 371 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Organization NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 34:
        /* #line 379 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Access_Network_Info NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_P_Access_Network_Info_t *header = tsip_header_P_Access_Network_Info_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 35:
        /* #line 389 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Answer_State NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 36:
        /* #line 397 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Asserted_Identity NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_P_Asserted_Identities_L_t* headers =  tsip_header_P_Asserted_Identity_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADERS(headers);
        }
        break;
        case 37:
        /* #line 407 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Associated_URI NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_P_Associated_URIs_L_t* headers =  tsip_header_P_Associated_URI_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADERS(headers);
        }
        break;
        case 38:
        /* #line 417 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Called_Party_ID NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 39:
        /* #line 425 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Charging_Function_Addresses NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_P_Charging_Function_Addressess_L_t* headers =  tsip_header_P_Charging_Function_Addresses_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADERS(headers);
        }
        break;
        case 40:
        /* #line 435 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Charging_Vector NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 41:
        /* #line 443 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_DCS_Billing_Info NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 42:
        /* #line 451 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_DCS_LAES NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 43:
        /* #line 459 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_DCS_OSPS NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 44:
        /* #line 467 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_DCS_Redirect NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 45:
        /* #line 475 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_DCS_Trace_Party_ID NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 46:
        /* #line 483 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Early_Media NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 47:
        /* #line 491 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Media_Authorization NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 48:
        /* #line 499 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Preferred_Identity NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);

        //tsip_header_P_Preferred_Identity_t *header = tsip_header_P_Preferred_Identity_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 49:
        /* #line 510 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Profile_Key NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 50:
        /* #line 518 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_User_Database NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 51:
        /* #line 526 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_P_Visited_Network_ID NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 52:
        /* #line 534 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Path NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Paths_L_t* headers =  tsip_header_Path_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADERS(headers);
        }
        break;
        case 53:
        /* #line 544 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Priority NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 54:
        /* #line 552 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Privacy NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Privacy_t *header = tsip_header_Privacy_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 55:
        /* #line 562 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Proxy_Authenticate NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Proxy_Authenticate_t *header = tsip_header_Proxy_Authenticate_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 56:
        /* #line 572 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Proxy_Authorization NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Proxy_Authorization_t *header = tsip_header_Proxy_Authorization_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 57:
        /* #line 582 "./ragel/tsip_parser_header.rl" */
        {
        TSIP_HeaderRequire header = TSIP_HeaderRequire.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 58:
        /* #line 589 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Proxy_Authorization NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_RAck_t *header = tsip_header_RAck_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 59:
        /* #line 599 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Reason NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 60:
        /* #line 607 "./ragel/tsip_parser_header.rl" */
        {
        List<TSIP_HeaderRecordRoute> headers = TSIP_HeaderRecordRoute.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(headers != null)
        {
            message.AddHeaders(headers.ToArray());
        }
        }
        break;
        case 61:
        /* #line 617 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Refer_Sub NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Refer_Sub_t *header = tsip_header_Refer_Sub_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 62:
        /* #line 627 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Refer_To NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Refer_To_t *header = tsip_header_Refer_To_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 63:
        /* #line 637 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Referred_By NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Referred_By_t *header = tsip_header_Referred_By_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 64:
        /* #line 647 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Reject_Contact NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 65:
        /* #line 655 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Replaces NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 66:
        /* #line 663 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Reply_To NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 67:
        /* #line 671 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Request_Disposition NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 68:
        /* #line 679 "./ragel/tsip_parser_header.rl" */
        {
        TSIP_HeaderRequire header = TSIP_HeaderRequire.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 69:
        /* #line 686 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Resource_Priority NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 70:
        /* #line 694 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Retry_After NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 71:
        /* #line 702 "./ragel/tsip_parser_header.rl" */
        {
        List<TSIP_HeaderRoute> headers = TSIP_HeaderRoute.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if (headers != null)
        {
            message.AddHeaders(headers.ToArray());
        }
        }
        break;
        case 72:
        /* #line 712 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_RSeq NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_RSeq_t *header = tsip_header_RSeq_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 73:
        /* #line 722 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Security_Client NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Security_Clients_L_t* headers =  tsip_header_Security_Client_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADERS(headers);
        }
        break;
        case 74:
        /* #line 732 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Security_Server NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Security_Servers_L_t* headers =  tsip_header_Security_Server_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADERS(headers);
        }
        break;
        case 75:
        /* #line 742 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Security_Verify NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Security_Verifies_L_t* headers =  tsip_header_Security_Verify_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADERS(headers);
        }
        break;
        case 76:
        /* #line 752 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Server NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Server_t *header = tsip_header_Server_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 77:
        /* #line 762 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Service_Route NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Service_Routes_L_t* headers =  tsip_header_Service_Route_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADERS(headers);
        }
        break;
        case 78:
        /* #line 772 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Session_Expires NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Session_Expires_t *header = tsip_header_Session_Expires_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 79:
        /* #line 782 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_SIP_ETag NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_SIP_ETag_t *header = tsip_header_SIP_ETag_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 80:
        /* #line 792 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_SIP_If_Match NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_SIP_If_Match_t *header = tsip_header_SIP_If_Match_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 81:
        /* #line 802 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Subject NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 82:
        /* #line 810 "./ragel/tsip_parser_header.rl" */
        {
        TSIP_HeaderSubscriptionState header = TSIP_HeaderSubscriptionState.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 83:
        /* #line 817 "./ragel/tsip_parser_header.rl" */
        {
        TSIP_HeaderSupported header = TSIP_HeaderSupported.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 84:
        /* #line 824 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Target_Dialog NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 85:
        /* #line 832 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Timestamp NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 86:
        /* #line 840 "./ragel/tsip_parser_header.rl" */
        {
         if(message.To == null)
        {
            message.To = TSIP_HeaderTo.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        }
        else
        {
            TSK_Debug.Warn("The message already have 'To' header.");
            TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
            message.AddHeader(header);
        }
        }
        break;
        case 87:
        /* #line 855 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Unsupported NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 88:
        /* #line 863 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_User_Agent NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_User_Agent_t *header = tsip_header_User_Agent_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADER(header);
        }
        break;
        case 89:
        /* #line 873 "./ragel/tsip_parser_header.rl" */
        {
        List<TSIP_HeaderVia> headers = TSIP_HeaderVia.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        if(headers != null)
        {
            message.AddHeaders(headers.ToArray());
        }
        }
        break;
        case 90:
        /* #line 883 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_Warning NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        //tsip_header_Warnings_L_t* headers =  tsip_header_Warning_parse(state->tag_start, (state->tag_end-state->tag_start));
        //ADD_HEADERS(headers);
        }
        break;
        case 91:
        /* #line 893 "./ragel/tsip_parser_header.rl" */
        {
        TSIP_HeaderWWWAuthenticate header = TSIP_HeaderWWWAuthenticate.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        case 92:
        /* #line 900 "./ragel/tsip_parser_header.rl" */
        {
        TSK_Debug.Warn("parse_header_extension_header NOT IMPLEMENTED. Will be added as Dummy header");
        TSIP_HeaderDummy header = TSIP_HeaderDummy.Parse(Encoding.UTF8.GetString(data, state.TagStart, (state.TagEnd - state.TagStart)));
        message.AddHeader(header);
        }
        break;
        /* #line 6419 "../Parsers/TSIP_ParserHeader.cs" */
        default: break;
        }
        }

        _again:
        if ( cs == 0 )
        goto _out;
        if ( ++p != pe )
        goto _resume;
        _test_eof: {}
        _out: {}
        }

        /* #line 941 "./ragel/tsip_parser_header.rl" */

        return ( cs >=
        /* #line 6436 "../Parsers/TSIP_ParserHeader.cs" */
        1398
        /* #line 942 "./ragel/tsip_parser_header.rl" */
         );
    }
    private static void EoH(ref TSK_RagelState state, ref TSIP_Message message, Boolean extractContent)
    {
        int cs = state.CS;
        int p = state.P;
        int pe = state.PE;
        int eof = state.EOF;

        if (extractContent && message != null)
        {
            int clen = (int)(message.ContentLength != null ? message.ContentLength.Length : 0);
            if ((p + clen) < pe && message.Content == null)
            {
                byte[] content = new byte[clen];
                Buffer.BlockCopy(state.Data, p + 1, content, 0, clen);
                message.AddContent(null, content);
                p = (p + clen);
            }
            else
            {
                p = (pe - 1);
            }
        }
    }