60 | 60 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,26 @@ |
1 |
+# $Id$ |
|
2 |
+# |
|
3 |
+# parse headers api changes |
|
4 |
+# |
|
5 |
+# 2004.02.23 created (andrei) |
|
6 |
+ |
|
7 |
+ |
|
8 |
+Starting with the ser version 0.10.99-dev1, the parse headers api has been slighlty changed. The reason for this change was performance improvement (now gcc can optimze much better all the switches involving header types) and dramatically reducing the memory impact of switching to 64 bits flags. |
|
9 |
+ |
|
10 |
+The header flags (HDR_xxx) have been split into header types (hdr_types_t) and header flags (hdr_flags_t). Instead of the old HDR_xxx use now HDR_xxx_T when the header type is required and HDR_xxx_F or HDR_T2F(HDR_xxx_T) when the corresponding header flag is needed (e.g. in the parse_headers() call). |
|
11 |
+ |
|
12 |
+The hdr_field structure and the parse_headers() function have also been changed. struct hdr_field's type member is now a hdr_types_t instead of an int and the flags parameter of parse_headers is now a hdr_flags_t. |
|
13 |
+ |
|
14 |
+The change affects also the lump types for header operations. For example instead of del_lump( msg, via_offset, via_len, HDR_VIA) use del_lump( msg, via_offset, via_len, HDR_VIA_T). |
|
15 |
+ |
|
16 |
+WARNING: don't use a header type (HDR_xxx_T) where a header flag (HDR_xxx_F) is expected or viceversa! |
|
17 |
+ |
|
18 |
+Examples: |
|
19 |
+ |
|
20 |
+An old call to parse_headers(msg, HDR_FOO, 0) will become parse_header(msg, HDR_FOO_F, 0). |
|
21 |
+ |
|
22 |
+An old loop searching for a header field: |
|
23 |
+ while(hdr && (hdr->type!=HDR_FOO)) hdr=hdr->next; |
|
24 |
+will become: |
|
25 |
+ while (hdr && (hdr->type!=HDR_FOO_T)) hdr=hdr->next; |
|
26 |
+. |
... | ... |
@@ -463,7 +463,7 @@ int forward_reply(struct sip_msg* msg) |
463 | 463 |
} |
464 | 464 |
|
465 | 465 |
/* we have to forward the reply stateless, so we need second via -bogdan*/ |
466 |
- if (parse_headers( msg, HDR_VIA2, 0 )==-1 |
|
466 |
+ if (parse_headers( msg, HDR_VIA2_F, 0 )==-1 |
|
467 | 467 |
|| (msg->via2==0) || (msg->via2->error!=PARSE_OK)) |
468 | 468 |
{ |
469 | 469 |
/* no second via => error */ |
... | ... |
@@ -313,7 +313,7 @@ static inline int get_route_set(struct sip_msg* _m, rr_t** _rs, unsigned char _o |
313 | 313 |
|
314 | 314 |
ptr = _m->record_route; |
315 | 315 |
while(ptr) { |
316 |
- if (ptr->type == HDR_RECORDROUTE) { |
|
316 |
+ if (ptr->type == HDR_RECORDROUTE_T) { |
|
317 | 317 |
if (parse_rr(ptr) < 0) { |
318 | 318 |
LOG(L_ERR, "get_route_set(): Error while parsing Record-Route body\n"); |
319 | 319 |
goto error; |
... | ... |
@@ -358,7 +358,7 @@ static inline int response2dlg(struct sip_msg* _m, dlg_t* _d) |
358 | 358 |
str contact, rtag; |
359 | 359 |
|
360 | 360 |
/* Parse the whole message, we will need all Record-Route headers */ |
361 |
- if (parse_headers(_m, HDR_EOH, 0) == -1) { |
|
361 |
+ if (parse_headers(_m, HDR_EOH_F, 0) == -1) { |
|
362 | 362 |
LOG(L_ERR, "response2dlg(): Error while parsing headers\n"); |
363 | 363 |
return -1; |
364 | 364 |
} |
... | ... |
@@ -478,7 +478,7 @@ static inline int dlg_early_resp_uac(dlg_t* _d, struct sip_msg* _m) |
478 | 478 |
*/ |
479 | 479 |
static inline int get_cseq_method(struct sip_msg* _m, str* _method) |
480 | 480 |
{ |
481 |
- if (!_m->cseq && ((parse_headers(_m, HDR_CSEQ, 0) == -1) || !_m->cseq)) { |
|
481 |
+ if (!_m->cseq && ((parse_headers(_m, HDR_CSEQ_F, 0) == -1) || !_m->cseq)) { |
|
482 | 482 |
LOG(L_ERR, "get_cseq_method(): Error while parsing CSeq\n"); |
483 | 483 |
return -1; |
484 | 484 |
} |
... | ... |
@@ -526,7 +526,7 @@ static inline int dlg_confirmed_resp_uac(dlg_t* _d, struct sip_msg* _m) |
526 | 526 |
if (get_cseq_method(_m, &method) < 0) return -1; |
527 | 527 |
if ((method.len == 6) && !memcmp("INVITE", method.s, 6)) { |
528 | 528 |
/* Get contact if any and update remote target */ |
529 |
- if (parse_headers(_m, HDR_CONTACT, 0) == -1) { |
|
529 |
+ if (parse_headers(_m, HDR_CONTACT_F, 0) == -1) { |
|
530 | 530 |
LOG(L_ERR, "dlg_confirmed_resp_uac(): Error while parsing headers\n"); |
531 | 531 |
return -2; |
532 | 532 |
} |
... | ... |
@@ -674,7 +674,7 @@ static inline int request2dlg(struct sip_msg* _m, dlg_t* _d) |
674 | 674 |
{ |
675 | 675 |
str contact, rtag, callid; |
676 | 676 |
|
677 |
- if (parse_headers(_m, HDR_EOH, 0) == -1) { |
|
677 |
+ if (parse_headers(_m, HDR_EOH_F, 0) == -1) { |
|
678 | 678 |
LOG(L_ERR, "request2dlg(): Error while parsing headers"); |
679 | 679 |
return -1; |
680 | 680 |
} |
... | ... |
@@ -789,7 +789,7 @@ int dlg_request_uas(dlg_t* _d, struct sip_msg* _m) |
789 | 789 |
/* We must check if the request is not out of order or retransmission |
790 | 790 |
* first, if so then we will not update anything |
791 | 791 |
*/ |
792 |
- if (parse_headers(_m, HDR_CSEQ, 0) == -1) { |
|
792 |
+ if (parse_headers(_m, HDR_CSEQ_F, 0) == -1) { |
|
793 | 793 |
LOG(L_ERR, "dlg_request_uas(): Error while parsing headers\n"); |
794 | 794 |
return -2; |
795 | 795 |
} |
... | ... |
@@ -805,7 +805,7 @@ int dlg_request_uas(dlg_t* _d, struct sip_msg* _m) |
805 | 805 |
*/ |
806 | 806 |
if (_m->first_line.u.request.method_value == METHOD_INVITE) { |
807 | 807 |
/* target refresher */ |
808 |
- if (parse_headers(_m, HDR_CONTACT, 0) == -1) { |
|
808 |
+ if (parse_headers(_m, HDR_CONTACT_F, 0) == -1) { |
|
809 | 809 |
LOG(L_ERR, "dlg_request_uas(): Error while parsing headers\n"); |
810 | 810 |
return -4; |
811 | 811 |
} |
... | ... |
@@ -66,7 +66,7 @@ inline static void free_via_clen_lump( struct lump **list ) |
66 | 66 |
prev_lump=0; |
67 | 67 |
for(lump=*list;lump;lump=next) { |
68 | 68 |
next=lump->next; |
69 |
- if (lump->type==HDR_VIA||lump->type==HDR_CONTENTLENGTH) { |
|
69 |
+ if (lump->type==HDR_VIA_T||lump->type==HDR_CONTENTLENGTH_T) { |
|
70 | 70 |
a=lump->before; |
71 | 71 |
while(a) { |
72 | 72 |
foo=a; a=a->before; |
... | ... |
@@ -293,7 +293,7 @@ struct sip_msg* sip_msg_cloner( struct sip_msg *org_msg, int *sip_msg_len ) |
293 | 293 |
len += ROUND4(sizeof( struct hdr_field)); |
294 | 294 |
switch (hdr->type) |
295 | 295 |
{ |
296 |
- case HDR_VIA: |
|
296 |
+ case HDR_VIA_T: |
|
297 | 297 |
for (via=(struct via_body*)hdr->parsed;via;via=via->next) |
298 | 298 |
{ |
299 | 299 |
len+=ROUND4(sizeof(struct via_body)); |
... | ... |
@@ -303,8 +303,8 @@ struct sip_msg* sip_msg_cloner( struct sip_msg *org_msg, int *sip_msg_len ) |
303 | 303 |
} |
304 | 304 |
break; |
305 | 305 |
|
306 |
- case HDR_TO: |
|
307 |
- case HDR_FROM: |
|
306 |
+ case HDR_TO_T: |
|
307 |
+ case HDR_FROM_T: |
|
308 | 308 |
/* From header might be unparsed */ |
309 | 309 |
if (hdr->parsed) { |
310 | 310 |
len+=ROUND4(sizeof(struct to_body)); |
... | ... |
@@ -315,43 +315,42 @@ struct sip_msg* sip_msg_cloner( struct sip_msg *org_msg, int *sip_msg_len ) |
315 | 315 |
} |
316 | 316 |
break; |
317 | 317 |
|
318 |
- case HDR_CSEQ: |
|
318 |
+ case HDR_CSEQ_T: |
|
319 | 319 |
len+=ROUND4(sizeof(struct cseq_body)); |
320 | 320 |
break; |
321 | 321 |
|
322 | 322 |
|
323 |
- case HDR_AUTHORIZATION: |
|
324 |
- case HDR_PROXYAUTH: |
|
323 |
+ case HDR_AUTHORIZATION_T: |
|
324 |
+ case HDR_PROXYAUTH_T: |
|
325 | 325 |
if (hdr->parsed) { |
326 | 326 |
len += ROUND4(AUTH_BODY_SIZE); |
327 | 327 |
} |
328 | 328 |
break; |
329 | 329 |
|
330 |
- case HDR_CALLID: |
|
331 |
- case HDR_CONTACT: |
|
332 |
- case HDR_MAXFORWARDS: |
|
333 |
- case HDR_ROUTE: |
|
334 |
- case HDR_RECORDROUTE: |
|
335 |
- case HDR_CONTENTTYPE: |
|
336 |
- case HDR_CONTENTLENGTH: |
|
337 |
- case HDR_EXPIRES: |
|
338 |
- case HDR_SUPPORTED: |
|
339 |
- case HDR_PROXYREQUIRE: |
|
340 |
- case HDR_UNSUPPORTED: |
|
341 |
- case HDR_ALLOW: |
|
342 |
- case HDR_EVENT: |
|
343 |
- case HDR_ACCEPT: |
|
344 |
- case HDR_ACCEPTLANGUAGE: |
|
345 |
- case HDR_ORGANIZATION: |
|
346 |
- case HDR_PRIORITY: |
|
347 |
- case HDR_SUBJECT: |
|
348 |
- case HDR_USERAGENT: |
|
349 |
- case HDR_ACCEPTDISPOSITION: |
|
350 |
- case HDR_CONTENTDISPOSITION: |
|
351 |
- case HDR_DIVERSION: |
|
352 |
- case HDR_RPID: |
|
353 |
- case HDR_REFER_TO: |
|
354 |
- |
|
330 |
+ case HDR_CALLID_T: |
|
331 |
+ case HDR_CONTACT_T: |
|
332 |
+ case HDR_MAXFORWARDS_T: |
|
333 |
+ case HDR_ROUTE_T: |
|
334 |
+ case HDR_RECORDROUTE_T: |
|
335 |
+ case HDR_CONTENTTYPE_T: |
|
336 |
+ case HDR_CONTENTLENGTH_T: |
|
337 |
+ case HDR_EXPIRES_T: |
|
338 |
+ case HDR_SUPPORTED_T: |
|
339 |
+ case HDR_PROXYREQUIRE_T: |
|
340 |
+ case HDR_UNSUPPORTED_T: |
|
341 |
+ case HDR_ALLOW_T: |
|
342 |
+ case HDR_EVENT_T: |
|
343 |
+ case HDR_ACCEPT_T: |
|
344 |
+ case HDR_ACCEPTLANGUAGE_T: |
|
345 |
+ case HDR_ORGANIZATION_T: |
|
346 |
+ case HDR_PRIORITY_T: |
|
347 |
+ case HDR_SUBJECT_T: |
|
348 |
+ case HDR_USERAGENT_T: |
|
349 |
+ case HDR_ACCEPTDISPOSITION_T: |
|
350 |
+ case HDR_CONTENTDISPOSITION_T: |
|
351 |
+ case HDR_DIVERSION_T: |
|
352 |
+ case HDR_RPID_T: |
|
353 |
+ case HDR_REFER_TO_T: |
|
355 | 354 |
/* we ignore them for now even if they have something parsed*/ |
356 | 355 |
break; |
357 | 356 |
|
... | ... |
@@ -477,7 +476,7 @@ do { \ |
477 | 476 |
|
478 | 477 |
switch (hdr->type) |
479 | 478 |
{ |
480 |
- case HDR_VIA: |
|
479 |
+ case HDR_VIA_T: |
|
481 | 480 |
/*fprintf(stderr,"prepare to clone via |%.*s|\n", |
482 | 481 |
via_len((struct via_body*)hdr->parsed), |
483 | 482 |
via_s((struct via_body*)hdr->parsed,org_msg));*/ |
... | ... |
@@ -511,7 +510,7 @@ do { \ |
511 | 510 |
(struct via_body*)hdr->parsed , &p); |
512 | 511 |
} |
513 | 512 |
break; |
514 |
- case HDR_CSEQ: |
|
513 |
+ case HDR_CSEQ_T: |
|
515 | 514 |
new_hdr->parsed = p; |
516 | 515 |
p +=ROUND4(sizeof(struct cseq_body)); |
517 | 516 |
memcpy(new_hdr->parsed, hdr->parsed, sizeof(struct cseq_body)); |
... | ... |
@@ -523,9 +522,9 @@ do { \ |
523 | 522 |
((struct cseq_body*)hdr->parsed)->method.s ); |
524 | 523 |
new_msg->cseq = new_hdr; |
525 | 524 |
break; |
526 |
- case HDR_TO: |
|
527 |
- case HDR_FROM: |
|
528 |
- if (hdr->type == HDR_TO) { |
|
525 |
+ case HDR_TO_T: |
|
526 |
+ case HDR_FROM_T: |
|
527 |
+ if (hdr->type == HDR_TO_T) { |
|
529 | 528 |
new_msg->to = new_hdr; |
530 | 529 |
} else { |
531 | 530 |
new_msg->from = new_hdr; |
... | ... |
@@ -570,85 +569,88 @@ do { \ |
570 | 569 |
= new_to_prm; |
571 | 570 |
} |
572 | 571 |
break; |
573 |
- case HDR_CALLID: |
|
572 |
+ case HDR_CALLID_T: |
|
574 | 573 |
new_msg->callid = new_hdr; |
575 | 574 |
break; |
576 |
- case HDR_CONTACT: |
|
575 |
+ case HDR_CONTACT_T: |
|
577 | 576 |
new_msg->contact = new_hdr; |
578 | 577 |
break; |
579 |
- case HDR_MAXFORWARDS : |
|
578 |
+ case HDR_MAXFORWARDS_T: |
|
580 | 579 |
new_msg->maxforwards = new_hdr; |
581 | 580 |
break; |
582 |
- case HDR_ROUTE : |
|
581 |
+ case HDR_ROUTE_T: |
|
583 | 582 |
new_msg->route = new_hdr; |
584 | 583 |
break; |
585 |
- case HDR_RECORDROUTE : |
|
584 |
+ case HDR_RECORDROUTE_T: |
|
586 | 585 |
new_msg->record_route = new_hdr; |
587 | 586 |
break; |
588 |
- case HDR_CONTENTTYPE : |
|
587 |
+ case HDR_CONTENTTYPE_T: |
|
589 | 588 |
new_msg->content_type = new_hdr; |
590 | 589 |
new_msg->content_type->parsed = hdr->parsed; |
591 | 590 |
break; |
592 |
- case HDR_CONTENTLENGTH : |
|
591 |
+ case HDR_CONTENTLENGTH_T: |
|
593 | 592 |
new_msg->content_length = new_hdr; |
594 | 593 |
new_msg->content_length->parsed = hdr->parsed; |
595 | 594 |
break; |
596 |
- case HDR_AUTHORIZATION : |
|
595 |
+ case HDR_AUTHORIZATION_T: |
|
597 | 596 |
new_msg->authorization = new_hdr; |
598 | 597 |
if (hdr->parsed) { |
599 | 598 |
new_hdr->parsed = auth_body_cloner(new_msg->buf , |
600 | 599 |
org_msg->buf , (struct auth_body*)hdr->parsed , &p); |
601 | 600 |
} |
602 | 601 |
break; |
603 |
- case HDR_EXPIRES : |
|
602 |
+ case HDR_EXPIRES_T: |
|
604 | 603 |
new_msg->expires = new_hdr; |
605 | 604 |
break; |
606 |
- case HDR_PROXYAUTH : |
|
605 |
+ case HDR_PROXYAUTH_T: |
|
607 | 606 |
new_msg->proxy_auth = new_hdr; |
608 | 607 |
if (hdr->parsed) { |
609 | 608 |
new_hdr->parsed = auth_body_cloner(new_msg->buf , |
610 | 609 |
org_msg->buf , (struct auth_body*)hdr->parsed , &p); |
611 | 610 |
} |
612 | 611 |
break; |
613 |
- case HDR_SUPPORTED : |
|
612 |
+ case HDR_SUPPORTED_T: |
|
614 | 613 |
new_msg->supported = new_hdr; |
615 | 614 |
break; |
616 |
- case HDR_PROXYREQUIRE : |
|
615 |
+ case HDR_PROXYREQUIRE_T: |
|
617 | 616 |
new_msg->proxy_require = new_hdr; |
618 | 617 |
break; |
619 |
- case HDR_UNSUPPORTED : |
|
618 |
+ case HDR_UNSUPPORTED_T: |
|
620 | 619 |
new_msg->unsupported = new_hdr; |
621 | 620 |
break; |
622 |
- case HDR_ALLOW : |
|
621 |
+ case HDR_ALLOW_T: |
|
623 | 622 |
new_msg->allow = new_hdr; |
624 | 623 |
break; |
625 |
- case HDR_EVENT: |
|
624 |
+ case HDR_EVENT_T: |
|
626 | 625 |
new_msg->event = new_hdr; |
627 | 626 |
break; |
628 |
- case HDR_ACCEPT: |
|
627 |
+ case HDR_ACCEPT_T: |
|
629 | 628 |
new_msg->accept = new_hdr; |
630 | 629 |
break; |
631 |
- case HDR_ACCEPTLANGUAGE: |
|
630 |
+ case HDR_ACCEPTLANGUAGE_T: |
|
632 | 631 |
new_msg->accept_language = new_hdr; |
633 | 632 |
break; |
634 |
- case HDR_ORGANIZATION: |
|
633 |
+ case HDR_ORGANIZATION_T: |
|
635 | 634 |
new_msg->organization = new_hdr; |
636 | 635 |
break; |
637 |
- case HDR_PRIORITY: |
|
636 |
+ case HDR_PRIORITY_T: |
|
638 | 637 |
new_msg->priority = new_hdr; |
639 | 638 |
break; |
640 |
- case HDR_SUBJECT: |
|
639 |
+ case HDR_SUBJECT_T: |
|
641 | 640 |
new_msg->subject = new_hdr; |
642 | 641 |
break; |
643 |
- case HDR_USERAGENT: |
|
642 |
+ case HDR_USERAGENT_T: |
|
644 | 643 |
new_msg->user_agent = new_hdr; |
645 | 644 |
break; |
646 |
- case HDR_ACCEPTDISPOSITION: |
|
645 |
+ case HDR_ACCEPTDISPOSITION_T: |
|
647 | 646 |
new_msg->accept_disposition = new_hdr; |
648 | 647 |
break; |
649 |
- case HDR_CONTENTDISPOSITION: |
|
648 |
+ case HDR_CONTENTDISPOSITION_T: |
|
650 | 649 |
new_msg->content_disposition = new_hdr; |
651 | 650 |
break; |
651 |
+ default: |
|
652 |
+ /* ignore the rest*/ |
|
653 |
+ ; |
|
652 | 654 |
}/*switch*/ |
653 | 655 |
|
654 | 656 |
if ( last_hdr ) |
... | ... |
@@ -354,7 +354,7 @@ int parse_tw_append( modparam_t type, void* val) |
354 | 354 |
} |
355 | 355 |
foo.s[foo.len] = bar; |
356 | 356 |
ha->ival = hdr.type; |
357 |
- if (hdr.type==HDR_OTHER || ha->title.s==0) { |
|
357 |
+ if (hdr.type==HDR_OTHER_T || ha->title.s==0) { |
|
358 | 358 |
/* duplicate hdr name */ |
359 | 359 |
ha->sval.s = (char*)pkg_malloc(foo.len+1); |
360 | 360 |
if (ha->sval.s==0) { |
... | ... |
@@ -615,14 +615,14 @@ static inline char* append2buf( char *buf, int len, struct sip_msg *req, |
615 | 615 |
} else if (ha->type==ELEM_IS_HDR) { |
616 | 616 |
/* parse the HDRs */ |
617 | 617 |
if (!msg_parsed) { |
618 |
- if (parse_headers( req, HDR_EOH, 0)!=0) { |
|
618 |
+ if (parse_headers( req, HDR_EOH_F, 0)!=0) { |
|
619 | 619 |
LOG(L_ERR,"ERROR:tm:append2buf: parsing hdrs failed\n"); |
620 | 620 |
goto error; |
621 | 621 |
} |
622 | 622 |
msg_parsed = 1; |
623 | 623 |
} |
624 | 624 |
/* search the HDR */ |
625 |
- if (ha->ival==HDR_OTHER) { |
|
625 |
+ if (ha->ival==HDR_OTHER_T) { |
|
626 | 626 |
for(hdr=req->headers;hdr;hdr=hdr->next) |
627 | 627 |
if (ha->sval.len==hdr->name.len && |
628 | 628 |
strncasecmp( ha->sval.s, hdr->name.s, hdr->name.len)==0) |
... | ... |
@@ -680,7 +680,7 @@ static int assemble_msg(struct sip_msg* msg, struct tw_info *twi) |
680 | 680 |
} |
681 | 681 |
|
682 | 682 |
/* parse all -- we will need every header field for a UAS */ |
683 |
- if ( parse_headers(msg, HDR_EOH, 0)==-1) { |
|
683 |
+ if ( parse_headers(msg, HDR_EOH_F, 0)==-1) { |
|
684 | 684 |
LOG(L_ERR,"assemble_msg: parse_headers failed\n"); |
685 | 685 |
goto error; |
686 | 686 |
} |
... | ... |
@@ -770,7 +770,7 @@ static int assemble_msg(struct sip_msg* msg, struct tw_info *twi) |
770 | 770 |
} |
771 | 771 |
for(p_hdr = p_hdr->next;p_hdr;p_hdr = p_hdr->next) { |
772 | 772 |
/* filter out non-RR hdr and empty hdrs */ |
773 |
- if( (p_hdr->type!=HDR_RECORDROUTE) || p_hdr->body.len==0) |
|
773 |
+ if( (p_hdr->type!=HDR_RECORDROUTE_T) || p_hdr->body.len==0) |
|
774 | 774 |
continue; |
775 | 775 |
|
776 | 776 |
if(p_hdr->parsed==0 && parse_rr(p_hdr)!=0 ){ |
... | ... |
@@ -63,10 +63,10 @@ |
63 | 63 |
|
64 | 64 |
/* fr_timer AVP specs */ |
65 | 65 |
static int fr_timer_avp_type = 0; |
66 |
-static int_str fr_timer_avp = (int_str)0; |
|
66 |
+static int_str fr_timer_avp = {0}; |
|
67 | 67 |
static str fr_timer_str; |
68 | 68 |
static int fr_inv_timer_avp_type = 0; |
69 |
-static int_str fr_inv_timer_avp = (int_str)0; |
|
69 |
+static int_str fr_inv_timer_avp = {0}; |
|
70 | 70 |
static str fr_inv_timer_str; |
71 | 71 |
|
72 | 72 |
|
... | ... |
@@ -163,7 +163,7 @@ void init_t() {global_msg_id=0; set_t(T_UNDEFINED);} |
163 | 163 |
|
164 | 164 |
static inline int parse_dlg( struct sip_msg *msg ) |
165 | 165 |
{ |
166 |
- if (parse_headers(msg, HDR_FROM | HDR_CSEQ | HDR_TO, 0)==-1) { |
|
166 |
+ if (parse_headers(msg, HDR_FROM_F | HDR_CSEQ_F | HDR_TO_F, 0)==-1) { |
|
167 | 167 |
LOG(L_ERR, "ERROR: parse_dlg: From or Cseq or To invalid\n"); |
168 | 168 |
return 0; |
169 | 169 |
} |
... | ... |
@@ -800,7 +800,7 @@ int t_reply_matching( struct sip_msg *p_msg , int *p_branch ) |
800 | 800 |
has_tran_tmcbs(p_cell,TMCB_RESPONSE_OUT|TMCB_E2EACK_IN) ) |
801 | 801 |
|| (is_local(p_cell)&&has_tran_tmcbs(p_cell,TMCB_LOCAL_COMPLETED)) |
802 | 802 |
)) { |
803 |
- if (parse_headers(p_msg, HDR_TO, 0)==-1) { |
|
803 |
+ if (parse_headers(p_msg, HDR_TO_F, 0)==-1) { |
|
804 | 804 |
LOG(L_ERR, "ERROR: t_reply_matching: to parsing failed\n"); |
805 | 805 |
} |
806 | 806 |
} |
... | ... |
@@ -845,7 +845,7 @@ int t_check( struct sip_msg* p_msg , int *param_branch ) |
845 | 845 |
/* transaction lookup */ |
846 | 846 |
if ( p_msg->first_line.type==SIP_REQUEST ) { |
847 | 847 |
/* force parsing all the needed headers*/ |
848 |
- if (parse_headers(p_msg, HDR_EOH, 0 )==-1) { |
|
848 |
+ if (parse_headers(p_msg, HDR_EOH_F, 0 )==-1) { |
|
849 | 849 |
LOG(L_ERR, "ERROR: t_check: parsing error\n"); |
850 | 850 |
return -1; |
851 | 851 |
} |
... | ... |
@@ -864,7 +864,7 @@ int t_check( struct sip_msg* p_msg , int *param_branch ) |
864 | 864 |
/* we need Via for branch and Cseq method to distinguish |
865 | 865 |
replies with the same branch/cseqNr (CANCEL) |
866 | 866 |
*/ |
867 |
- if ( parse_headers(p_msg, HDR_VIA1|HDR_CSEQ, 0 )==-1 |
|
867 |
+ if ( parse_headers(p_msg, HDR_VIA1_F|HDR_CSEQ_F, 0 )==-1 |
|
868 | 868 |
|| !p_msg->via1 || !p_msg->cseq ) { |
869 | 869 |
LOG(L_ERR, "ERROR: reply cannot be parsed\n"); |
870 | 870 |
return -1; |
... | ... |
@@ -875,7 +875,7 @@ int t_check( struct sip_msg* p_msg , int *param_branch ) |
875 | 875 |
*/ |
876 | 876 |
if ( get_cseq(p_msg)->method.len==INVITE_LEN |
877 | 877 |
&& memcmp( get_cseq(p_msg)->method.s, INVITE, INVITE_LEN )==0 ) { |
878 |
- if (parse_headers(p_msg, HDR_TO, 0)==-1 |
|
878 |
+ if (parse_headers(p_msg, HDR_TO_F, 0)==-1 |
|
879 | 879 |
|| !p_msg->to) { |
880 | 880 |
LOG(L_ERR, "ERROR: INVITE reply cannot be parsed\n"); |
881 | 881 |
return -1; |
... | ... |
@@ -1038,11 +1038,11 @@ int t_newtran( struct sip_msg* p_msg ) |
1038 | 1038 |
shmem with pkg_mem |
1039 | 1039 |
*/ |
1040 | 1040 |
|
1041 |
- if (parse_headers(p_msg, HDR_EOH, 0 )) { |
|
1041 |
+ if (parse_headers(p_msg, HDR_EOH_F, 0 )) { |
|
1042 | 1042 |
LOG(L_ERR, "ERROR: t_newtran: parse_headers failed\n"); |
1043 | 1043 |
return E_BAD_REQ; |
1044 | 1044 |
} |
1045 |
- if ((p_msg->parsed_flag & HDR_EOH)!=HDR_EOH) { |
|
1045 |
+ if ((p_msg->parsed_flag & HDR_EOH_F)!=HDR_EOH_F) { |
|
1046 | 1046 |
LOG(L_ERR, "ERROR: t_newtran: EoH not parsed\n"); |
1047 | 1047 |
return E_OUT_OF_MEM; |
1048 | 1048 |
} |
... | ... |
@@ -126,7 +126,7 @@ char *build_local(struct cell *Trans,unsigned int branch, |
126 | 126 |
/* copy'n'paste Route headers */ |
127 | 127 |
if (!is_local(Trans)) { |
128 | 128 |
for ( hdr=Trans->uas.request->headers ; hdr ; hdr=hdr->next ) |
129 |
- if (hdr->type==HDR_ROUTE) |
|
129 |
+ if (hdr->type==HDR_ROUTE_T) |
|
130 | 130 |
*len+=hdr->len; |
131 | 131 |
} |
132 | 132 |
|
... | ... |
@@ -165,7 +165,7 @@ char *build_local(struct cell *Trans,unsigned int branch, |
165 | 165 |
|
166 | 166 |
if (!is_local(Trans)) { |
167 | 167 |
for ( hdr=Trans->uas.request->headers ; hdr ; hdr=hdr->next ) |
168 |
- if(hdr->type==HDR_ROUTE) { |
|
168 |
+ if(hdr->type==HDR_ROUTE_T) { |
|
169 | 169 |
append_mem_block(p, hdr->name.s, hdr->len ); |
170 | 170 |
} |
171 | 171 |
} |
... | ... |
@@ -216,7 +216,7 @@ static inline int process_routeset(struct sip_msg* msg, str* contact, struct rte |
216 | 216 |
ptr = msg->record_route; |
217 | 217 |
head = 0; |
218 | 218 |
while(ptr) { |
219 |
- if (ptr->type == HDR_RECORDROUTE) { |
|
219 |
+ if (ptr->type == HDR_RECORDROUTE_T) { |
|
220 | 220 |
if (parse_rr(ptr) < 0) { |
221 | 221 |
LOG(L_ERR, "process_routeset: Error while parsing Record-Route header\n"); |
222 | 222 |
return -1; |
... | ... |
@@ -179,7 +179,7 @@ int unmatched_totag(struct cell *t, struct sip_msg *ack) |
179 | 179 |
struct totag_elem *i; |
180 | 180 |
str *tag; |
181 | 181 |
|
182 |
- if (parse_headers(ack, HDR_TO,0)==-1 || |
|
182 |
+ if (parse_headers(ack, HDR_TO_F,0)==-1 || |
|
183 | 183 |
!ack->to ) { |
184 | 184 |
LOG(L_ERR, "ERROR: unmatched_totag: To invalid\n"); |
185 | 185 |
return 1; |
... | ... |
@@ -273,7 +273,7 @@ static char *build_ack(struct sip_msg* rpl,struct cell *trans,int branch, |
273 | 273 |
{ |
274 | 274 |
str to; |
275 | 275 |
|
276 |
- if (parse_headers(rpl,HDR_TO, 0)==-1 || !rpl->to ) { |
|
276 |
+ if (parse_headers(rpl,HDR_TO_F, 0)==-1 || !rpl->to ) { |
|
277 | 277 |
LOG(L_ERR, "ERROR: build_ack: " |
278 | 278 |
"cannot generate a HBH ACK if key HFs in reply missing\n"); |
279 | 279 |
return NULL; |
... | ... |
@@ -294,7 +294,7 @@ static char *build_local_ack(struct sip_msg* rpl, struct cell *trans, int branch |
294 | 294 |
unsigned int *ret_len, str* next_hop) |
295 | 295 |
{ |
296 | 296 |
str to; |
297 |
- if (parse_headers(rpl, HDR_EOH, 0) == -1 || !rpl->to) { |
|
297 |
+ if (parse_headers(rpl, HDR_EOH_F, 0) == -1 || !rpl->to) { |
|
298 | 298 |
LOG(L_ERR, "ERROR: build_local_ack: Error while parsing headers\n"); |
299 | 299 |
return 0; |
300 | 300 |
} |
... | ... |
@@ -65,10 +65,10 @@ struct str_list { |
65 | 65 |
|
66 | 66 |
|
67 | 67 |
#define skip_hf(_hf) ( \ |
68 |
- ((_hf)->type == HDR_FROM) || \ |
|
69 |
- ((_hf)->type == HDR_TO) || \ |
|
70 |
- ((_hf)->type == HDR_CALLID) || \ |
|
71 |
- ((_hf)->type == HDR_CSEQ) \ |
|
68 |
+ ((_hf)->type == HDR_FROM_T) || \ |
|
69 |
+ ((_hf)->type == HDR_TO_T) || \ |
|
70 |
+ ((_hf)->type == HDR_CALLID_T) || \ |
|
71 |
+ ((_hf)->type == HDR_CSEQ_T) \ |
|
72 | 72 |
) |
73 | 73 |
|
74 | 74 |
|
... | ... |
@@ -595,7 +595,7 @@ int fifo_uac(FILE *stream, char *response_file) |
595 | 595 |
memset(&faked_msg, 0, sizeof(struct sip_msg)); |
596 | 596 |
faked_msg.len = headers.len; |
597 | 597 |
faked_msg.buf = faked_msg.unparsed = headers.s; |
598 |
- if (parse_headers(&faked_msg, HDR_EOH, 0) == -1 ) { |
|
598 |
+ if (parse_headers(&faked_msg, HDR_EOH_F, 0) == -1 ) { |
|
599 | 599 |
DBG("DEBUG: fifo_uac: parse_headers failed\n"); |
600 | 600 |
fifo_uac_error(response_file, 400, "HFs unparseable"); |
601 | 601 |
goto error; |
... | ... |
@@ -52,10 +52,10 @@ struct str_list { |
52 | 52 |
|
53 | 53 |
|
54 | 54 |
#define skip_hf(_hf) ( \ |
55 |
- ((_hf)->type == HDR_FROM) || \ |
|
56 |
- ((_hf)->type == HDR_TO) || \ |
|
57 |
- ((_hf)->type == HDR_CALLID) || \ |
|
58 |
- ((_hf)->type == HDR_CSEQ) \ |
|
55 |
+ ((_hf)->type == HDR_FROM_T) || \ |
|
56 |
+ ((_hf)->type == HDR_TO_T) || \ |
|
57 |
+ ((_hf)->type == HDR_CALLID_T) || \ |
|
58 |
+ ((_hf)->type == HDR_CSEQ_T) \ |
|
59 | 59 |
) |
60 | 60 |
|
61 | 61 |
|
... | ... |
@@ -504,7 +504,7 @@ int unixsock_uac(str* msg) |
504 | 504 |
memset(&faked_msg, 0, sizeof(struct sip_msg)); |
505 | 505 |
faked_msg.len = headers.len; |
506 | 506 |
faked_msg.buf = faked_msg.unparsed = headers.s; |
507 |
- if (parse_headers(&faked_msg, HDR_EOH, 0) == -1 ) { |
|
507 |
+ if (parse_headers(&faked_msg, HDR_EOH_F, 0) == -1 ) { |
|
508 | 508 |
unixsock_reply_asciiz("400 HFs unparsable\n"); |
509 | 509 |
unixsock_reply_send(); |
510 | 510 |
goto error; |
... | ... |
@@ -288,7 +288,8 @@ static char * warning_builder( struct sip_msg *msg, unsigned int *returned_len) |
288 | 288 |
str_pair_print(" in_uri=", msg->first_line.u.request.uri.s, |
289 | 289 |
msg->first_line.u.request.uri.len); |
290 | 290 |
str_pair_print(" out_uri=", foo->s, foo->len); |
291 |
- str_pair_print(" via_cnt", msg->parsed_flag & HDR_EOH ? "=" : ">", 1); |
|
291 |
+ str_pair_print(" via_cnt", |
|
292 |
+ (msg->parsed_flag & HDR_EOH_F)==HDR_EOH_F ? "=" : ">", 1); |
|
292 | 293 |
str_int_print("=", via_cnt); |
293 | 294 |
if (clen<MAX_WARNING_LEN){ buf[clen]='"'; clen++; } |
294 | 295 |
else goto error_overflow; |
... | ... |
@@ -1208,7 +1209,7 @@ static inline int adjust_clen(struct sip_msg* msg, int body_delta, int proto) |
1208 | 1209 |
|| proto == PROTO_TLS |
1209 | 1210 |
#endif |
1210 | 1211 |
) { |
1211 |
- if (parse_headers(msg, HDR_CONTENTLENGTH, 0)==-1){ |
|
1212 |
+ if (parse_headers(msg, HDR_CONTENTLENGTH_F, 0)==-1){ |
|
1212 | 1213 |
LOG(L_ERR, "adjust_clen: error parsing content-length\n"); |
1213 | 1214 |
goto error; |
1214 | 1215 |
} |
... | ... |
@@ -1218,7 +1219,7 @@ static inline int adjust_clen(struct sip_msg* msg, int body_delta, int proto) |
1218 | 1219 |
* - whole message was parsed by the above parse_headers |
1219 | 1220 |
* which did not find content-length */ |
1220 | 1221 |
anchor=anchor_lump(msg, msg->unparsed-msg->buf, 0, |
1221 |
- HDR_CONTENTLENGTH); |
|
1222 |
+ HDR_CONTENTLENGTH_T); |
|
1222 | 1223 |
if (anchor==0){ |
1223 | 1224 |
LOG(L_ERR, "adjust_clen: cannot set clen anchor\n"); |
1224 | 1225 |
goto error; |
... | ... |
@@ -1229,7 +1230,7 @@ static inline int adjust_clen(struct sip_msg* msg, int body_delta, int proto) |
1229 | 1230 |
|
1230 | 1231 |
|
1231 | 1232 |
if ((anchor==0) && body_delta){ |
1232 |
- if (parse_headers(msg, HDR_CONTENTLENGTH, 0) == -1) { |
|
1233 |
+ if (parse_headers(msg, HDR_CONTENTLENGTH_F, 0) == -1) { |
|
1233 | 1234 |
LOG(L_ERR, "adjust_clen: Error parsing Content-Length\n"); |
1234 | 1235 |
goto error; |
1235 | 1236 |
} |
... | ... |
@@ -1246,7 +1247,7 @@ static inline int adjust_clen(struct sip_msg* msg, int body_delta, int proto) |
1246 | 1247 |
* which did not find content-length */ |
1247 | 1248 |
if (proto!=PROTO_UDP){ |
1248 | 1249 |
anchor=anchor_lump(msg, msg->unparsed-msg->buf, 0, |
1249 |
- HDR_CONTENTLENGTH); |
|
1250 |
+ HDR_CONTENTLENGTH_T); |
|
1250 | 1251 |
if (anchor==0){ |
1251 | 1252 |
LOG(L_ERR, "adjust_clen: cannot set clen anchor\n"); |
1252 | 1253 |
goto error; |
... | ... |
@@ -1257,7 +1258,7 @@ static inline int adjust_clen(struct sip_msg* msg, int body_delta, int proto) |
1257 | 1258 |
}else{ |
1258 | 1259 |
/* Content-Length has been found, remove it */ |
1259 | 1260 |
anchor = del_lump( msg, msg->content_length->name.s - msg->buf, |
1260 |
- msg->content_length->len, HDR_CONTENTLENGTH); |
|
1261 |
+ msg->content_length->len, HDR_CONTENTLENGTH_T); |
|
1261 | 1262 |
if (anchor==0) { |
1262 | 1263 |
LOG(L_ERR, "adjust_clen: Can't remove original" |
1263 | 1264 |
" Content-Length\n"); |
... | ... |
@@ -1270,7 +1271,7 @@ static inline int adjust_clen(struct sip_msg* msg, int body_delta, int proto) |
1270 | 1271 |
clen_buf = clen_builder(msg, &clen_len, body_delta); |
1271 | 1272 |
if (!clen_buf) goto error; |
1272 | 1273 |
if (insert_new_lump_after(anchor, clen_buf, clen_len, |
1273 |
- HDR_CONTENTLENGTH) == 0) |
|
1274 |
+ HDR_CONTENTLENGTH_T) == 0) |
|
1274 | 1275 |
goto error; |
1275 | 1276 |
} |
1276 | 1277 |
|
... | ... |
@@ -1384,9 +1385,9 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg, |
1384 | 1385 |
/* add via header to the list */ |
1385 | 1386 |
/* try to add it before msg. 1st via */ |
1386 | 1387 |
/* add first via, as an anchor for second via*/ |
1387 |
- anchor=anchor_lump(msg, msg->via1->hdr.s-buf, 0, HDR_VIA); |
|
1388 |
+ anchor=anchor_lump(msg, msg->via1->hdr.s-buf, 0, HDR_VIA_T); |
|
1388 | 1389 |
if (anchor==0) goto error01; |
1389 |
- if (insert_new_lump_before(anchor, line_buf, via_len, HDR_VIA)==0) |
|
1390 |
+ if (insert_new_lump_before(anchor, line_buf, via_len, HDR_VIA_T)==0) |
|
1390 | 1391 |
goto error01; |
1391 | 1392 |
/* find out where the offset of the first parameter that should be added |
1392 | 1393 |
* (after host:port), needed by add receive & maybe rport */ |
... | ... |
@@ -1412,29 +1413,29 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg, |
1412 | 1413 |
if (msg->via1->received){ /* received already present => overwrite it*/ |
1413 | 1414 |
via_insert_param=del_lump(msg, |
1414 | 1415 |
msg->via1->received->start-buf-1, /*;*/ |
1415 |
- msg->via1->received->size+1, /*;*/ HDR_VIA); |
|
1416 |
+ msg->via1->received->size+1, /*;*/ HDR_VIA_T); |
|
1416 | 1417 |
}else if (via_insert_param==0){ /* receive not present, ok */ |
1417 |
- via_insert_param=anchor_lump(msg, |
|
1418 |
- msg->via1->hdr.s-buf+size,0, HDR_VIA); |
|
1418 |
+ via_insert_param=anchor_lump(msg, msg->via1->hdr.s-buf+size, 0, |
|
1419 |
+ HDR_VIA_T); |
|
1419 | 1420 |
} |
1420 | 1421 |
if (via_insert_param==0) goto error02; /* free received_buf */ |
1421 | 1422 |
if (insert_new_lump_after(via_insert_param, received_buf, received_len, |
1422 |
- HDR_VIA) ==0 ) goto error02; /* free received_buf */ |
|
1423 |
+ HDR_VIA_T) ==0 ) goto error02; /* free received_buf */ |
|
1423 | 1424 |
} |
1424 | 1425 |
/* if rport needs to be updated, delete it if present and add it's value */ |
1425 | 1426 |
if (rport_len){ |
1426 | 1427 |
if (msg->via1->rport){ /* rport already present */ |
1427 | 1428 |
via_insert_param=del_lump(msg, |
1428 | 1429 |
msg->via1->rport->start-buf-1, /*';'*/ |
1429 |
- msg->via1->rport->size+1 /* ; */, HDR_VIA); |
|
1430 |
+ msg->via1->rport->size+1 /* ; */, HDR_VIA_T); |
|
1430 | 1431 |
}else if (via_insert_param==0){ /*force rport, no rport present */ |
1431 | 1432 |
/* no rport, add it */ |
1432 |
- via_insert_param=anchor_lump(msg, |
|
1433 |
- msg->via1->hdr.s-buf+size,0, HDR_VIA); |
|
1433 |
+ via_insert_param=anchor_lump(msg, msg->via1->hdr.s-buf+size, 0, |
|
1434 |
+ HDR_VIA_T); |
|
1434 | 1435 |
} |
1435 | 1436 |
if (via_insert_param==0) goto error03; /* free rport_buf */ |
1436 | 1437 |
if (insert_new_lump_after(via_insert_param, rport_buf, rport_len, |
1437 |
- HDR_VIA) ==0 ) |
|
1438 |
+ HDR_VIA_T) ==0 ) |
|
1438 | 1439 |
goto error03; /* free rport_buf */ |
1439 | 1440 |
|
1440 | 1441 |
} |
... | ... |
@@ -1540,7 +1541,7 @@ char * build_res_buf_from_sip_res( struct sip_msg* msg, |
1540 | 1541 |
} |
1541 | 1542 |
|
1542 | 1543 |
/* remove the first via*/ |
1543 |
- if (del_lump( msg, via_offset, via_len, HDR_VIA)==0){ |
|
1544 |
+ if (del_lump( msg, via_offset, via_len, HDR_VIA_T)==0){ |
|
1544 | 1545 |
LOG(L_ERR, "build_res_buf_from_sip_res: error trying to remove first" |
1545 | 1546 |
"via\n"); |
1546 | 1547 |
goto error; |
... | ... |
@@ -1610,7 +1611,7 @@ char * build_res_buf_from_sip_req( unsigned int code, char *text ,str *new_tag, |
1610 | 1611 |
Via's in the reply and they may be scattered down to the |
1611 | 1612 |
end of header (non-block Vias are a really poor property |
1612 | 1613 |
of SIP :( ) */ |
1613 |
- if (parse_headers( msg, HDR_EOH, 0 )==-1) { |
|
1614 |
+ if (parse_headers( msg, HDR_EOH_F, 0 )==-1) { |
|
1614 | 1615 |
LOG(L_ERR, "ERROR: build_res_buf_from_sip_req: " |
1615 | 1616 |
"alas, parse_headers failed\n"); |
1616 | 1617 |
goto error00; |
... | ... |
@@ -1645,7 +1646,7 @@ char * build_res_buf_from_sip_req( unsigned int code, char *text ,str *new_tag, |
1645 | 1646 |
/*headers that will be copied (TO, FROM, CSEQ,CALLID,VIA)*/ |
1646 | 1647 |
for ( hdr=msg->headers ; hdr ; hdr=hdr->next ) { |
1647 | 1648 |
switch (hdr->type) { |
1648 |
- case HDR_TO: |
|
1649 |
+ case HDR_TO_T: |
|
1649 | 1650 |
if (new_tag && new_tag->len) { |
1650 | 1651 |
to_tag=get_to(msg)->tag_value; |
1651 | 1652 |
if (to_tag.len ) |
... | ... |
@@ -1655,20 +1656,24 @@ char * build_res_buf_from_sip_req( unsigned int code, char *text ,str *new_tag, |
1655 | 1656 |
} |
1656 | 1657 |
len += hdr->len; |
1657 | 1658 |
break; |
1658 |
- case HDR_VIA: |
|
1659 |
+ case HDR_VIA_T: |
|
1659 | 1660 |
/* we always add CRLF to via*/ |
1660 | 1661 |
len+=(hdr->body.s+hdr->body.len)-hdr->name.s+CRLF_LEN; |
1661 | 1662 |
if (hdr==msg->h_via1) len += received_len+rport_len; |
1662 | 1663 |
break; |
1663 |
- case HDR_RECORDROUTE: |
|
1664 |
+ case HDR_RECORDROUTE_T: |
|
1664 | 1665 |
/* RR only for 1xx and 2xx replies */ |
1665 | 1666 |
if (code<180 || code>=300) |
1666 | 1667 |
break; |
1667 |
- case HDR_FROM: |
|
1668 |
- case HDR_CALLID: |
|
1669 |
- case HDR_CSEQ: |
|
1668 |
+ case HDR_FROM_T: |
|
1669 |
+ case HDR_CALLID_T: |
|
1670 |
+ case HDR_CSEQ_T: |
|
1670 | 1671 |
/* we keep the original termination for these headers*/ |
1671 | 1672 |
len += hdr->len; |
1673 |
+ break; |
|
1674 |
+ default: |
|
1675 |
+ /* do nothing, we are interested only in the above headers */ |
|
1676 |
+ ; |
|
1672 | 1677 |
} |
1673 | 1678 |
} |
1674 | 1679 |
/* lumps length */ |
... | ... |
@@ -1724,7 +1729,7 @@ char * build_res_buf_from_sip_req( unsigned int code, char *text ,str *new_tag, |
1724 | 1729 |
for ( hdr=msg->headers ; hdr ; hdr=hdr->next ) { |
1725 | 1730 |
switch (hdr->type) |
1726 | 1731 |
{ |
1727 |
- case HDR_VIA: |
|
1732 |
+ case HDR_VIA_T: |
|
1728 | 1733 |
if (hdr==msg->h_via1){ |
1729 | 1734 |
if (rport_buf){ |
1730 | 1735 |
if (msg->via1->rport){ /* delete the old one */ |
... | ... |
@@ -1759,12 +1764,12 @@ char * build_res_buf_from_sip_req( unsigned int code, char *text ,str *new_tag, |
1759 | 1764 |
} |
1760 | 1765 |
append_str( p, CRLF,CRLF_LEN); |
1761 | 1766 |
break; |
1762 |
- case HDR_RECORDROUTE: |
|
1767 |
+ case HDR_RECORDROUTE_T: |
|
1763 | 1768 |
/* RR only for 1xx and 2xx replies */ |
1764 | 1769 |
if (code<180 || code>=300) break; |
1765 | 1770 |
append_str(p, hdr->name.s, hdr->len); |
1766 | 1771 |
break; |
1767 |
- case HDR_TO: |
|
1772 |
+ case HDR_TO_T: |
|
1768 | 1773 |
if (new_tag && new_tag->len){ |
1769 | 1774 |
if (to_tag.s ) { /* replacement */ |
1770 | 1775 |
/* before to-tag */ |
... | ... |
@@ -1794,10 +1799,14 @@ char * build_res_buf_from_sip_req( unsigned int code, char *text ,str *new_tag, |
1794 | 1799 |
bmark->to_tag_val.len= |
1795 | 1800 |
((struct to_body*)(hdr->parsed))->tag_value.len; |
1796 | 1801 |
}; |
1797 |
- case HDR_FROM: |
|
1798 |
- case HDR_CALLID: |
|
1799 |
- case HDR_CSEQ: |
|
1802 |
+ case HDR_FROM_T: |
|
1803 |
+ case HDR_CALLID_T: |
|
1804 |
+ case HDR_CSEQ_T: |
|
1800 | 1805 |
append_str(p, hdr->name.s, hdr->len); |
1806 |
+ break; |
|
1807 |
+ default: |
|
1808 |
+ /* do nothing, we are interested only in the above headers */ |
|
1809 |
+ ; |
|
1801 | 1810 |
} /* end switch */ |
1802 | 1811 |
} /* end for */ |
1803 | 1812 |
/* lumps */ |
... | ... |
@@ -34,12 +34,12 @@ |
34 | 34 |
#define age_CASE \ |
35 | 35 |
switch(LOWER_DWORD(val)) { \ |
36 | 36 |
case _age1_: \ |
37 |
- hdr->type = HDR_ACCEPTLANGUAGE; \ |
|
37 |
+ hdr->type = HDR_ACCEPTLANGUAGE_T; \ |
|
38 | 38 |
hdr->name.len = 15; \ |
39 | 39 |
return (p + 4); \ |
40 | 40 |
\ |
41 | 41 |
case _age2_: \ |
42 |
- hdr->type = HDR_ACCEPTLANGUAGE; \ |
|
42 |
+ hdr->type = HDR_ACCEPTLANGUAGE_T; \ |
|
43 | 43 |
p += 4; \ |
44 | 44 |
goto dc_end; \ |
45 | 45 |
} |
... | ... |
@@ -59,7 +59,7 @@ |
59 | 59 |
if (LOWER_BYTE(*p) == 'o') { \ |
60 | 60 |
p++; \ |
61 | 61 |
if (LOWER_BYTE(*p) == 'n') { \ |
62 |
- hdr->type = HDR_ACCEPTDISPOSITION; \ |
|
62 |
+ hdr->type = HDR_ACCEPTDISPOSITION_T; \ |
|
63 | 63 |
p++; \ |
64 | 64 |
goto dc_end; \ |
65 | 65 |
} \ |
... | ... |
@@ -110,7 +110,7 @@ |
110 | 110 |
if (LOWER_BYTE(*p) == 'p') { \ |
111 | 111 |
p++; \ |
112 | 112 |
if (LOWER_BYTE(*p) == 't') { \ |
113 |
- hdr->type = HDR_ACCEPT; \ |
|
113 |
+ hdr->type = HDR_ACCEPT_T; \ |
|
114 | 114 |
p++; \ |
115 | 115 |
goto dc_end; \ |
116 | 116 |
} \ |
... | ... |
@@ -41,12 +41,12 @@ |
41 | 41 |
#define ID_CASE \ |
42 | 42 |
switch(LOWER_DWORD(val)) { \ |
43 | 43 |
case __id1_: \ |
44 |
- hdr->type = HDR_CALLID; \ |
|
44 |
+ hdr->type = HDR_CALLID_T; \ |
|
45 | 45 |
hdr->name.len = 7; \ |
46 | 46 |
return (p + 4); \ |
47 | 47 |
\ |
48 | 48 |
case __id2_: \ |
49 |
- hdr->type = HDR_CALLID; \ |
|
49 |
+ hdr->type = HDR_CALLID_T; \ |
|
50 | 50 |
p += 4; \ |
51 | 51 |
goto dc_end; \ |
52 | 52 |
} |
... | ... |
@@ -42,7 +42,7 @@ |
42 | 42 |
#define TH_CASE \ |
43 | 43 |
switch(LOWER_DWORD(val)) { \ |
44 | 44 |
case _th12_: \ |
45 |
- hdr->type = HDR_CONTENTLENGTH; \ |
|
45 |
+ hdr->type = HDR_CONTENTLENGTH_T; \ |
|
46 | 46 |
hdr->name.len = 14; \ |
47 | 47 |
return (p + 4); \ |
48 | 48 |
} \ |
... | ... |
@@ -50,7 +50,7 @@ |
50 | 50 |
if (LOWER_BYTE(*p) == 't') { \ |
51 | 51 |
p++; \ |
52 | 52 |
if (LOWER_BYTE(*p) == 'h') { \ |
53 |
- hdr->type = HDR_CONTENTLENGTH; \ |
|
53 |
+ hdr->type = HDR_CONTENTLENGTH_T;\ |
|
54 | 54 |
p++; \ |
55 | 55 |
goto dc_end; \ |
56 | 56 |
} \ |
... | ... |
@@ -60,12 +60,12 @@ |
60 | 60 |
#define ion_CASE \ |
61 | 61 |
switch(LOWER_DWORD(val)) { \ |
62 | 62 |
case _ion1_: \ |
63 |
- hdr->type = HDR_CONTENTDISPOSITION; \ |
|
63 |
+ hdr->type = HDR_CONTENTDISPOSITION_T; \ |
|
64 | 64 |
hdr->name.len = 19; \ |
65 | 65 |
return (p + 4); \ |
66 | 66 |
\ |
67 | 67 |
case _ion2_: \ |
68 |
- hdr->type = HDR_CONTENTDISPOSITION; \ |
|
68 |
+ hdr->type = HDR_CONTENTDISPOSITION_T; \ |
|
69 | 69 |
p += 4; \ |
70 | 70 |
goto dc_end; \ |
71 | 71 |
} |
... | ... |
@@ -90,7 +90,7 @@ |
90 | 90 |
goto other; \ |
91 | 91 |
\ |
92 | 92 |
case _type_: \ |
93 |
- hdr->type = HDR_CONTENTTYPE; \ |
|
93 |
+ hdr->type = HDR_CONTENTTYPE_T; \ |
|
94 | 94 |
p += 4; \ |
95 | 95 |
goto dc_end; \ |
96 | 96 |
\ |
... | ... |
@@ -105,12 +105,12 @@ |
105 | 105 |
#define ACT_ENT_CASE \ |
106 | 106 |
switch(LOWER_DWORD(val)) { \ |
107 | 107 |
case _act1_: \ |
108 |
- hdr->type = HDR_CONTACT; \ |
|
108 |
+ hdr->type = HDR_CONTACT_T; \ |
|
109 | 109 |
hdr->name.len = 7; \ |
110 | 110 |
return (p + 4); \ |
111 | 111 |
\ |
112 | 112 |
case _act2_: \ |
113 |
- hdr->type = HDR_CONTACT; \ |
|
113 |
+ hdr->type = HDR_CONTACT_T; \ |
|
114 | 114 |
p += 4; \ |
115 | 115 |
goto dc_end; \ |
116 | 116 |
\ |
... | ... |
@@ -41,12 +41,12 @@ |
41 | 41 |
#define EXPI_RES_CASE \ |
42 | 42 |
switch(LOWER_DWORD(val)) { \ |
43 | 43 |
case _res1_: \ |
44 |
- hdr->type = HDR_EXPIRES; \ |
|
44 |
+ hdr->type = HDR_EXPIRES_T; \ |
|
45 | 45 |
hdr->name.len = 7; \ |
46 | 46 |
return (p + 4); \ |
47 | 47 |
\ |
48 | 48 |
case _res2_: \ |
49 |
- hdr->type = HDR_EXPIRES; \ |
|
49 |
+ hdr->type = HDR_EXPIRES_T; \ |
|
50 | 50 |
p += 4; \ |
51 | 51 |
goto dc_end; \ |
52 | 52 |
} |
... | ... |
@@ -41,12 +41,12 @@ |
41 | 41 |
#define ION_CASE \ |
42 | 42 |
switch(LOWER_DWORD(val)) { \ |
43 | 43 |
case _ion1_: \ |
44 |
- hdr->type = HDR_PROXYAUTH; \ |
|
44 |
+ hdr->type = HDR_PROXYAUTH_T; \ |
|
45 | 45 |
hdr->name.len = 19; \ |
46 | 46 |
return (p + 4); \ |
47 | 47 |
\ |
48 | 48 |
case _ion2_: \ |
49 |
- hdr->type = HDR_PROXYAUTH; \ |
|
49 |
+ hdr->type = HDR_PROXYAUTH_T; \ |
|
50 | 50 |
p += 4; \ |
51 | 51 |
goto dc_end; \ |
52 | 52 |
} |
... | ... |
@@ -78,7 +78,7 @@ |
78 | 78 |
p += 4; \ |
79 | 79 |
switch(LOWER_BYTE(*p)) { \ |
80 | 80 |
case 'e': \ |
81 |
- hdr->type = HDR_PROXYREQUIRE; \ |
|
81 |
+ hdr->type = HDR_PROXYREQUIRE_T; \ |
|
82 | 82 |
p++; \ |
83 | 83 |
goto dc_end; \ |
84 | 84 |
} \ |
... | ... |
@@ -34,12 +34,12 @@ |
34 | 34 |
#define _ID_CASE \ |
35 | 35 |
switch(LOWER_DWORD(val)) { \ |
36 | 36 |
case __id1_: \ |
37 |
- hdr->type = HDR_RPID; \ |
|
37 |
+ hdr->type = HDR_RPID_T; \ |
|
38 | 38 |
hdr->name.len = 15; \ |
39 | 39 |
return (p + 4); \ |
40 | 40 |
\ |
41 | 41 |
case __id2_: \ |
42 |
- hdr->type = HDR_RPID; \ |
|
42 |
+ hdr->type = HDR_RPID_T; \ |
|
43 | 43 |
p += 4; \ |
44 | 44 |
goto dc_end; \ |
45 | 45 |
} |
... | ... |
@@ -42,12 +42,12 @@ |
42 | 42 |
#define IRE_CASE \ |
43 | 43 |
switch(LOWER_DWORD(val)) { \ |
44 | 44 |
case _ire1_: \ |
45 |
- hdr->type = HDR_REQUIRE; \ |
|
45 |
+ hdr->type = HDR_REQUIRE_T; \ |
|
46 | 46 |
hdr->name.len = 7; \ |
47 | 47 |
return (p + 4); \ |
48 | 48 |
\ |
49 | 49 |
case _ire2_: \ |
50 |
- hdr->type = HDR_REQUIRE; \ |
|
50 |
+ hdr->type = HDR_REQUIRE_T; \ |
|
51 | 51 |
p += 4; \ |
52 | 52 |
goto dc_end; \ |
53 | 53 |
} |
... | ... |
@@ -35,12 +35,12 @@ |
35 | 35 |
#define ect_CASE \ |
36 | 36 |
switch(LOWER_DWORD(val)) { \ |
37 | 37 |
case _ect1_: \ |
38 |
- hdr->type = HDR_SUBJECT; \ |
|
38 |
+ hdr->type = HDR_SUBJECT_T; \ |
|
39 | 39 |
hdr->name.len = 7; \ |
40 | 40 |
return (p + 4); \ |
41 | 41 |
\ |
42 | 42 |
case _ect2_: \ |
43 |
- hdr->type = HDR_SUBJECT; \ |
|
43 |
+ hdr->type = HDR_SUBJECT_T; \ |
|
44 | 44 |
p += 4; \ |
45 | 45 |
goto dc_end; \ |
46 | 46 |
} |
... | ... |
@@ -41,12 +41,12 @@ |
41 | 41 |
#define TED_CASE \ |
42 | 42 |
switch(LOWER_DWORD(val)) { \ |
43 | 43 |
case _ted1_: \ |
44 |
- hdr->type = HDR_UNSUPPORTED; \ |
|
44 |
+ hdr->type = HDR_UNSUPPORTED_T; \ |
|
45 | 45 |
hdr->name.len = 11; \ |
46 | 46 |
return (p + 4); \ |
47 | 47 |
\ |
48 | 48 |
case _ted2_: \ |
49 |
- hdr->type = HDR_UNSUPPORTED; \ |
|
49 |
+ hdr->type = HDR_UNSUPPORTED_T; \ |
|
50 | 50 |
p += 4; \ |
51 | 51 |
goto dc_end; \ |
52 | 52 |
} |
... | ... |
@@ -38,12 +38,12 @@ |
38 | 38 |
#include "../comp_defs.h" |
39 | 39 |
|
40 | 40 |
#define via1_CASE \ |
41 |
- hdr->type = HDR_VIA; \ |
|
41 |
+ hdr->type = HDR_VIA_T; \ |
|
42 | 42 |
hdr->name.len = 3; \ |
43 | 43 |
return (p + 4) |
44 | 44 |
|
45 | 45 |
#define via2_CASE \ |
46 |
- hdr->type = HDR_VIA; \ |
|
46 |
+ hdr->type = HDR_VIA_T; \ |
|
47 | 47 |
p += 4; \ |
48 | 48 |
goto dc_end |
49 | 49 |
|
... | ... |
@@ -145,7 +145,7 @@ int contact_iterator(contact_t** c, struct sip_msg* msg, contact_t* prev) |
145 | 145 |
*/ |
146 | 146 |
hdr = msg->contact; |
147 | 147 |
if (!hdr) { |
148 |
- if (parse_headers(msg, HDR_CONTACT, 0) == -1) { |
|
148 |
+ if (parse_headers(msg, HDR_CONTACT_F, 0) == -1) { |
|
149 | 149 |
LOG(L_ERR, "contact_iterator: Error while parsing headers\n"); |
150 | 150 |
return -1; |
151 | 151 |
} |
... | ... |
@@ -184,7 +184,7 @@ int contact_iterator(contact_t** c, struct sip_msg* msg, contact_t* prev) |
184 | 184 |
/* Search another already parsed Contact |
185 | 185 |
* header field |
186 | 186 |
*/ |
187 |
- while(hdr && hdr->type != HDR_CONTACT) { |
|
187 |
+ while(hdr && hdr->type != HDR_CONTACT_T) { |
|
188 | 188 |
hdr = hdr->next; |
189 | 189 |
} |
190 | 190 |
|
... | ... |
@@ -192,7 +192,7 @@ int contact_iterator(contact_t** c, struct sip_msg* msg, contact_t* prev) |
192 | 192 |
/* Look for another Contact HF in unparsed |
193 | 193 |
* part of the message header |
194 | 194 |
*/ |
195 |
- if (parse_headers(msg, HDR_CONTACT, 1) == -1) { |
|
195 |
+ if (parse_headers(msg, HDR_CONTACT_F, 1) == -1) { |
|
196 | 196 |
LOG(L_ERR, "contact_iterator: Error while parsing message header\n"); |
197 | 197 |
return -1; |
198 | 198 |
} |
... | ... |
@@ -202,7 +202,7 @@ int contact_iterator(contact_t** c, struct sip_msg* msg, contact_t* prev) |
202 | 202 |
* previous Contact HF (that indicates that the previous |
203 | 203 |
* one was the last header field in the header) |
204 | 204 |
*/ |
205 |
- if ((msg->last_header->type == HDR_CONTACT) && |
|
205 |
+ if ((msg->last_header->type == HDR_CONTACT_T) && |
|
206 | 206 |
(msg->last_header != last)) { |
207 | 207 |
hdr = msg->last_header; |
208 | 208 |
} else { |
... | ... |
@@ -197,8 +197,8 @@ int mark_authorized_cred(struct sip_msg* _m, struct hdr_field* _h) |
197 | 197 |
struct hdr_field* f; |
198 | 198 |
|
199 | 199 |
switch(_h->type) { |
200 |
- case HDR_AUTHORIZATION: f = _m->authorization; break; |
|
201 |
- case HDR_PROXYAUTH: f = _m->proxy_auth; break; |
|
200 |
+ case HDR_AUTHORIZATION_T: f = _m->authorization; break; |
|
201 |
+ case HDR_PROXYAUTH_T: f = _m->proxy_auth; break; |
|
202 | 202 |
default: |
203 | 203 |
LOG(L_ERR, "mark_authorized_cred(): Invalid header field type\n"); |
204 | 204 |
return -1; |
... | ... |
@@ -56,109 +56,109 @@ void clean_hdr_field(struct hdr_field* hf) |
56 | 56 |
{ |
57 | 57 |
if (hf->parsed){ |
58 | 58 |
switch(hf->type){ |
59 |
- case HDR_VIA: |
|
59 |
+ case HDR_VIA_T: |
|
60 | 60 |
free_via_list(hf->parsed); |
61 | 61 |
break; |
62 | 62 |
|
63 |
- case HDR_TO: |
|
63 |
+ case HDR_TO_T: |
|
64 | 64 |
free_to(hf->parsed); |
65 | 65 |
break; |
66 | 66 |
|
67 |
- case HDR_FROM: |
|
67 |
+ case HDR_FROM_T: |
|
68 | 68 |
free_to(hf->parsed); |
69 | 69 |
break; |
70 | 70 |
|
71 |
- case HDR_CSEQ: |
|
71 |
+ case HDR_CSEQ_T: |
|
72 | 72 |
free_cseq(hf->parsed); |
73 | 73 |
break; |
74 | 74 |
|
75 |
- case HDR_CALLID: |
|
75 |
+ case HDR_CALLID_T: |
|
76 | 76 |
break; |
77 | 77 |
|
78 |
- case HDR_CONTACT: |
|
78 |
+ case HDR_CONTACT_T: |
|
79 | 79 |
free_contact((contact_body_t**)(&(hf->parsed))); |
80 | 80 |
break; |
81 | 81 |
|
82 |
- case HDR_MAXFORWARDS: |
|
82 |
+ case HDR_MAXFORWARDS_T: |
|
83 | 83 |
break; |
84 | 84 |
|
85 |
- case HDR_ROUTE: |
|
85 |
+ case HDR_ROUTE_T: |
|
86 | 86 |
free_rr((rr_t**)(&hf->parsed)); |
87 | 87 |
break; |
88 | 88 |
|
89 |
- case HDR_RECORDROUTE: |
|
89 |
+ case HDR_RECORDROUTE_T: |
|
90 | 90 |
free_rr((rr_t**)(&hf->parsed)); |
91 | 91 |
break; |
92 | 92 |
|
93 |
- case HDR_CONTENTTYPE: |
|
93 |
+ case HDR_CONTENTTYPE_T: |
|
94 | 94 |
break; |
95 | 95 |
|
96 |
- case HDR_CONTENTLENGTH: |
|
96 |
+ case HDR_CONTENTLENGTH_T: |
|
97 | 97 |
break; |
98 | 98 |
|
99 |
- case HDR_AUTHORIZATION: |
|
99 |
+ case HDR_AUTHORIZATION_T: |
|
100 | 100 |
free_credentials((auth_body_t**)(&(hf->parsed))); |
101 | 101 |
break; |
102 | 102 |
|
103 |
- case HDR_EXPIRES: |
|
103 |
+ case HDR_EXPIRES_T: |
|
104 | 104 |
free_expires((exp_body_t**)(&(hf->parsed))); |
105 | 105 |
break; |
106 | 106 |
|
107 |
- case HDR_PROXYAUTH: |
|
107 |
+ case HDR_PROXYAUTH_T: |
|
108 | 108 |
free_credentials((auth_body_t**)(&(hf->parsed))); |
109 | 109 |
break; |
110 | 110 |
|
111 |
- case HDR_SUPPORTED: |
|
111 |
+ case HDR_SUPPORTED_T: |
|
112 | 112 |
break; |
113 | 113 |
|
114 |
- case HDR_PROXYREQUIRE: |
|
114 |
+ case HDR_PROXYREQUIRE_T: |
|
115 | 115 |
break; |
116 | 116 |
|
117 |
- case HDR_UNSUPPORTED: |
|
117 |
+ case HDR_UNSUPPORTED_T: |
|
118 | 118 |
break; |
119 | 119 |
|
120 |
- case HDR_ALLOW: |
|
120 |
+ case HDR_ALLOW_T: |
|
121 | 121 |
break; |
122 | 122 |
|
123 |
- case HDR_EVENT: |
|
123 |
+ case HDR_EVENT_T: |
|
124 | 124 |
free_event((event_t**)(&(hf->parsed))); |
125 | 125 |
break; |
126 | 126 |
|
127 |
- case HDR_ACCEPT: |
|
127 |
+ case HDR_ACCEPT_T: |
|
128 | 128 |
pkg_free(hf->parsed); |
129 | 129 |
break; |
130 | 130 |
|
131 |
- case HDR_ACCEPTLANGUAGE: |
|
131 |
+ case HDR_ACCEPTLANGUAGE_T: |
|
132 | 132 |
break; |
133 | 133 |
|
134 |
- case HDR_ORGANIZATION: |
|
134 |
+ case HDR_ORGANIZATION_T: |
|
135 | 135 |
break; |
136 | 136 |
|
137 |
- case HDR_PRIORITY: |
|
137 |
+ case HDR_PRIORITY_T: |
|
138 | 138 |
break; |
139 | 139 |
|
140 |
- case HDR_SUBJECT: |
|
140 |
+ case HDR_SUBJECT_T: |
|
141 | 141 |
break; |
142 | 142 |
|
143 |
- case HDR_USERAGENT: |
|
143 |
+ case HDR_USERAGENT_T: |
|
144 | 144 |
break; |
145 | 145 |
|
146 |
- case HDR_ACCEPTDISPOSITION: |
|
146 |
+ case HDR_ACCEPTDISPOSITION_T: |
|
147 | 147 |
break; |
148 | 148 |
|
149 |
- case HDR_CONTENTDISPOSITION: |
|
149 |
+ case HDR_CONTENTDISPOSITION_T: |
|
150 | 150 |
free_disposition( ((struct disposition**)(&hf->parsed)) ); |
151 | 151 |
break; |
152 | 152 |
|
153 |
- case HDR_DIVERSION: |
|
153 |
+ case HDR_DIVERSION_T: |
|
154 | 154 |
free_to(hf->parsed); |
155 | 155 |
break; |
156 | 156 |
|
157 |
- case HDR_RPID: |
|
157 |
+ case HDR_RPID_T: |
|
158 | 158 |
free_to(hf->parsed); |
159 | 159 |
break; |
160 | 160 |
|
161 |
- case HDR_REFER_TO: |
|
161 |
+ case HDR_REFER_TO_T: |
|
162 | 162 |
free_to(hf->parsed); |
163 | 163 |
break; |
164 | 164 |
|
... | ... |
@@ -29,6 +29,8 @@ |
29 | 29 |
* 2003-02-28 scratchpad compatibility abandoned (jiri) |
30 | 30 |
* 2003-01-27 next baby-step to removing ZT - PRESERVE_ZT (jiri) |
31 | 31 |
* 2003-05-01 HDR_ACCEPT added (janakj) |
32 |
+ * 2005-02-14 hdr_flags_t && hdr_flags_f defined, split HDR_xxx into |
|
33 |
+ * HDR_xxx_F & HDR_xxx_T [WARNING: don't mix them!] (andrei) |
|
32 | 34 |
*/ |
33 | 35 |
|
34 | 36 |
|
... | ... |
@@ -39,57 +41,109 @@ |
39 | 41 |
#include "../comp_defs.h" |
40 | 42 |
|
41 | 43 |
|
42 |
-/* Header types and flags */ |
|
43 |
-#define HDR_EOH -1 /* End of header found */ |
|
44 |
-#define HDR_ERROR 0 /* Error while parsing */ |
|
45 |
-#define HDR_VIA 1 /* Via header field */ |
|
46 |
-#define HDR_VIA1 1 /* First Via header field */ |
|
47 |
-#define HDR_VIA2 (1 << 1) /* only used as flag*/ |
|
48 |
-#define HDR_TO (1 << 2) /* To header field */ |
|
49 |
-#define HDR_FROM (1 << 3) /* From header field */ |
|
50 |
-#define HDR_CSEQ (1 << 4) /* CSeq header field */ |
|
51 |
-#define HDR_CALLID (1 << 5) /* Call-Id header field */ |
|
52 |
-#define HDR_CONTACT (1 << 6) /* Contact header field */ |
|
53 |
-#define HDR_MAXFORWARDS (1 << 7) /* MaxForwards header field */ |
|
54 |
-#define HDR_ROUTE (1 << 8) /* Route header field */ |
|
55 |
-#define HDR_RECORDROUTE (1 << 9) /* Record-Route header field */ |
|
56 |
-#define HDR_CONTENTTYPE (1 << 10) /* Content-Type header field */ |
|
57 |
-#define HDR_CONTENTLENGTH (1 << 11) /* Content-Length header field */ |
|
58 |
-#define HDR_AUTHORIZATION (1 << 12) /* Authorization header field */ |
|
59 |
-#define HDR_EXPIRES (1 << 13) /* Expires header field */ |
|
60 |
-#define HDR_PROXYAUTH (1 << 14) /* Proxy-Authorization hdr field */ |
|
61 |
-#define HDR_SUPPORTED (1 << 15) /* Supported header field */ |
|
62 |
-#define HDR_PROXYREQUIRE (1 << 16) /* Proxy-Require header field */ |
|
63 |
-#define HDR_UNSUPPORTED (1 << 17) /* Unsupported header field */ |
|
64 |
-#define HDR_ALLOW (1 << 18) /* Allow header field */ |
|
65 |
-#define HDR_EVENT (1 << 19) /* Event header field */ |
|
66 |
-#define HDR_ACCEPT (1 << 20) /* Accept header field */ |
|
67 |
-#define HDR_ACCEPTLANGUAGE (1 << 21) /* Accept-Language header field */ |
|
68 |
-#define HDR_ORGANIZATION (1 << 22) /* Organization header field */ |
|
69 |
-#define HDR_PRIORITY (1 << 23) /* Priority header field */ |
|
70 |
-#define HDR_SUBJECT (1 << 24) /* Subject header field */ |
|
71 |
-#define HDR_USERAGENT (1 << 25) /* User-Agent header field */ |
|
72 |
-#define HDR_ACCEPTDISPOSITION (1 << 26) /* Accept-Disposition hdr field */ |
|
73 |
-#define HDR_CONTENTDISPOSITION (1 << 27) /* Content-Disposition hdr field */ |
|
74 |
-#define HDR_DIVERSION (1 << 28) /* Diversion header field */ |
|
75 |
-#define HDR_RPID (1 << 29) /* Remote-Party-ID header field */ |
|
76 |
-#define HDR_REFER_TO (1 << 30) /* Remote-Party-ID header field */ |
|
77 |
-#define HDR_OTHER |