00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SIP_PROTOS_H
00027
00028 #define SIP_PROTOS_H
00029
00040 #include <sofia-sip/su_config.h>
00041
00042 #ifndef SIP_HEADER_H
00043 #include <sofia-sip/sip_header.h>
00044 #endif
00045
00046 #ifndef SIP_HCLASSES_H
00047 #include <sofia-sip/sip_hclasses.h>
00048 #endif
00049
00050 SOFIA_BEGIN_DECLS
00051
00052 #if SU_HAVE_INLINE
00053
00054 su_inline
00055 sip_t *sip_object(msg_t const *msg)
00056 {
00057 return (sip_t *)msg_public(msg, SIP_PROTOCOL_TAG);
00058 }
00059
00078 su_inline
00079 int sip_header_insert(msg_t *msg, sip_t *sip, sip_header_t *h)
00080 {
00081 return msg_header_insert(msg, (msg_pub_t *)sip, (msg_header_t *)h);
00082 }
00083
00085 su_inline
00086 int sip_header_remove(msg_t *msg, sip_t *sip, sip_header_t *h)
00087 {
00088 return msg_header_remove(msg, (msg_pub_t *)sip, (msg_header_t *)h);
00089 }
00090
00092 su_inline
00093 char const *sip_header_name(sip_header_t const *h, int compact)
00094 {
00095 if (compact && h->sh_class->hc_short[0])
00096 return h->sh_class->hc_short;
00097 else
00098 return h->sh_class->hc_name;
00099 }
00100
00102 su_inline
00103 void *sip_header_data(sip_header_t *h)
00104 {
00105 return h && h != SIP_NONE ? h->sh_class->hc_size + (char *)h : NULL;
00106 }
00107 #else
00108 sip_t *sip_object(msg_t *msg);
00109 int sip_header_insert(msg_t *msg, sip_t *sip, sip_header_t *h);
00110 int sip_header_remove(msg_t *msg, sip_t *sip, sip_header_t *h);
00111 char const *sip_header_name(sip_header_t const *h, int compact);
00112 void *sip_header_data(sip_header_t *h);
00113 #endif
00114
00120 SOFIAPUBFUN int sip_request_d(su_home_t *, msg_header_t *,
00121 char *s, int slen);
00122
00124 SOFIAPUBFUN int sip_request_e(char b[], int bsiz,
00125 msg_header_t const *h, int flags);
00126
00130 #define sip_request(sip) \
00131 ((sip_request_t *)msg_header_access((msg_pub_t*)(sip), sip_request_class))
00132
00145 #define SIP_REQUEST_INIT() SIP_HDR_INIT(request)
00146
00160 #if SU_HAVE_INLINE
00161 su_inline sip_request_t *sip_request_init(sip_request_t x[1])
00162 {
00163 return SIP_HEADER_INIT(x, sip_request_class, sizeof(sip_request_t));
00164 }
00165 #else
00166 #define sip_request_init(x) \
00167 SIP_HEADER_INIT(x, sip_request_class, sizeof(sip_request_t))
00168 #endif
00169
00183 #if SU_HAVE_INLINE
00184 su_inline int sip_is_request(sip_header_t const *header)
00185 {
00186 return header && header->sh_class->hc_hash == sip_request_hash;
00187 }
00188 #else
00189 int sip_is_request(sip_header_t const *header);
00190 #endif
00191
00192 #define sip_request_p(h) sip_is_request((h))
00193
00194
00222 #if SU_HAVE_INLINE
00223 su_inline
00224 #endif
00225 sip_request_t *sip_request_dup(su_home_t *home, sip_request_t const *hdr)
00226 __attribute__((__malloc__));
00227
00228 #if SU_HAVE_INLINE
00229 su_inline
00230 sip_request_t *sip_request_dup(su_home_t *home, sip_request_t const *hdr)
00231 {
00232 return (sip_request_t *)
00233 msg_header_dup_as(home, sip_request_class, (msg_header_t const *)hdr);
00234 }
00235 #endif
00236
00265 #if SU_HAVE_INLINE
00266 su_inline
00267 #endif
00268 sip_request_t *sip_request_copy(su_home_t *home, sip_request_t const *hdr)
00269 __attribute__((__malloc__));
00270
00271 #if SU_HAVE_INLINE
00272 su_inline
00273 sip_request_t *sip_request_copy(su_home_t *home, sip_request_t const *hdr)
00274 {
00275 return (sip_request_t *)
00276 msg_header_copy_as(home, sip_request_class, (msg_header_t const *)hdr);
00277 }
00278 #endif
00279
00298 #if SU_HAVE_INLINE
00299 su_inline
00300 #endif
00301 sip_request_t *sip_request_make(su_home_t *home, char const *s)
00302 __attribute__((__malloc__));
00303
00304 #if SU_HAVE_INLINE
00305 su_inline sip_request_t *sip_request_make(su_home_t *home, char const *s)
00306 {
00307 return (sip_request_t *)sip_header_make(home, sip_request_class, s);
00308 }
00309 #endif
00310
00333 #if SU_HAVE_INLINE
00334 su_inline
00335 #endif
00336 sip_request_t *sip_request_format(su_home_t *home, char const *fmt, ...)
00337 __attribute__((__malloc__, __format__ (printf, 2, 3)));
00338
00339 #if SU_HAVE_INLINE
00340 su_inline sip_request_t *sip_request_format(su_home_t *home, char const *fmt, ...)
00341 {
00342 sip_header_t *h;
00343 va_list ap;
00344
00345 va_start(ap, fmt);
00346 h = sip_header_vformat(home, sip_request_class, fmt, ap);
00347 va_end(ap);
00348
00349 return (sip_request_t *)h;
00350 }
00351 #endif
00352
00360 SOFIAPUBFUN int sip_status_d(su_home_t *, msg_header_t *,
00361 char *s, int slen);
00362
00364 SOFIAPUBFUN int sip_status_e(char b[], int bsiz,
00365 msg_header_t const *h, int flags);
00366
00370 #define sip_status(sip) \
00371 ((sip_status_t *)msg_header_access((msg_pub_t*)(sip), sip_status_class))
00372
00385 #define SIP_STATUS_INIT() SIP_HDR_INIT(status)
00386
00400 #if SU_HAVE_INLINE
00401 su_inline sip_status_t *sip_status_init(sip_status_t x[1])
00402 {
00403 return SIP_HEADER_INIT(x, sip_status_class, sizeof(sip_status_t));
00404 }
00405 #else
00406 #define sip_status_init(x) \
00407 SIP_HEADER_INIT(x, sip_status_class, sizeof(sip_status_t))
00408 #endif
00409
00423 #if SU_HAVE_INLINE
00424 su_inline int sip_is_status(sip_header_t const *header)
00425 {
00426 return header && header->sh_class->hc_hash == sip_status_hash;
00427 }
00428 #else
00429 int sip_is_status(sip_header_t const *header);
00430 #endif
00431
00432 #define sip_status_p(h) sip_is_status((h))
00433
00434
00462 #if SU_HAVE_INLINE
00463 su_inline
00464 #endif
00465 sip_status_t *sip_status_dup(su_home_t *home, sip_status_t const *hdr)
00466 __attribute__((__malloc__));
00467
00468 #if SU_HAVE_INLINE
00469 su_inline
00470 sip_status_t *sip_status_dup(su_home_t *home, sip_status_t const *hdr)
00471 {
00472 return (sip_status_t *)
00473 msg_header_dup_as(home, sip_status_class, (msg_header_t const *)hdr);
00474 }
00475 #endif
00476
00505 #if SU_HAVE_INLINE
00506 su_inline
00507 #endif
00508 sip_status_t *sip_status_copy(su_home_t *home, sip_status_t const *hdr)
00509 __attribute__((__malloc__));
00510
00511 #if SU_HAVE_INLINE
00512 su_inline
00513 sip_status_t *sip_status_copy(su_home_t *home, sip_status_t const *hdr)
00514 {
00515 return (sip_status_t *)
00516 msg_header_copy_as(home, sip_status_class, (msg_header_t const *)hdr);
00517 }
00518 #endif
00519
00538 #if SU_HAVE_INLINE
00539 su_inline
00540 #endif
00541 sip_status_t *sip_status_make(su_home_t *home, char const *s)
00542 __attribute__((__malloc__));
00543
00544 #if SU_HAVE_INLINE
00545 su_inline sip_status_t *sip_status_make(su_home_t *home, char const *s)
00546 {
00547 return (sip_status_t *)sip_header_make(home, sip_status_class, s);
00548 }
00549 #endif
00550
00573 #if SU_HAVE_INLINE
00574 su_inline
00575 #endif
00576 sip_status_t *sip_status_format(su_home_t *home, char const *fmt, ...)
00577 __attribute__((__malloc__, __format__ (printf, 2, 3)));
00578
00579 #if SU_HAVE_INLINE
00580 su_inline sip_status_t *sip_status_format(su_home_t *home, char const *fmt, ...)
00581 {
00582 sip_header_t *h;
00583 va_list ap;
00584
00585 va_start(ap, fmt);
00586 h = sip_header_vformat(home, sip_status_class, fmt, ap);
00587 va_end(ap);
00588
00589 return (sip_status_t *)h;
00590 }
00591 #endif
00592
00600 SOFIAPUBFUN int sip_via_d(su_home_t *, msg_header_t *,
00601 char *s, int slen);
00602
00604 SOFIAPUBFUN int sip_via_e(char b[], int bsiz,
00605 msg_header_t const *h, int flags);
00606
00610 #define sip_via(sip) \
00611 ((sip_via_t *)msg_header_access((msg_pub_t*)(sip), sip_via_class))
00612
00625 #define SIP_VIA_INIT() SIP_HDR_INIT(via)
00626
00640 #if SU_HAVE_INLINE
00641 su_inline sip_via_t *sip_via_init(sip_via_t x[1])
00642 {
00643 return SIP_HEADER_INIT(x, sip_via_class, sizeof(sip_via_t));
00644 }
00645 #else
00646 #define sip_via_init(x) \
00647 SIP_HEADER_INIT(x, sip_via_class, sizeof(sip_via_t))
00648 #endif
00649
00663 #if SU_HAVE_INLINE
00664 su_inline int sip_is_via(sip_header_t const *header)
00665 {
00666 return header && header->sh_class->hc_hash == sip_via_hash;
00667 }
00668 #else
00669 int sip_is_via(sip_header_t const *header);
00670 #endif
00671
00672 #define sip_via_p(h) sip_is_via((h))
00673
00674
00702 #if SU_HAVE_INLINE
00703 su_inline
00704 #endif
00705 sip_via_t *sip_via_dup(su_home_t *home, sip_via_t const *hdr)
00706 __attribute__((__malloc__));
00707
00708 #if SU_HAVE_INLINE
00709 su_inline
00710 sip_via_t *sip_via_dup(su_home_t *home, sip_via_t const *hdr)
00711 {
00712 return (sip_via_t *)
00713 msg_header_dup_as(home, sip_via_class, (msg_header_t const *)hdr);
00714 }
00715 #endif
00716
00745 #if SU_HAVE_INLINE
00746 su_inline
00747 #endif
00748 sip_via_t *sip_via_copy(su_home_t *home, sip_via_t const *hdr)
00749 __attribute__((__malloc__));
00750
00751 #if SU_HAVE_INLINE
00752 su_inline
00753 sip_via_t *sip_via_copy(su_home_t *home, sip_via_t const *hdr)
00754 {
00755 return (sip_via_t *)
00756 msg_header_copy_as(home, sip_via_class, (msg_header_t const *)hdr);
00757 }
00758 #endif
00759
00778 #if SU_HAVE_INLINE
00779 su_inline
00780 #endif
00781 sip_via_t *sip_via_make(su_home_t *home, char const *s)
00782 __attribute__((__malloc__));
00783
00784 #if SU_HAVE_INLINE
00785 su_inline sip_via_t *sip_via_make(su_home_t *home, char const *s)
00786 {
00787 return (sip_via_t *)sip_header_make(home, sip_via_class, s);
00788 }
00789 #endif
00790
00813 #if SU_HAVE_INLINE
00814 su_inline
00815 #endif
00816 sip_via_t *sip_via_format(su_home_t *home, char const *fmt, ...)
00817 __attribute__((__malloc__, __format__ (printf, 2, 3)));
00818
00819 #if SU_HAVE_INLINE
00820 su_inline sip_via_t *sip_via_format(su_home_t *home, char const *fmt, ...)
00821 {
00822 sip_header_t *h;
00823 va_list ap;
00824
00825 va_start(ap, fmt);
00826 h = sip_header_vformat(home, sip_via_class, fmt, ap);
00827 va_end(ap);
00828
00829 return (sip_via_t *)h;
00830 }
00831 #endif
00832
00840 SOFIAPUBFUN int sip_route_d(su_home_t *, msg_header_t *,
00841 char *s, int slen);
00842
00844 SOFIAPUBFUN int sip_route_e(char b[], int bsiz,
00845 msg_header_t const *h, int flags);
00846
00850 #define sip_route(sip) \
00851 ((sip_route_t *)msg_header_access((msg_pub_t*)(sip), sip_route_class))
00852
00865 #define SIP_ROUTE_INIT() SIP_HDR_INIT(route)
00866
00880 #if SU_HAVE_INLINE
00881 su_inline sip_route_t *sip_route_init(sip_route_t x[1])
00882 {
00883 return SIP_HEADER_INIT(x, sip_route_class, sizeof(sip_route_t));
00884 }
00885 #else
00886 #define sip_route_init(x) \
00887 SIP_HEADER_INIT(x, sip_route_class, sizeof(sip_route_t))
00888 #endif
00889
00903 #if SU_HAVE_INLINE
00904 su_inline int sip_is_route(sip_header_t const *header)
00905 {
00906 return header && header->sh_class->hc_hash == sip_route_hash;
00907 }
00908 #else
00909 int sip_is_route(sip_header_t const *header);
00910 #endif
00911
00912 #define sip_route_p(h) sip_is_route((h))
00913
00914
00942 #if SU_HAVE_INLINE
00943 su_inline
00944 #endif
00945 sip_route_t *sip_route_dup(su_home_t *home, sip_route_t const *hdr)
00946 __attribute__((__malloc__));
00947
00948 #if SU_HAVE_INLINE
00949 su_inline
00950 sip_route_t *sip_route_dup(su_home_t *home, sip_route_t const *hdr)
00951 {
00952 return (sip_route_t *)
00953 msg_header_dup_as(home, sip_route_class, (msg_header_t const *)hdr);
00954 }
00955 #endif
00956
00985 #if SU_HAVE_INLINE
00986 su_inline
00987 #endif
00988 sip_route_t *sip_route_copy(su_home_t *home, sip_route_t const *hdr)
00989 __attribute__((__malloc__));
00990
00991 #if SU_HAVE_INLINE
00992 su_inline
00993 sip_route_t *sip_route_copy(su_home_t *home, sip_route_t const *hdr)
00994 {
00995 return (sip_route_t *)
00996 msg_header_copy_as(home, sip_route_class, (msg_header_t const *)hdr);
00997 }
00998 #endif
00999
01018 #if SU_HAVE_INLINE
01019 su_inline
01020 #endif
01021 sip_route_t *sip_route_make(su_home_t *home, char const *s)
01022 __attribute__((__malloc__));
01023
01024 #if SU_HAVE_INLINE
01025 su_inline sip_route_t *sip_route_make(su_home_t *home, char const *s)
01026 {
01027 return (sip_route_t *)sip_header_make(home, sip_route_class, s);
01028 }
01029 #endif
01030
01053 #if SU_HAVE_INLINE
01054 su_inline
01055 #endif
01056 sip_route_t *sip_route_format(su_home_t *home, char const *fmt, ...)
01057 __attribute__((__malloc__, __format__ (printf, 2, 3)));
01058
01059 #if SU_HAVE_INLINE
01060 su_inline sip_route_t *sip_route_format(su_home_t *home, char const *fmt, ...)
01061 {
01062 sip_header_t *h;
01063 va_list ap;
01064
01065 va_start(ap, fmt);
01066 h = sip_header_vformat(home, sip_route_class, fmt, ap);
01067 va_end(ap);
01068
01069 return (sip_route_t *)h;
01070 }
01071 #endif
01072
01080 SOFIAPUBFUN int sip_record_route_d(su_home_t *, msg_header_t *,
01081 char *s, int slen);
01082
01084 SOFIAPUBFUN int sip_record_route_e(char b[], int bsiz,
01085 msg_header_t const *h, int flags);
01086
01090 #define sip_record_route(sip) \
01091 ((sip_record_route_t *)msg_header_access((msg_pub_t*)(sip), sip_record_route_class))
01092
01105 #define SIP_RECORD_ROUTE_INIT() SIP_HDR_INIT(record_route)
01106
01120 #if SU_HAVE_INLINE
01121 su_inline sip_record_route_t *sip_record_route_init(sip_record_route_t x[1])
01122 {
01123 return SIP_HEADER_INIT(x, sip_record_route_class, sizeof(sip_record_route_t));
01124 }
01125 #else
01126 #define sip_record_route_init(x) \
01127 SIP_HEADER_INIT(x, sip_record_route_class, sizeof(sip_record_route_t))
01128 #endif
01129
01143 #if SU_HAVE_INLINE
01144 su_inline int sip_is_record_route(sip_header_t const *header)
01145 {
01146 return header && header->sh_class->hc_hash == sip_record_route_hash;
01147 }
01148 #else
01149 int sip_is_record_route(sip_header_t const *header);
01150 #endif
01151
01152 #define sip_record_route_p(h) sip_is_record_route((h))
01153
01154
01182 #if SU_HAVE_INLINE
01183 su_inline
01184 #endif
01185 sip_record_route_t *sip_record_route_dup(su_home_t *home, sip_record_route_t const *hdr)
01186 __attribute__((__malloc__));
01187
01188 #if SU_HAVE_INLINE
01189 su_inline
01190 sip_record_route_t *sip_record_route_dup(su_home_t *home, sip_record_route_t const *hdr)
01191 {
01192 return (sip_record_route_t *)
01193 msg_header_dup_as(home, sip_record_route_class, (msg_header_t const *)hdr);
01194 }
01195 #endif
01196
01225 #if SU_HAVE_INLINE
01226 su_inline
01227 #endif
01228 sip_record_route_t *sip_record_route_copy(su_home_t *home, sip_record_route_t const *hdr)
01229 __attribute__((__malloc__));
01230
01231 #if SU_HAVE_INLINE
01232 su_inline
01233 sip_record_route_t *sip_record_route_copy(su_home_t *home, sip_record_route_t const *hdr)
01234 {
01235 return (sip_record_route_t *)
01236 msg_header_copy_as(home, sip_record_route_class, (msg_header_t const *)hdr);
01237 }
01238 #endif
01239
01258 #if SU_HAVE_INLINE
01259 su_inline
01260 #endif
01261 sip_record_route_t *sip_record_route_make(su_home_t *home, char const *s)
01262 __attribute__((__malloc__));
01263
01264 #if SU_HAVE_INLINE
01265 su_inline sip_record_route_t *sip_record_route_make(su_home_t *home, char const *s)
01266 {
01267 return (sip_record_route_t *)sip_header_make(home, sip_record_route_class, s);
01268 }
01269 #endif
01270
01293 #if SU_HAVE_INLINE
01294 su_inline
01295 #endif
01296 sip_record_route_t *sip_record_route_format(su_home_t *home, char const *fmt, ...)
01297 __attribute__((__malloc__, __format__ (printf, 2, 3)));
01298
01299 #if SU_HAVE_INLINE
01300 su_inline sip_record_route_t *sip_record_route_format(su_home_t *home, char const *fmt, ...)
01301 {
01302 sip_header_t *h;
01303 va_list ap;
01304
01305 va_start(ap, fmt);
01306 h = sip_header_vformat(home, sip_record_route_class, fmt, ap);
01307 va_end(ap);
01308
01309 return (sip_record_route_t *)h;
01310 }
01311 #endif
01312
01320 SOFIAPUBFUN int sip_max_forwards_d(su_home_t *, msg_header_t *,
01321 char *s, int slen);
01322
01324 SOFIAPUBFUN int sip_max_forwards_e(char b[], int bsiz,
01325 msg_header_t const *h, int flags);
01326
01330 #define sip_max_forwards(sip) \
01331 ((sip_max_forwards_t *)msg_header_access((msg_pub_t*)(sip), sip_max_forwards_class))
01332
01345 #define SIP_MAX_FORWARDS_INIT() SIP_HDR_INIT(max_forwards)
01346
01360 #if SU_HAVE_INLINE
01361 su_inline sip_max_forwards_t *sip_max_forwards_init(sip_max_forwards_t x[1])
01362 {
01363 return SIP_HEADER_INIT(x, sip_max_forwards_class, sizeof(sip_max_forwards_t));
01364 }
01365 #else
01366 #define sip_max_forwards_init(x) \
01367 SIP_HEADER_INIT(x, sip_max_forwards_class, sizeof(sip_max_forwards_t))
01368 #endif
01369
01383 #if SU_HAVE_INLINE
01384 su_inline int sip_is_max_forwards(sip_header_t const *header)
01385 {
01386 return header && header->sh_class->hc_hash == sip_max_forwards_hash;
01387 }
01388 #else
01389 int sip_is_max_forwards(sip_header_t const *header);
01390 #endif
01391
01392 #define sip_max_forwards_p(h) sip_is_max_forwards((h))
01393
01394
01422 #if SU_HAVE_INLINE
01423 su_inline
01424 #endif
01425 sip_max_forwards_t *sip_max_forwards_dup(su_home_t *home, sip_max_forwards_t const *hdr)
01426 __attribute__((__malloc__));
01427
01428 #if SU_HAVE_INLINE
01429 su_inline
01430 sip_max_forwards_t *sip_max_forwards_dup(su_home_t *home, sip_max_forwards_t const *hdr)
01431 {
01432 return (sip_max_forwards_t *)
01433 msg_header_dup_as(home, sip_max_forwards_class, (msg_header_t const *)hdr);
01434 }
01435 #endif
01436
01465 #if SU_HAVE_INLINE
01466 su_inline
01467 #endif
01468 sip_max_forwards_t *sip_max_forwards_copy(su_home_t *home, sip_max_forwards_t const *hdr)
01469 __attribute__((__malloc__));
01470
01471 #if SU_HAVE_INLINE
01472 su_inline
01473 sip_max_forwards_t *sip_max_forwards_copy(su_home_t *home, sip_max_forwards_t const *hdr)
01474 {
01475 return (sip_max_forwards_t *)
01476 msg_header_copy_as(home, sip_max_forwards_class, (msg_header_t const *)hdr);
01477 }
01478 #endif
01479
01498 #if SU_HAVE_INLINE
01499 su_inline
01500 #endif
01501 sip_max_forwards_t *sip_max_forwards_make(su_home_t *home, char const *s)
01502 __attribute__((__malloc__));
01503
01504 #if SU_HAVE_INLINE
01505 su_inline sip_max_forwards_t *sip_max_forwards_make(su_home_t *home, char const *s)
01506 {
01507 return (sip_max_forwards_t *)sip_header_make(home, sip_max_forwards_class, s);
01508 }
01509 #endif
01510
01533 #if SU_HAVE_INLINE
01534 su_inline
01535 #endif
01536 sip_max_forwards_t *sip_max_forwards_format(su_home_t *home, char const *fmt, ...)
01537 __attribute__((__malloc__, __format__ (printf, 2, 3)));
01538
01539 #if SU_HAVE_INLINE
01540 su_inline sip_max_forwards_t *sip_max_forwards_format(su_home_t *home, char const *fmt, ...)
01541 {
01542 sip_header_t *h;
01543 va_list ap;
01544
01545 va_start(ap, fmt);
01546 h = sip_header_vformat(home, sip_max_forwards_class, fmt, ap);
01547 va_end(ap);
01548
01549 return (sip_max_forwards_t *)h;
01550 }
01551 #endif
01552
01560 SOFIAPUBFUN int sip_proxy_require_d(su_home_t *, msg_header_t *,
01561 char *s, int slen);
01562
01564 SOFIAPUBFUN int sip_proxy_require_e(char b[], int bsiz,
01565 msg_header_t const *h, int flags);
01566
01570 #define sip_proxy_require(sip) \
01571 ((sip_proxy_require_t *)msg_header_access((msg_pub_t*)(sip), sip_proxy_require_class))
01572
01585 #define SIP_PROXY_REQUIRE_INIT() SIP_HDR_INIT(proxy_require)
01586
01600 #if SU_HAVE_INLINE
01601 su_inline sip_proxy_require_t *sip_proxy_require_init(sip_proxy_require_t x[1])
01602 {
01603 return SIP_HEADER_INIT(x, sip_proxy_require_class, sizeof(sip_proxy_require_t));
01604 }
01605 #else
01606 #define sip_proxy_require_init(x) \
01607 SIP_HEADER_INIT(x, sip_proxy_require_class, sizeof(sip_proxy_require_t))
01608 #endif
01609
01623 #if SU_HAVE_INLINE
01624 su_inline int sip_is_proxy_require(sip_header_t const *header)
01625 {
01626 return header && header->sh_class->hc_hash == sip_proxy_require_hash;
01627 }
01628 #else
01629 int sip_is_proxy_require(sip_header_t const *header);
01630 #endif
01631
01632 #define sip_proxy_require_p(h) sip_is_proxy_require((h))
01633
01634
01662 #if SU_HAVE_INLINE
01663 su_inline
01664 #endif
01665 sip_proxy_require_t *sip_proxy_require_dup(su_home_t *home, sip_proxy_require_t const *hdr)
01666 __attribute__((__malloc__));
01667
01668 #if SU_HAVE_INLINE
01669 su_inline
01670 sip_proxy_require_t *sip_proxy_require_dup(su_home_t *home, sip_proxy_require_t const *hdr)
01671 {
01672 return (sip_proxy_require_t *)
01673 msg_header_dup_as(home, sip_proxy_require_class, (msg_header_t const *)hdr);
01674 }
01675 #endif
01676
01705 #if SU_HAVE_INLINE
01706 su_inline
01707 #endif
01708 sip_proxy_require_t *sip_proxy_require_copy(su_home_t *home, sip_proxy_require_t const *hdr)
01709 __attribute__((__malloc__));
01710
01711 #if SU_HAVE_INLINE
01712 su_inline
01713 sip_proxy_require_t *sip_proxy_require_copy(su_home_t *home, sip_proxy_require_t const *hdr)
01714 {
01715 return (sip_proxy_require_t *)
01716 msg_header_copy_as(home, sip_proxy_require_class, (msg_header_t const *)hdr);
01717 }
01718 #endif
01719
01738 #if SU_HAVE_INLINE
01739 su_inline
01740 #endif
01741 sip_proxy_require_t *sip_proxy_require_make(su_home_t *home, char const *s)
01742 __attribute__((__malloc__));
01743
01744 #if SU_HAVE_INLINE
01745 su_inline sip_proxy_require_t *sip_proxy_require_make(su_home_t *home, char const *s)
01746 {
01747 return (sip_proxy_require_t *)sip_header_make(home, sip_proxy_require_class, s);
01748 }
01749 #endif
01750
01773 #if SU_HAVE_INLINE
01774 su_inline
01775 #endif
01776 sip_proxy_require_t *sip_proxy_require_format(su_home_t *home, char const *fmt, ...)
01777 __attribute__((__malloc__, __format__ (printf, 2, 3)));
01778
01779 #if SU_HAVE_INLINE
01780 su_inline sip_proxy_require_t *sip_proxy_require_format(su_home_t *home, char const *fmt, ...)
01781 {
01782 sip_header_t *h;
01783 va_list ap;
01784
01785 va_start(ap, fmt);
01786 h = sip_header_vformat(home, sip_proxy_require_class, fmt, ap);
01787 va_end(ap);
01788
01789 return (sip_proxy_require_t *)h;
01790 }
01791 #endif
01792
01800 SOFIAPUBFUN int sip_from_d(su_home_t *, msg_header_t *,
01801 char *s, int slen);
01802
01804 SOFIAPUBFUN int sip_from_e(char b[], int bsiz,
01805 msg_header_t const *h, int flags);
01806
01810 #define sip_from(sip) \
01811 ((sip_from_t *)msg_header_access((msg_pub_t*)(sip), sip_from_class))
01812
01825 #define SIP_FROM_INIT() SIP_HDR_INIT(from)
01826
01840 #if SU_HAVE_INLINE
01841 su_inline sip_from_t *sip_from_init(sip_from_t x[1])
01842 {
01843 return SIP_HEADER_INIT(x, sip_from_class, sizeof(sip_from_t));
01844 }
01845 #else
01846 #define sip_from_init(x) \
01847 SIP_HEADER_INIT(x, sip_from_class, sizeof(sip_from_t))
01848 #endif
01849
01863 #if SU_HAVE_INLINE
01864 su_inline int sip_is_from(sip_header_t const *header)
01865 {
01866 return header && header->sh_class->hc_hash == sip_from_hash;
01867 }
01868 #else
01869 int sip_is_from(sip_header_t const *header);
01870 #endif
01871
01872 #define sip_from_p(h) sip_is_from((h))
01873
01874
01902 #if SU_HAVE_INLINE
01903 su_inline
01904 #endif
01905 sip_from_t *sip_from_dup(su_home_t *home, sip_from_t const *hdr)
01906 __attribute__((__malloc__));
01907
01908 #if SU_HAVE_INLINE
01909 su_inline
01910 sip_from_t *sip_from_dup(su_home_t *home, sip_from_t const *hdr)
01911 {
01912 return (sip_from_t *)
01913 msg_header_dup_as(home, sip_from_class, (msg_header_t const *)hdr);
01914 }
01915 #endif
01916
01945 #if SU_HAVE_INLINE
01946 su_inline
01947 #endif
01948 sip_from_t *sip_from_copy(su_home_t *home, sip_from_t const *hdr)
01949 __attribute__((__malloc__));
01950
01951 #if SU_HAVE_INLINE
01952 su_inline
01953 sip_from_t *sip_from_copy(su_home_t *home, sip_from_t const *hdr)
01954 {
01955 return (sip_from_t *)
01956 msg_header_copy_as(home, sip_from_class, (msg_header_t const *)hdr);
01957 }
01958 #endif
01959
01978 #if SU_HAVE_INLINE
01979 su_inline
01980 #endif
01981 sip_from_t *sip_from_make(su_home_t *home, char const *s)
01982 __attribute__((__malloc__));
01983
01984 #if SU_HAVE_INLINE
01985 su_inline sip_from_t *sip_from_make(su_home_t *home, char const *s)
01986 {
01987 return (sip_from_t *)sip_header_make(home, sip_from_class, s);
01988 }
01989 #endif
01990
02013 #if SU_HAVE_INLINE
02014 su_inline
02015 #endif
02016 sip_from_t *sip_from_format(su_home_t *home, char const *fmt, ...)
02017 __attribute__((__malloc__, __format__ (printf, 2, 3)));
02018
02019 #if SU_HAVE_INLINE
02020 su_inline sip_from_t *sip_from_format(su_home_t *home, char const *fmt, ...)
02021 {
02022 sip_header_t *h;
02023 va_list ap;
02024
02025 va_start(ap, fmt);
02026 h = sip_header_vformat(home, sip_from_class, fmt, ap);
02027 va_end(ap);
02028
02029 return (sip_from_t *)h;
02030 }
02031 #endif
02032
02040 SOFIAPUBFUN int sip_to_d(su_home_t *, msg_header_t *,
02041 char *s, int slen);
02042
02044 SOFIAPUBFUN int sip_to_e(char b[], int bsiz,
02045 msg_header_t const *h, int flags);
02046
02050 #define sip_to(sip) \
02051 ((sip_to_t *)msg_header_access((msg_pub_t*)(sip), sip_to_class))
02052
02065 #define SIP_TO_INIT() SIP_HDR_INIT(to)
02066
02080 #if SU_HAVE_INLINE
02081 su_inline sip_to_t *sip_to_init(sip_to_t x[1])
02082 {
02083 return SIP_HEADER_INIT(x, sip_to_class, sizeof(sip_to_t));
02084 }
02085 #else
02086 #define sip_to_init(x) \
02087 SIP_HEADER_INIT(x, sip_to_class, sizeof(sip_to_t))
02088 #endif
02089
02103 #if SU_HAVE_INLINE
02104 su_inline int sip_is_to(sip_header_t const *header)
02105 {
02106 return header && header->sh_class->hc_hash == sip_to_hash;
02107 }
02108 #else
02109 int sip_is_to(sip_header_t const *header);
02110 #endif
02111
02112 #define sip_to_p(h) sip_is_to((h))
02113
02114
02142 #if SU_HAVE_INLINE
02143 su_inline
02144 #endif
02145 sip_to_t *sip_to_dup(su_home_t *home, sip_to_t const *hdr)
02146 __attribute__((__malloc__));
02147
02148 #if SU_HAVE_INLINE
02149 su_inline
02150 sip_to_t *sip_to_dup(su_home_t *home, sip_to_t const *hdr)
02151 {
02152 return (sip_to_t *)
02153 msg_header_dup_as(home, sip_to_class, (msg_header_t const *)hdr);
02154 }
02155 #endif
02156
02185 #if SU_HAVE_INLINE
02186 su_inline
02187 #endif
02188 sip_to_t *sip_to_copy(su_home_t *home, sip_to_t const *hdr)
02189 __attribute__((__malloc__));
02190
02191 #if SU_HAVE_INLINE
02192 su_inline
02193 sip_to_t *sip_to_copy(su_home_t *home, sip_to_t const *hdr)
02194 {
02195 return (sip_to_t *)
02196 msg_header_copy_as(home, sip_to_class, (msg_header_t const *)hdr);
02197 }
02198 #endif
02199
02218 #if SU_HAVE_INLINE
02219 su_inline
02220 #endif
02221 sip_to_t *sip_to_make(su_home_t *home, char const *s)
02222 __attribute__((__malloc__));
02223
02224 #if SU_HAVE_INLINE
02225 su_inline sip_to_t *sip_to_make(su_home_t *home, char const *s)
02226 {
02227 return (sip_to_t *)sip_header_make(home, sip_to_class, s);
02228 }
02229 #endif
02230
02253 #if SU_HAVE_INLINE
02254 su_inline
02255 #endif
02256 sip_to_t *sip_to_format(su_home_t *home, char const *fmt, ...)
02257 __attribute__((__malloc__, __format__ (printf, 2, 3)));
02258
02259 #if SU_HAVE_INLINE
02260 su_inline sip_to_t *sip_to_format(su_home_t *home, char const *fmt, ...)
02261 {
02262 sip_header_t *h;
02263 va_list ap;
02264
02265 va_start(ap, fmt);
02266 h = sip_header_vformat(home, sip_to_class, fmt, ap);
02267 va_end(ap);
02268
02269 return (sip_to_t *)h;
02270 }
02271 #endif
02272
02280 SOFIAPUBFUN int sip_call_id_d(su_home_t *, msg_header_t *,
02281 char *s, int slen);
02282
02284 SOFIAPUBFUN int sip_call_id_e(char b[], int bsiz,
02285 msg_header_t const *h, int flags);
02286
02290 #define sip_call_id(sip) \
02291 ((sip_call_id_t *)msg_header_access((msg_pub_t*)(sip), sip_call_id_class))
02292
02305 #define SIP_CALL_ID_INIT() SIP_HDR_INIT(call_id)
02306
02320 #if SU_HAVE_INLINE
02321 su_inline sip_call_id_t *sip_call_id_init(sip_call_id_t x[1])
02322 {
02323 return SIP_HEADER_INIT(x, sip_call_id_class, sizeof(sip_call_id_t));
02324 }
02325 #else
02326 #define sip_call_id_init(x) \
02327 SIP_HEADER_INIT(x, sip_call_id_class, sizeof(sip_call_id_t))
02328 #endif
02329
02343 #if SU_HAVE_INLINE
02344 su_inline int sip_is_call_id(sip_header_t const *header)
02345 {
02346 return header && header->sh_class->hc_hash == sip_call_id_hash;
02347 }
02348 #else
02349 int sip_is_call_id(sip_header_t const *header);
02350 #endif
02351
02352 #define sip_call_id_p(h) sip_is_call_id((h))
02353
02354
02382 #if SU_HAVE_INLINE
02383 su_inline
02384 #endif
02385 sip_call_id_t *sip_call_id_dup(su_home_t *home, sip_call_id_t const *hdr)
02386 __attribute__((__malloc__));
02387
02388 #if SU_HAVE_INLINE
02389 su_inline
02390 sip_call_id_t *sip_call_id_dup(su_home_t *home, sip_call_id_t const *hdr)
02391 {
02392 return (sip_call_id_t *)
02393 msg_header_dup_as(home, sip_call_id_class, (msg_header_t const *)hdr);
02394 }
02395 #endif
02396
02425 #if SU_HAVE_INLINE
02426 su_inline
02427 #endif
02428 sip_call_id_t *sip_call_id_copy(su_home_t *home, sip_call_id_t const *hdr)
02429 __attribute__((__malloc__));
02430
02431 #if SU_HAVE_INLINE
02432 su_inline
02433 sip_call_id_t *sip_call_id_copy(su_home_t *home, sip_call_id_t const *hdr)
02434 {
02435 return (sip_call_id_t *)
02436 msg_header_copy_as(home, sip_call_id_class, (msg_header_t const *)hdr);
02437 }
02438 #endif
02439
02458 #if SU_HAVE_INLINE
02459 su_inline
02460 #endif
02461 sip_call_id_t *sip_call_id_make(su_home_t *home, char const *s)
02462 __attribute__((__malloc__));
02463
02464 #if SU_HAVE_INLINE
02465 su_inline sip_call_id_t *sip_call_id_make(su_home_t *home, char const *s)
02466 {
02467 return (sip_call_id_t *)sip_header_make(home, sip_call_id_class, s);
02468 }
02469 #endif
02470
02493 #if SU_HAVE_INLINE
02494 su_inline
02495 #endif
02496 sip_call_id_t *sip_call_id_format(su_home_t *home, char const *fmt, ...)
02497 __attribute__((__malloc__, __format__ (printf, 2, 3)));
02498
02499 #if SU_HAVE_INLINE
02500 su_inline sip_call_id_t *sip_call_id_format(su_home_t *home, char const *fmt, ...)
02501 {
02502 sip_header_t *h;
02503 va_list ap;
02504
02505 va_start(ap, fmt);
02506 h = sip_header_vformat(home, sip_call_id_class, fmt, ap);
02507 va_end(ap);
02508
02509 return (sip_call_id_t *)h;
02510 }
02511 #endif
02512
02520 SOFIAPUBFUN int sip_cseq_d(su_home_t *, msg_header_t *,
02521 char *s, int slen);
02522
02524 SOFIAPUBFUN int sip_cseq_e(char b[], int bsiz,
02525 msg_header_t const *h, int flags);
02526
02530 #define sip_cseq(sip) \
02531 ((sip_cseq_t *)msg_header_access((msg_pub_t*)(sip), sip_cseq_class))
02532
02545 #define SIP_CSEQ_INIT() SIP_HDR_INIT(cseq)
02546
02560 #if SU_HAVE_INLINE
02561 su_inline sip_cseq_t *sip_cseq_init(sip_cseq_t x[1])
02562 {
02563 return SIP_HEADER_INIT(x, sip_cseq_class, sizeof(sip_cseq_t));
02564 }
02565 #else
02566 #define sip_cseq_init(x) \
02567 SIP_HEADER_INIT(x, sip_cseq_class, sizeof(sip_cseq_t))
02568 #endif
02569
02583 #if SU_HAVE_INLINE
02584 su_inline int sip_is_cseq(sip_header_t const *header)
02585 {
02586 return header && header->sh_class->hc_hash == sip_cseq_hash;
02587 }
02588 #else
02589 int sip_is_cseq(sip_header_t const *header);
02590 #endif
02591
02592 #define sip_cseq_p(h) sip_is_cseq((h))
02593
02594
02622 #if SU_HAVE_INLINE
02623 su_inline
02624 #endif
02625 sip_cseq_t *sip_cseq_dup(su_home_t *home, sip_cseq_t const *hdr)
02626 __attribute__((__malloc__));
02627
02628 #if SU_HAVE_INLINE
02629 su_inline
02630 sip_cseq_t *sip_cseq_dup(su_home_t *home, sip_cseq_t const *hdr)
02631 {
02632 return (sip_cseq_t *)
02633 msg_header_dup_as(home, sip_cseq_class, (msg_header_t const *)hdr);
02634 }
02635 #endif
02636
02665 #if SU_HAVE_INLINE
02666 su_inline
02667 #endif
02668 sip_cseq_t *sip_cseq_copy(su_home_t *home, sip_cseq_t const *hdr)
02669 __attribute__((__malloc__));
02670
02671 #if SU_HAVE_INLINE
02672 su_inline
02673 sip_cseq_t *sip_cseq_copy(su_home_t *home, sip_cseq_t const *hdr)
02674 {
02675 return (sip_cseq_t *)
02676 msg_header_copy_as(home, sip_cseq_class, (msg_header_t const *)hdr);
02677 }
02678 #endif
02679
02698 #if SU_HAVE_INLINE
02699 su_inline
02700 #endif
02701 sip_cseq_t *sip_cseq_make(su_home_t *home, char const *s)
02702 __attribute__((__malloc__));
02703
02704 #if SU_HAVE_INLINE
02705 su_inline sip_cseq_t *sip_cseq_make(su_home_t *home, char const *s)
02706 {
02707 return (sip_cseq_t *)sip_header_make(home, sip_cseq_class, s);
02708 }
02709 #endif
02710
02733 #if SU_HAVE_INLINE
02734 su_inline
02735 #endif
02736 sip_cseq_t *sip_cseq_format(su_home_t *home, char const *fmt, ...)
02737 __attribute__((__malloc__, __format__ (printf, 2, 3)));
02738
02739 #if SU_HAVE_INLINE
02740 su_inline sip_cseq_t *sip_cseq_format(su_home_t *home, char const *fmt, ...)
02741 {
02742 sip_header_t *h;
02743 va_list ap;
02744
02745 va_start(ap, fmt);
02746 h = sip_header_vformat(home, sip_cseq_class, fmt, ap);
02747 va_end(ap);
02748
02749 return (sip_cseq_t *)h;
02750 }
02751 #endif
02752
02760 SOFIAPUBFUN int sip_contact_d(su_home_t *, msg_header_t *,
02761 char *s, int slen);
02762
02764 SOFIAPUBFUN int sip_contact_e(char b[], int bsiz,
02765 msg_header_t const *h, int flags);
02766
02770 #define sip_contact(sip) \
02771 ((sip_contact_t *)msg_header_access((msg_pub_t*)(sip), sip_contact_class))
02772
02785 #define SIP_CONTACT_INIT() SIP_HDR_INIT(contact)
02786
02800 #if SU_HAVE_INLINE
02801 su_inline sip_contact_t *sip_contact_init(sip_contact_t x[1])
02802 {
02803 return SIP_HEADER_INIT(x, sip_contact_class, sizeof(sip_contact_t));
02804 }
02805 #else
02806 #define sip_contact_init(x) \
02807 SIP_HEADER_INIT(x, sip_contact_class, sizeof(sip_contact_t))
02808 #endif
02809
02823 #if SU_HAVE_INLINE
02824 su_inline int sip_is_contact(sip_header_t const *header)
02825 {
02826 return header && header->sh_class->hc_hash == sip_contact_hash;
02827 }
02828 #else
02829 int sip_is_contact(sip_header_t const *header);
02830 #endif
02831
02832 #define sip_contact_p(h) sip_is_contact((h))
02833
02834
02862 #if SU_HAVE_INLINE
02863 su_inline
02864 #endif
02865 sip_contact_t *sip_contact_dup(su_home_t *home, sip_contact_t const *hdr)
02866 __attribute__((__malloc__));
02867
02868 #if SU_HAVE_INLINE
02869 su_inline
02870 sip_contact_t *sip_contact_dup(su_home_t *home, sip_contact_t const *hdr)
02871 {
02872 return (sip_contact_t *)
02873 msg_header_dup_as(home, sip_contact_class, (msg_header_t const *)hdr);
02874 }
02875 #endif
02876
02905 #if SU_HAVE_INLINE
02906 su_inline
02907 #endif
02908 sip_contact_t *sip_contact_copy(su_home_t *home, sip_contact_t const *hdr)
02909 __attribute__((__malloc__));
02910
02911 #if SU_HAVE_INLINE
02912 su_inline
02913 sip_contact_t *sip_contact_copy(su_home_t *home, sip_contact_t const *hdr)
02914 {
02915 return (sip_contact_t *)
02916 msg_header_copy_as(home, sip_contact_class, (msg_header_t const *)hdr);
02917 }
02918 #endif
02919
02938 #if SU_HAVE_INLINE
02939 su_inline
02940 #endif
02941 sip_contact_t *sip_contact_make(su_home_t *home, char const *s)
02942 __attribute__((__malloc__));
02943
02944 #if SU_HAVE_INLINE
02945 su_inline sip_contact_t *sip_contact_make(su_home_t *home, char const *s)
02946 {
02947 return (sip_contact_t *)sip_header_make(home, sip_contact_class, s);
02948 }
02949 #endif
02950
02973 #if SU_HAVE_INLINE
02974 su_inline
02975 #endif
02976 sip_contact_t *sip_contact_format(su_home_t *home, char const *fmt, ...)
02977 __attribute__((__malloc__, __format__ (printf, 2, 3)));
02978
02979 #if SU_HAVE_INLINE
02980 su_inline sip_contact_t *sip_contact_format(su_home_t *home, char const *fmt, ...)
02981 {
02982 sip_header_t *h;
02983 va_list ap;
02984
02985 va_start(ap, fmt);
02986 h = sip_header_vformat(home, sip_contact_class, fmt, ap);
02987 va_end(ap);
02988
02989 return (sip_contact_t *)h;
02990 }
02991 #endif
02992
03000 SOFIAPUBFUN int sip_rseq_d(su_home_t *, msg_header_t *,
03001 char *s, int slen);
03002
03004 SOFIAPUBFUN int sip_rseq_e(char b[], int bsiz,
03005 msg_header_t const *h, int flags);
03006
03010 #define sip_rseq(sip) \
03011 ((sip_rseq_t *)msg_header_access((msg_pub_t*)(sip), sip_rseq_class))
03012
03025 #define SIP_RSEQ_INIT() SIP_HDR_INIT(rseq)
03026
03040 #if SU_HAVE_INLINE
03041 su_inline sip_rseq_t *sip_rseq_init(sip_rseq_t x[1])
03042 {
03043 return SIP_HEADER_INIT(x, sip_rseq_class, sizeof(sip_rseq_t));
03044 }
03045 #else
03046 #define sip_rseq_init(x) \
03047 SIP_HEADER_INIT(x, sip_rseq_class, sizeof(sip_rseq_t))
03048 #endif
03049
03063 #if SU_HAVE_INLINE
03064 su_inline int sip_is_rseq(sip_header_t const *header)
03065 {
03066 return header && header->sh_class->hc_hash == sip_rseq_hash;
03067 }
03068 #else
03069 int sip_is_rseq(sip_header_t const *header);
03070 #endif
03071
03072 #define sip_rseq_p(h) sip_is_rseq((h))
03073
03074
03102 #if SU_HAVE_INLINE
03103 su_inline
03104 #endif
03105 sip_rseq_t *sip_rseq_dup(su_home_t *home, sip_rseq_t const *hdr)
03106 __attribute__((__malloc__));
03107
03108 #if SU_HAVE_INLINE
03109 su_inline
03110 sip_rseq_t *sip_rseq_dup(su_home_t *home, sip_rseq_t const *hdr)
03111 {
03112 return (sip_rseq_t *)
03113 msg_header_dup_as(home, sip_rseq_class, (msg_header_t const *)hdr);
03114 }
03115 #endif
03116
03145 #if SU_HAVE_INLINE
03146 su_inline
03147 #endif
03148 sip_rseq_t *sip_rseq_copy(su_home_t *home, sip_rseq_t const *hdr)
03149 __attribute__((__malloc__));
03150
03151 #if SU_HAVE_INLINE
03152 su_inline
03153 sip_rseq_t *sip_rseq_copy(su_home_t *home, sip_rseq_t const *hdr)
03154 {
03155 return (sip_rseq_t *)
03156 msg_header_copy_as(home, sip_rseq_class, (msg_header_t const *)hdr);
03157 }
03158 #endif
03159
03178 #if SU_HAVE_INLINE
03179 su_inline
03180 #endif
03181 sip_rseq_t *sip_rseq_make(su_home_t *home, char const *s)
03182 __attribute__((__malloc__));
03183
03184 #if SU_HAVE_INLINE
03185 su_inline sip_rseq_t *sip_rseq_make(su_home_t *home, char const *s)
03186 {
03187 return (sip_rseq_t *)sip_header_make(home, sip_rseq_class, s);
03188 }
03189 #endif
03190
03213 #if SU_HAVE_INLINE
03214 su_inline
03215 #endif
03216 sip_rseq_t *sip_rseq_format(su_home_t *home, char const *fmt, ...)
03217 __attribute__((__malloc__, __format__ (printf, 2, 3)));
03218
03219 #if SU_HAVE_INLINE
03220 su_inline sip_rseq_t *sip_rseq_format(su_home_t *home, char const *fmt, ...)
03221 {
03222 sip_header_t *h;
03223 va_list ap;
03224
03225 va_start(ap, fmt);
03226 h = sip_header_vformat(home, sip_rseq_class, fmt, ap);
03227 va_end(ap);
03228
03229 return (sip_rseq_t *)h;
03230 }
03231 #endif
03232
03240 SOFIAPUBFUN int sip_rack_d(su_home_t *, msg_header_t *,
03241 char *s, int slen);
03242
03244 SOFIAPUBFUN int sip_rack_e(char b[], int bsiz,
03245 msg_header_t const *h, int flags);
03246
03250 #define sip_rack(sip) \
03251 ((sip_rack_t *)msg_header_access((msg_pub_t*)(sip), sip_rack_class))
03252
03265 #define SIP_RACK_INIT() SIP_HDR_INIT(rack)
03266
03280 #if SU_HAVE_INLINE
03281 su_inline sip_rack_t *sip_rack_init(sip_rack_t x[1])
03282 {
03283 return SIP_HEADER_INIT(x, sip_rack_class, sizeof(sip_rack_t));
03284 }
03285 #else
03286 #define sip_rack_init(x) \
03287 SIP_HEADER_INIT(x, sip_rack_class, sizeof(sip_rack_t))
03288 #endif
03289
03303 #if SU_HAVE_INLINE
03304 su_inline int sip_is_rack(sip_header_t const *header)
03305 {
03306 return header && header->sh_class->hc_hash == sip_rack_hash;
03307 }
03308 #else
03309 int sip_is_rack(sip_header_t const *header);
03310 #endif
03311
03312 #define sip_rack_p(h) sip_is_rack((h))
03313
03314
03342 #if SU_HAVE_INLINE
03343 su_inline
03344 #endif
03345 sip_rack_t *sip_rack_dup(su_home_t *home, sip_rack_t const *hdr)
03346 __attribute__((__malloc__));
03347
03348 #if SU_HAVE_INLINE
03349 su_inline
03350 sip_rack_t *sip_rack_dup(su_home_t *home, sip_rack_t const *hdr)
03351 {
03352 return (sip_rack_t *)
03353 msg_header_dup_as(home, sip_rack_class, (msg_header_t const *)hdr);
03354 }
03355 #endif
03356
03385 #if SU_HAVE_INLINE
03386 su_inline
03387 #endif
03388 sip_rack_t *sip_rack_copy(su_home_t *home, sip_rack_t const *hdr)
03389 __attribute__((__malloc__));
03390
03391 #if SU_HAVE_INLINE
03392 su_inline
03393 sip_rack_t *sip_rack_copy(su_home_t *home, sip_rack_t const *hdr)
03394 {
03395 return (sip_rack_t *)
03396 msg_header_copy_as(home, sip_rack_class, (msg_header_t const *)hdr);
03397 }
03398 #endif
03399
03418 #if SU_HAVE_INLINE
03419 su_inline
03420 #endif
03421 sip_rack_t *sip_rack_make(su_home_t *home, char const *s)
03422 __attribute__((__malloc__));
03423
03424 #if SU_HAVE_INLINE
03425 su_inline sip_rack_t *sip_rack_make(su_home_t *home, char const *s)
03426 {
03427 return (sip_rack_t *)sip_header_make(home, sip_rack_class, s);
03428 }
03429 #endif
03430
03453 #if SU_HAVE_INLINE
03454 su_inline
03455 #endif
03456 sip_rack_t *sip_rack_format(su_home_t *home, char const *fmt, ...)
03457 __attribute__((__malloc__, __format__ (printf, 2, 3)));
03458
03459 #if SU_HAVE_INLINE
03460 su_inline sip_rack_t *sip_rack_format(su_home_t *home, char const *fmt, ...)
03461 {
03462 sip_header_t *h;
03463 va_list ap;
03464
03465 va_start(ap, fmt);
03466 h = sip_header_vformat(home, sip_rack_class, fmt, ap);
03467 va_end(ap);
03468
03469 return (sip_rack_t *)h;
03470 }
03471 #endif
03472
03480 SOFIAPUBFUN int sip_request_disposition_d(su_home_t *, msg_header_t *,
03481 char *s, int slen);
03482
03484 SOFIAPUBFUN int sip_request_disposition_e(char b[], int bsiz,
03485 msg_header_t const *h, int flags);
03486
03490 #define sip_request_disposition(sip) \
03491 ((sip_request_disposition_t *)msg_header_access((msg_pub_t*)(sip), sip_request_disposition_class))
03492
03505 #define SIP_REQUEST_DISPOSITION_INIT() SIP_HDR_INIT(request_disposition)
03506
03520 #if SU_HAVE_INLINE
03521 su_inline sip_request_disposition_t *sip_request_disposition_init(sip_request_disposition_t x[1])
03522 {
03523 return SIP_HEADER_INIT(x, sip_request_disposition_class, sizeof(sip_request_disposition_t));
03524 }
03525 #else
03526 #define sip_request_disposition_init(x) \
03527 SIP_HEADER_INIT(x, sip_request_disposition_class, sizeof(sip_request_disposition_t))
03528 #endif
03529
03543 #if SU_HAVE_INLINE
03544 su_inline int sip_is_request_disposition(sip_header_t const *header)
03545 {
03546 return header && header->sh_class->hc_hash == sip_request_disposition_hash;
03547 }
03548 #else
03549 int sip_is_request_disposition(sip_header_t const *header);
03550 #endif
03551
03552 #define sip_request_disposition_p(h) sip_is_request_disposition((h))
03553
03554
03582 #if SU_HAVE_INLINE
03583 su_inline
03584 #endif
03585 sip_request_disposition_t *sip_request_disposition_dup(su_home_t *home, sip_request_disposition_t const *hdr)
03586 __attribute__((__malloc__));
03587
03588 #if SU_HAVE_INLINE
03589 su_inline
03590 sip_request_disposition_t *sip_request_disposition_dup(su_home_t *home, sip_request_disposition_t const *hdr)
03591 {
03592 return (sip_request_disposition_t *)
03593 msg_header_dup_as(home, sip_request_disposition_class, (msg_header_t const *)hdr);
03594 }
03595 #endif
03596
03625 #if SU_HAVE_INLINE
03626 su_inline
03627 #endif
03628 sip_request_disposition_t *sip_request_disposition_copy(su_home_t *home, sip_request_disposition_t const *hdr)
03629 __attribute__((__malloc__));
03630
03631 #if SU_HAVE_INLINE
03632 su_inline
03633 sip_request_disposition_t *sip_request_disposition_copy(su_home_t *home, sip_request_disposition_t const *hdr)
03634 {
03635 return (sip_request_disposition_t *)
03636 msg_header_copy_as(home, sip_request_disposition_class, (msg_header_t const *)hdr);
03637 }
03638 #endif
03639
03658 #if SU_HAVE_INLINE
03659 su_inline
03660 #endif
03661 sip_request_disposition_t *sip_request_disposition_make(su_home_t *home, char const *s)
03662 __attribute__((__malloc__));
03663
03664 #if SU_HAVE_INLINE
03665 su_inline sip_request_disposition_t *sip_request_disposition_make(su_home_t *home, char const *s)
03666 {
03667 return (sip_request_disposition_t *)sip_header_make(home, sip_request_disposition_class, s);
03668 }
03669 #endif
03670
03693 #if SU_HAVE_INLINE
03694 su_inline
03695 #endif
03696 sip_request_disposition_t *sip_request_disposition_format(su_home_t *home, char const *fmt, ...)
03697 __attribute__((__malloc__, __format__ (printf, 2, 3)));
03698
03699 #if SU_HAVE_INLINE
03700 su_inline sip_request_disposition_t *sip_request_disposition_format(su_home_t *home, char const *fmt, ...)
03701 {
03702 sip_header_t *h;
03703 va_list ap;
03704
03705 va_start(ap, fmt);
03706 h = sip_header_vformat(home, sip_request_disposition_class, fmt, ap);
03707 va_end(ap);
03708
03709 return (sip_request_disposition_t *)h;
03710 }
03711 #endif
03712
03720 SOFIAPUBFUN int sip_accept_contact_d(su_home_t *, msg_header_t *,
03721 char *s, int slen);
03722
03724 SOFIAPUBFUN int sip_accept_contact_e(char b[], int bsiz,
03725 msg_header_t const *h, int flags);
03726
03730 #define sip_accept_contact(sip) \
03731 ((sip_accept_contact_t *)msg_header_access((msg_pub_t*)(sip), sip_accept_contact_class))
03732
03745 #define SIP_ACCEPT_CONTACT_INIT() SIP_HDR_INIT(accept_contact)
03746
03760 #if SU_HAVE_INLINE
03761 su_inline sip_accept_contact_t *sip_accept_contact_init(sip_accept_contact_t x[1])
03762 {
03763 return SIP_HEADER_INIT(x, sip_accept_contact_class, sizeof(sip_accept_contact_t));
03764 }
03765 #else
03766 #define sip_accept_contact_init(x) \
03767 SIP_HEADER_INIT(x, sip_accept_contact_class, sizeof(sip_accept_contact_t))
03768 #endif
03769
03783 #if SU_HAVE_INLINE
03784 su_inline int sip_is_accept_contact(sip_header_t const *header)
03785 {
03786 return header && header->sh_class->hc_hash == sip_accept_contact_hash;
03787 }
03788 #else
03789 int sip_is_accept_contact(sip_header_t const *header);
03790 #endif
03791
03792 #define sip_accept_contact_p(h) sip_is_accept_contact((h))
03793
03794
03822 #if SU_HAVE_INLINE
03823 su_inline
03824 #endif
03825 sip_accept_contact_t *sip_accept_contact_dup(su_home_t *home, sip_accept_contact_t const *hdr)
03826 __attribute__((__malloc__));
03827
03828 #if SU_HAVE_INLINE
03829 su_inline
03830 sip_accept_contact_t *sip_accept_contact_dup(su_home_t *home, sip_accept_contact_t const *hdr)
03831 {
03832 return (sip_accept_contact_t *)
03833 msg_header_dup_as(home, sip_accept_contact_class, (msg_header_t const *)hdr);
03834 }
03835 #endif
03836
03865 #if SU_HAVE_INLINE
03866 su_inline
03867 #endif
03868 sip_accept_contact_t *sip_accept_contact_copy(su_home_t *home, sip_accept_contact_t const *hdr)
03869 __attribute__((__malloc__));
03870
03871 #if SU_HAVE_INLINE
03872 su_inline
03873 sip_accept_contact_t *sip_accept_contact_copy(su_home_t *home, sip_accept_contact_t const *hdr)
03874 {
03875 return (sip_accept_contact_t *)
03876 msg_header_copy_as(home, sip_accept_contact_class, (msg_header_t const *)hdr);
03877 }
03878 #endif
03879
03898 #if SU_HAVE_INLINE
03899 su_inline
03900 #endif
03901 sip_accept_contact_t *sip_accept_contact_make(su_home_t *home, char const *s)
03902 __attribute__((__malloc__));
03903
03904 #if SU_HAVE_INLINE
03905 su_inline sip_accept_contact_t *sip_accept_contact_make(su_home_t *home, char const *s)
03906 {
03907 return (sip_accept_contact_t *)sip_header_make(home, sip_accept_contact_class, s);
03908 }
03909 #endif
03910
03933 #if SU_HAVE_INLINE
03934 su_inline
03935 #endif
03936 sip_accept_contact_t *sip_accept_contact_format(su_home_t *home, char const *fmt, ...)
03937 __attribute__((__malloc__, __format__ (printf, 2, 3)));
03938
03939 #if SU_HAVE_INLINE
03940 su_inline sip_accept_contact_t *sip_accept_contact_format(su_home_t *home, char const *fmt, ...)
03941 {
03942 sip_header_t *h;
03943 va_list ap;
03944
03945 va_start(ap, fmt);
03946 h = sip_header_vformat(home, sip_accept_contact_class, fmt, ap);
03947 va_end(ap);
03948
03949 return (sip_accept_contact_t *)h;
03950 }
03951 #endif
03952
03960 SOFIAPUBFUN int sip_reject_contact_d(su_home_t *, msg_header_t *,
03961 char *s, int slen);
03962
03964 SOFIAPUBFUN int sip_reject_contact_e(char b[], int bsiz,
03965 msg_header_t const *h, int flags);
03966
03970 #define sip_reject_contact(sip) \
03971 ((sip_reject_contact_t *)msg_header_access((msg_pub_t*)(sip), sip_reject_contact_class))
03972
03985 #define SIP_REJECT_CONTACT_INIT() SIP_HDR_INIT(reject_contact)
03986
04000 #if SU_HAVE_INLINE
04001 su_inline sip_reject_contact_t *sip_reject_contact_init(sip_reject_contact_t x[1])
04002 {
04003 return SIP_HEADER_INIT(x, sip_reject_contact_class, sizeof(sip_reject_contact_t));
04004 }
04005 #else
04006 #define sip_reject_contact_init(x) \
04007 SIP_HEADER_INIT(x, sip_reject_contact_class, sizeof(sip_reject_contact_t))
04008 #endif
04009
04023 #if SU_HAVE_INLINE
04024 su_inline int sip_is_reject_contact(sip_header_t const *header)
04025 {
04026 return header && header->sh_class->hc_hash == sip_reject_contact_hash;
04027 }
04028 #else
04029 int sip_is_reject_contact(sip_header_t const *header);
04030 #endif
04031
04032 #define sip_reject_contact_p(h) sip_is_reject_contact((h))
04033
04034
04062 #if SU_HAVE_INLINE
04063 su_inline
04064 #endif
04065 sip_reject_contact_t *sip_reject_contact_dup(su_home_t *home, sip_reject_contact_t const *hdr)
04066 __attribute__((__malloc__));
04067
04068 #if SU_HAVE_INLINE
04069 su_inline
04070 sip_reject_contact_t *sip_reject_contact_dup(su_home_t *home, sip_reject_contact_t const *hdr)
04071 {
04072 return (sip_reject_contact_t *)
04073 msg_header_dup_as(home, sip_reject_contact_class, (msg_header_t const *)hdr);
04074 }
04075 #endif
04076
04105 #if SU_HAVE_INLINE
04106 su_inline
04107 #endif
04108 sip_reject_contact_t *sip_reject_contact_copy(su_home_t *home, sip_reject_contact_t const *hdr)
04109 __attribute__((__malloc__));
04110
04111 #if SU_HAVE_INLINE
04112 su_inline
04113 sip_reject_contact_t *sip_reject_contact_copy(su_home_t *home, sip_reject_contact_t const *hdr)
04114 {
04115 return (sip_reject_contact_t *)
04116 msg_header_copy_as(home, sip_reject_contact_class, (msg_header_t const *)hdr);
04117 }
04118 #endif
04119
04138 #if SU_HAVE_INLINE
04139 su_inline
04140 #endif
04141 sip_reject_contact_t *sip_reject_contact_make(su_home_t *home, char const *s)
04142 __attribute__((__malloc__));
04143
04144 #if SU_HAVE_INLINE
04145 su_inline sip_reject_contact_t *sip_reject_contact_make(su_home_t *home, char const *s)
04146 {
04147 return (sip_reject_contact_t *)sip_header_make(home, sip_reject_contact_class, s);
04148 }
04149 #endif
04150
04173 #if SU_HAVE_INLINE
04174 su_inline
04175 #endif
04176 sip_reject_contact_t *sip_reject_contact_format(su_home_t *home, char const *fmt, ...)
04177 __attribute__((__malloc__, __format__ (printf, 2, 3)));
04178
04179 #if SU_HAVE_INLINE
04180 su_inline sip_reject_contact_t *sip_reject_contact_format(su_home_t *home, char const *fmt, ...)
04181 {
04182 sip_header_t *h;
04183 va_list ap;
04184
04185 va_start(ap, fmt);
04186 h = sip_header_vformat(home, sip_reject_contact_class, fmt, ap);
04187 va_end(ap);
04188
04189 return (sip_reject_contact_t *)h;
04190 }
04191 #endif
04192
04200 SOFIAPUBFUN int sip_expires_d(su_home_t *, msg_header_t *,
04201 char *s, int slen);
04202
04204 SOFIAPUBFUN int sip_expires_e(char b[], int bsiz,
04205 msg_header_t const *h, int flags);
04206
04210 #define sip_expires(sip) \
04211 ((sip_expires_t *)msg_header_access((msg_pub_t*)(sip), sip_expires_class))
04212
04225 #define SIP_EXPIRES_INIT() SIP_HDR_INIT(expires)
04226
04240 #if SU_HAVE_INLINE
04241 su_inline sip_expires_t *sip_expires_init(sip_expires_t x[1])
04242 {
04243 return SIP_HEADER_INIT(x, sip_expires_class, sizeof(sip_expires_t));
04244 }
04245 #else
04246 #define sip_expires_init(x) \
04247 SIP_HEADER_INIT(x, sip_expires_class, sizeof(sip_expires_t))
04248 #endif
04249
04263 #if SU_HAVE_INLINE
04264 su_inline int sip_is_expires(sip_header_t const *header)
04265 {
04266 return header && header->sh_class->hc_hash == sip_expires_hash;
04267 }
04268 #else
04269 int sip_is_expires(sip_header_t const *header);
04270 #endif
04271
04272 #define sip_expires_p(h) sip_is_expires((h))
04273
04274
04302 #if SU_HAVE_INLINE
04303 su_inline
04304 #endif
04305 sip_expires_t *sip_expires_dup(su_home_t *home, sip_expires_t const *hdr)
04306 __attribute__((__malloc__));
04307
04308 #if SU_HAVE_INLINE
04309 su_inline
04310 sip_expires_t *sip_expires_dup(su_home_t *home, sip_expires_t const *hdr)
04311 {
04312 return (sip_expires_t *)
04313 msg_header_dup_as(home, sip_expires_class, (msg_header_t const *)hdr);
04314 }
04315 #endif
04316
04345 #if SU_HAVE_INLINE
04346 su_inline
04347 #endif
04348 sip_expires_t *sip_expires_copy(su_home_t *home, sip_expires_t const *hdr)
04349 __attribute__((__malloc__));
04350
04351 #if SU_HAVE_INLINE
04352 su_inline
04353 sip_expires_t *sip_expires_copy(su_home_t *home, sip_expires_t const *hdr)
04354 {
04355 return (sip_expires_t *)
04356 msg_header_copy_as(home, sip_expires_class, (msg_header_t const *)hdr);
04357 }
04358 #endif
04359
04378 #if SU_HAVE_INLINE
04379 su_inline
04380 #endif
04381 sip_expires_t *sip_expires_make(su_home_t *home, char const *s)
04382 __attribute__((__malloc__));
04383
04384 #if SU_HAVE_INLINE
04385 su_inline sip_expires_t *sip_expires_make(su_home_t *home, char const *s)
04386 {
04387 return (sip_expires_t *)sip_header_make(home, sip_expires_class, s);
04388 }
04389 #endif
04390
04413 #if SU_HAVE_INLINE
04414 su_inline
04415 #endif
04416 sip_expires_t *sip_expires_format(su_home_t *home, char const *fmt, ...)
04417 __attribute__((__malloc__, __format__ (printf, 2, 3)));
04418
04419 #if SU_HAVE_INLINE
04420 su_inline sip_expires_t *sip_expires_format(su_home_t *home, char const *fmt, ...)
04421 {
04422 sip_header_t *h;
04423 va_list ap;
04424
04425 va_start(ap, fmt);
04426 h = sip_header_vformat(home, sip_expires_class, fmt, ap);
04427 va_end(ap);
04428
04429 return (sip_expires_t *)h;
04430 }
04431 #endif
04432
04440 SOFIAPUBFUN int sip_date_d(su_home_t *, msg_header_t *,
04441 char *s, int slen);
04442
04444 SOFIAPUBFUN int sip_date_e(char b[], int bsiz,
04445 msg_header_t const *h, int flags);
04446
04450 #define sip_date(sip) \
04451 ((sip_date_t *)msg_header_access((msg_pub_t*)(sip), sip_date_class))
04452
04465 #define SIP_DATE_INIT() SIP_HDR_INIT(date)
04466
04480 #if SU_HAVE_INLINE
04481 su_inline sip_date_t *sip_date_init(sip_date_t x[1])
04482 {
04483 return SIP_HEADER_INIT(x, sip_date_class, sizeof(sip_date_t));
04484 }
04485 #else
04486 #define sip_date_init(x) \
04487 SIP_HEADER_INIT(x, sip_date_class, sizeof(sip_date_t))
04488 #endif
04489
04503 #if SU_HAVE_INLINE
04504 su_inline int sip_is_date(sip_header_t const *header)
04505 {
04506 return header && header->sh_class->hc_hash == sip_date_hash;
04507 }
04508 #else
04509 int sip_is_date(sip_header_t const *header);
04510 #endif
04511
04512 #define sip_date_p(h) sip_is_date((h))
04513
04514
04542 #if SU_HAVE_INLINE
04543 su_inline
04544 #endif
04545 sip_date_t *sip_date_dup(su_home_t *home, sip_date_t const *hdr)
04546 __attribute__((__malloc__));
04547
04548 #if SU_HAVE_INLINE
04549 su_inline
04550 sip_date_t *sip_date_dup(su_home_t *home, sip_date_t const *hdr)
04551 {
04552 return (sip_date_t *)
04553 msg_header_dup_as(home, sip_date_class, (msg_header_t const *)hdr);
04554 }
04555 #endif
04556
04585 #if SU_HAVE_INLINE
04586 su_inline
04587 #endif
04588 sip_date_t *sip_date_copy(su_home_t *home, sip_date_t const *hdr)
04589 __attribute__((__malloc__));
04590
04591 #if SU_HAVE_INLINE
04592 su_inline
04593 sip_date_t *sip_date_copy(su_home_t *home, sip_date_t const *hdr)
04594 {
04595 return (sip_date_t *)
04596 msg_header_copy_as(home, sip_date_class, (msg_header_t const *)hdr);
04597 }
04598 #endif
04599
04618 #if SU_HAVE_INLINE
04619 su_inline
04620 #endif
04621 sip_date_t *sip_date_make(su_home_t *home, char const *s)
04622 __attribute__((__malloc__));
04623
04624 #if SU_HAVE_INLINE
04625 su_inline sip_date_t *sip_date_make(su_home_t *home, char const *s)
04626 {
04627 return (sip_date_t *)sip_header_make(home, sip_date_class, s);
04628 }
04629 #endif
04630
04653 #if SU_HAVE_INLINE
04654 su_inline
04655 #endif
04656 sip_date_t *sip_date_format(su_home_t *home, char const *fmt, ...)
04657 __attribute__((__malloc__, __format__ (printf, 2, 3)));
04658
04659 #if SU_HAVE_INLINE
04660 su_inline sip_date_t *sip_date_format(su_home_t *home, char const *fmt, ...)
04661 {
04662 sip_header_t *h;
04663 va_list ap;
04664
04665 va_start(ap, fmt);
04666 h = sip_header_vformat(home, sip_date_class, fmt, ap);
04667 va_end(ap);
04668
04669 return (sip_date_t *)h;
04670 }
04671 #endif
04672
04680 SOFIAPUBFUN int sip_retry_after_d(su_home_t *, msg_header_t *,
04681 char *s, int slen);
04682
04684 SOFIAPUBFUN int sip_retry_after_e(char b[], int bsiz,
04685 msg_header_t const *h, int flags);
04686
04690 #define sip_retry_after(sip) \
04691 ((sip_retry_after_t *)msg_header_access((msg_pub_t*)(sip), sip_retry_after_class))
04692
04705 #define SIP_RETRY_AFTER_INIT() SIP_HDR_INIT(retry_after)
04706
04720 #if SU_HAVE_INLINE
04721 su_inline sip_retry_after_t *sip_retry_after_init(sip_retry_after_t x[1])
04722 {
04723 return SIP_HEADER_INIT(x, sip_retry_after_class, sizeof(sip_retry_after_t));
04724 }
04725 #else
04726 #define sip_retry_after_init(x) \
04727 SIP_HEADER_INIT(x, sip_retry_after_class, sizeof(sip_retry_after_t))
04728 #endif
04729
04743 #if SU_HAVE_INLINE
04744 su_inline int sip_is_retry_after(sip_header_t const *header)
04745 {
04746 return header && header->sh_class->hc_hash == sip_retry_after_hash;
04747 }
04748 #else
04749 int sip_is_retry_after(sip_header_t const *header);
04750 #endif
04751
04752 #define sip_retry_after_p(h) sip_is_retry_after((h))
04753
04754
04782 #if SU_HAVE_INLINE
04783 su_inline
04784 #endif
04785 sip_retry_after_t *sip_retry_after_dup(su_home_t *home, sip_retry_after_t const *hdr)
04786 __attribute__((__malloc__));
04787
04788 #if SU_HAVE_INLINE
04789 su_inline
04790 sip_retry_after_t *sip_retry_after_dup(su_home_t *home, sip_retry_after_t const *hdr)
04791 {
04792 return (sip_retry_after_t *)
04793 msg_header_dup_as(home, sip_retry_after_class, (msg_header_t const *)hdr);
04794 }
04795 #endif
04796
04825 #if SU_HAVE_INLINE
04826 su_inline
04827 #endif
04828 sip_retry_after_t *sip_retry_after_copy(su_home_t *home, sip_retry_after_t const *hdr)
04829 __attribute__((__malloc__));
04830
04831 #if SU_HAVE_INLINE
04832 su_inline
04833 sip_retry_after_t *sip_retry_after_copy(su_home_t *home, sip_retry_after_t const *hdr)
04834 {
04835 return (sip_retry_after_t *)
04836 msg_header_copy_as(home, sip_retry_after_class, (msg_header_t const *)hdr);
04837 }
04838 #endif
04839
04858 #if SU_HAVE_INLINE
04859 su_inline
04860 #endif
04861 sip_retry_after_t *sip_retry_after_make(su_home_t *home, char const *s)
04862 __attribute__((__malloc__));
04863
04864 #if SU_HAVE_INLINE
04865 su_inline sip_retry_after_t *sip_retry_after_make(su_home_t *home, char const *s)
04866 {
04867 return (sip_retry_after_t *)sip_header_make(home, sip_retry_after_class, s);
04868 }
04869 #endif
04870
04893 #if SU_HAVE_INLINE
04894 su_inline
04895 #endif
04896 sip_retry_after_t *sip_retry_after_format(su_home_t *home, char const *fmt, ...)
04897 __attribute__((__malloc__, __format__ (printf, 2, 3)));
04898
04899 #if SU_HAVE_INLINE
04900 su_inline sip_retry_after_t *sip_retry_after_format(su_home_t *home, char const *fmt, ...)
04901 {
04902 sip_header_t *h;
04903 va_list ap;
04904
04905 va_start(ap, fmt);
04906 h = sip_header_vformat(home, sip_retry_after_class, fmt, ap);
04907 va_end(ap);
04908
04909 return (sip_retry_after_t *)h;
04910 }
04911 #endif
04912
04920 SOFIAPUBFUN int sip_timestamp_d(su_home_t *, msg_header_t *,
04921 char *s, int slen);
04922
04924 SOFIAPUBFUN int sip_timestamp_e(char b[], int bsiz,
04925 msg_header_t const *h, int flags);
04926
04930 #define sip_timestamp(sip) \
04931 ((sip_timestamp_t *)msg_header_access((msg_pub_t*)(sip), sip_timestamp_class))
04932
04945 #define SIP_TIMESTAMP_INIT() SIP_HDR_INIT(timestamp)
04946
04960 #if SU_HAVE_INLINE
04961 su_inline sip_timestamp_t *sip_timestamp_init(sip_timestamp_t x[1])
04962 {
04963 return SIP_HEADER_INIT(x, sip_timestamp_class, sizeof(sip_timestamp_t));
04964 }
04965 #else
04966 #define sip_timestamp_init(x) \
04967 SIP_HEADER_INIT(x, sip_timestamp_class, sizeof(sip_timestamp_t))
04968 #endif
04969
04983 #if SU_HAVE_INLINE
04984 su_inline int sip_is_timestamp(sip_header_t const *header)
04985 {
04986 return header && header->sh_class->hc_hash == sip_timestamp_hash;
04987 }
04988 #else
04989 int sip_is_timestamp(sip_header_t const *header);
04990 #endif
04991
04992 #define sip_timestamp_p(h) sip_is_timestamp((h))
04993
04994
05022 #if SU_HAVE_INLINE
05023 su_inline
05024 #endif
05025 sip_timestamp_t *sip_timestamp_dup(su_home_t *home, sip_timestamp_t const *hdr)
05026 __attribute__((__malloc__));
05027
05028 #if SU_HAVE_INLINE
05029 su_inline
05030 sip_timestamp_t *sip_timestamp_dup(su_home_t *home, sip_timestamp_t const *hdr)
05031 {
05032 return (sip_timestamp_t *)
05033 msg_header_dup_as(home, sip_timestamp_class, (msg_header_t const *)hdr);
05034 }
05035 #endif
05036
05065 #if SU_HAVE_INLINE
05066 su_inline
05067 #endif
05068 sip_timestamp_t *sip_timestamp_copy(su_home_t *home, sip_timestamp_t const *hdr)
05069 __attribute__((__malloc__));
05070
05071 #if SU_HAVE_INLINE
05072 su_inline
05073 sip_timestamp_t *sip_timestamp_copy(su_home_t *home, sip_timestamp_t const *hdr)
05074 {
05075 return (sip_timestamp_t *)
05076 msg_header_copy_as(home, sip_timestamp_class, (msg_header_t const *)hdr);
05077 }
05078 #endif
05079
05098 #if SU_HAVE_INLINE
05099 su_inline
05100 #endif
05101 sip_timestamp_t *sip_timestamp_make(su_home_t *home, char const *s)
05102 __attribute__((__malloc__));
05103
05104 #if SU_HAVE_INLINE
05105 su_inline sip_timestamp_t *sip_timestamp_make(su_home_t *home, char const *s)
05106 {
05107 return (sip_timestamp_t *)sip_header_make(home, sip_timestamp_class, s);
05108 }
05109 #endif
05110
05133 #if SU_HAVE_INLINE
05134 su_inline
05135 #endif
05136 sip_timestamp_t *sip_timestamp_format(su_home_t *home, char const *fmt, ...)
05137 __attribute__((__malloc__, __format__ (printf, 2, 3)));
05138
05139 #if SU_HAVE_INLINE
05140 su_inline sip_timestamp_t *sip_timestamp_format(su_home_t *home, char const *fmt, ...)
05141 {
05142 sip_header_t *h;
05143 va_list ap;
05144
05145 va_start(ap, fmt);
05146 h = sip_header_vformat(home, sip_timestamp_class, fmt, ap);
05147 va_end(ap);
05148
05149 return (sip_timestamp_t *)h;
05150 }
05151 #endif
05152
05160 SOFIAPUBFUN int sip_min_expires_d(su_home_t *, msg_header_t *,
05161 char *s, int slen);
05162
05164 SOFIAPUBFUN int sip_min_expires_e(char b[], int bsiz,
05165 msg_header_t const *h, int flags);
05166
05170 #define sip_min_expires(sip) \
05171 ((sip_min_expires_t *)msg_header_access((msg_pub_t*)(sip), sip_min_expires_class))
05172
05185 #define SIP_MIN_EXPIRES_INIT() SIP_HDR_INIT(min_expires)
05186
05200 #if SU_HAVE_INLINE
05201 su_inline sip_min_expires_t *sip_min_expires_init(sip_min_expires_t x[1])
05202 {
05203 return SIP_HEADER_INIT(x, sip_min_expires_class, sizeof(sip_min_expires_t));
05204 }
05205 #else
05206 #define sip_min_expires_init(x) \
05207 SIP_HEADER_INIT(x, sip_min_expires_class, sizeof(sip_min_expires_t))
05208 #endif
05209
05223 #if SU_HAVE_INLINE
05224 su_inline int sip_is_min_expires(sip_header_t const *header)
05225 {
05226 return header && header->sh_class->hc_hash == sip_min_expires_hash;
05227 }
05228 #else
05229 int sip_is_min_expires(sip_header_t const *header);
05230 #endif
05231
05232 #define sip_min_expires_p(h) sip_is_min_expires((h))
05233
05234
05262 #if SU_HAVE_INLINE
05263 su_inline
05264 #endif
05265 sip_min_expires_t *sip_min_expires_dup(su_home_t *home, sip_min_expires_t const *hdr)
05266 __attribute__((__malloc__));
05267
05268 #if SU_HAVE_INLINE
05269 su_inline
05270 sip_min_expires_t *sip_min_expires_dup(su_home_t *home, sip_min_expires_t const *hdr)
05271 {
05272 return (sip_min_expires_t *)
05273 msg_header_dup_as(home, sip_min_expires_class, (msg_header_t const *)hdr);
05274 }
05275 #endif
05276
05305 #if SU_HAVE_INLINE
05306 su_inline
05307 #endif
05308 sip_min_expires_t *sip_min_expires_copy(su_home_t *home, sip_min_expires_t const *hdr)
05309 __attribute__((__malloc__));
05310
05311 #if SU_HAVE_INLINE
05312 su_inline
05313 sip_min_expires_t *sip_min_expires_copy(su_home_t *home, sip_min_expires_t const *hdr)
05314 {
05315 return (sip_min_expires_t *)
05316 msg_header_copy_as(home, sip_min_expires_class, (msg_header_t const *)hdr);
05317 }
05318 #endif
05319
05338 #if SU_HAVE_INLINE
05339 su_inline
05340 #endif
05341 sip_min_expires_t *sip_min_expires_make(su_home_t *home, char const *s)
05342 __attribute__((__malloc__));
05343
05344 #if SU_HAVE_INLINE
05345 su_inline sip_min_expires_t *sip_min_expires_make(su_home_t *home, char const *s)
05346 {
05347 return (sip_min_expires_t *)sip_header_make(home, sip_min_expires_class, s);
05348 }
05349 #endif
05350
05373 #if SU_HAVE_INLINE
05374 su_inline
05375 #endif
05376 sip_min_expires_t *sip_min_expires_format(su_home_t *home, char const *fmt, ...)
05377 __attribute__((__malloc__, __format__ (printf, 2, 3)));
05378
05379 #if SU_HAVE_INLINE
05380 su_inline sip_min_expires_t *sip_min_expires_format(su_home_t *home, char const *fmt, ...)
05381 {
05382 sip_header_t *h;
05383 va_list ap;
05384
05385 va_start(ap, fmt);
05386 h = sip_header_vformat(home, sip_min_expires_class, fmt, ap);
05387 va_end(ap);
05388
05389 return (sip_min_expires_t *)h;
05390 }
05391 #endif
05392
05400 SOFIAPUBFUN int sip_subject_d(su_home_t *, msg_header_t *,
05401 char *s, int slen);
05402
05404 SOFIAPUBFUN int sip_subject_e(char b[], int bsiz,
05405 msg_header_t const *h, int flags);
05406
05410 #define sip_subject(sip) \
05411 ((sip_subject_t *)msg_header_access((msg_pub_t*)(sip), sip_subject_class))
05412
05425 #define SIP_SUBJECT_INIT() SIP_HDR_INIT(subject)
05426
05440 #if SU_HAVE_INLINE
05441 su_inline sip_subject_t *sip_subject_init(sip_subject_t x[1])
05442 {
05443 return SIP_HEADER_INIT(x, sip_subject_class, sizeof(sip_subject_t));
05444 }
05445 #else
05446 #define sip_subject_init(x) \
05447 SIP_HEADER_INIT(x, sip_subject_class, sizeof(sip_subject_t))
05448 #endif
05449
05463 #if SU_HAVE_INLINE
05464 su_inline int sip_is_subject(sip_header_t const *header)
05465 {
05466 return header && header->sh_class->hc_hash == sip_subject_hash;
05467 }
05468 #else
05469 int sip_is_subject(sip_header_t const *header);
05470 #endif
05471
05472 #define sip_subject_p(h) sip_is_subject((h))
05473
05474
05502 #if SU_HAVE_INLINE
05503 su_inline
05504 #endif
05505 sip_subject_t *sip_subject_dup(su_home_t *home, sip_subject_t const *hdr)
05506 __attribute__((__malloc__));
05507
05508 #if SU_HAVE_INLINE
05509 su_inline
05510 sip_subject_t *sip_subject_dup(su_home_t *home, sip_subject_t const *hdr)
05511 {
05512 return (sip_subject_t *)
05513 msg_header_dup_as(home, sip_subject_class, (msg_header_t const *)hdr);
05514 }
05515 #endif
05516
05545 #if SU_HAVE_INLINE
05546 su_inline
05547 #endif
05548 sip_subject_t *sip_subject_copy(su_home_t *home, sip_subject_t const *hdr)
05549 __attribute__((__malloc__));
05550
05551 #if SU_HAVE_INLINE
05552 su_inline
05553 sip_subject_t *sip_subject_copy(su_home_t *home, sip_subject_t const *hdr)
05554 {
05555 return (sip_subject_t *)
05556 msg_header_copy_as(home, sip_subject_class, (msg_header_t const *)hdr);
05557 }
05558 #endif
05559
05578 #if SU_HAVE_INLINE
05579 su_inline
05580 #endif
05581 sip_subject_t *sip_subject_make(su_home_t *home, char const *s)
05582 __attribute__((__malloc__));
05583
05584 #if SU_HAVE_INLINE
05585 su_inline sip_subject_t *sip_subject_make(su_home_t *home, char const *s)
05586 {
05587 return (sip_subject_t *)sip_header_make(home, sip_subject_class, s);
05588 }
05589 #endif
05590
05613 #if SU_HAVE_INLINE
05614 su_inline
05615 #endif
05616 sip_subject_t *sip_subject_format(su_home_t *home, char const *fmt, ...)
05617 __attribute__((__malloc__, __format__ (printf, 2, 3)));
05618
05619 #if SU_HAVE_INLINE
05620 su_inline sip_subject_t *sip_subject_format(su_home_t *home, char const *fmt, ...)
05621 {
05622 sip_header_t *h;
05623 va_list ap;
05624
05625 va_start(ap, fmt);
05626 h = sip_header_vformat(home, sip_subject_class, fmt, ap);
05627 va_end(ap);
05628
05629 return (sip_subject_t *)h;
05630 }
05631 #endif
05632
05640 SOFIAPUBFUN int sip_priority_d(su_home_t *, msg_header_t *,
05641 char *s, int slen);
05642
05644 SOFIAPUBFUN int sip_priority_e(char b[], int bsiz,
05645 msg_header_t const *h, int flags);
05646
05650 #define sip_priority(sip) \
05651 ((sip_priority_t *)msg_header_access((msg_pub_t*)(sip), sip_priority_class))
05652
05665 #define SIP_PRIORITY_INIT() SIP_HDR_INIT(priority)
05666
05680 #if SU_HAVE_INLINE
05681 su_inline sip_priority_t *sip_priority_init(sip_priority_t x[1])
05682 {
05683 return SIP_HEADER_INIT(x, sip_priority_class, sizeof(sip_priority_t));
05684 }
05685 #else
05686 #define sip_priority_init(x) \
05687 SIP_HEADER_INIT(x, sip_priority_class, sizeof(sip_priority_t))
05688 #endif
05689
05703 #if SU_HAVE_INLINE
05704 su_inline int sip_is_priority(sip_header_t const *header)
05705 {
05706 return header && header->sh_class->hc_hash == sip_priority_hash;
05707 }
05708 #else
05709 int sip_is_priority(sip_header_t const *header);
05710 #endif
05711
05712 #define sip_priority_p(h) sip_is_priority((h))
05713
05714
05742 #if SU_HAVE_INLINE
05743 su_inline
05744 #endif
05745 sip_priority_t *sip_priority_dup(su_home_t *home, sip_priority_t const *hdr)
05746 __attribute__((__malloc__));
05747
05748 #if SU_HAVE_INLINE
05749 su_inline
05750 sip_priority_t *sip_priority_dup(su_home_t *home, sip_priority_t const *hdr)
05751 {
05752 return (sip_priority_t *)
05753 msg_header_dup_as(home, sip_priority_class, (msg_header_t const *)hdr);
05754 }
05755 #endif
05756
05785 #if SU_HAVE_INLINE
05786 su_inline
05787 #endif
05788 sip_priority_t *sip_priority_copy(su_home_t *home, sip_priority_t const *hdr)
05789 __attribute__((__malloc__));
05790
05791 #if SU_HAVE_INLINE
05792 su_inline
05793 sip_priority_t *sip_priority_copy(su_home_t *home, sip_priority_t const *hdr)
05794 {
05795 return (sip_priority_t *)
05796 msg_header_copy_as(home, sip_priority_class, (msg_header_t const *)hdr);
05797 }
05798 #endif
05799
05818 #if SU_HAVE_INLINE
05819 su_inline
05820 #endif
05821 sip_priority_t *sip_priority_make(su_home_t *home, char const *s)
05822 __attribute__((__malloc__));
05823
05824 #if SU_HAVE_INLINE
05825 su_inline sip_priority_t *sip_priority_make(su_home_t *home, char const *s)
05826 {
05827 return (sip_priority_t *)sip_header_make(home, sip_priority_class, s);
05828 }
05829 #endif
05830
05853 #if SU_HAVE_INLINE
05854 su_inline
05855 #endif
05856 sip_priority_t *sip_priority_format(su_home_t *home, char const *fmt, ...)
05857 __attribute__((__malloc__, __format__ (printf, 2, 3)));
05858
05859 #if SU_HAVE_INLINE
05860 su_inline sip_priority_t *sip_priority_format(su_home_t *home, char const *fmt, ...)
05861 {
05862 sip_header_t *h;
05863 va_list ap;
05864
05865 va_start(ap, fmt);
05866 h = sip_header_vformat(home, sip_priority_class, fmt, ap);
05867 va_end(ap);
05868
05869 return (sip_priority_t *)h;
05870 }
05871 #endif
05872
05880 SOFIAPUBFUN int sip_call_info_d(su_home_t *, msg_header_t *,
05881 char *s, int slen);
05882
05884 SOFIAPUBFUN int sip_call_info_e(char b[], int bsiz,
05885 msg_header_t const *h, int flags);
05886
05890 #define sip_call_info(sip) \
05891 ((sip_call_info_t *)msg_header_access((msg_pub_t*)(sip), sip_call_info_class))
05892
05905 #define SIP_CALL_INFO_INIT() SIP_HDR_INIT(call_info)
05906
05920 #if SU_HAVE_INLINE
05921 su_inline sip_call_info_t *sip_call_info_init(sip_call_info_t x[1])
05922 {
05923 return SIP_HEADER_INIT(x, sip_call_info_class, sizeof(sip_call_info_t));
05924 }
05925 #else
05926 #define sip_call_info_init(x) \
05927 SIP_HEADER_INIT(x, sip_call_info_class, sizeof(sip_call_info_t))
05928 #endif
05929
05943 #if SU_HAVE_INLINE
05944 su_inline int sip_is_call_info(sip_header_t const *header)
05945 {
05946 return header && header->sh_class->hc_hash == sip_call_info_hash;
05947 }
05948 #else
05949 int sip_is_call_info(sip_header_t const *header);
05950 #endif
05951
05952 #define sip_call_info_p(h) sip_is_call_info((h))
05953
05954
05982 #if SU_HAVE_INLINE
05983 su_inline
05984 #endif
05985 sip_call_info_t *sip_call_info_dup(su_home_t *home, sip_call_info_t const *hdr)
05986 __attribute__((__malloc__));
05987
05988 #if SU_HAVE_INLINE
05989 su_inline
05990 sip_call_info_t *sip_call_info_dup(su_home_t *home, sip_call_info_t const *hdr)
05991 {
05992 return (sip_call_info_t *)
05993 msg_header_dup_as(home, sip_call_info_class, (msg_header_t const *)hdr);
05994 }
05995 #endif
05996
06025 #if SU_HAVE_INLINE
06026 su_inline
06027 #endif
06028 sip_call_info_t *sip_call_info_copy(su_home_t *home, sip_call_info_t const *hdr)
06029 __attribute__((__malloc__));
06030
06031 #if SU_HAVE_INLINE
06032 su_inline
06033 sip_call_info_t *sip_call_info_copy(su_home_t *home, sip_call_info_t const *hdr)
06034 {
06035 return (sip_call_info_t *)
06036 msg_header_copy_as(home, sip_call_info_class, (msg_header_t const *)hdr);
06037 }
06038 #endif
06039
06058 #if SU_HAVE_INLINE
06059 su_inline
06060 #endif
06061 sip_call_info_t *sip_call_info_make(su_home_t *home, char const *s)
06062 __attribute__((__malloc__));
06063
06064 #if SU_HAVE_INLINE
06065 su_inline sip_call_info_t *sip_call_info_make(su_home_t *home, char const *s)
06066 {
06067 return (sip_call_info_t *)sip_header_make(home, sip_call_info_class, s);
06068 }
06069 #endif
06070
06093 #if SU_HAVE_INLINE
06094 su_inline
06095 #endif
06096 sip_call_info_t *sip_call_info_format(su_home_t *home, char const *fmt, ...)
06097 __attribute__((__malloc__, __format__ (printf, 2, 3)));
06098
06099 #if SU_HAVE_INLINE
06100 su_inline sip_call_info_t *sip_call_info_format(su_home_t *home, char const *fmt, ...)
06101 {
06102 sip_header_t *h;
06103 va_list ap;
06104
06105 va_start(ap, fmt);
06106 h = sip_header_vformat(home, sip_call_info_class, fmt, ap);
06107 va_end(ap);
06108
06109 return (sip_call_info_t *)h;
06110 }
06111 #endif
06112
06120 SOFIAPUBFUN int sip_organization_d(su_home_t *, msg_header_t *,
06121 char *s, int slen);
06122
06124 SOFIAPUBFUN int sip_organization_e(char b[], int bsiz,
06125 msg_header_t const *h, int flags);
06126
06130 #define sip_organization(sip) \
06131 ((sip_organization_t *)msg_header_access((msg_pub_t*)(sip), sip_organization_class))
06132
06145 #define SIP_ORGANIZATION_INIT() SIP_HDR_INIT(organization)
06146
06160 #if SU_HAVE_INLINE
06161 su_inline sip_organization_t *sip_organization_init(sip_organization_t x[1])
06162 {
06163 return SIP_HEADER_INIT(x, sip_organization_class, sizeof(sip_organization_t));
06164 }
06165 #else
06166 #define sip_organization_init(x) \
06167 SIP_HEADER_INIT(x, sip_organization_class, sizeof(sip_organization_t))
06168 #endif
06169
06183 #if SU_HAVE_INLINE
06184 su_inline int sip_is_organization(sip_header_t const *header)
06185 {
06186 return header && header->sh_class->hc_hash == sip_organization_hash;
06187 }
06188 #else
06189 int sip_is_organization(sip_header_t const *header);
06190 #endif
06191
06192 #define sip_organization_p(h) sip_is_organization((h))
06193
06194
06222 #if SU_HAVE_INLINE
06223 su_inline
06224 #endif
06225 sip_organization_t *sip_organization_dup(su_home_t *home, sip_organization_t const *hdr)
06226 __attribute__((__malloc__));
06227
06228 #if SU_HAVE_INLINE
06229 su_inline
06230 sip_organization_t *sip_organization_dup(su_home_t *home, sip_organization_t const *hdr)
06231 {
06232 return (sip_organization_t *)
06233 msg_header_dup_as(home, sip_organization_class, (msg_header_t const *)hdr);
06234 }
06235 #endif
06236
06265 #if SU_HAVE_INLINE
06266 su_inline
06267 #endif
06268 sip_organization_t *sip_organization_copy(su_home_t *home, sip_organization_t const *hdr)
06269 __attribute__((__malloc__));
06270
06271 #if SU_HAVE_INLINE
06272 su_inline
06273 sip_organization_t *sip_organization_copy(su_home_t *home, sip_organization_t const *hdr)
06274 {
06275 return (sip_organization_t *)
06276 msg_header_copy_as(home, sip_organization_class, (msg_header_t const *)hdr);
06277 }
06278 #endif
06279
06298 #if SU_HAVE_INLINE
06299 su_inline
06300 #endif
06301 sip_organization_t *sip_organization_make(su_home_t *home, char const *s)
06302 __attribute__((__malloc__));
06303
06304 #if SU_HAVE_INLINE
06305 su_inline sip_organization_t *sip_organization_make(su_home_t *home, char const *s)
06306 {
06307 return (sip_organization_t *)sip_header_make(home, sip_organization_class, s);
06308 }
06309 #endif
06310
06333 #if SU_HAVE_INLINE
06334 su_inline
06335 #endif
06336 sip_organization_t *sip_organization_format(su_home_t *home, char const *fmt, ...)
06337 __attribute__((__malloc__, __format__ (printf, 2, 3)));
06338
06339 #if SU_HAVE_INLINE
06340 su_inline sip_organization_t *sip_organization_format(su_home_t *home, char const *fmt, ...)
06341 {
06342 sip_header_t *h;
06343 va_list ap;
06344
06345 va_start(ap, fmt);
06346 h = sip_header_vformat(home, sip_organization_class, fmt, ap);
06347 va_end(ap);
06348
06349 return (sip_organization_t *)h;
06350 }
06351 #endif
06352
06360 SOFIAPUBFUN int sip_server_d(su_home_t *, msg_header_t *,
06361 char *s, int slen);
06362
06364 SOFIAPUBFUN int sip_server_e(char b[], int bsiz,
06365 msg_header_t const *h, int flags);
06366
06370 #define sip_server(sip) \
06371 ((sip_server_t *)msg_header_access((msg_pub_t*)(sip), sip_server_class))
06372
06385 #define SIP_SERVER_INIT() SIP_HDR_INIT(server)
06386
06400 #if SU_HAVE_INLINE
06401 su_inline sip_server_t *sip_server_init(sip_server_t x[1])
06402 {
06403 return SIP_HEADER_INIT(x, sip_server_class, sizeof(sip_server_t));
06404 }
06405 #else
06406 #define sip_server_init(x) \
06407 SIP_HEADER_INIT(x, sip_server_class, sizeof(sip_server_t))
06408 #endif
06409
06423 #if SU_HAVE_INLINE
06424 su_inline int sip_is_server(sip_header_t const *header)
06425 {
06426 return header && header->sh_class->hc_hash == sip_server_hash;
06427 }
06428 #else
06429 int sip_is_server(sip_header_t const *header);
06430 #endif
06431
06432 #define sip_server_p(h) sip_is_server((h))
06433
06434
06462 #if SU_HAVE_INLINE
06463 su_inline
06464 #endif
06465 sip_server_t *sip_server_dup(su_home_t *home, sip_server_t const *hdr)
06466 __attribute__((__malloc__));
06467
06468 #if SU_HAVE_INLINE
06469 su_inline
06470 sip_server_t *sip_server_dup(su_home_t *home, sip_server_t const *hdr)
06471 {
06472 return (sip_server_t *)
06473 msg_header_dup_as(home, sip_server_class, (msg_header_t const *)hdr);
06474 }
06475 #endif
06476
06505 #if SU_HAVE_INLINE
06506 su_inline
06507 #endif
06508 sip_server_t *sip_server_copy(su_home_t *home, sip_server_t const *hdr)
06509 __attribute__((__malloc__));
06510
06511 #if SU_HAVE_INLINE
06512 su_inline
06513 sip_server_t *sip_server_copy(su_home_t *home, sip_server_t const *hdr)
06514 {
06515 return (sip_server_t *)
06516 msg_header_copy_as(home, sip_server_class, (msg_header_t const *)hdr);
06517 }
06518 #endif
06519
06538 #if SU_HAVE_INLINE
06539 su_inline
06540 #endif
06541 sip_server_t *sip_server_make(su_home_t *home, char const *s)
06542 __attribute__((__malloc__));
06543
06544 #if SU_HAVE_INLINE
06545 su_inline sip_server_t *sip_server_make(su_home_t *home, char const *s)
06546 {
06547 return (sip_server_t *)sip_header_make(home, sip_server_class, s);
06548 }
06549 #endif
06550
06573 #if SU_HAVE_INLINE
06574 su_inline
06575 #endif
06576 sip_server_t *sip_server_format(su_home_t *home, char const *fmt, ...)
06577 __attribute__((__malloc__, __format__ (printf, 2, 3)));
06578
06579 #if SU_HAVE_INLINE
06580 su_inline sip_server_t *sip_server_format(su_home_t *home, char const *fmt, ...)
06581 {
06582 sip_header_t *h;
06583 va_list ap;
06584
06585 va_start(ap, fmt);
06586 h = sip_header_vformat(home, sip_server_class, fmt, ap);
06587 va_end(ap);
06588
06589 return (sip_server_t *)h;
06590 }
06591 #endif
06592
06600 SOFIAPUBFUN int sip_user_agent_d(su_home_t *, msg_header_t *,
06601 char *s, int slen);
06602
06604 SOFIAPUBFUN int sip_user_agent_e(char b[], int bsiz,
06605 msg_header_t const *h, int flags);
06606
06610 #define sip_user_agent(sip) \
06611 ((sip_user_agent_t *)msg_header_access((msg_pub_t*)(sip), sip_user_agent_class))
06612
06625 #define SIP_USER_AGENT_INIT() SIP_HDR_INIT(user_agent)
06626
06640 #if SU_HAVE_INLINE
06641 su_inline sip_user_agent_t *sip_user_agent_init(sip_user_agent_t x[1])
06642 {
06643 return SIP_HEADER_INIT(x, sip_user_agent_class, sizeof(sip_user_agent_t));
06644 }
06645 #else
06646 #define sip_user_agent_init(x) \
06647 SIP_HEADER_INIT(x, sip_user_agent_class, sizeof(sip_user_agent_t))
06648 #endif
06649
06663 #if SU_HAVE_INLINE
06664 su_inline int sip_is_user_agent(sip_header_t const *header)
06665 {
06666 return header && header->sh_class->hc_hash == sip_user_agent_hash;
06667 }
06668 #else
06669 int sip_is_user_agent(sip_header_t const *header);
06670 #endif
06671
06672 #define sip_user_agent_p(h) sip_is_user_agent((h))
06673
06674
06702 #if SU_HAVE_INLINE
06703 su_inline
06704 #endif
06705 sip_user_agent_t *sip_user_agent_dup(su_home_t *home, sip_user_agent_t const *hdr)
06706 __attribute__((__malloc__));
06707
06708 #if SU_HAVE_INLINE
06709 su_inline
06710 sip_user_agent_t *sip_user_agent_dup(su_home_t *home, sip_user_agent_t const *hdr)
06711 {
06712 return (sip_user_agent_t *)
06713 msg_header_dup_as(home, sip_user_agent_class, (msg_header_t const *)hdr);
06714 }
06715 #endif
06716
06745 #if SU_HAVE_INLINE
06746 su_inline
06747 #endif
06748 sip_user_agent_t *sip_user_agent_copy(su_home_t *home, sip_user_agent_t const *hdr)
06749 __attribute__((__malloc__));
06750
06751 #if SU_HAVE_INLINE
06752 su_inline
06753 sip_user_agent_t *sip_user_agent_copy(su_home_t *home, sip_user_agent_t const *hdr)
06754 {
06755 return (sip_user_agent_t *)
06756 msg_header_copy_as(home, sip_user_agent_class, (msg_header_t const *)hdr);
06757 }
06758 #endif
06759
06778 #if SU_HAVE_INLINE
06779 su_inline
06780 #endif
06781 sip_user_agent_t *sip_user_agent_make(su_home_t *home, char const *s)
06782 __attribute__((__malloc__));
06783
06784 #if SU_HAVE_INLINE
06785 su_inline sip_user_agent_t *sip_user_agent_make(su_home_t *home, char const *s)
06786 {
06787 return (sip_user_agent_t *)sip_header_make(home, sip_user_agent_class, s);
06788 }
06789 #endif
06790
06813 #if SU_HAVE_INLINE
06814 su_inline
06815 #endif
06816 sip_user_agent_t *sip_user_agent_format(su_home_t *home, char const *fmt, ...)
06817 __attribute__((__malloc__, __format__ (printf, 2, 3)));
06818
06819 #if SU_HAVE_INLINE
06820 su_inline sip_user_agent_t *sip_user_agent_format(su_home_t *home, char const *fmt, ...)
06821 {
06822 sip_header_t *h;
06823 va_list ap;
06824
06825 va_start(ap, fmt);
06826 h = sip_header_vformat(home, sip_user_agent_class, fmt, ap);
06827 va_end(ap);
06828
06829 return (sip_user_agent_t *)h;
06830 }
06831 #endif
06832
06840 SOFIAPUBFUN int sip_in_reply_to_d(su_home_t *, msg_header_t *,
06841 char *s, int slen);
06842
06844 SOFIAPUBFUN int sip_in_reply_to_e(char b[], int bsiz,
06845 msg_header_t const *h, int flags);
06846
06850 #define sip_in_reply_to(sip) \
06851 ((sip_in_reply_to_t *)msg_header_access((msg_pub_t*)(sip), sip_in_reply_to_class))
06852
06865 #define SIP_IN_REPLY_TO_INIT() SIP_HDR_INIT(in_reply_to)
06866
06880 #if SU_HAVE_INLINE
06881 su_inline sip_in_reply_to_t *sip_in_reply_to_init(sip_in_reply_to_t x[1])
06882 {
06883 return SIP_HEADER_INIT(x, sip_in_reply_to_class, sizeof(sip_in_reply_to_t));
06884 }
06885 #else
06886 #define sip_in_reply_to_init(x) \
06887 SIP_HEADER_INIT(x, sip_in_reply_to_class, sizeof(sip_in_reply_to_t))
06888 #endif
06889
06903 #if SU_HAVE_INLINE
06904 su_inline int sip_is_in_reply_to(sip_header_t const *header)
06905 {
06906 return header && header->sh_class->hc_hash == sip_in_reply_to_hash;
06907 }
06908 #else
06909 int sip_is_in_reply_to(sip_header_t const *header);
06910 #endif
06911
06912 #define sip_in_reply_to_p(h) sip_is_in_reply_to((h))
06913
06914
06942 #if SU_HAVE_INLINE
06943 su_inline
06944 #endif
06945 sip_in_reply_to_t *sip_in_reply_to_dup(su_home_t *home, sip_in_reply_to_t const *hdr)
06946 __attribute__((__malloc__));
06947
06948 #if SU_HAVE_INLINE
06949 su_inline
06950 sip_in_reply_to_t *sip_in_reply_to_dup(su_home_t *home, sip_in_reply_to_t const *hdr)
06951 {
06952 return (sip_in_reply_to_t *)
06953 msg_header_dup_as(home, sip_in_reply_to_class, (msg_header_t const *)hdr);
06954 }
06955 #endif
06956
06985 #if SU_HAVE_INLINE
06986 su_inline
06987 #endif
06988 sip_in_reply_to_t *sip_in_reply_to_copy(su_home_t *home, sip_in_reply_to_t const *hdr)
06989 __attribute__((__malloc__));
06990
06991 #if SU_HAVE_INLINE
06992 su_inline
06993 sip_in_reply_to_t *sip_in_reply_to_copy(su_home_t *home, sip_in_reply_to_t const *hdr)
06994 {
06995 return (sip_in_reply_to_t *)
06996 msg_header_copy_as(home, sip_in_reply_to_class, (msg_header_t const *)hdr);
06997 }
06998 #endif
06999
07018 #if SU_HAVE_INLINE
07019 su_inline
07020 #endif
07021 sip_in_reply_to_t *sip_in_reply_to_make(su_home_t *home, char const *s)
07022 __attribute__((__malloc__));
07023
07024 #if SU_HAVE_INLINE
07025 su_inline sip_in_reply_to_t *sip_in_reply_to_make(su_home_t *home, char const *s)
07026 {
07027 return (sip_in_reply_to_t *)sip_header_make(home, sip_in_reply_to_class, s);
07028 }
07029 #endif
07030
07053 #if SU_HAVE_INLINE
07054 su_inline
07055 #endif
07056 sip_in_reply_to_t *sip_in_reply_to_format(su_home_t *home, char const *fmt, ...)
07057 __attribute__((__malloc__, __format__ (printf, 2, 3)));
07058
07059 #if SU_HAVE_INLINE
07060 su_inline sip_in_reply_to_t *sip_in_reply_to_format(su_home_t *home, char const *fmt, ...)
07061 {
07062 sip_header_t *h;
07063 va_list ap;
07064
07065 va_start(ap, fmt);
07066 h = sip_header_vformat(home, sip_in_reply_to_class, fmt, ap);
07067 va_end(ap);
07068
07069 return (sip_in_reply_to_t *)h;
07070 }
07071 #endif
07072
07080 SOFIAPUBFUN int sip_accept_d(su_home_t *, msg_header_t *,
07081 char *s, int slen);
07082
07084 SOFIAPUBFUN int sip_accept_e(char b[], int bsiz,
07085 msg_header_t const *h, int flags);
07086
07090 #define sip_accept(sip) \
07091 ((sip_accept_t *)msg_header_access((msg_pub_t*)(sip), sip_accept_class))
07092
07105 #define SIP_ACCEPT_INIT() SIP_HDR_INIT(accept)
07106
07120 #if SU_HAVE_INLINE
07121 su_inline sip_accept_t *sip_accept_init(sip_accept_t x[1])
07122 {
07123 return SIP_HEADER_INIT(x, sip_accept_class, sizeof(sip_accept_t));
07124 }
07125 #else
07126 #define sip_accept_init(x) \
07127 SIP_HEADER_INIT(x, sip_accept_class, sizeof(sip_accept_t))
07128 #endif
07129
07143 #if SU_HAVE_INLINE
07144 su_inline int sip_is_accept(sip_header_t const *header)
07145 {
07146 return header && header->sh_class->hc_hash == sip_accept_hash;
07147 }
07148 #else
07149 int sip_is_accept(sip_header_t const *header);
07150 #endif
07151
07152 #define sip_accept_p(h) sip_is_accept((h))
07153
07154
07182 #if SU_HAVE_INLINE
07183 su_inline
07184 #endif
07185 sip_accept_t *sip_accept_dup(su_home_t *home, sip_accept_t const *hdr)
07186 __attribute__((__malloc__));
07187
07188 #if SU_HAVE_INLINE
07189 su_inline
07190 sip_accept_t *sip_accept_dup(su_home_t *home, sip_accept_t const *hdr)
07191 {
07192 return (sip_accept_t *)
07193 msg_header_dup_as(home, sip_accept_class, (msg_header_t const *)hdr);
07194 }
07195 #endif
07196
07225 #if SU_HAVE_INLINE
07226 su_inline
07227 #endif
07228 sip_accept_t *sip_accept_copy(su_home_t *home, sip_accept_t const *hdr)
07229 __attribute__((__malloc__));
07230
07231 #if SU_HAVE_INLINE
07232 su_inline
07233 sip_accept_t *sip_accept_copy(su_home_t *home, sip_accept_t const *hdr)
07234 {
07235 return (sip_accept_t *)
07236 msg_header_copy_as(home, sip_accept_class, (msg_header_t const *)hdr);
07237 }
07238 #endif
07239
07258 #if SU_HAVE_INLINE
07259 su_inline
07260 #endif
07261 sip_accept_t *sip_accept_make(su_home_t *home, char const *s)
07262 __attribute__((__malloc__));
07263
07264 #if SU_HAVE_INLINE
07265 su_inline sip_accept_t *sip_accept_make(su_home_t *home, char const *s)
07266 {
07267 return (sip_accept_t *)sip_header_make(home, sip_accept_class, s);
07268 }
07269 #endif
07270
07293 #if SU_HAVE_INLINE
07294 su_inline
07295 #endif
07296 sip_accept_t *sip_accept_format(su_home_t *home, char const *fmt, ...)
07297 __attribute__((__malloc__, __format__ (printf, 2, 3)));
07298
07299 #if SU_HAVE_INLINE
07300 su_inline sip_accept_t *sip_accept_format(su_home_t *home, char const *fmt, ...)
07301 {
07302 sip_header_t *h;
07303 va_list ap;
07304
07305 va_start(ap, fmt);
07306 h = sip_header_vformat(home, sip_accept_class, fmt, ap);
07307 va_end(ap);
07308
07309 return (sip_accept_t *)h;
07310 }
07311 #endif
07312
07320 SOFIAPUBFUN int sip_accept_encoding_d(su_home_t *, msg_header_t *,
07321 char *s, int slen);
07322
07324 SOFIAPUBFUN int sip_accept_encoding_e(char b[], int bsiz,
07325 msg_header_t const *h, int flags);
07326
07330 #define sip_accept_encoding(sip) \
07331 ((sip_accept_encoding_t *)msg_header_access((msg_pub_t*)(sip), sip_accept_encoding_class))
07332
07345 #define SIP_ACCEPT_ENCODING_INIT() SIP_HDR_INIT(accept_encoding)
07346
07360 #if SU_HAVE_INLINE
07361 su_inline sip_accept_encoding_t *sip_accept_encoding_init(sip_accept_encoding_t x[1])
07362 {
07363 return SIP_HEADER_INIT(x, sip_accept_encoding_class, sizeof(sip_accept_encoding_t));
07364 }
07365 #else
07366 #define sip_accept_encoding_init(x) \
07367 SIP_HEADER_INIT(x, sip_accept_encoding_class, sizeof(sip_accept_encoding_t))
07368 #endif
07369
07383 #if SU_HAVE_INLINE
07384 su_inline int sip_is_accept_encoding(sip_header_t const *header)
07385 {
07386 return header && header->sh_class->hc_hash == sip_accept_encoding_hash;
07387 }
07388 #else
07389 int sip_is_accept_encoding(sip_header_t const *header);
07390 #endif
07391
07392 #define sip_accept_encoding_p(h) sip_is_accept_encoding((h))
07393
07394
07422 #if SU_HAVE_INLINE
07423 su_inline
07424 #endif
07425 sip_accept_encoding_t *sip_accept_encoding_dup(su_home_t *home, sip_accept_encoding_t const *hdr)
07426 __attribute__((__malloc__));
07427
07428 #if SU_HAVE_INLINE
07429 su_inline
07430 sip_accept_encoding_t *sip_accept_encoding_dup(su_home_t *home, sip_accept_encoding_t const *hdr)
07431 {
07432 return (sip_accept_encoding_t *)
07433 msg_header_dup_as(home, sip_accept_encoding_class, (msg_header_t const *)hdr);
07434 }
07435 #endif
07436
07465 #if SU_HAVE_INLINE
07466 su_inline
07467 #endif
07468 sip_accept_encoding_t *sip_accept_encoding_copy(su_home_t *home, sip_accept_encoding_t const *hdr)
07469 __attribute__((__malloc__));
07470
07471 #if SU_HAVE_INLINE
07472 su_inline
07473 sip_accept_encoding_t *sip_accept_encoding_copy(su_home_t *home, sip_accept_encoding_t const *hdr)
07474 {
07475 return (sip_accept_encoding_t *)
07476 msg_header_copy_as(home, sip_accept_encoding_class, (msg_header_t const *)hdr);
07477 }
07478 #endif
07479
07498 #if SU_HAVE_INLINE
07499 su_inline
07500 #endif
07501 sip_accept_encoding_t *sip_accept_encoding_make(su_home_t *home, char const *s)
07502 __attribute__((__malloc__));
07503
07504 #if SU_HAVE_INLINE
07505 su_inline sip_accept_encoding_t *sip_accept_encoding_make(su_home_t *home, char const *s)
07506 {
07507 return (sip_accept_encoding_t *)sip_header_make(home, sip_accept_encoding_class, s);
07508 }
07509 #endif
07510
07533 #if SU_HAVE_INLINE
07534 su_inline
07535 #endif
07536 sip_accept_encoding_t *sip_accept_encoding_format(su_home_t *home, char const *fmt, ...)
07537 __attribute__((__malloc__, __format__ (printf, 2, 3)));
07538
07539 #if SU_HAVE_INLINE
07540 su_inline sip_accept_encoding_t *sip_accept_encoding_format(su_home_t *home, char const *fmt, ...)
07541 {
07542 sip_header_t *h;
07543 va_list ap;
07544
07545 va_start(ap, fmt);
07546 h = sip_header_vformat(home, sip_accept_encoding_class, fmt, ap);
07547 va_end(ap);
07548
07549 return (sip_accept_encoding_t *)h;
07550 }
07551 #endif
07552
07560 SOFIAPUBFUN int sip_accept_language_d(su_home_t *, msg_header_t *,
07561 char *s, int slen);
07562
07564 SOFIAPUBFUN int sip_accept_language_e(char b[], int bsiz,
07565 msg_header_t const *h, int flags);
07566
07570 #define sip_accept_language(sip) \
07571 ((sip_accept_language_t *)msg_header_access((msg_pub_t*)(sip), sip_accept_language_class))
07572
07585 #define SIP_ACCEPT_LANGUAGE_INIT() SIP_HDR_INIT(accept_language)
07586
07600 #if SU_HAVE_INLINE
07601 su_inline sip_accept_language_t *sip_accept_language_init(sip_accept_language_t x[1])
07602 {
07603 return SIP_HEADER_INIT(x, sip_accept_language_class, sizeof(sip_accept_language_t));
07604 }
07605 #else
07606 #define sip_accept_language_init(x) \
07607 SIP_HEADER_INIT(x, sip_accept_language_class, sizeof(sip_accept_language_t))
07608 #endif
07609
07623 #if SU_HAVE_INLINE
07624 su_inline int sip_is_accept_language(sip_header_t const *header)
07625 {
07626 return header && header->sh_class->hc_hash == sip_accept_language_hash;
07627 }
07628 #else
07629 int sip_is_accept_language(sip_header_t const *header);
07630 #endif
07631
07632 #define sip_accept_language_p(h) sip_is_accept_language((h))
07633
07634
07662 #if SU_HAVE_INLINE
07663 su_inline
07664 #endif
07665 sip_accept_language_t *sip_accept_language_dup(su_home_t *home, sip_accept_language_t const *hdr)
07666 __attribute__((__malloc__));
07667
07668 #if SU_HAVE_INLINE
07669 su_inline
07670 sip_accept_language_t *sip_accept_language_dup(su_home_t *home, sip_accept_language_t const *hdr)
07671 {
07672 return (sip_accept_language_t *)
07673 msg_header_dup_as(home, sip_accept_language_class, (msg_header_t const *)hdr);
07674 }
07675 #endif
07676
07705 #if SU_HAVE_INLINE
07706 su_inline
07707 #endif
07708 sip_accept_language_t *sip_accept_language_copy(su_home_t *home, sip_accept_language_t const *hdr)
07709 __attribute__((__malloc__));
07710
07711 #if SU_HAVE_INLINE
07712 su_inline
07713 sip_accept_language_t *sip_accept_language_copy(su_home_t *home, sip_accept_language_t const *hdr)
07714 {
07715 return (sip_accept_language_t *)
07716 msg_header_copy_as(home, sip_accept_language_class, (msg_header_t const *)hdr);
07717 }
07718 #endif
07719
07738 #if SU_HAVE_INLINE
07739 su_inline
07740 #endif
07741 sip_accept_language_t *sip_accept_language_make(su_home_t *home, char const *s)
07742 __attribute__((__malloc__));
07743
07744 #if SU_HAVE_INLINE
07745 su_inline sip_accept_language_t *sip_accept_language_make(su_home_t *home, char const *s)
07746 {
07747 return (sip_accept_language_t *)sip_header_make(home, sip_accept_language_class, s);
07748 }
07749 #endif
07750
07773 #if SU_HAVE_INLINE
07774 su_inline
07775 #endif
07776 sip_accept_language_t *sip_accept_language_format(su_home_t *home, char const *fmt, ...)
07777 __attribute__((__malloc__, __format__ (printf, 2, 3)));
07778
07779 #if SU_HAVE_INLINE
07780 su_inline sip_accept_language_t *sip_accept_language_format(su_home_t *home, char const *fmt, ...)
07781 {
07782 sip_header_t *h;
07783 va_list ap;
07784
07785 va_start(ap, fmt);
07786 h = sip_header_vformat(home, sip_accept_language_class, fmt, ap);
07787 va_end(ap);
07788
07789 return (sip_accept_language_t *)h;
07790 }
07791 #endif
07792
07800 SOFIAPUBFUN int sip_allow_d(su_home_t *, msg_header_t *,
07801 char *s, int slen);
07802
07804 SOFIAPUBFUN int sip_allow_e(char b[], int bsiz,
07805 msg_header_t const *h, int flags);
07806
07810 #define sip_allow(sip) \
07811 ((sip_allow_t *)msg_header_access((msg_pub_t*)(sip), sip_allow_class))
07812
07825 #define SIP_ALLOW_INIT() SIP_HDR_INIT(allow)
07826
07840 #if SU_HAVE_INLINE
07841 su_inline sip_allow_t *sip_allow_init(sip_allow_t x[1])
07842 {
07843 return SIP_HEADER_INIT(x, sip_allow_class, sizeof(sip_allow_t));
07844 }
07845 #else
07846 #define sip_allow_init(x) \
07847 SIP_HEADER_INIT(x, sip_allow_class, sizeof(sip_allow_t))
07848 #endif
07849
07863 #if SU_HAVE_INLINE
07864 su_inline int sip_is_allow(sip_header_t const *header)
07865 {
07866 return header && header->sh_class->hc_hash == sip_allow_hash;
07867 }
07868 #else
07869 int sip_is_allow(sip_header_t const *header);
07870 #endif
07871
07872 #define sip_allow_p(h) sip_is_allow((h))
07873
07874
07902 #if SU_HAVE_INLINE
07903 su_inline
07904 #endif
07905 sip_allow_t *sip_allow_dup(su_home_t *home, sip_allow_t const *hdr)
07906 __attribute__((__malloc__));
07907
07908 #if SU_HAVE_INLINE
07909 su_inline
07910 sip_allow_t *sip_allow_dup(su_home_t *home, sip_allow_t const *hdr)
07911 {
07912 return (sip_allow_t *)
07913 msg_header_dup_as(home, sip_allow_class, (msg_header_t const *)hdr);
07914 }
07915 #endif
07916
07945 #if SU_HAVE_INLINE
07946 su_inline
07947 #endif
07948 sip_allow_t *sip_allow_copy(su_home_t *home, sip_allow_t const *hdr)
07949 __attribute__((__malloc__));
07950
07951 #if SU_HAVE_INLINE
07952 su_inline
07953 sip_allow_t *sip_allow_copy(su_home_t *home, sip_allow_t const *hdr)
07954 {
07955 return (sip_allow_t *)
07956 msg_header_copy_as(home, sip_allow_class, (msg_header_t const *)hdr);
07957 }
07958 #endif
07959
07978 #if SU_HAVE_INLINE
07979 su_inline
07980 #endif
07981 sip_allow_t *sip_allow_make(su_home_t *home, char const *s)
07982 __attribute__((__malloc__));
07983
07984 #if SU_HAVE_INLINE
07985 su_inline sip_allow_t *sip_allow_make(su_home_t *home, char const *s)
07986 {
07987 return (sip_allow_t *)sip_header_make(home, sip_allow_class, s);
07988 }
07989 #endif
07990
08013 #if SU_HAVE_INLINE
08014 su_inline
08015 #endif
08016 sip_allow_t *sip_allow_format(su_home_t *home, char const *fmt, ...)
08017 __attribute__((__malloc__, __format__ (printf, 2, 3)));
08018
08019 #if SU_HAVE_INLINE
08020 su_inline sip_allow_t *sip_allow_format(su_home_t *home, char const *fmt, ...)
08021 {
08022 sip_header_t *h;
08023 va_list ap;
08024
08025 va_start(ap, fmt);
08026 h = sip_header_vformat(home, sip_allow_class, fmt, ap);
08027 va_end(ap);
08028
08029 return (sip_allow_t *)h;
08030 }
08031 #endif
08032
08040 SOFIAPUBFUN int sip_require_d(su_home_t *, msg_header_t *,
08041 char *s, int slen);
08042
08044 SOFIAPUBFUN int sip_require_e(char b[], int bsiz,
08045 msg_header_t const *h, int flags);
08046
08050 #define sip_require(sip) \
08051 ((sip_require_t *)msg_header_access((msg_pub_t*)(sip), sip_require_class))
08052
08065 #define SIP_REQUIRE_INIT() SIP_HDR_INIT(require)
08066
08080 #if SU_HAVE_INLINE
08081 su_inline sip_require_t *sip_require_init(sip_require_t x[1])
08082 {
08083 return SIP_HEADER_INIT(x, sip_require_class, sizeof(sip_require_t));
08084 }
08085 #else
08086 #define sip_require_init(x) \
08087 SIP_HEADER_INIT(x, sip_require_class, sizeof(sip_require_t))
08088 #endif
08089
08103 #if SU_HAVE_INLINE
08104 su_inline int sip_is_require(sip_header_t const *header)
08105 {
08106 return header && header->sh_class->hc_hash == sip_require_hash;
08107 }
08108 #else
08109 int sip_is_require(sip_header_t const *header);
08110 #endif
08111
08112 #define sip_require_p(h) sip_is_require((h))
08113
08114
08142 #if SU_HAVE_INLINE
08143 su_inline
08144 #endif
08145 sip_require_t *sip_require_dup(su_home_t *home, sip_require_t const *hdr)
08146 __attribute__((__malloc__));
08147
08148 #if SU_HAVE_INLINE
08149 su_inline
08150 sip_require_t *sip_require_dup(su_home_t *home, sip_require_t const *hdr)
08151 {
08152 return (sip_require_t *)
08153 msg_header_dup_as(home, sip_require_class, (msg_header_t const *)hdr);
08154 }
08155 #endif
08156
08185 #if SU_HAVE_INLINE
08186 su_inline
08187 #endif
08188 sip_require_t *sip_require_copy(su_home_t *home, sip_require_t const *hdr)
08189 __attribute__((__malloc__));
08190
08191 #if SU_HAVE_INLINE
08192 su_inline
08193 sip_require_t *sip_require_copy(su_home_t *home, sip_require_t const *hdr)
08194 {
08195 return (sip_require_t *)
08196 msg_header_copy_as(home, sip_require_class, (msg_header_t const *)hdr);
08197 }
08198 #endif
08199
08218 #if SU_HAVE_INLINE
08219 su_inline
08220 #endif
08221 sip_require_t *sip_require_make(su_home_t *home, char const *s)
08222 __attribute__((__malloc__));
08223
08224 #if SU_HAVE_INLINE
08225 su_inline sip_require_t *sip_require_make(su_home_t *home, char const *s)
08226 {
08227 return (sip_require_t *)sip_header_make(home, sip_require_class, s);
08228 }
08229 #endif
08230
08253 #if SU_HAVE_INLINE
08254 su_inline
08255 #endif
08256 sip_require_t *sip_require_format(su_home_t *home, char const *fmt, ...)
08257 __attribute__((__malloc__, __format__ (printf, 2, 3)));
08258
08259 #if SU_HAVE_INLINE
08260 su_inline sip_require_t *sip_require_format(su_home_t *home, char const *fmt, ...)
08261 {
08262 sip_header_t *h;
08263 va_list ap;
08264
08265 va_start(ap, fmt);
08266 h = sip_header_vformat(home, sip_require_class, fmt, ap);
08267 va_end(ap);
08268
08269 return (sip_require_t *)h;
08270 }
08271 #endif
08272
08280 SOFIAPUBFUN int sip_supported_d(su_home_t *, msg_header_t *,
08281 char *s, int slen);
08282
08284 SOFIAPUBFUN int sip_supported_e(char b[], int bsiz,
08285 msg_header_t const *h, int flags);
08286
08290 #define sip_supported(sip) \
08291 ((sip_supported_t *)msg_header_access((msg_pub_t*)(sip), sip_supported_class))
08292
08305 #define SIP_SUPPORTED_INIT() SIP_HDR_INIT(supported)
08306
08320 #if SU_HAVE_INLINE
08321 su_inline sip_supported_t *sip_supported_init(sip_supported_t x[1])
08322 {
08323 return SIP_HEADER_INIT(x, sip_supported_class, sizeof(sip_supported_t));
08324 }
08325 #else
08326 #define sip_supported_init(x) \
08327 SIP_HEADER_INIT(x, sip_supported_class, sizeof(sip_supported_t))
08328 #endif
08329
08343 #if SU_HAVE_INLINE
08344 su_inline int sip_is_supported(sip_header_t const *header)
08345 {
08346 return header && header->sh_class->hc_hash == sip_supported_hash;
08347 }
08348 #else
08349 int sip_is_supported(sip_header_t const *header);
08350 #endif
08351
08352 #define sip_supported_p(h) sip_is_supported((h))
08353
08354
08382 #if SU_HAVE_INLINE
08383 su_inline
08384 #endif
08385 sip_supported_t *sip_supported_dup(su_home_t *home, sip_supported_t const *hdr)
08386 __attribute__((__malloc__));
08387
08388 #if SU_HAVE_INLINE
08389 su_inline
08390 sip_supported_t *sip_supported_dup(su_home_t *home, sip_supported_t const *hdr)
08391 {
08392 return (sip_supported_t *)
08393 msg_header_dup_as(home, sip_supported_class, (msg_header_t const *)hdr);
08394 }
08395 #endif
08396
08425 #if SU_HAVE_INLINE
08426 su_inline
08427 #endif
08428 sip_supported_t *sip_supported_copy(su_home_t *home, sip_supported_t const *hdr)
08429 __attribute__((__malloc__));
08430
08431 #if SU_HAVE_INLINE
08432 su_inline
08433 sip_supported_t *sip_supported_copy(su_home_t *home, sip_supported_t const *hdr)
08434 {
08435 return (sip_supported_t *)
08436 msg_header_copy_as(home, sip_supported_class, (msg_header_t const *)hdr);
08437 }
08438 #endif
08439
08458 #if SU_HAVE_INLINE
08459 su_inline
08460 #endif
08461 sip_supported_t *sip_supported_make(su_home_t *home, char const *s)
08462 __attribute__((__malloc__));
08463
08464 #if SU_HAVE_INLINE
08465 su_inline sip_supported_t *sip_supported_make(su_home_t *home, char const *s)
08466 {
08467 return (sip_supported_t *)sip_header_make(home, sip_supported_class, s);
08468 }
08469 #endif
08470
08493 #if SU_HAVE_INLINE
08494 su_inline
08495 #endif
08496 sip_supported_t *sip_supported_format(su_home_t *home, char const *fmt, ...)
08497 __attribute__((__malloc__, __format__ (printf, 2, 3)));
08498
08499 #if SU_HAVE_INLINE
08500 su_inline sip_supported_t *sip_supported_format(su_home_t *home, char const *fmt, ...)
08501 {
08502 sip_header_t *h;
08503 va_list ap;
08504
08505 va_start(ap, fmt);
08506 h = sip_header_vformat(home, sip_supported_class, fmt, ap);
08507 va_end(ap);
08508
08509 return (sip_supported_t *)h;
08510 }
08511 #endif
08512
08520 SOFIAPUBFUN int sip_unsupported_d(su_home_t *, msg_header_t *,
08521 char *s, int slen);
08522
08524 SOFIAPUBFUN int sip_unsupported_e(char b[], int bsiz,
08525 msg_header_t const *h, int flags);
08526
08530 #define sip_unsupported(sip) \
08531 ((sip_unsupported_t *)msg_header_access((msg_pub_t*)(sip), sip_unsupported_class))
08532
08545 #define SIP_UNSUPPORTED_INIT() SIP_HDR_INIT(unsupported)
08546
08560 #if SU_HAVE_INLINE
08561 su_inline sip_unsupported_t *sip_unsupported_init(sip_unsupported_t x[1])
08562 {
08563 return SIP_HEADER_INIT(x, sip_unsupported_class, sizeof(sip_unsupported_t));
08564 }
08565 #else
08566 #define sip_unsupported_init(x) \
08567 SIP_HEADER_INIT(x, sip_unsupported_class, sizeof(sip_unsupported_t))
08568 #endif
08569
08583 #if SU_HAVE_INLINE
08584 su_inline int sip_is_unsupported(sip_header_t const *header)
08585 {
08586 return header && header->sh_class->hc_hash == sip_unsupported_hash;
08587 }
08588 #else
08589 int sip_is_unsupported(sip_header_t const *header);
08590 #endif
08591
08592 #define sip_unsupported_p(h) sip_is_unsupported((h))
08593
08594
08622 #if SU_HAVE_INLINE
08623 su_inline
08624 #endif
08625 sip_unsupported_t *sip_unsupported_dup(su_home_t *home, sip_unsupported_t const *hdr)
08626 __attribute__((__malloc__));
08627
08628 #if SU_HAVE_INLINE
08629 su_inline
08630 sip_unsupported_t *sip_unsupported_dup(su_home_t *home, sip_unsupported_t const *hdr)
08631 {
08632 return (sip_unsupported_t *)
08633 msg_header_dup_as(home, sip_unsupported_class, (msg_header_t const *)hdr);
08634 }
08635 #endif
08636
08665 #if SU_HAVE_INLINE
08666 su_inline
08667 #endif
08668 sip_unsupported_t *sip_unsupported_copy(su_home_t *home, sip_unsupported_t const *hdr)
08669 __attribute__((__malloc__));
08670
08671 #if SU_HAVE_INLINE
08672 su_inline
08673 sip_unsupported_t *sip_unsupported_copy(su_home_t *home, sip_unsupported_t const *hdr)
08674 {
08675 return (sip_unsupported_t *)
08676 msg_header_copy_as(home, sip_unsupported_class, (msg_header_t const *)hdr);
08677 }
08678 #endif
08679
08698 #if SU_HAVE_INLINE
08699 su_inline
08700 #endif
08701 sip_unsupported_t *sip_unsupported_make(su_home_t *home, char const *s)
08702 __attribute__((__malloc__));
08703
08704 #if SU_HAVE_INLINE
08705 su_inline sip_unsupported_t *sip_unsupported_make(su_home_t *home, char const *s)
08706 {
08707 return (sip_unsupported_t *)sip_header_make(home, sip_unsupported_class, s);
08708 }
08709 #endif
08710
08733 #if SU_HAVE_INLINE
08734 su_inline
08735 #endif
08736 sip_unsupported_t *sip_unsupported_format(su_home_t *home, char const *fmt, ...)
08737 __attribute__((__malloc__, __format__ (printf, 2, 3)));
08738
08739 #if SU_HAVE_INLINE
08740 su_inline sip_unsupported_t *sip_unsupported_format(su_home_t *home, char const *fmt, ...)
08741 {
08742 sip_header_t *h;
08743 va_list ap;
08744
08745 va_start(ap, fmt);
08746 h = sip_header_vformat(home, sip_unsupported_class, fmt, ap);
08747 va_end(ap);
08748
08749 return (sip_unsupported_t *)h;
08750 }
08751 #endif
08752
08760 SOFIAPUBFUN int sip_event_d(su_home_t *, msg_header_t *,
08761 char *s, int slen);
08762
08764 SOFIAPUBFUN int sip_event_e(char b[], int bsiz,
08765 msg_header_t const *h, int flags);
08766
08770 #define sip_event(sip) \
08771 ((sip_event_t *)msg_header_access((msg_pub_t*)(sip), sip_event_class))
08772
08785 #define SIP_EVENT_INIT() SIP_HDR_INIT(event)
08786
08800 #if SU_HAVE_INLINE
08801 su_inline sip_event_t *sip_event_init(sip_event_t x[1])
08802 {
08803 return SIP_HEADER_INIT(x, sip_event_class, sizeof(sip_event_t));
08804 }
08805 #else
08806 #define sip_event_init(x) \
08807 SIP_HEADER_INIT(x, sip_event_class, sizeof(sip_event_t))
08808 #endif
08809
08823 #if SU_HAVE_INLINE
08824 su_inline int sip_is_event(sip_header_t const *header)
08825 {
08826 return header && header->sh_class->hc_hash == sip_event_hash;
08827 }
08828 #else
08829 int sip_is_event(sip_header_t const *header);
08830 #endif
08831
08832 #define sip_event_p(h) sip_is_event((h))
08833
08834
08862 #if SU_HAVE_INLINE
08863 su_inline
08864 #endif
08865 sip_event_t *sip_event_dup(su_home_t *home, sip_event_t const *hdr)
08866 __attribute__((__malloc__));
08867
08868 #if SU_HAVE_INLINE
08869 su_inline
08870 sip_event_t *sip_event_dup(su_home_t *home, sip_event_t const *hdr)
08871 {
08872 return (sip_event_t *)
08873 msg_header_dup_as(home, sip_event_class, (msg_header_t const *)hdr);
08874 }
08875 #endif
08876
08905 #if SU_HAVE_INLINE
08906 su_inline
08907 #endif
08908 sip_event_t *sip_event_copy(su_home_t *home, sip_event_t const *hdr)
08909 __attribute__((__malloc__));
08910
08911 #if SU_HAVE_INLINE
08912 su_inline
08913 sip_event_t *sip_event_copy(su_home_t *home, sip_event_t const *hdr)
08914 {
08915 return (sip_event_t *)
08916 msg_header_copy_as(home, sip_event_class, (msg_header_t const *)hdr);
08917 }
08918 #endif
08919
08938 #if SU_HAVE_INLINE
08939 su_inline
08940 #endif
08941 sip_event_t *sip_event_make(su_home_t *home, char const *s)
08942 __attribute__((__malloc__));
08943
08944 #if SU_HAVE_INLINE
08945 su_inline sip_event_t *sip_event_make(su_home_t *home, char const *s)
08946 {
08947 return (sip_event_t *)sip_header_make(home, sip_event_class, s);
08948 }
08949 #endif
08950
08973 #if SU_HAVE_INLINE
08974 su_inline
08975 #endif
08976 sip_event_t *sip_event_format(su_home_t *home, char const *fmt, ...)
08977 __attribute__((__malloc__, __format__ (printf, 2, 3)));
08978
08979 #if SU_HAVE_INLINE
08980 su_inline sip_event_t *sip_event_format(su_home_t *home, char const *fmt, ...)
08981 {
08982 sip_header_t *h;
08983 va_list ap;
08984
08985 va_start(ap, fmt);
08986 h = sip_header_vformat(home, sip_event_class, fmt, ap);
08987 va_end(ap);
08988
08989 return (sip_event_t *)h;
08990 }
08991 #endif
08992
09000 SOFIAPUBFUN int sip_allow_events_d(su_home_t *, msg_header_t *,
09001 char *s, int slen);
09002
09004 SOFIAPUBFUN int sip_allow_events_e(char b[], int bsiz,
09005 msg_header_t const *h, int flags);
09006
09010 #define sip_allow_events(sip) \
09011 ((sip_allow_events_t *)msg_header_access((msg_pub_t*)(sip), sip_allow_events_class))
09012
09025 #define SIP_ALLOW_EVENTS_INIT() SIP_HDR_INIT(allow_events)
09026
09040 #if SU_HAVE_INLINE
09041 su_inline sip_allow_events_t *sip_allow_events_init(sip_allow_events_t x[1])
09042 {
09043 return SIP_HEADER_INIT(x, sip_allow_events_class, sizeof(sip_allow_events_t));
09044 }
09045 #else
09046 #define sip_allow_events_init(x) \
09047 SIP_HEADER_INIT(x, sip_allow_events_class, sizeof(sip_allow_events_t))
09048 #endif
09049
09063 #if SU_HAVE_INLINE
09064 su_inline int sip_is_allow_events(sip_header_t const *header)
09065 {
09066 return header && header->sh_class->hc_hash == sip_allow_events_hash;
09067 }
09068 #else
09069 int sip_is_allow_events(sip_header_t const *header);
09070 #endif
09071
09072 #define sip_allow_events_p(h) sip_is_allow_events((h))
09073
09074
09102 #if SU_HAVE_INLINE
09103 su_inline
09104 #endif
09105 sip_allow_events_t *sip_allow_events_dup(su_home_t *home, sip_allow_events_t const *hdr)
09106 __attribute__((__malloc__));
09107
09108 #if SU_HAVE_INLINE
09109 su_inline
09110 sip_allow_events_t *sip_allow_events_dup(su_home_t *home, sip_allow_events_t const *hdr)
09111 {
09112 return (sip_allow_events_t *)
09113 msg_header_dup_as(home, sip_allow_events_class, (msg_header_t const *)hdr);
09114 }
09115 #endif
09116
09145 #if SU_HAVE_INLINE
09146 su_inline
09147 #endif
09148 sip_allow_events_t *sip_allow_events_copy(su_home_t *home, sip_allow_events_t const *hdr)
09149 __attribute__((__malloc__));
09150
09151 #if SU_HAVE_INLINE
09152 su_inline
09153 sip_allow_events_t *sip_allow_events_copy(su_home_t *home, sip_allow_events_t const *hdr)
09154 {
09155 return (sip_allow_events_t *)
09156 msg_header_copy_as(home, sip_allow_events_class, (msg_header_t const *)hdr);
09157 }
09158 #endif
09159
09178 #if SU_HAVE_INLINE
09179 su_inline
09180 #endif
09181 sip_allow_events_t *sip_allow_events_make(su_home_t *home, char const *s)
09182 __attribute__((__malloc__));
09183
09184 #if SU_HAVE_INLINE
09185 su_inline sip_allow_events_t *sip_allow_events_make(su_home_t *home, char const *s)
09186 {
09187 return (sip_allow_events_t *)sip_header_make(home, sip_allow_events_class, s);
09188 }
09189 #endif
09190
09213 #if SU_HAVE_INLINE
09214 su_inline
09215 #endif
09216 sip_allow_events_t *sip_allow_events_format(su_home_t *home, char const *fmt, ...)
09217 __attribute__((__malloc__, __format__ (printf, 2, 3)));
09218
09219 #if SU_HAVE_INLINE
09220 su_inline sip_allow_events_t *sip_allow_events_format(su_home_t *home, char const *fmt, ...)
09221 {
09222 sip_header_t *h;
09223 va_list ap;
09224
09225 va_start(ap, fmt);
09226 h = sip_header_vformat(home, sip_allow_events_class, fmt, ap);
09227 va_end(ap);
09228
09229 return (sip_allow_events_t *)h;
09230 }
09231 #endif
09232
09240 SOFIAPUBFUN int sip_subscription_state_d(su_home_t *, msg_header_t *,
09241 char *s, int slen);
09242
09244 SOFIAPUBFUN int sip_subscription_state_e(char b[], int bsiz,
09245 msg_header_t const *h, int flags);
09246
09250 #define sip_subscription_state(sip) \
09251 ((sip_subscription_state_t *)msg_header_access((msg_pub_t*)(sip), sip_subscription_state_class))
09252
09265 #define SIP_SUBSCRIPTION_STATE_INIT() SIP_HDR_INIT(subscription_state)
09266
09280 #if SU_HAVE_INLINE
09281 su_inline sip_subscription_state_t *sip_subscription_state_init(sip_subscription_state_t x[1])
09282 {
09283 return SIP_HEADER_INIT(x, sip_subscription_state_class, sizeof(sip_subscription_state_t));
09284 }
09285 #else
09286 #define sip_subscription_state_init(x) \
09287 SIP_HEADER_INIT(x, sip_subscription_state_class, sizeof(sip_subscription_state_t))
09288 #endif
09289
09303 #if SU_HAVE_INLINE
09304 su_inline int sip_is_subscription_state(sip_header_t const *header)
09305 {
09306 return header && header->sh_class->hc_hash == sip_subscription_state_hash;
09307 }
09308 #else
09309 int sip_is_subscription_state(sip_header_t const *header);
09310 #endif
09311
09312 #define sip_subscription_state_p(h) sip_is_subscription_state((h))
09313
09314
09342 #if SU_HAVE_INLINE
09343 su_inline
09344 #endif
09345 sip_subscription_state_t *sip_subscription_state_dup(su_home_t *home, sip_subscription_state_t const *hdr)
09346 __attribute__((__malloc__));
09347
09348 #if SU_HAVE_INLINE
09349 su_inline
09350 sip_subscription_state_t *sip_subscription_state_dup(su_home_t *home, sip_subscription_state_t const *hdr)
09351 {
09352 return (sip_subscription_state_t *)
09353 msg_header_dup_as(home, sip_subscription_state_class, (msg_header_t const *)hdr);
09354 }
09355 #endif
09356
09385 #if SU_HAVE_INLINE
09386 su_inline
09387 #endif
09388 sip_subscription_state_t *sip_subscription_state_copy(su_home_t *home, sip_subscription_state_t const *hdr)
09389 __attribute__((__malloc__));
09390
09391 #if SU_HAVE_INLINE
09392 su_inline
09393 sip_subscription_state_t *sip_subscription_state_copy(su_home_t *home, sip_subscription_state_t const *hdr)
09394 {
09395 return (sip_subscription_state_t *)
09396 msg_header_copy_as(home, sip_subscription_state_class, (msg_header_t const *)hdr);
09397 }
09398 #endif
09399
09418 #if SU_HAVE_INLINE
09419 su_inline
09420 #endif
09421 sip_subscription_state_t *sip_subscription_state_make(su_home_t *home, char const *s)
09422 __attribute__((__malloc__));
09423
09424 #if SU_HAVE_INLINE
09425 su_inline sip_subscription_state_t *sip_subscription_state_make(su_home_t *home, char const *s)
09426 {
09427 return (sip_subscription_state_t *)sip_header_make(home, sip_subscription_state_class, s);
09428 }
09429 #endif
09430
09453 #if SU_HAVE_INLINE
09454 su_inline
09455 #endif
09456 sip_subscription_state_t *sip_subscription_state_format(su_home_t *home, char const *fmt, ...)
09457 __attribute__((__malloc__, __format__ (printf, 2, 3)));
09458
09459 #if SU_HAVE_INLINE
09460 su_inline sip_subscription_state_t *sip_subscription_state_format(su_home_t *home, char const *fmt, ...)
09461 {
09462 sip_header_t *h;
09463 va_list ap;
09464
09465 va_start(ap, fmt);
09466 h = sip_header_vformat(home, sip_subscription_state_class, fmt, ap);
09467 va_end(ap);
09468
09469 return (sip_subscription_state_t *)h;
09470 }
09471 #endif
09472
09480 SOFIAPUBFUN int sip_proxy_authenticate_d(su_home_t *, msg_header_t *,
09481 char *s, int slen);
09482
09484 SOFIAPUBFUN int sip_proxy_authenticate_e(char b[], int bsiz,
09485 msg_header_t const *h, int flags);
09486
09490 #define sip_proxy_authenticate(sip) \
09491 ((sip_proxy_authenticate_t *)msg_header_access((msg_pub_t*)(sip), sip_proxy_authenticate_class))
09492
09505 #define SIP_PROXY_AUTHENTICATE_INIT() SIP_HDR_INIT(proxy_authenticate)
09506
09520 #if SU_HAVE_INLINE
09521 su_inline sip_proxy_authenticate_t *sip_proxy_authenticate_init(sip_proxy_authenticate_t x[1])
09522 {
09523 return SIP_HEADER_INIT(x, sip_proxy_authenticate_class, sizeof(sip_proxy_authenticate_t));
09524 }
09525 #else
09526 #define sip_proxy_authenticate_init(x) \
09527 SIP_HEADER_INIT(x, sip_proxy_authenticate_class, sizeof(sip_proxy_authenticate_t))
09528 #endif
09529
09543 #if SU_HAVE_INLINE
09544 su_inline int sip_is_proxy_authenticate(sip_header_t const *header)
09545 {
09546 return header && header->sh_class->hc_hash == sip_proxy_authenticate_hash;
09547 }
09548 #else
09549 int sip_is_proxy_authenticate(sip_header_t const *header);
09550 #endif
09551
09552 #define sip_proxy_authenticate_p(h) sip_is_proxy_authenticate((h))
09553
09554
09582 #if SU_HAVE_INLINE
09583 su_inline
09584 #endif
09585 sip_proxy_authenticate_t *sip_proxy_authenticate_dup(su_home_t *home, sip_proxy_authenticate_t const *hdr)
09586 __attribute__((__malloc__));
09587
09588 #if SU_HAVE_INLINE
09589 su_inline
09590 sip_proxy_authenticate_t *sip_proxy_authenticate_dup(su_home_t *home, sip_proxy_authenticate_t const *hdr)
09591 {
09592 return (sip_proxy_authenticate_t *)
09593 msg_header_dup_as(home, sip_proxy_authenticate_class, (msg_header_t const *)hdr);
09594 }
09595 #endif
09596
09625 #if SU_HAVE_INLINE
09626 su_inline
09627 #endif
09628 sip_proxy_authenticate_t *sip_proxy_authenticate_copy(su_home_t *home, sip_proxy_authenticate_t const *hdr)
09629 __attribute__((__malloc__));
09630
09631 #if SU_HAVE_INLINE
09632 su_inline
09633 sip_proxy_authenticate_t *sip_proxy_authenticate_copy(su_home_t *home, sip_proxy_authenticate_t const *hdr)
09634 {
09635 return (sip_proxy_authenticate_t *)
09636 msg_header_copy_as(home, sip_proxy_authenticate_class, (msg_header_t const *)hdr);
09637 }
09638 #endif
09639
09658 #if SU_HAVE_INLINE
09659 su_inline
09660 #endif
09661 sip_proxy_authenticate_t *sip_proxy_authenticate_make(su_home_t *home, char const *s)
09662 __attribute__((__malloc__));
09663
09664 #if SU_HAVE_INLINE
09665 su_inline sip_proxy_authenticate_t *sip_proxy_authenticate_make(su_home_t *home, char const *s)
09666 {
09667 return (sip_proxy_authenticate_t *)sip_header_make(home, sip_proxy_authenticate_class, s);
09668 }
09669 #endif
09670
09693 #if SU_HAVE_INLINE
09694 su_inline
09695 #endif
09696 sip_proxy_authenticate_t *sip_proxy_authenticate_format(su_home_t *home, char const *fmt, ...)
09697 __attribute__((__malloc__, __format__ (printf, 2, 3)));
09698
09699 #if SU_HAVE_INLINE
09700 su_inline sip_proxy_authenticate_t *sip_proxy_authenticate_format(su_home_t *home, char const *fmt, ...)
09701 {
09702 sip_header_t *h;
09703 va_list ap;
09704
09705 va_start(ap, fmt);
09706 h = sip_header_vformat(home, sip_proxy_authenticate_class, fmt, ap);
09707 va_end(ap);
09708
09709 return (sip_proxy_authenticate_t *)h;
09710 }
09711 #endif
09712
09720 SOFIAPUBFUN int sip_proxy_authentication_info_d(su_home_t *, msg_header_t *,
09721 char *s, int slen);
09722
09724 SOFIAPUBFUN int sip_proxy_authentication_info_e(char b[], int bsiz,
09725 msg_header_t const *h, int flags);
09726
09730 #define sip_proxy_authentication_info(sip) \
09731 ((sip_proxy_authentication_info_t *)msg_header_access((msg_pub_t*)(sip), sip_proxy_authentication_info_class))
09732
09745 #define SIP_PROXY_AUTHENTICATION_INFO_INIT() SIP_HDR_INIT(proxy_authentication_info)
09746
09760 #if SU_HAVE_INLINE
09761 su_inline sip_proxy_authentication_info_t *sip_proxy_authentication_info_init(sip_proxy_authentication_info_t x[1])
09762 {
09763 return SIP_HEADER_INIT(x, sip_proxy_authentication_info_class, sizeof(sip_proxy_authentication_info_t));
09764 }
09765 #else
09766 #define sip_proxy_authentication_info_init(x) \
09767 SIP_HEADER_INIT(x, sip_proxy_authentication_info_class, sizeof(sip_proxy_authentication_info_t))
09768 #endif
09769
09783 #if SU_HAVE_INLINE
09784 su_inline int sip_is_proxy_authentication_info(sip_header_t const *header)
09785 {
09786 return header && header->sh_class->hc_hash == sip_proxy_authentication_info_hash;
09787 }
09788 #else
09789 int sip_is_proxy_authentication_info(sip_header_t const *header);
09790 #endif
09791
09792 #define sip_proxy_authentication_info_p(h) sip_is_proxy_authentication_info((h))
09793
09794
09822 #if SU_HAVE_INLINE
09823 su_inline
09824 #endif
09825 sip_proxy_authentication_info_t *sip_proxy_authentication_info_dup(su_home_t *home, sip_proxy_authentication_info_t const *hdr)
09826 __attribute__((__malloc__));
09827
09828 #if SU_HAVE_INLINE
09829 su_inline
09830 sip_proxy_authentication_info_t *sip_proxy_authentication_info_dup(su_home_t *home, sip_proxy_authentication_info_t const *hdr)
09831 {
09832 return (sip_proxy_authentication_info_t *)
09833 msg_header_dup_as(home, sip_proxy_authentication_info_class, (msg_header_t const *)hdr);
09834 }
09835 #endif
09836
09865 #if SU_HAVE_INLINE
09866 su_inline
09867 #endif
09868 sip_proxy_authentication_info_t *sip_proxy_authentication_info_copy(su_home_t *home, sip_proxy_authentication_info_t const *hdr)
09869 __attribute__((__malloc__));
09870
09871 #if SU_HAVE_INLINE
09872 su_inline
09873 sip_proxy_authentication_info_t *sip_proxy_authentication_info_copy(su_home_t *home, sip_proxy_authentication_info_t const *hdr)
09874 {
09875 return (sip_proxy_authentication_info_t *)
09876 msg_header_copy_as(home, sip_proxy_authentication_info_class, (msg_header_t const *)hdr);
09877 }
09878 #endif
09879
09898 #if SU_HAVE_INLINE
09899 su_inline
09900 #endif
09901 sip_proxy_authentication_info_t *sip_proxy_authentication_info_make(su_home_t *home, char const *s)
09902 __attribute__((__malloc__));
09903
09904 #if SU_HAVE_INLINE
09905 su_inline sip_proxy_authentication_info_t *sip_proxy_authentication_info_make(su_home_t *home, char const *s)
09906 {
09907 return (sip_proxy_authentication_info_t *)sip_header_make(home, sip_proxy_authentication_info_class, s);
09908 }
09909 #endif
09910
09933 #if SU_HAVE_INLINE
09934 su_inline
09935 #endif
09936 sip_proxy_authentication_info_t *sip_proxy_authentication_info_format(su_home_t *home, char const *fmt, ...)
09937 __attribute__((__malloc__, __format__ (printf, 2, 3)));
09938
09939 #if SU_HAVE_INLINE
09940 su_inline sip_proxy_authentication_info_t *sip_proxy_authentication_info_format(su_home_t *home, char const *fmt, ...)
09941 {
09942 sip_header_t *h;
09943 va_list ap;
09944
09945 va_start(ap, fmt);
09946 h = sip_header_vformat(home, sip_proxy_authentication_info_class, fmt, ap);
09947 va_end(ap);
09948
09949 return (sip_proxy_authentication_info_t *)h;
09950 }
09951 #endif
09952
09960 SOFIAPUBFUN int sip_proxy_authorization_d(su_home_t *, msg_header_t *,
09961 char *s, int slen);
09962
09964 SOFIAPUBFUN int sip_proxy_authorization_e(char b[], int bsiz,
09965 msg_header_t const *h, int flags);
09966
09970 #define sip_proxy_authorization(sip) \
09971 ((sip_proxy_authorization_t *)msg_header_access((msg_pub_t*)(sip), sip_proxy_authorization_class))
09972
09985 #define SIP_PROXY_AUTHORIZATION_INIT() SIP_HDR_INIT(proxy_authorization)
09986
10000 #if SU_HAVE_INLINE
10001 su_inline sip_proxy_authorization_t *sip_proxy_authorization_init(sip_proxy_authorization_t x[1])
10002 {
10003 return SIP_HEADER_INIT(x, sip_proxy_authorization_class, sizeof(sip_proxy_authorization_t));
10004 }
10005 #else
10006 #define sip_proxy_authorization_init(x) \
10007 SIP_HEADER_INIT(x, sip_proxy_authorization_class, sizeof(sip_proxy_authorization_t))
10008 #endif
10009
10023 #if SU_HAVE_INLINE
10024 su_inline int sip_is_proxy_authorization(sip_header_t const *header)
10025 {
10026 return header && header->sh_class->hc_hash == sip_proxy_authorization_hash;
10027 }
10028 #else
10029 int sip_is_proxy_authorization(sip_header_t const *header);
10030 #endif
10031
10032 #define sip_proxy_authorization_p(h) sip_is_proxy_authorization((h))
10033
10034
10062 #if SU_HAVE_INLINE
10063 su_inline
10064 #endif
10065 sip_proxy_authorization_t *sip_proxy_authorization_dup(su_home_t *home, sip_proxy_authorization_t const *hdr)
10066 __attribute__((__malloc__));
10067
10068 #if SU_HAVE_INLINE
10069 su_inline
10070 sip_proxy_authorization_t *sip_proxy_authorization_dup(su_home_t *home, sip_proxy_authorization_t const *hdr)
10071 {
10072 return (sip_proxy_authorization_t *)
10073 msg_header_dup_as(home, sip_proxy_authorization_class, (msg_header_t const *)hdr);
10074 }
10075 #endif
10076
10105 #if SU_HAVE_INLINE
10106 su_inline
10107 #endif
10108 sip_proxy_authorization_t *sip_proxy_authorization_copy(su_home_t *home, sip_proxy_authorization_t const *hdr)
10109 __attribute__((__malloc__));
10110
10111 #if SU_HAVE_INLINE
10112 su_inline
10113 sip_proxy_authorization_t *sip_proxy_authorization_copy(su_home_t *home, sip_proxy_authorization_t const *hdr)
10114 {
10115 return (sip_proxy_authorization_t *)
10116 msg_header_copy_as(home, sip_proxy_authorization_class, (msg_header_t const *)hdr);
10117 }
10118 #endif
10119
10138 #if SU_HAVE_INLINE
10139 su_inline
10140 #endif
10141 sip_proxy_authorization_t *sip_proxy_authorization_make(su_home_t *home, char const *s)
10142 __attribute__((__malloc__));
10143
10144 #if SU_HAVE_INLINE
10145 su_inline sip_proxy_authorization_t *sip_proxy_authorization_make(su_home_t *home, char const *s)
10146 {
10147 return (sip_proxy_authorization_t *)sip_header_make(home, sip_proxy_authorization_class, s);
10148 }
10149 #endif
10150
10173 #if SU_HAVE_INLINE
10174 su_inline
10175 #endif
10176 sip_proxy_authorization_t *sip_proxy_authorization_format(su_home_t *home, char const *fmt, ...)
10177 __attribute__((__malloc__, __format__ (printf, 2, 3)));
10178
10179 #if SU_HAVE_INLINE
10180 su_inline sip_proxy_authorization_t *sip_proxy_authorization_format(su_home_t *home, char const *fmt, ...)
10181 {
10182 sip_header_t *h;
10183 va_list ap;
10184
10185 va_start(ap, fmt);
10186 h = sip_header_vformat(home, sip_proxy_authorization_class, fmt, ap);
10187 va_end(ap);
10188
10189 return (sip_proxy_authorization_t *)h;
10190 }
10191 #endif
10192
10200 SOFIAPUBFUN int sip_authorization_d(su_home_t *, msg_header_t *,
10201 char *s, int slen);
10202
10204 SOFIAPUBFUN int sip_authorization_e(char b[], int bsiz,
10205 msg_header_t const *h, int flags);
10206
10210 #define sip_authorization(sip) \
10211 ((sip_authorization_t *)msg_header_access((msg_pub_t*)(sip), sip_authorization_class))
10212
10225 #define SIP_AUTHORIZATION_INIT() SIP_HDR_INIT(authorization)
10226
10240 #if SU_HAVE_INLINE
10241 su_inline sip_authorization_t *sip_authorization_init(sip_authorization_t x[1])
10242 {
10243 return SIP_HEADER_INIT(x, sip_authorization_class, sizeof(sip_authorization_t));
10244 }
10245 #else
10246 #define sip_authorization_init(x) \
10247 SIP_HEADER_INIT(x, sip_authorization_class, sizeof(sip_authorization_t))
10248 #endif
10249
10263 #if SU_HAVE_INLINE
10264 su_inline int sip_is_authorization(sip_header_t const *header)
10265 {
10266 return header && header->sh_class->hc_hash == sip_authorization_hash;
10267 }
10268 #else
10269 int sip_is_authorization(sip_header_t const *header);
10270 #endif
10271
10272 #define sip_authorization_p(h) sip_is_authorization((h))
10273
10274
10302 #if SU_HAVE_INLINE
10303 su_inline
10304 #endif
10305 sip_authorization_t *sip_authorization_dup(su_home_t *home, sip_authorization_t const *hdr)
10306 __attribute__((__malloc__));
10307
10308 #if SU_HAVE_INLINE
10309 su_inline
10310 sip_authorization_t *sip_authorization_dup(su_home_t *home, sip_authorization_t const *hdr)
10311 {
10312 return (sip_authorization_t *)
10313 msg_header_dup_as(home, sip_authorization_class, (msg_header_t const *)hdr);
10314 }
10315 #endif
10316
10345 #if SU_HAVE_INLINE
10346 su_inline
10347 #endif
10348 sip_authorization_t *sip_authorization_copy(su_home_t *home, sip_authorization_t const *hdr)
10349 __attribute__((__malloc__));
10350
10351 #if SU_HAVE_INLINE
10352 su_inline
10353 sip_authorization_t *sip_authorization_copy(su_home_t *home, sip_authorization_t const *hdr)
10354 {
10355 return (sip_authorization_t *)
10356 msg_header_copy_as(home, sip_authorization_class, (msg_header_t const *)hdr);
10357 }
10358 #endif
10359
10378 #if SU_HAVE_INLINE
10379 su_inline
10380 #endif
10381 sip_authorization_t *sip_authorization_make(su_home_t *home, char const *s)
10382 __attribute__((__malloc__));
10383
10384 #if SU_HAVE_INLINE
10385 su_inline sip_authorization_t *sip_authorization_make(su_home_t *home, char const *s)
10386 {
10387 return (sip_authorization_t *)sip_header_make(home, sip_authorization_class, s);
10388 }
10389 #endif
10390
10413 #if SU_HAVE_INLINE
10414 su_inline
10415 #endif
10416 sip_authorization_t *sip_authorization_format(su_home_t *home, char const *fmt, ...)
10417 __attribute__((__malloc__, __format__ (printf, 2, 3)));
10418
10419 #if SU_HAVE_INLINE
10420 su_inline sip_authorization_t *sip_authorization_format(su_home_t *home, char const *fmt, ...)
10421 {
10422 sip_header_t *h;
10423 va_list ap;
10424
10425 va_start(ap, fmt);
10426 h = sip_header_vformat(home, sip_authorization_class, fmt, ap);
10427 va_end(ap);
10428
10429 return (sip_authorization_t *)h;
10430 }
10431 #endif
10432
10440 SOFIAPUBFUN int sip_www_authenticate_d(su_home_t *, msg_header_t *,
10441 char *s, int slen);
10442
10444 SOFIAPUBFUN int sip_www_authenticate_e(char b[], int bsiz,
10445 msg_header_t const *h, int flags);
10446
10450 #define sip_www_authenticate(sip) \
10451 ((sip_www_authenticate_t *)msg_header_access((msg_pub_t*)(sip), sip_www_authenticate_class))
10452
10465 #define SIP_WWW_AUTHENTICATE_INIT() SIP_HDR_INIT(www_authenticate)
10466
10480 #if SU_HAVE_INLINE
10481 su_inline sip_www_authenticate_t *sip_www_authenticate_init(sip_www_authenticate_t x[1])
10482 {
10483 return SIP_HEADER_INIT(x, sip_www_authenticate_class, sizeof(sip_www_authenticate_t));
10484 }
10485 #else
10486 #define sip_www_authenticate_init(x) \
10487 SIP_HEADER_INIT(x, sip_www_authenticate_class, sizeof(sip_www_authenticate_t))
10488 #endif
10489
10503 #if SU_HAVE_INLINE
10504 su_inline int sip_is_www_authenticate(sip_header_t const *header)
10505 {
10506 return header && header->sh_class->hc_hash == sip_www_authenticate_hash;
10507 }
10508 #else
10509 int sip_is_www_authenticate(sip_header_t const *header);
10510 #endif
10511
10512 #define sip_www_authenticate_p(h) sip_is_www_authenticate((h))
10513
10514
10542 #if SU_HAVE_INLINE
10543 su_inline
10544 #endif
10545 sip_www_authenticate_t *sip_www_authenticate_dup(su_home_t *home, sip_www_authenticate_t const *hdr)
10546 __attribute__((__malloc__));
10547
10548 #if SU_HAVE_INLINE
10549 su_inline
10550 sip_www_authenticate_t *sip_www_authenticate_dup(su_home_t *home, sip_www_authenticate_t const *hdr)
10551 {
10552 return (sip_www_authenticate_t *)
10553 msg_header_dup_as(home, sip_www_authenticate_class, (msg_header_t const *)hdr);
10554 }
10555 #endif
10556
10585 #if SU_HAVE_INLINE
10586 su_inline
10587 #endif
10588 sip_www_authenticate_t *sip_www_authenticate_copy(su_home_t *home, sip_www_authenticate_t const *hdr)
10589 __attribute__((__malloc__));
10590
10591 #if SU_HAVE_INLINE
10592 su_inline
10593 sip_www_authenticate_t *sip_www_authenticate_copy(su_home_t *home, sip_www_authenticate_t const *hdr)
10594 {
10595 return (sip_www_authenticate_t *)
10596 msg_header_copy_as(home, sip_www_authenticate_class, (msg_header_t const *)hdr);
10597 }
10598 #endif
10599
10618 #if SU_HAVE_INLINE
10619 su_inline
10620 #endif
10621 sip_www_authenticate_t *sip_www_authenticate_make(su_home_t *home, char const *s)
10622 __attribute__((__malloc__));
10623
10624 #if SU_HAVE_INLINE
10625 su_inline sip_www_authenticate_t *sip_www_authenticate_make(su_home_t *home, char const *s)
10626 {
10627 return (sip_www_authenticate_t *)sip_header_make(home, sip_www_authenticate_class, s);
10628 }
10629 #endif
10630
10653 #if SU_HAVE_INLINE
10654 su_inline
10655 #endif
10656 sip_www_authenticate_t *sip_www_authenticate_format(su_home_t *home, char const *fmt, ...)
10657 __attribute__((__malloc__, __format__ (printf, 2, 3)));
10658
10659 #if SU_HAVE_INLINE
10660 su_inline sip_www_authenticate_t *sip_www_authenticate_format(su_home_t *home, char const *fmt, ...)
10661 {
10662 sip_header_t *h;
10663 va_list ap;
10664
10665 va_start(ap, fmt);
10666 h = sip_header_vformat(home, sip_www_authenticate_class, fmt, ap);
10667 va_end(ap);
10668
10669 return (sip_www_authenticate_t *)h;
10670 }
10671 #endif
10672
10680 SOFIAPUBFUN int sip_authentication_info_d(su_home_t *, msg_header_t *,
10681 char *s, int slen);
10682
10684 SOFIAPUBFUN int sip_authentication_info_e(char b[], int bsiz,
10685 msg_header_t const *h, int flags);
10686
10690 #define sip_authentication_info(sip) \
10691 ((sip_authentication_info_t *)msg_header_access((msg_pub_t*)(sip), sip_authentication_info_class))
10692
10705 #define SIP_AUTHENTICATION_INFO_INIT() SIP_HDR_INIT(authentication_info)
10706
10720 #if SU_HAVE_INLINE
10721 su_inline sip_authentication_info_t *sip_authentication_info_init(sip_authentication_info_t x[1])
10722 {
10723 return SIP_HEADER_INIT(x, sip_authentication_info_class, sizeof(sip_authentication_info_t));
10724 }
10725 #else
10726 #define sip_authentication_info_init(x) \
10727 SIP_HEADER_INIT(x, sip_authentication_info_class, sizeof(sip_authentication_info_t))
10728 #endif
10729
10743 #if SU_HAVE_INLINE
10744 su_inline int sip_is_authentication_info(sip_header_t const *header)
10745 {
10746 return header && header->sh_class->hc_hash == sip_authentication_info_hash;
10747 }
10748 #else
10749 int sip_is_authentication_info(sip_header_t const *header);
10750 #endif
10751
10752 #define sip_authentication_info_p(h) sip_is_authentication_info((h))
10753
10754
10782 #if SU_HAVE_INLINE
10783 su_inline
10784 #endif
10785 sip_authentication_info_t *sip_authentication_info_dup(su_home_t *home, sip_authentication_info_t const *hdr)
10786 __attribute__((__malloc__));
10787
10788 #if SU_HAVE_INLINE
10789 su_inline
10790 sip_authentication_info_t *sip_authentication_info_dup(su_home_t *home, sip_authentication_info_t const *hdr)
10791 {
10792 return (sip_authentication_info_t *)
10793 msg_header_dup_as(home, sip_authentication_info_class, (msg_header_t const *)hdr);
10794 }
10795 #endif
10796
10825 #if SU_HAVE_INLINE
10826 su_inline
10827 #endif
10828 sip_authentication_info_t *sip_authentication_info_copy(su_home_t *home, sip_authentication_info_t const *hdr)
10829 __attribute__((__malloc__));
10830
10831 #if SU_HAVE_INLINE
10832 su_inline
10833 sip_authentication_info_t *sip_authentication_info_copy(su_home_t *home, sip_authentication_info_t const *hdr)
10834 {
10835 return (sip_authentication_info_t *)
10836 msg_header_copy_as(home, sip_authentication_info_class, (msg_header_t const *)hdr);
10837 }
10838 #endif
10839
10858 #if SU_HAVE_INLINE
10859 su_inline
10860 #endif
10861 sip_authentication_info_t *sip_authentication_info_make(su_home_t *home, char const *s)
10862 __attribute__((__malloc__));
10863
10864 #if SU_HAVE_INLINE
10865 su_inline sip_authentication_info_t *sip_authentication_info_make(su_home_t *home, char const *s)
10866 {
10867 return (sip_authentication_info_t *)sip_header_make(home, sip_authentication_info_class, s);
10868 }
10869 #endif
10870
10893 #if SU_HAVE_INLINE
10894 su_inline
10895 #endif
10896 sip_authentication_info_t *sip_authentication_info_format(su_home_t *home, char const *fmt, ...)
10897 __attribute__((__malloc__, __format__ (printf, 2, 3)));
10898
10899 #if SU_HAVE_INLINE
10900 su_inline sip_authentication_info_t *sip_authentication_info_format(su_home_t *home, char const *fmt, ...)
10901 {
10902 sip_header_t *h;
10903 va_list ap;
10904
10905 va_start(ap, fmt);
10906 h = sip_header_vformat(home, sip_authentication_info_class, fmt, ap);
10907 va_end(ap);
10908
10909 return (sip_authentication_info_t *)h;
10910 }
10911 #endif
10912
10920 SOFIAPUBFUN int sip_error_info_d(su_home_t *, msg_header_t *,
10921 char *s, int slen);
10922
10924 SOFIAPUBFUN int sip_error_info_e(char b[], int bsiz,
10925 msg_header_t const *h, int flags);
10926
10930 #define sip_error_info(sip) \
10931 ((sip_error_info_t *)msg_header_access((msg_pub_t*)(sip), sip_error_info_class))
10932
10945 #define SIP_ERROR_INFO_INIT() SIP_HDR_INIT(error_info)
10946
10960 #if SU_HAVE_INLINE
10961 su_inline sip_error_info_t *sip_error_info_init(sip_error_info_t x[1])
10962 {
10963 return SIP_HEADER_INIT(x, sip_error_info_class, sizeof(sip_error_info_t));
10964 }
10965 #else
10966 #define sip_error_info_init(x) \
10967 SIP_HEADER_INIT(x, sip_error_info_class, sizeof(sip_error_info_t))
10968 #endif
10969
10983 #if SU_HAVE_INLINE
10984 su_inline int sip_is_error_info(sip_header_t const *header)
10985 {
10986 return header && header->sh_class->hc_hash == sip_error_info_hash;
10987 }
10988 #else
10989 int sip_is_error_info(sip_header_t const *header);
10990 #endif
10991
10992 #define sip_error_info_p(h) sip_is_error_info((h))
10993
10994
11022 #if SU_HAVE_INLINE
11023 su_inline
11024 #endif
11025 sip_error_info_t *sip_error_info_dup(su_home_t *home, sip_error_info_t const *hdr)
11026 __attribute__((__malloc__));
11027
11028 #if SU_HAVE_INLINE
11029 su_inline
11030 sip_error_info_t *sip_error_info_dup(su_home_t *home, sip_error_info_t const *hdr)
11031 {
11032 return (sip_error_info_t *)
11033 msg_header_dup_as(home, sip_error_info_class, (msg_header_t const *)hdr);
11034 }
11035 #endif
11036
11065 #if SU_HAVE_INLINE
11066 su_inline
11067 #endif
11068 sip_error_info_t *sip_error_info_copy(su_home_t *home, sip_error_info_t const *hdr)
11069 __attribute__((__malloc__));
11070
11071 #if SU_HAVE_INLINE
11072 su_inline
11073 sip_error_info_t *sip_error_info_copy(su_home_t *home, sip_error_info_t const *hdr)
11074 {
11075 return (sip_error_info_t *)
11076 msg_header_copy_as(home, sip_error_info_class, (msg_header_t const *)hdr);
11077 }
11078 #endif
11079
11098 #if SU_HAVE_INLINE
11099 su_inline
11100 #endif
11101 sip_error_info_t *sip_error_info_make(su_home_t *home, char const *s)
11102 __attribute__((__malloc__));
11103
11104 #if SU_HAVE_INLINE
11105 su_inline sip_error_info_t *sip_error_info_make(su_home_t *home, char const *s)
11106 {
11107 return (sip_error_info_t *)sip_header_make(home, sip_error_info_class, s);
11108 }
11109 #endif
11110
11133 #if SU_HAVE_INLINE
11134 su_inline
11135 #endif
11136 sip_error_info_t *sip_error_info_format(su_home_t *home, char const *fmt, ...)
11137 __attribute__((__malloc__, __format__ (printf, 2, 3)));
11138
11139 #if SU_HAVE_INLINE
11140 su_inline sip_error_info_t *sip_error_info_format(su_home_t *home, char const *fmt, ...)
11141 {
11142 sip_header_t *h;
11143 va_list ap;
11144
11145 va_start(ap, fmt);
11146 h = sip_header_vformat(home, sip_error_info_class, fmt, ap);
11147 va_end(ap);
11148
11149 return (sip_error_info_t *)h;
11150 }
11151 #endif
11152
11160 SOFIAPUBFUN int sip_warning_d(su_home_t *, msg_header_t *,
11161 char *s, int slen);
11162
11164 SOFIAPUBFUN int sip_warning_e(char b[], int bsiz,
11165 msg_header_t const *h, int flags);
11166
11170 #define sip_warning(sip) \
11171 ((sip_warning_t *)msg_header_access((msg_pub_t*)(sip), sip_warning_class))
11172
11185 #define SIP_WARNING_INIT() SIP_HDR_INIT(warning)
11186
11200 #if SU_HAVE_INLINE
11201 su_inline sip_warning_t *sip_warning_init(sip_warning_t x[1])
11202 {
11203 return SIP_HEADER_INIT(x, sip_warning_class, sizeof(sip_warning_t));
11204 }
11205 #else
11206 #define sip_warning_init(x) \
11207 SIP_HEADER_INIT(x, sip_warning_class, sizeof(sip_warning_t))
11208 #endif
11209
11223 #if SU_HAVE_INLINE
11224 su_inline int sip_is_warning(sip_header_t const *header)
11225 {
11226 return header && header->sh_class->hc_hash == sip_warning_hash;
11227 }
11228 #else
11229 int sip_is_warning(sip_header_t const *header);
11230 #endif
11231
11232 #define sip_warning_p(h) sip_is_warning((h))
11233
11234
11262 #if SU_HAVE_INLINE
11263 su_inline
11264 #endif
11265 sip_warning_t *sip_warning_dup(su_home_t *home, sip_warning_t const *hdr)
11266 __attribute__((__malloc__));
11267
11268 #if SU_HAVE_INLINE
11269 su_inline
11270 sip_warning_t *sip_warning_dup(su_home_t *home, sip_warning_t const *hdr)
11271 {
11272 return (sip_warning_t *)
11273 msg_header_dup_as(home, sip_warning_class, (msg_header_t const *)hdr);
11274 }
11275 #endif
11276
11305 #if SU_HAVE_INLINE
11306 su_inline
11307 #endif
11308 sip_warning_t *sip_warning_copy(su_home_t *home, sip_warning_t const *hdr)
11309 __attribute__((__malloc__));
11310
11311 #if SU_HAVE_INLINE
11312 su_inline
11313 sip_warning_t *sip_warning_copy(su_home_t *home, sip_warning_t const *hdr)
11314 {
11315 return (sip_warning_t *)
11316 msg_header_copy_as(home, sip_warning_class, (msg_header_t const *)hdr);
11317 }
11318 #endif
11319
11338 #if SU_HAVE_INLINE
11339 su_inline
11340 #endif
11341 sip_warning_t *sip_warning_make(su_home_t *home, char const *s)
11342 __attribute__((__malloc__));
11343
11344 #if SU_HAVE_INLINE
11345 su_inline sip_warning_t *sip_warning_make(su_home_t *home, char const *s)
11346 {
11347 return (sip_warning_t *)sip_header_make(home, sip_warning_class, s);
11348 }
11349 #endif
11350
11373 #if SU_HAVE_INLINE
11374 su_inline
11375 #endif
11376 sip_warning_t *sip_warning_format(su_home_t *home, char const *fmt, ...)
11377 __attribute__((__malloc__, __format__ (printf, 2, 3)));
11378
11379 #if SU_HAVE_INLINE
11380 su_inline sip_warning_t *sip_warning_format(su_home_t *home, char const *fmt, ...)
11381 {
11382 sip_header_t *h;
11383 va_list ap;
11384
11385 va_start(ap, fmt);
11386 h = sip_header_vformat(home, sip_warning_class, fmt, ap);
11387 va_end(ap);
11388
11389 return (sip_warning_t *)h;
11390 }
11391 #endif
11392
11400 SOFIAPUBFUN int sip_refer_to_d(su_home_t *, msg_header_t *,
11401 char *s, int slen);
11402
11404 SOFIAPUBFUN int sip_refer_to_e(char b[], int bsiz,
11405 msg_header_t const *h, int flags);
11406
11410 #define sip_refer_to(sip) \
11411 ((sip_refer_to_t *)msg_header_access((msg_pub_t*)(sip), sip_refer_to_class))
11412
11425 #define SIP_REFER_TO_INIT() SIP_HDR_INIT(refer_to)
11426
11440 #if SU_HAVE_INLINE
11441 su_inline sip_refer_to_t *sip_refer_to_init(sip_refer_to_t x[1])
11442 {
11443 return SIP_HEADER_INIT(x, sip_refer_to_class, sizeof(sip_refer_to_t));
11444 }
11445 #else
11446 #define sip_refer_to_init(x) \
11447 SIP_HEADER_INIT(x, sip_refer_to_class, sizeof(sip_refer_to_t))
11448 #endif
11449
11463 #if SU_HAVE_INLINE
11464 su_inline int sip_is_refer_to(sip_header_t const *header)
11465 {
11466 return header && header->sh_class->hc_hash == sip_refer_to_hash;
11467 }
11468 #else
11469 int sip_is_refer_to(sip_header_t const *header);
11470 #endif
11471
11472 #define sip_refer_to_p(h) sip_is_refer_to((h))
11473
11474
11502 #if SU_HAVE_INLINE
11503 su_inline
11504 #endif
11505 sip_refer_to_t *sip_refer_to_dup(su_home_t *home, sip_refer_to_t const *hdr)
11506 __attribute__((__malloc__));
11507
11508 #if SU_HAVE_INLINE
11509 su_inline
11510 sip_refer_to_t *sip_refer_to_dup(su_home_t *home, sip_refer_to_t const *hdr)
11511 {
11512 return (sip_refer_to_t *)
11513 msg_header_dup_as(home, sip_refer_to_class, (msg_header_t const *)hdr);
11514 }
11515 #endif
11516
11545 #if SU_HAVE_INLINE
11546 su_inline
11547 #endif
11548 sip_refer_to_t *sip_refer_to_copy(su_home_t *home, sip_refer_to_t const *hdr)
11549 __attribute__((__malloc__));
11550
11551 #if SU_HAVE_INLINE
11552 su_inline
11553 sip_refer_to_t *sip_refer_to_copy(su_home_t *home, sip_refer_to_t const *hdr)
11554 {
11555 return (sip_refer_to_t *)
11556 msg_header_copy_as(home, sip_refer_to_class, (msg_header_t const *)hdr);
11557 }
11558 #endif
11559
11578 #if SU_HAVE_INLINE
11579 su_inline
11580 #endif
11581 sip_refer_to_t *sip_refer_to_make(su_home_t *home, char const *s)
11582 __attribute__((__malloc__));
11583
11584 #if SU_HAVE_INLINE
11585 su_inline sip_refer_to_t *sip_refer_to_make(su_home_t *home, char const *s)
11586 {
11587 return (sip_refer_to_t *)sip_header_make(home, sip_refer_to_class, s);
11588 }
11589 #endif
11590
11613 #if SU_HAVE_INLINE
11614 su_inline
11615 #endif
11616 sip_refer_to_t *sip_refer_to_format(su_home_t *home, char const *fmt, ...)
11617 __attribute__((__malloc__, __format__ (printf, 2, 3)));
11618
11619 #if SU_HAVE_INLINE
11620 su_inline sip_refer_to_t *sip_refer_to_format(su_home_t *home, char const *fmt, ...)
11621 {
11622 sip_header_t *h;
11623 va_list ap;
11624
11625 va_start(ap, fmt);
11626 h = sip_header_vformat(home, sip_refer_to_class, fmt, ap);
11627 va_end(ap);
11628
11629 return (sip_refer_to_t *)h;
11630 }
11631 #endif
11632
11640 SOFIAPUBFUN int sip_referred_by_d(su_home_t *, msg_header_t *,
11641 char *s, int slen);
11642
11644 SOFIAPUBFUN int sip_referred_by_e(char b[], int bsiz,
11645 msg_header_t const *h, int flags);
11646
11650 #define sip_referred_by(sip) \
11651 ((sip_referred_by_t *)msg_header_access((msg_pub_t*)(sip), sip_referred_by_class))
11652
11665 #define SIP_REFERRED_BY_INIT() SIP_HDR_INIT(referred_by)
11666
11680 #if SU_HAVE_INLINE
11681 su_inline sip_referred_by_t *sip_referred_by_init(sip_referred_by_t x[1])
11682 {
11683 return SIP_HEADER_INIT(x, sip_referred_by_class, sizeof(sip_referred_by_t));
11684 }
11685 #else
11686 #define sip_referred_by_init(x) \
11687 SIP_HEADER_INIT(x, sip_referred_by_class, sizeof(sip_referred_by_t))
11688 #endif
11689
11703 #if SU_HAVE_INLINE
11704 su_inline int sip_is_referred_by(sip_header_t const *header)
11705 {
11706 return header && header->sh_class->hc_hash == sip_referred_by_hash;
11707 }
11708 #else
11709 int sip_is_referred_by(sip_header_t const *header);
11710 #endif
11711
11712 #define sip_referred_by_p(h) sip_is_referred_by((h))
11713
11714
11742 #if SU_HAVE_INLINE
11743 su_inline
11744 #endif
11745 sip_referred_by_t *sip_referred_by_dup(su_home_t *home, sip_referred_by_t const *hdr)
11746 __attribute__((__malloc__));
11747
11748 #if SU_HAVE_INLINE
11749 su_inline
11750 sip_referred_by_t *sip_referred_by_dup(su_home_t *home, sip_referred_by_t const *hdr)
11751 {
11752 return (sip_referred_by_t *)
11753 msg_header_dup_as(home, sip_referred_by_class, (msg_header_t const *)hdr);
11754 }
11755 #endif
11756
11785 #if SU_HAVE_INLINE
11786 su_inline
11787 #endif
11788 sip_referred_by_t *sip_referred_by_copy(su_home_t *home, sip_referred_by_t const *hdr)
11789 __attribute__((__malloc__));
11790
11791 #if SU_HAVE_INLINE
11792 su_inline
11793 sip_referred_by_t *sip_referred_by_copy(su_home_t *home, sip_referred_by_t const *hdr)
11794 {
11795 return (sip_referred_by_t *)
11796 msg_header_copy_as(home, sip_referred_by_class, (msg_header_t const *)hdr);
11797 }
11798 #endif
11799
11818 #if SU_HAVE_INLINE
11819 su_inline
11820 #endif
11821 sip_referred_by_t *sip_referred_by_make(su_home_t *home, char const *s)
11822 __attribute__((__malloc__));
11823
11824 #if SU_HAVE_INLINE
11825 su_inline sip_referred_by_t *sip_referred_by_make(su_home_t *home, char const *s)
11826 {
11827 return (sip_referred_by_t *)sip_header_make(home, sip_referred_by_class, s);
11828 }
11829 #endif
11830
11853 #if SU_HAVE_INLINE
11854 su_inline
11855 #endif
11856 sip_referred_by_t *sip_referred_by_format(su_home_t *home, char const *fmt, ...)
11857 __attribute__((__malloc__, __format__ (printf, 2, 3)));
11858
11859 #if SU_HAVE_INLINE
11860 su_inline sip_referred_by_t *sip_referred_by_format(su_home_t *home, char const *fmt, ...)
11861 {
11862 sip_header_t *h;
11863 va_list ap;
11864
11865 va_start(ap, fmt);
11866 h = sip_header_vformat(home, sip_referred_by_class, fmt, ap);
11867 va_end(ap);
11868
11869 return (sip_referred_by_t *)h;
11870 }
11871 #endif
11872
11880 SOFIAPUBFUN int sip_replaces_d(su_home_t *, msg_header_t *,
11881 char *s, int slen);
11882
11884 SOFIAPUBFUN int sip_replaces_e(char b[], int bsiz,
11885 msg_header_t const *h, int flags);
11886
11890 #define sip_replaces(sip) \
11891 ((sip_replaces_t *)msg_header_access((msg_pub_t*)(sip), sip_replaces_class))
11892
11905 #define SIP_REPLACES_INIT() SIP_HDR_INIT(replaces)
11906
11920 #if SU_HAVE_INLINE
11921 su_inline sip_replaces_t *sip_replaces_init(sip_replaces_t x[1])
11922 {
11923 return SIP_HEADER_INIT(x, sip_replaces_class, sizeof(sip_replaces_t));
11924 }
11925 #else
11926 #define sip_replaces_init(x) \
11927 SIP_HEADER_INIT(x, sip_replaces_class, sizeof(sip_replaces_t))
11928 #endif
11929
11943 #if SU_HAVE_INLINE
11944 su_inline int sip_is_replaces(sip_header_t const *header)
11945 {
11946 return header && header->sh_class->hc_hash == sip_replaces_hash;
11947 }
11948 #else
11949 int sip_is_replaces(sip_header_t const *header);
11950 #endif
11951
11952 #define sip_replaces_p(h) sip_is_replaces((h))
11953
11954
11982 #if SU_HAVE_INLINE
11983 su_inline
11984 #endif
11985 sip_replaces_t *sip_replaces_dup(su_home_t *home, sip_replaces_t const *hdr)
11986 __attribute__((__malloc__));
11987
11988 #if SU_HAVE_INLINE
11989 su_inline
11990 sip_replaces_t *sip_replaces_dup(su_home_t *home, sip_replaces_t const *hdr)
11991 {
11992 return (sip_replaces_t *)
11993 msg_header_dup_as(home, sip_replaces_class, (msg_header_t const *)hdr);
11994 }
11995 #endif
11996
12025 #if SU_HAVE_INLINE
12026 su_inline
12027 #endif
12028 sip_replaces_t *sip_replaces_copy(su_home_t *home, sip_replaces_t const *hdr)
12029 __attribute__((__malloc__));
12030
12031 #if SU_HAVE_INLINE
12032 su_inline
12033 sip_replaces_t *sip_replaces_copy(su_home_t *home, sip_replaces_t const *hdr)
12034 {
12035 return (sip_replaces_t *)
12036 msg_header_copy_as(home, sip_replaces_class, (msg_header_t const *)hdr);
12037 }
12038 #endif
12039
12058 #if SU_HAVE_INLINE
12059 su_inline
12060 #endif
12061 sip_replaces_t *sip_replaces_make(su_home_t *home, char const *s)
12062 __attribute__((__malloc__));
12063
12064 #if SU_HAVE_INLINE
12065 su_inline sip_replaces_t *sip_replaces_make(su_home_t *home, char const *s)
12066 {
12067 return (sip_replaces_t *)sip_header_make(home, sip_replaces_class, s);
12068 }
12069 #endif
12070
12093 #if SU_HAVE_INLINE
12094 su_inline
12095 #endif
12096 sip_replaces_t *sip_replaces_format(su_home_t *home, char const *fmt, ...)
12097 __attribute__((__malloc__, __format__ (printf, 2, 3)));
12098
12099 #if SU_HAVE_INLINE
12100 su_inline sip_replaces_t *sip_replaces_format(su_home_t *home, char const *fmt, ...)
12101 {
12102 sip_header_t *h;
12103 va_list ap;
12104
12105 va_start(ap, fmt);
12106 h = sip_header_vformat(home, sip_replaces_class, fmt, ap);
12107 va_end(ap);
12108
12109 return (sip_replaces_t *)h;
12110 }
12111 #endif
12112
12120 SOFIAPUBFUN int sip_session_expires_d(su_home_t *, msg_header_t *,
12121 char *s, int slen);
12122
12124 SOFIAPUBFUN int sip_session_expires_e(char b[], int bsiz,
12125 msg_header_t const *h, int flags);
12126
12130 #define sip_session_expires(sip) \
12131 ((sip_session_expires_t *)msg_header_access((msg_pub_t*)(sip), sip_session_expires_class))
12132
12145 #define SIP_SESSION_EXPIRES_INIT() SIP_HDR_INIT(session_expires)
12146
12160 #if SU_HAVE_INLINE
12161 su_inline sip_session_expires_t *sip_session_expires_init(sip_session_expires_t x[1])
12162 {
12163 return SIP_HEADER_INIT(x, sip_session_expires_class, sizeof(sip_session_expires_t));
12164 }
12165 #else
12166 #define sip_session_expires_init(x) \
12167 SIP_HEADER_INIT(x, sip_session_expires_class, sizeof(sip_session_expires_t))
12168 #endif
12169
12183 #if SU_HAVE_INLINE
12184 su_inline int sip_is_session_expires(sip_header_t const *header)
12185 {
12186 return header && header->sh_class->hc_hash == sip_session_expires_hash;
12187 }
12188 #else
12189 int sip_is_session_expires(sip_header_t const *header);
12190 #endif
12191
12192 #define sip_session_expires_p(h) sip_is_session_expires((h))
12193
12194
12222 #if SU_HAVE_INLINE
12223 su_inline
12224 #endif
12225 sip_session_expires_t *sip_session_expires_dup(su_home_t *home, sip_session_expires_t const *hdr)
12226 __attribute__((__malloc__));
12227
12228 #if SU_HAVE_INLINE
12229 su_inline
12230 sip_session_expires_t *sip_session_expires_dup(su_home_t *home, sip_session_expires_t const *hdr)
12231 {
12232 return (sip_session_expires_t *)
12233 msg_header_dup_as(home, sip_session_expires_class, (msg_header_t const *)hdr);
12234 }
12235 #endif
12236
12265 #if SU_HAVE_INLINE
12266 su_inline
12267 #endif
12268 sip_session_expires_t *sip_session_expires_copy(su_home_t *home, sip_session_expires_t const *hdr)
12269 __attribute__((__malloc__));
12270
12271 #if SU_HAVE_INLINE
12272 su_inline
12273 sip_session_expires_t *sip_session_expires_copy(su_home_t *home, sip_session_expires_t const *hdr)
12274 {
12275 return (sip_session_expires_t *)
12276 msg_header_copy_as(home, sip_session_expires_class, (msg_header_t const *)hdr);
12277 }
12278 #endif
12279
12298 #if SU_HAVE_INLINE
12299 su_inline
12300 #endif
12301 sip_session_expires_t *sip_session_expires_make(su_home_t *home, char const *s)
12302 __attribute__((__malloc__));
12303
12304 #if SU_HAVE_INLINE
12305 su_inline sip_session_expires_t *sip_session_expires_make(su_home_t *home, char const *s)
12306 {
12307 return (sip_session_expires_t *)sip_header_make(home, sip_session_expires_class, s);
12308 }
12309 #endif
12310
12333 #if SU_HAVE_INLINE
12334 su_inline
12335 #endif
12336 sip_session_expires_t *sip_session_expires_format(su_home_t *home, char const *fmt, ...)
12337 __attribute__((__malloc__, __format__ (printf, 2, 3)));
12338
12339 #if SU_HAVE_INLINE
12340 su_inline sip_session_expires_t *sip_session_expires_format(su_home_t *home, char const *fmt, ...)
12341 {
12342 sip_header_t *h;
12343 va_list ap;
12344
12345 va_start(ap, fmt);
12346 h = sip_header_vformat(home, sip_session_expires_class, fmt, ap);
12347 va_end(ap);
12348
12349 return (sip_session_expires_t *)h;
12350 }
12351 #endif
12352
12360 SOFIAPUBFUN int sip_min_se_d(su_home_t *, msg_header_t *,
12361 char *s, int slen);
12362
12364 SOFIAPUBFUN int sip_min_se_e(char b[], int bsiz,
12365 msg_header_t const *h, int flags);
12366
12370 #define sip_min_se(sip) \
12371 ((sip_min_se_t *)msg_header_access((msg_pub_t*)(sip), sip_min_se_class))
12372
12385 #define SIP_MIN_SE_INIT() SIP_HDR_INIT(min_se)
12386
12400 #if SU_HAVE_INLINE
12401 su_inline sip_min_se_t *sip_min_se_init(sip_min_se_t x[1])
12402 {
12403 return SIP_HEADER_INIT(x, sip_min_se_class, sizeof(sip_min_se_t));
12404 }
12405 #else
12406 #define sip_min_se_init(x) \
12407 SIP_HEADER_INIT(x, sip_min_se_class, sizeof(sip_min_se_t))
12408 #endif
12409
12423 #if SU_HAVE_INLINE
12424 su_inline int sip_is_min_se(sip_header_t const *header)
12425 {
12426 return header && header->sh_class->hc_hash == sip_min_se_hash;
12427 }
12428 #else
12429 int sip_is_min_se(sip_header_t const *header);
12430 #endif
12431
12432 #define sip_min_se_p(h) sip_is_min_se((h))
12433
12434
12462 #if SU_HAVE_INLINE
12463 su_inline
12464 #endif
12465 sip_min_se_t *sip_min_se_dup(su_home_t *home, sip_min_se_t const *hdr)
12466 __attribute__((__malloc__));
12467
12468 #if SU_HAVE_INLINE
12469 su_inline
12470 sip_min_se_t *sip_min_se_dup(su_home_t *home, sip_min_se_t const *hdr)
12471 {
12472 return (sip_min_se_t *)
12473 msg_header_dup_as(home, sip_min_se_class, (msg_header_t const *)hdr);
12474 }
12475 #endif
12476
12505 #if SU_HAVE_INLINE
12506 su_inline
12507 #endif
12508 sip_min_se_t *sip_min_se_copy(su_home_t *home, sip_min_se_t const *hdr)
12509 __attribute__((__malloc__));
12510
12511 #if SU_HAVE_INLINE
12512 su_inline
12513 sip_min_se_t *sip_min_se_copy(su_home_t *home, sip_min_se_t const *hdr)
12514 {
12515 return (sip_min_se_t *)
12516 msg_header_copy_as(home, sip_min_se_class, (msg_header_t const *)hdr);
12517 }
12518 #endif
12519
12538 #if SU_HAVE_INLINE
12539 su_inline
12540 #endif
12541 sip_min_se_t *sip_min_se_make(su_home_t *home, char const *s)
12542 __attribute__((__malloc__));
12543
12544 #if SU_HAVE_INLINE
12545 su_inline sip_min_se_t *sip_min_se_make(su_home_t *home, char const *s)
12546 {
12547 return (sip_min_se_t *)sip_header_make(home, sip_min_se_class, s);
12548 }
12549 #endif
12550
12573 #if SU_HAVE_INLINE
12574 su_inline
12575 #endif
12576 sip_min_se_t *sip_min_se_format(su_home_t *home, char const *fmt, ...)
12577 __attribute__((__malloc__, __format__ (printf, 2, 3)));
12578
12579 #if SU_HAVE_INLINE
12580 su_inline sip_min_se_t *sip_min_se_format(su_home_t *home, char const *fmt, ...)
12581 {
12582 sip_header_t *h;
12583 va_list ap;
12584
12585 va_start(ap, fmt);
12586 h = sip_header_vformat(home, sip_min_se_class, fmt, ap);
12587 va_end(ap);
12588
12589 return (sip_min_se_t *)h;
12590 }
12591 #endif
12592
12600 SOFIAPUBFUN int sip_path_d(su_home_t *, msg_header_t *,
12601 char *s, int slen);
12602
12604 SOFIAPUBFUN int sip_path_e(char b[], int bsiz,
12605 msg_header_t const *h, int flags);
12606
12610 #define sip_path(sip) \
12611 ((sip_path_t *)msg_header_access((msg_pub_t*)(sip), sip_path_class))
12612
12625 #define SIP_PATH_INIT() SIP_HDR_INIT(path)
12626
12640 #if SU_HAVE_INLINE
12641 su_inline sip_path_t *sip_path_init(sip_path_t x[1])
12642 {
12643 return SIP_HEADER_INIT(x, sip_path_class, sizeof(sip_path_t));
12644 }
12645 #else
12646 #define sip_path_init(x) \
12647 SIP_HEADER_INIT(x, sip_path_class, sizeof(sip_path_t))
12648 #endif
12649
12663 #if SU_HAVE_INLINE
12664 su_inline int sip_is_path(sip_header_t const *header)
12665 {
12666 return header && header->sh_class->hc_hash == sip_path_hash;
12667 }
12668 #else
12669 int sip_is_path(sip_header_t const *header);
12670 #endif
12671
12672 #define sip_path_p(h) sip_is_path((h))
12673
12674
12702 #if SU_HAVE_INLINE
12703 su_inline
12704 #endif
12705 sip_path_t *sip_path_dup(su_home_t *home, sip_path_t const *hdr)
12706 __attribute__((__malloc__));
12707
12708 #if SU_HAVE_INLINE
12709 su_inline
12710 sip_path_t *sip_path_dup(su_home_t *home, sip_path_t const *hdr)
12711 {
12712 return (sip_path_t *)
12713 msg_header_dup_as(home, sip_path_class, (msg_header_t const *)hdr);
12714 }
12715 #endif
12716
12745 #if SU_HAVE_INLINE
12746 su_inline
12747 #endif
12748 sip_path_t *sip_path_copy(su_home_t *home, sip_path_t const *hdr)
12749 __attribute__((__malloc__));
12750
12751 #if SU_HAVE_INLINE
12752 su_inline
12753 sip_path_t *sip_path_copy(su_home_t *home, sip_path_t const *hdr)
12754 {
12755 return (sip_path_t *)
12756 msg_header_copy_as(home, sip_path_class, (msg_header_t const *)hdr);
12757 }
12758 #endif
12759
12778 #if SU_HAVE_INLINE
12779 su_inline
12780 #endif
12781 sip_path_t *sip_path_make(su_home_t *home, char const *s)
12782 __attribute__((__malloc__));
12783
12784 #if SU_HAVE_INLINE
12785 su_inline sip_path_t *sip_path_make(su_home_t *home, char const *s)
12786 {
12787 return (sip_path_t *)sip_header_make(home, sip_path_class, s);
12788 }
12789 #endif
12790
12813 #if SU_HAVE_INLINE
12814 su_inline
12815 #endif
12816 sip_path_t *sip_path_format(su_home_t *home, char const *fmt, ...)
12817 __attribute__((__malloc__, __format__ (printf, 2, 3)));
12818
12819 #if SU_HAVE_INLINE
12820 su_inline sip_path_t *sip_path_format(su_home_t *home, char const *fmt, ...)
12821 {
12822 sip_header_t *h;
12823 va_list ap;
12824
12825 va_start(ap, fmt);
12826 h = sip_header_vformat(home, sip_path_class, fmt, ap);
12827 va_end(ap);
12828
12829 return (sip_path_t *)h;
12830 }
12831 #endif
12832
12840 SOFIAPUBFUN int sip_service_route_d(su_home_t *, msg_header_t *,
12841 char *s, int slen);
12842
12844 SOFIAPUBFUN int sip_service_route_e(char b[], int bsiz,
12845 msg_header_t const *h, int flags);
12846
12850 #define sip_service_route(sip) \
12851 ((sip_service_route_t *)msg_header_access((msg_pub_t*)(sip), sip_service_route_class))
12852
12865 #define SIP_SERVICE_ROUTE_INIT() SIP_HDR_INIT(service_route)
12866
12880 #if SU_HAVE_INLINE
12881 su_inline sip_service_route_t *sip_service_route_init(sip_service_route_t x[1])
12882 {
12883 return SIP_HEADER_INIT(x, sip_service_route_class, sizeof(sip_service_route_t));
12884 }
12885 #else
12886 #define sip_service_route_init(x) \
12887 SIP_HEADER_INIT(x, sip_service_route_class, sizeof(sip_service_route_t))
12888 #endif
12889
12903 #if SU_HAVE_INLINE
12904 su_inline int sip_is_service_route(sip_header_t const *header)
12905 {
12906 return header && header->sh_class->hc_hash == sip_service_route_hash;
12907 }
12908 #else
12909 int sip_is_service_route(sip_header_t const *header);
12910 #endif
12911
12912 #define sip_service_route_p(h) sip_is_service_route((h))
12913
12914
12942 #if SU_HAVE_INLINE
12943 su_inline
12944 #endif
12945 sip_service_route_t *sip_service_route_dup(su_home_t *home, sip_service_route_t const *hdr)
12946 __attribute__((__malloc__));
12947
12948 #if SU_HAVE_INLINE
12949 su_inline
12950 sip_service_route_t *sip_service_route_dup(su_home_t *home, sip_service_route_t const *hdr)
12951 {
12952 return (sip_service_route_t *)
12953 msg_header_dup_as(home, sip_service_route_class, (msg_header_t const *)hdr);
12954 }
12955 #endif
12956
12985 #if SU_HAVE_INLINE
12986 su_inline
12987 #endif
12988 sip_service_route_t *sip_service_route_copy(su_home_t *home, sip_service_route_t const *hdr)
12989 __attribute__((__malloc__));
12990
12991 #if SU_HAVE_INLINE
12992 su_inline
12993 sip_service_route_t *sip_service_route_copy(su_home_t *home, sip_service_route_t const *hdr)
12994 {
12995 return (sip_service_route_t *)
12996 msg_header_copy_as(home, sip_service_route_class, (msg_header_t const *)hdr);
12997 }
12998 #endif
12999
13018 #if SU_HAVE_INLINE
13019 su_inline
13020 #endif
13021 sip_service_route_t *sip_service_route_make(su_home_t *home, char const *s)
13022 __attribute__((__malloc__));
13023
13024 #if SU_HAVE_INLINE
13025 su_inline sip_service_route_t *sip_service_route_make(su_home_t *home, char const *s)
13026 {
13027 return (sip_service_route_t *)sip_header_make(home, sip_service_route_class, s);
13028 }
13029 #endif
13030
13053 #if SU_HAVE_INLINE
13054 su_inline
13055 #endif
13056 sip_service_route_t *sip_service_route_format(su_home_t *home, char const *fmt, ...)
13057 __attribute__((__malloc__, __format__ (printf, 2, 3)));
13058
13059 #if SU_HAVE_INLINE
13060 su_inline sip_service_route_t *sip_service_route_format(su_home_t *home, char const *fmt, ...)
13061 {
13062 sip_header_t *h;
13063 va_list ap;
13064
13065 va_start(ap, fmt);
13066 h = sip_header_vformat(home, sip_service_route_class, fmt, ap);
13067 va_end(ap);
13068
13069 return (sip_service_route_t *)h;
13070 }
13071 #endif
13072
13080 SOFIAPUBFUN int sip_reason_d(su_home_t *, msg_header_t *,
13081 char *s, int slen);
13082
13084 SOFIAPUBFUN int sip_reason_e(char b[], int bsiz,
13085 msg_header_t const *h, int flags);
13086
13090 #define sip_reason(sip) \
13091 ((sip_reason_t *)msg_header_access((msg_pub_t*)(sip), sip_reason_class))
13092
13105 #define SIP_REASON_INIT() SIP_HDR_INIT(reason)
13106
13120 #if SU_HAVE_INLINE
13121 su_inline sip_reason_t *sip_reason_init(sip_reason_t x[1])
13122 {
13123 return SIP_HEADER_INIT(x, sip_reason_class, sizeof(sip_reason_t));
13124 }
13125 #else
13126 #define sip_reason_init(x) \
13127 SIP_HEADER_INIT(x, sip_reason_class, sizeof(sip_reason_t))
13128 #endif
13129
13143 #if SU_HAVE_INLINE
13144 su_inline int sip_is_reason(sip_header_t const *header)
13145 {
13146 return header && header->sh_class->hc_hash == sip_reason_hash;
13147 }
13148 #else
13149 int sip_is_reason(sip_header_t const *header);
13150 #endif
13151
13152 #define sip_reason_p(h) sip_is_reason((h))
13153
13154
13182 #if SU_HAVE_INLINE
13183 su_inline
13184 #endif
13185 sip_reason_t *sip_reason_dup(su_home_t *home, sip_reason_t const *hdr)
13186 __attribute__((__malloc__));
13187
13188 #if SU_HAVE_INLINE
13189 su_inline
13190 sip_reason_t *sip_reason_dup(su_home_t *home, sip_reason_t const *hdr)
13191 {
13192 return (sip_reason_t *)
13193 msg_header_dup_as(home, sip_reason_class, (msg_header_t const *)hdr);
13194 }
13195 #endif
13196
13225 #if SU_HAVE_INLINE
13226 su_inline
13227 #endif
13228 sip_reason_t *sip_reason_copy(su_home_t *home, sip_reason_t const *hdr)
13229 __attribute__((__malloc__));
13230
13231 #if SU_HAVE_INLINE
13232 su_inline
13233 sip_reason_t *sip_reason_copy(su_home_t *home, sip_reason_t const *hdr)
13234 {
13235 return (sip_reason_t *)
13236 msg_header_copy_as(home, sip_reason_class, (msg_header_t const *)hdr);
13237 }
13238 #endif
13239
13258 #if SU_HAVE_INLINE
13259 su_inline
13260 #endif
13261 sip_reason_t *sip_reason_make(su_home_t *home, char const *s)
13262 __attribute__((__malloc__));
13263
13264 #if SU_HAVE_INLINE
13265 su_inline sip_reason_t *sip_reason_make(su_home_t *home, char const *s)
13266 {
13267 return (sip_reason_t *)sip_header_make(home, sip_reason_class, s);
13268 }
13269 #endif
13270
13293 #if SU_HAVE_INLINE
13294 su_inline
13295 #endif
13296 sip_reason_t *sip_reason_format(su_home_t *home, char const *fmt, ...)
13297 __attribute__((__malloc__, __format__ (printf, 2, 3)));
13298
13299 #if SU_HAVE_INLINE
13300 su_inline sip_reason_t *sip_reason_format(su_home_t *home, char const *fmt, ...)
13301 {
13302 sip_header_t *h;
13303 va_list ap;
13304
13305 va_start(ap, fmt);
13306 h = sip_header_vformat(home, sip_reason_class, fmt, ap);
13307 va_end(ap);
13308
13309 return (sip_reason_t *)h;
13310 }
13311 #endif
13312
13320 SOFIAPUBFUN int sip_security_client_d(su_home_t *, msg_header_t *,
13321 char *s, int slen);
13322
13324 SOFIAPUBFUN int sip_security_client_e(char b[], int bsiz,
13325 msg_header_t const *h, int flags);
13326
13330 #define sip_security_client(sip) \
13331 ((sip_security_client_t *)msg_header_access((msg_pub_t*)(sip), sip_security_client_class))
13332
13345 #define SIP_SECURITY_CLIENT_INIT() SIP_HDR_INIT(security_client)
13346
13360 #if SU_HAVE_INLINE
13361 su_inline sip_security_client_t *sip_security_client_init(sip_security_client_t x[1])
13362 {
13363 return SIP_HEADER_INIT(x, sip_security_client_class, sizeof(sip_security_client_t));
13364 }
13365 #else
13366 #define sip_security_client_init(x) \
13367 SIP_HEADER_INIT(x, sip_security_client_class, sizeof(sip_security_client_t))
13368 #endif
13369
13383 #if SU_HAVE_INLINE
13384 su_inline int sip_is_security_client(sip_header_t const *header)
13385 {
13386 return header && header->sh_class->hc_hash == sip_security_client_hash;
13387 }
13388 #else
13389 int sip_is_security_client(sip_header_t const *header);
13390 #endif
13391
13392 #define sip_security_client_p(h) sip_is_security_client((h))
13393
13394
13422 #if SU_HAVE_INLINE
13423 su_inline
13424 #endif
13425 sip_security_client_t *sip_security_client_dup(su_home_t *home, sip_security_client_t const *hdr)
13426 __attribute__((__malloc__));
13427
13428 #if SU_HAVE_INLINE
13429 su_inline
13430 sip_security_client_t *sip_security_client_dup(su_home_t *home, sip_security_client_t const *hdr)
13431 {
13432 return (sip_security_client_t *)
13433 msg_header_dup_as(home, sip_security_client_class, (msg_header_t const *)hdr);
13434 }
13435 #endif
13436
13465 #if SU_HAVE_INLINE
13466 su_inline
13467 #endif
13468 sip_security_client_t *sip_security_client_copy(su_home_t *home, sip_security_client_t const *hdr)
13469 __attribute__((__malloc__));
13470
13471 #if SU_HAVE_INLINE
13472 su_inline
13473 sip_security_client_t *sip_security_client_copy(su_home_t *home, sip_security_client_t const *hdr)
13474 {
13475 return (sip_security_client_t *)
13476 msg_header_copy_as(home, sip_security_client_class, (msg_header_t const *)hdr);
13477 }
13478 #endif
13479
13498 #if SU_HAVE_INLINE
13499 su_inline
13500 #endif
13501 sip_security_client_t *sip_security_client_make(su_home_t *home, char const *s)
13502 __attribute__((__malloc__));
13503
13504 #if SU_HAVE_INLINE
13505 su_inline sip_security_client_t *sip_security_client_make(su_home_t *home, char const *s)
13506 {
13507 return (sip_security_client_t *)sip_header_make(home, sip_security_client_class, s);
13508 }
13509 #endif
13510
13533 #if SU_HAVE_INLINE
13534 su_inline
13535 #endif
13536 sip_security_client_t *sip_security_client_format(su_home_t *home, char const *fmt, ...)
13537 __attribute__((__malloc__, __format__ (printf, 2, 3)));
13538
13539 #if SU_HAVE_INLINE
13540 su_inline sip_security_client_t *sip_security_client_format(su_home_t *home, char const *fmt, ...)
13541 {
13542 sip_header_t *h;
13543 va_list ap;
13544
13545 va_start(ap, fmt);
13546 h = sip_header_vformat(home, sip_security_client_class, fmt, ap);
13547 va_end(ap);
13548
13549 return (sip_security_client_t *)h;
13550 }
13551 #endif
13552
13560 SOFIAPUBFUN int sip_security_server_d(su_home_t *, msg_header_t *,
13561 char *s, int slen);
13562
13564 SOFIAPUBFUN int sip_security_server_e(char b[], int bsiz,
13565 msg_header_t const *h, int flags);
13566
13570 #define sip_security_server(sip) \
13571 ((sip_security_server_t *)msg_header_access((msg_pub_t*)(sip), sip_security_server_class))
13572
13585 #define SIP_SECURITY_SERVER_INIT() SIP_HDR_INIT(security_server)
13586
13600 #if SU_HAVE_INLINE
13601 su_inline sip_security_server_t *sip_security_server_init(sip_security_server_t x[1])
13602 {
13603 return SIP_HEADER_INIT(x, sip_security_server_class, sizeof(sip_security_server_t));
13604 }
13605 #else
13606 #define sip_security_server_init(x) \
13607 SIP_HEADER_INIT(x, sip_security_server_class, sizeof(sip_security_server_t))
13608 #endif
13609
13623 #if SU_HAVE_INLINE
13624 su_inline int sip_is_security_server(sip_header_t const *header)
13625 {
13626 return header && header->sh_class->hc_hash == sip_security_server_hash;
13627 }
13628 #else
13629 int sip_is_security_server(sip_header_t const *header);
13630 #endif
13631
13632 #define sip_security_server_p(h) sip_is_security_server((h))
13633
13634
13662 #if SU_HAVE_INLINE
13663 su_inline
13664 #endif
13665 sip_security_server_t *sip_security_server_dup(su_home_t *home, sip_security_server_t const *hdr)
13666 __attribute__((__malloc__));
13667
13668 #if SU_HAVE_INLINE
13669 su_inline
13670 sip_security_server_t *sip_security_server_dup(su_home_t *home, sip_security_server_t const *hdr)
13671 {
13672 return (sip_security_server_t *)
13673 msg_header_dup_as(home, sip_security_server_class, (msg_header_t const *)hdr);
13674 }
13675 #endif
13676
13705 #if SU_HAVE_INLINE
13706 su_inline
13707 #endif
13708 sip_security_server_t *sip_security_server_copy(su_home_t *home, sip_security_server_t const *hdr)
13709 __attribute__((__malloc__));
13710
13711 #if SU_HAVE_INLINE
13712 su_inline
13713 sip_security_server_t *sip_security_server_copy(su_home_t *home, sip_security_server_t const *hdr)
13714 {
13715 return (sip_security_server_t *)
13716 msg_header_copy_as(home, sip_security_server_class, (msg_header_t const *)hdr);
13717 }
13718 #endif
13719
13738 #if SU_HAVE_INLINE
13739 su_inline
13740 #endif
13741 sip_security_server_t *sip_security_server_make(su_home_t *home, char const *s)
13742 __attribute__((__malloc__));
13743
13744 #if SU_HAVE_INLINE
13745 su_inline sip_security_server_t *sip_security_server_make(su_home_t *home, char const *s)
13746 {
13747 return (sip_security_server_t *)sip_header_make(home, sip_security_server_class, s);
13748 }
13749 #endif
13750
13773 #if SU_HAVE_INLINE
13774 su_inline
13775 #endif
13776 sip_security_server_t *sip_security_server_format(su_home_t *home, char const *fmt, ...)
13777 __attribute__((__malloc__, __format__ (printf, 2, 3)));
13778
13779 #if SU_HAVE_INLINE
13780 su_inline sip_security_server_t *sip_security_server_format(su_home_t *home, char const *fmt, ...)
13781 {
13782 sip_header_t *h;
13783 va_list ap;
13784
13785 va_start(ap, fmt);
13786 h = sip_header_vformat(home, sip_security_server_class, fmt, ap);
13787 va_end(ap);
13788
13789 return (sip_security_server_t *)h;
13790 }
13791 #endif
13792
13800 SOFIAPUBFUN int sip_security_verify_d(su_home_t *, msg_header_t *,
13801 char *s, int slen);
13802
13804 SOFIAPUBFUN int sip_security_verify_e(char b[], int bsiz,
13805 msg_header_t const *h, int flags);
13806
13810 #define sip_security_verify(sip) \
13811 ((sip_security_verify_t *)msg_header_access((msg_pub_t*)(sip), sip_security_verify_class))
13812
13825 #define SIP_SECURITY_VERIFY_INIT() SIP_HDR_INIT(security_verify)
13826
13840 #if SU_HAVE_INLINE
13841 su_inline sip_security_verify_t *sip_security_verify_init(sip_security_verify_t x[1])
13842 {
13843 return SIP_HEADER_INIT(x, sip_security_verify_class, sizeof(sip_security_verify_t));
13844 }
13845 #else
13846 #define sip_security_verify_init(x) \
13847 SIP_HEADER_INIT(x, sip_security_verify_class, sizeof(sip_security_verify_t))
13848 #endif
13849
13863 #if SU_HAVE_INLINE
13864 su_inline int sip_is_security_verify(sip_header_t const *header)
13865 {
13866 return header && header->sh_class->hc_hash == sip_security_verify_hash;
13867 }
13868 #else
13869 int sip_is_security_verify(sip_header_t const *header);
13870 #endif
13871
13872 #define sip_security_verify_p(h) sip_is_security_verify((h))
13873
13874
13902 #if SU_HAVE_INLINE
13903 su_inline
13904 #endif
13905 sip_security_verify_t *sip_security_verify_dup(su_home_t *home, sip_security_verify_t const *hdr)
13906 __attribute__((__malloc__));
13907
13908 #if SU_HAVE_INLINE
13909 su_inline
13910 sip_security_verify_t *sip_security_verify_dup(su_home_t *home, sip_security_verify_t const *hdr)
13911 {
13912 return (sip_security_verify_t *)
13913 msg_header_dup_as(home, sip_security_verify_class, (msg_header_t const *)hdr);
13914 }
13915 #endif
13916
13945 #if SU_HAVE_INLINE
13946 su_inline
13947 #endif
13948 sip_security_verify_t *sip_security_verify_copy(su_home_t *home, sip_security_verify_t const *hdr)
13949 __attribute__((__malloc__));
13950
13951 #if SU_HAVE_INLINE
13952 su_inline
13953 sip_security_verify_t *sip_security_verify_copy(su_home_t *home, sip_security_verify_t const *hdr)
13954 {
13955 return (sip_security_verify_t *)
13956 msg_header_copy_as(home, sip_security_verify_class, (msg_header_t const *)hdr);
13957 }
13958 #endif
13959
13978 #if SU_HAVE_INLINE
13979 su_inline
13980 #endif
13981 sip_security_verify_t *sip_security_verify_make(su_home_t *home, char const *s)
13982 __attribute__((__malloc__));
13983
13984 #if SU_HAVE_INLINE
13985 su_inline sip_security_verify_t *sip_security_verify_make(su_home_t *home, char const *s)
13986 {
13987 return (sip_security_verify_t *)sip_header_make(home, sip_security_verify_class, s);
13988 }
13989 #endif
13990
14013 #if SU_HAVE_INLINE
14014 su_inline
14015 #endif
14016 sip_security_verify_t *sip_security_verify_format(su_home_t *home, char const *fmt, ...)
14017 __attribute__((__malloc__, __format__ (printf, 2, 3)));
14018
14019 #if SU_HAVE_INLINE
14020 su_inline sip_security_verify_t *sip_security_verify_format(su_home_t *home, char const *fmt, ...)
14021 {
14022 sip_header_t *h;
14023 va_list ap;
14024
14025 va_start(ap, fmt);
14026 h = sip_header_vformat(home, sip_security_verify_class, fmt, ap);
14027 va_end(ap);
14028
14029 return (sip_security_verify_t *)h;
14030 }
14031 #endif
14032
14040 SOFIAPUBFUN int sip_privacy_d(su_home_t *, msg_header_t *,
14041 char *s, int slen);
14042
14044 SOFIAPUBFUN int sip_privacy_e(char b[], int bsiz,
14045 msg_header_t const *h, int flags);
14046
14050 #define sip_privacy(sip) \
14051 ((sip_privacy_t *)msg_header_access((msg_pub_t*)(sip), sip_privacy_class))
14052
14065 #define SIP_PRIVACY_INIT() SIP_HDR_INIT(privacy)
14066
14080 #if SU_HAVE_INLINE
14081 su_inline sip_privacy_t *sip_privacy_init(sip_privacy_t x[1])
14082 {
14083 return SIP_HEADER_INIT(x, sip_privacy_class, sizeof(sip_privacy_t));
14084 }
14085 #else
14086 #define sip_privacy_init(x) \
14087 SIP_HEADER_INIT(x, sip_privacy_class, sizeof(sip_privacy_t))
14088 #endif
14089
14103 #if SU_HAVE_INLINE
14104 su_inline int sip_is_privacy(sip_header_t const *header)
14105 {
14106 return header && header->sh_class->hc_hash == sip_privacy_hash;
14107 }
14108 #else
14109 int sip_is_privacy(sip_header_t const *header);
14110 #endif
14111
14112 #define sip_privacy_p(h) sip_is_privacy((h))
14113
14114
14142 #if SU_HAVE_INLINE
14143 su_inline
14144 #endif
14145 sip_privacy_t *sip_privacy_dup(su_home_t *home, sip_privacy_t const *hdr)
14146 __attribute__((__malloc__));
14147
14148 #if SU_HAVE_INLINE
14149 su_inline
14150 sip_privacy_t *sip_privacy_dup(su_home_t *home, sip_privacy_t const *hdr)
14151 {
14152 return (sip_privacy_t *)
14153 msg_header_dup_as(home, sip_privacy_class, (msg_header_t const *)hdr);
14154 }
14155 #endif
14156
14185 #if SU_HAVE_INLINE
14186 su_inline
14187 #endif
14188 sip_privacy_t *sip_privacy_copy(su_home_t *home, sip_privacy_t const *hdr)
14189 __attribute__((__malloc__));
14190
14191 #if SU_HAVE_INLINE
14192 su_inline
14193 sip_privacy_t *sip_privacy_copy(su_home_t *home, sip_privacy_t const *hdr)
14194 {
14195 return (sip_privacy_t *)
14196 msg_header_copy_as(home, sip_privacy_class, (msg_header_t const *)hdr);
14197 }
14198 #endif
14199
14218 #if SU_HAVE_INLINE
14219 su_inline
14220 #endif
14221 sip_privacy_t *sip_privacy_make(su_home_t *home, char const *s)
14222 __attribute__((__malloc__));
14223
14224 #if SU_HAVE_INLINE
14225 su_inline sip_privacy_t *sip_privacy_make(su_home_t *home, char const *s)
14226 {
14227 return (sip_privacy_t *)sip_header_make(home, sip_privacy_class, s);
14228 }
14229 #endif
14230
14253 #if SU_HAVE_INLINE
14254 su_inline
14255 #endif
14256 sip_privacy_t *sip_privacy_format(su_home_t *home, char const *fmt, ...)
14257 __attribute__((__malloc__, __format__ (printf, 2, 3)));
14258
14259 #if SU_HAVE_INLINE
14260 su_inline sip_privacy_t *sip_privacy_format(su_home_t *home, char const *fmt, ...)
14261 {
14262 sip_header_t *h;
14263 va_list ap;
14264
14265 va_start(ap, fmt);
14266 h = sip_header_vformat(home, sip_privacy_class, fmt, ap);
14267 va_end(ap);
14268
14269 return (sip_privacy_t *)h;
14270 }
14271 #endif
14272
14280 SOFIAPUBFUN int sip_etag_d(su_home_t *, msg_header_t *,
14281 char *s, int slen);
14282
14284 SOFIAPUBFUN int sip_etag_e(char b[], int bsiz,
14285 msg_header_t const *h, int flags);
14286
14290 #define sip_etag(sip) \
14291 ((sip_etag_t *)msg_header_access((msg_pub_t*)(sip), sip_etag_class))
14292
14305 #define SIP_ETAG_INIT() SIP_HDR_INIT(etag)
14306
14320 #if SU_HAVE_INLINE
14321 su_inline sip_etag_t *sip_etag_init(sip_etag_t x[1])
14322 {
14323 return SIP_HEADER_INIT(x, sip_etag_class, sizeof(sip_etag_t));
14324 }
14325 #else
14326 #define sip_etag_init(x) \
14327 SIP_HEADER_INIT(x, sip_etag_class, sizeof(sip_etag_t))
14328 #endif
14329
14343 #if SU_HAVE_INLINE
14344 su_inline int sip_is_etag(sip_header_t const *header)
14345 {
14346 return header && header->sh_class->hc_hash == sip_etag_hash;
14347 }
14348 #else
14349 int sip_is_etag(sip_header_t const *header);
14350 #endif
14351
14352 #define sip_etag_p(h) sip_is_etag((h))
14353
14354
14382 #if SU_HAVE_INLINE
14383 su_inline
14384 #endif
14385 sip_etag_t *sip_etag_dup(su_home_t *home, sip_etag_t const *hdr)
14386 __attribute__((__malloc__));
14387
14388 #if SU_HAVE_INLINE
14389 su_inline
14390 sip_etag_t *sip_etag_dup(su_home_t *home, sip_etag_t const *hdr)
14391 {
14392 return (sip_etag_t *)
14393 msg_header_dup_as(home, sip_etag_class, (msg_header_t const *)hdr);
14394 }
14395 #endif
14396
14425 #if SU_HAVE_INLINE
14426 su_inline
14427 #endif
14428 sip_etag_t *sip_etag_copy(su_home_t *home, sip_etag_t const *hdr)
14429 __attribute__((__malloc__));
14430
14431 #if SU_HAVE_INLINE
14432 su_inline
14433 sip_etag_t *sip_etag_copy(su_home_t *home, sip_etag_t const *hdr)
14434 {
14435 return (sip_etag_t *)
14436 msg_header_copy_as(home, sip_etag_class, (msg_header_t const *)hdr);
14437 }
14438 #endif
14439
14458 #if SU_HAVE_INLINE
14459 su_inline
14460 #endif
14461 sip_etag_t *sip_etag_make(su_home_t *home, char const *s)
14462 __attribute__((__malloc__));
14463
14464 #if SU_HAVE_INLINE
14465 su_inline sip_etag_t *sip_etag_make(su_home_t *home, char const *s)
14466 {
14467 return (sip_etag_t *)sip_header_make(home, sip_etag_class, s);
14468 }
14469 #endif
14470
14493 #if SU_HAVE_INLINE
14494 su_inline
14495 #endif
14496 sip_etag_t *sip_etag_format(su_home_t *home, char const *fmt, ...)
14497 __attribute__((__malloc__, __format__ (printf, 2, 3)));
14498
14499 #if SU_HAVE_INLINE
14500 su_inline sip_etag_t *sip_etag_format(su_home_t *home, char const *fmt, ...)
14501 {
14502 sip_header_t *h;
14503 va_list ap;
14504
14505 va_start(ap, fmt);
14506 h = sip_header_vformat(home, sip_etag_class, fmt, ap);
14507 va_end(ap);
14508
14509 return (sip_etag_t *)h;
14510 }
14511 #endif
14512
14520 SOFIAPUBFUN int sip_if_match_d(su_home_t *, msg_header_t *,
14521 char *s, int slen);
14522
14524 SOFIAPUBFUN int sip_if_match_e(char b[], int bsiz,
14525 msg_header_t const *h, int flags);
14526
14530 #define sip_if_match(sip) \
14531 ((sip_if_match_t *)msg_header_access((msg_pub_t*)(sip), sip_if_match_class))
14532
14545 #define SIP_IF_MATCH_INIT() SIP_HDR_INIT(if_match)
14546
14560 #if SU_HAVE_INLINE
14561 su_inline sip_if_match_t *sip_if_match_init(sip_if_match_t x[1])
14562 {
14563 return SIP_HEADER_INIT(x, sip_if_match_class, sizeof(sip_if_match_t));
14564 }
14565 #else
14566 #define sip_if_match_init(x) \
14567 SIP_HEADER_INIT(x, sip_if_match_class, sizeof(sip_if_match_t))
14568 #endif
14569
14583 #if SU_HAVE_INLINE
14584 su_inline int sip_is_if_match(sip_header_t const *header)
14585 {
14586 return header && header->sh_class->hc_hash == sip_if_match_hash;
14587 }
14588 #else
14589 int sip_is_if_match(sip_header_t const *header);
14590 #endif
14591
14592 #define sip_if_match_p(h) sip_is_if_match((h))
14593
14594
14622 #if SU_HAVE_INLINE
14623 su_inline
14624 #endif
14625 sip_if_match_t *sip_if_match_dup(su_home_t *home, sip_if_match_t const *hdr)
14626 __attribute__((__malloc__));
14627
14628 #if SU_HAVE_INLINE
14629 su_inline
14630 sip_if_match_t *sip_if_match_dup(su_home_t *home, sip_if_match_t const *hdr)
14631 {
14632 return (sip_if_match_t *)
14633 msg_header_dup_as(home, sip_if_match_class, (msg_header_t const *)hdr);
14634 }
14635 #endif
14636
14665 #if SU_HAVE_INLINE
14666 su_inline
14667 #endif
14668 sip_if_match_t *sip_if_match_copy(su_home_t *home, sip_if_match_t const *hdr)
14669 __attribute__((__malloc__));
14670
14671 #if SU_HAVE_INLINE
14672 su_inline
14673 sip_if_match_t *sip_if_match_copy(su_home_t *home, sip_if_match_t const *hdr)
14674 {
14675 return (sip_if_match_t *)
14676 msg_header_copy_as(home, sip_if_match_class, (msg_header_t const *)hdr);
14677 }
14678 #endif
14679
14698 #if SU_HAVE_INLINE
14699 su_inline
14700 #endif
14701 sip_if_match_t *sip_if_match_make(su_home_t *home, char const *s)
14702 __attribute__((__malloc__));
14703
14704 #if SU_HAVE_INLINE
14705 su_inline sip_if_match_t *sip_if_match_make(su_home_t *home, char const *s)
14706 {
14707 return (sip_if_match_t *)sip_header_make(home, sip_if_match_class, s);
14708 }
14709 #endif
14710
14733 #if SU_HAVE_INLINE
14734 su_inline
14735 #endif
14736 sip_if_match_t *sip_if_match_format(su_home_t *home, char const *fmt, ...)
14737 __attribute__((__malloc__, __format__ (printf, 2, 3)));
14738
14739 #if SU_HAVE_INLINE
14740 su_inline sip_if_match_t *sip_if_match_format(su_home_t *home, char const *fmt, ...)
14741 {
14742 sip_header_t *h;
14743 va_list ap;
14744
14745 va_start(ap, fmt);
14746 h = sip_header_vformat(home, sip_if_match_class, fmt, ap);
14747 va_end(ap);
14748
14749 return (sip_if_match_t *)h;
14750 }
14751 #endif
14752
14760 SOFIAPUBFUN int sip_mime_version_d(su_home_t *, msg_header_t *,
14761 char *s, int slen);
14762
14764 SOFIAPUBFUN int sip_mime_version_e(char b[], int bsiz,
14765 msg_header_t const *h, int flags);
14766
14770 #define sip_mime_version(sip) \
14771 ((sip_mime_version_t *)msg_header_access((msg_pub_t*)(sip), sip_mime_version_class))
14772
14785 #define SIP_MIME_VERSION_INIT() SIP_HDR_INIT(mime_version)
14786
14800 #if SU_HAVE_INLINE
14801 su_inline sip_mime_version_t *sip_mime_version_init(sip_mime_version_t x[1])
14802 {
14803 return SIP_HEADER_INIT(x, sip_mime_version_class, sizeof(sip_mime_version_t));
14804 }
14805 #else
14806 #define sip_mime_version_init(x) \
14807 SIP_HEADER_INIT(x, sip_mime_version_class, sizeof(sip_mime_version_t))
14808 #endif
14809
14823 #if SU_HAVE_INLINE
14824 su_inline int sip_is_mime_version(sip_header_t const *header)
14825 {
14826 return header && header->sh_class->hc_hash == sip_mime_version_hash;
14827 }
14828 #else
14829 int sip_is_mime_version(sip_header_t const *header);
14830 #endif
14831
14832 #define sip_mime_version_p(h) sip_is_mime_version((h))
14833
14834
14862 #if SU_HAVE_INLINE
14863 su_inline
14864 #endif
14865 sip_mime_version_t *sip_mime_version_dup(su_home_t *home, sip_mime_version_t const *hdr)
14866 __attribute__((__malloc__));
14867
14868 #if SU_HAVE_INLINE
14869 su_inline
14870 sip_mime_version_t *sip_mime_version_dup(su_home_t *home, sip_mime_version_t const *hdr)
14871 {
14872 return (sip_mime_version_t *)
14873 msg_header_dup_as(home, sip_mime_version_class, (msg_header_t const *)hdr);
14874 }
14875 #endif
14876
14905 #if SU_HAVE_INLINE
14906 su_inline
14907 #endif
14908 sip_mime_version_t *sip_mime_version_copy(su_home_t *home, sip_mime_version_t const *hdr)
14909 __attribute__((__malloc__));
14910
14911 #if SU_HAVE_INLINE
14912 su_inline
14913 sip_mime_version_t *sip_mime_version_copy(su_home_t *home, sip_mime_version_t const *hdr)
14914 {
14915 return (sip_mime_version_t *)
14916 msg_header_copy_as(home, sip_mime_version_class, (msg_header_t const *)hdr);
14917 }
14918 #endif
14919
14938 #if SU_HAVE_INLINE
14939 su_inline
14940 #endif
14941 sip_mime_version_t *sip_mime_version_make(su_home_t *home, char const *s)
14942 __attribute__((__malloc__));
14943
14944 #if SU_HAVE_INLINE
14945 su_inline sip_mime_version_t *sip_mime_version_make(su_home_t *home, char const *s)
14946 {
14947 return (sip_mime_version_t *)sip_header_make(home, sip_mime_version_class, s);
14948 }
14949 #endif
14950
14973 #if SU_HAVE_INLINE
14974 su_inline
14975 #endif
14976 sip_mime_version_t *sip_mime_version_format(su_home_t *home, char const *fmt, ...)
14977 __attribute__((__malloc__, __format__ (printf, 2, 3)));
14978
14979 #if SU_HAVE_INLINE
14980 su_inline sip_mime_version_t *sip_mime_version_format(su_home_t *home, char const *fmt, ...)
14981 {
14982 sip_header_t *h;
14983 va_list ap;
14984
14985 va_start(ap, fmt);
14986 h = sip_header_vformat(home, sip_mime_version_class, fmt, ap);
14987 va_end(ap);
14988
14989 return (sip_mime_version_t *)h;
14990 }
14991 #endif
14992
15000 SOFIAPUBFUN int sip_content_type_d(su_home_t *, msg_header_t *,
15001 char *s, int slen);
15002
15004 SOFIAPUBFUN int sip_content_type_e(char b[], int bsiz,
15005 msg_header_t const *h, int flags);
15006
15010 #define sip_content_type(sip) \
15011 ((sip_content_type_t *)msg_header_access((msg_pub_t*)(sip), sip_content_type_class))
15012
15025 #define SIP_CONTENT_TYPE_INIT() SIP_HDR_INIT(content_type)
15026
15040 #if SU_HAVE_INLINE
15041 su_inline sip_content_type_t *sip_content_type_init(sip_content_type_t x[1])
15042 {
15043 return SIP_HEADER_INIT(x, sip_content_type_class, sizeof(sip_content_type_t));
15044 }
15045 #else
15046 #define sip_content_type_init(x) \
15047 SIP_HEADER_INIT(x, sip_content_type_class, sizeof(sip_content_type_t))
15048 #endif
15049
15063 #if SU_HAVE_INLINE
15064 su_inline int sip_is_content_type(sip_header_t const *header)
15065 {
15066 return header && header->sh_class->hc_hash == sip_content_type_hash;
15067 }
15068 #else
15069 int sip_is_content_type(sip_header_t const *header);
15070 #endif
15071
15072 #define sip_content_type_p(h) sip_is_content_type((h))
15073
15074
15102 #if SU_HAVE_INLINE
15103 su_inline
15104 #endif
15105 sip_content_type_t *sip_content_type_dup(su_home_t *home, sip_content_type_t const *hdr)
15106 __attribute__((__malloc__));
15107
15108 #if SU_HAVE_INLINE
15109 su_inline
15110 sip_content_type_t *sip_content_type_dup(su_home_t *home, sip_content_type_t const *hdr)
15111 {
15112 return (sip_content_type_t *)
15113 msg_header_dup_as(home, sip_content_type_class, (msg_header_t const *)hdr);
15114 }
15115 #endif
15116
15145 #if SU_HAVE_INLINE
15146 su_inline
15147 #endif
15148 sip_content_type_t *sip_content_type_copy(su_home_t *home, sip_content_type_t const *hdr)
15149 __attribute__((__malloc__));
15150
15151 #if SU_HAVE_INLINE
15152 su_inline
15153 sip_content_type_t *sip_content_type_copy(su_home_t *home, sip_content_type_t const *hdr)
15154 {
15155 return (sip_content_type_t *)
15156 msg_header_copy_as(home, sip_content_type_class, (msg_header_t const *)hdr);
15157 }
15158 #endif
15159
15178 #if SU_HAVE_INLINE
15179 su_inline
15180 #endif
15181 sip_content_type_t *sip_content_type_make(su_home_t *home, char const *s)
15182 __attribute__((__malloc__));
15183
15184 #if SU_HAVE_INLINE
15185 su_inline sip_content_type_t *sip_content_type_make(su_home_t *home, char const *s)
15186 {
15187 return (sip_content_type_t *)sip_header_make(home, sip_content_type_class, s);
15188 }
15189 #endif
15190
15213 #if SU_HAVE_INLINE
15214 su_inline
15215 #endif
15216 sip_content_type_t *sip_content_type_format(su_home_t *home, char const *fmt, ...)
15217 __attribute__((__malloc__, __format__ (printf, 2, 3)));
15218
15219 #if SU_HAVE_INLINE
15220 su_inline sip_content_type_t *sip_content_type_format(su_home_t *home, char const *fmt, ...)
15221 {
15222 sip_header_t *h;
15223 va_list ap;
15224
15225 va_start(ap, fmt);
15226 h = sip_header_vformat(home, sip_content_type_class, fmt, ap);
15227 va_end(ap);
15228
15229 return (sip_content_type_t *)h;
15230 }
15231 #endif
15232
15240 SOFIAPUBFUN int sip_content_encoding_d(su_home_t *, msg_header_t *,
15241 char *s, int slen);
15242
15244 SOFIAPUBFUN int sip_content_encoding_e(char b[], int bsiz,
15245 msg_header_t const *h, int flags);
15246
15250 #define sip_content_encoding(sip) \
15251 ((sip_content_encoding_t *)msg_header_access((msg_pub_t*)(sip), sip_content_encoding_class))
15252
15265 #define SIP_CONTENT_ENCODING_INIT() SIP_HDR_INIT(content_encoding)
15266
15280 #if SU_HAVE_INLINE
15281 su_inline sip_content_encoding_t *sip_content_encoding_init(sip_content_encoding_t x[1])
15282 {
15283 return SIP_HEADER_INIT(x, sip_content_encoding_class, sizeof(sip_content_encoding_t));
15284 }
15285 #else
15286 #define sip_content_encoding_init(x) \
15287 SIP_HEADER_INIT(x, sip_content_encoding_class, sizeof(sip_content_encoding_t))
15288 #endif
15289
15303 #if SU_HAVE_INLINE
15304 su_inline int sip_is_content_encoding(sip_header_t const *header)
15305 {
15306 return header && header->sh_class->hc_hash == sip_content_encoding_hash;
15307 }
15308 #else
15309 int sip_is_content_encoding(sip_header_t const *header);
15310 #endif
15311
15312 #define sip_content_encoding_p(h) sip_is_content_encoding((h))
15313
15314
15342 #if SU_HAVE_INLINE
15343 su_inline
15344 #endif
15345 sip_content_encoding_t *sip_content_encoding_dup(su_home_t *home, sip_content_encoding_t const *hdr)
15346 __attribute__((__malloc__));
15347
15348 #if SU_HAVE_INLINE
15349 su_inline
15350 sip_content_encoding_t *sip_content_encoding_dup(su_home_t *home, sip_content_encoding_t const *hdr)
15351 {
15352 return (sip_content_encoding_t *)
15353 msg_header_dup_as(home, sip_content_encoding_class, (msg_header_t const *)hdr);
15354 }
15355 #endif
15356
15385 #if SU_HAVE_INLINE
15386 su_inline
15387 #endif
15388 sip_content_encoding_t *sip_content_encoding_copy(su_home_t *home, sip_content_encoding_t const *hdr)
15389 __attribute__((__malloc__));
15390
15391 #if SU_HAVE_INLINE
15392 su_inline
15393 sip_content_encoding_t *sip_content_encoding_copy(su_home_t *home, sip_content_encoding_t const *hdr)
15394 {
15395 return (sip_content_encoding_t *)
15396 msg_header_copy_as(home, sip_content_encoding_class, (msg_header_t const *)hdr);
15397 }
15398 #endif
15399
15418 #if SU_HAVE_INLINE
15419 su_inline
15420 #endif
15421 sip_content_encoding_t *sip_content_encoding_make(su_home_t *home, char const *s)
15422 __attribute__((__malloc__));
15423
15424 #if SU_HAVE_INLINE
15425 su_inline sip_content_encoding_t *sip_content_encoding_make(su_home_t *home, char const *s)
15426 {
15427 return (sip_content_encoding_t *)sip_header_make(home, sip_content_encoding_class, s);
15428 }
15429 #endif
15430
15453 #if SU_HAVE_INLINE
15454 su_inline
15455 #endif
15456 sip_content_encoding_t *sip_content_encoding_format(su_home_t *home, char const *fmt, ...)
15457 __attribute__((__malloc__, __format__ (printf, 2, 3)));
15458
15459 #if SU_HAVE_INLINE
15460 su_inline sip_content_encoding_t *sip_content_encoding_format(su_home_t *home, char const *fmt, ...)
15461 {
15462 sip_header_t *h;
15463 va_list ap;
15464
15465 va_start(ap, fmt);
15466 h = sip_header_vformat(home, sip_content_encoding_class, fmt, ap);
15467 va_end(ap);
15468
15469 return (sip_content_encoding_t *)h;
15470 }
15471 #endif
15472
15480 SOFIAPUBFUN int sip_content_language_d(su_home_t *, msg_header_t *,
15481 char *s, int slen);
15482
15484 SOFIAPUBFUN int sip_content_language_e(char b[], int bsiz,
15485 msg_header_t const *h, int flags);
15486
15490 #define sip_content_language(sip) \
15491 ((sip_content_language_t *)msg_header_access((msg_pub_t*)(sip), sip_content_language_class))
15492
15505 #define SIP_CONTENT_LANGUAGE_INIT() SIP_HDR_INIT(content_language)
15506
15520 #if SU_HAVE_INLINE
15521 su_inline sip_content_language_t *sip_content_language_init(sip_content_language_t x[1])
15522 {
15523 return SIP_HEADER_INIT(x, sip_content_language_class, sizeof(sip_content_language_t));
15524 }
15525 #else
15526 #define sip_content_language_init(x) \
15527 SIP_HEADER_INIT(x, sip_content_language_class, sizeof(sip_content_language_t))
15528 #endif
15529
15543 #if SU_HAVE_INLINE
15544 su_inline int sip_is_content_language(sip_header_t const *header)
15545 {
15546 return header && header->sh_class->hc_hash == sip_content_language_hash;
15547 }
15548 #else
15549 int sip_is_content_language(sip_header_t const *header);
15550 #endif
15551
15552 #define sip_content_language_p(h) sip_is_content_language((h))
15553
15554
15582 #if SU_HAVE_INLINE
15583 su_inline
15584 #endif
15585 sip_content_language_t *sip_content_language_dup(su_home_t *home, sip_content_language_t const *hdr)
15586 __attribute__((__malloc__));
15587
15588 #if SU_HAVE_INLINE
15589 su_inline
15590 sip_content_language_t *sip_content_language_dup(su_home_t *home, sip_content_language_t const *hdr)
15591 {
15592 return (sip_content_language_t *)
15593 msg_header_dup_as(home, sip_content_language_class, (msg_header_t const *)hdr);
15594 }
15595 #endif
15596
15625 #if SU_HAVE_INLINE
15626 su_inline
15627 #endif
15628 sip_content_language_t *sip_content_language_copy(su_home_t *home, sip_content_language_t const *hdr)
15629 __attribute__((__malloc__));
15630
15631 #if SU_HAVE_INLINE
15632 su_inline
15633 sip_content_language_t *sip_content_language_copy(su_home_t *home, sip_content_language_t const *hdr)
15634 {
15635 return (sip_content_language_t *)
15636 msg_header_copy_as(home, sip_content_language_class, (msg_header_t const *)hdr);
15637 }
15638 #endif
15639
15658 #if SU_HAVE_INLINE
15659 su_inline
15660 #endif
15661 sip_content_language_t *sip_content_language_make(su_home_t *home, char const *s)
15662 __attribute__((__malloc__));
15663
15664 #if SU_HAVE_INLINE
15665 su_inline sip_content_language_t *sip_content_language_make(su_home_t *home, char const *s)
15666 {
15667 return (sip_content_language_t *)sip_header_make(home, sip_content_language_class, s);
15668 }
15669 #endif
15670
15693 #if SU_HAVE_INLINE
15694 su_inline
15695 #endif
15696 sip_content_language_t *sip_content_language_format(su_home_t *home, char const *fmt, ...)
15697 __attribute__((__malloc__, __format__ (printf, 2, 3)));
15698
15699 #if SU_HAVE_INLINE
15700 su_inline sip_content_language_t *sip_content_language_format(su_home_t *home, char const *fmt, ...)
15701 {
15702 sip_header_t *h;
15703 va_list ap;
15704
15705 va_start(ap, fmt);
15706 h = sip_header_vformat(home, sip_content_language_class, fmt, ap);
15707 va_end(ap);
15708
15709 return (sip_content_language_t *)h;
15710 }
15711 #endif
15712
15720 SOFIAPUBFUN int sip_content_disposition_d(su_home_t *, msg_header_t *,
15721 char *s, int slen);
15722
15724 SOFIAPUBFUN int sip_content_disposition_e(char b[], int bsiz,
15725 msg_header_t const *h, int flags);
15726
15730 #define sip_content_disposition(sip) \
15731 ((sip_content_disposition_t *)msg_header_access((msg_pub_t*)(sip), sip_content_disposition_class))
15732
15745 #define SIP_CONTENT_DISPOSITION_INIT() SIP_HDR_INIT(content_disposition)
15746
15760 #if SU_HAVE_INLINE
15761 su_inline sip_content_disposition_t *sip_content_disposition_init(sip_content_disposition_t x[1])
15762 {
15763 return SIP_HEADER_INIT(x, sip_content_disposition_class, sizeof(sip_content_disposition_t));
15764 }
15765 #else
15766 #define sip_content_disposition_init(x) \
15767 SIP_HEADER_INIT(x, sip_content_disposition_class, sizeof(sip_content_disposition_t))
15768 #endif
15769
15783 #if SU_HAVE_INLINE
15784 su_inline int sip_is_content_disposition(sip_header_t const *header)
15785 {
15786 return header && header->sh_class->hc_hash == sip_content_disposition_hash;
15787 }
15788 #else
15789 int sip_is_content_disposition(sip_header_t const *header);
15790 #endif
15791
15792 #define sip_content_disposition_p(h) sip_is_content_disposition((h))
15793
15794
15822 #if SU_HAVE_INLINE
15823 su_inline
15824 #endif
15825 sip_content_disposition_t *sip_content_disposition_dup(su_home_t *home, sip_content_disposition_t const *hdr)
15826 __attribute__((__malloc__));
15827
15828 #if SU_HAVE_INLINE
15829 su_inline
15830 sip_content_disposition_t *sip_content_disposition_dup(su_home_t *home, sip_content_disposition_t const *hdr)
15831 {
15832 return (sip_content_disposition_t *)
15833 msg_header_dup_as(home, sip_content_disposition_class, (msg_header_t const *)hdr);
15834 }
15835 #endif
15836
15865 #if SU_HAVE_INLINE
15866 su_inline
15867 #endif
15868 sip_content_disposition_t *sip_content_disposition_copy(su_home_t *home, sip_content_disposition_t const *hdr)
15869 __attribute__((__malloc__));
15870
15871 #if SU_HAVE_INLINE
15872 su_inline
15873 sip_content_disposition_t *sip_content_disposition_copy(su_home_t *home, sip_content_disposition_t const *hdr)
15874 {
15875 return (sip_content_disposition_t *)
15876 msg_header_copy_as(home, sip_content_disposition_class, (msg_header_t const *)hdr);
15877 }
15878 #endif
15879
15898 #if SU_HAVE_INLINE
15899 su_inline
15900 #endif
15901 sip_content_disposition_t *sip_content_disposition_make(su_home_t *home, char const *s)
15902 __attribute__((__malloc__));
15903
15904 #if SU_HAVE_INLINE
15905 su_inline sip_content_disposition_t *sip_content_disposition_make(su_home_t *home, char const *s)
15906 {
15907 return (sip_content_disposition_t *)sip_header_make(home, sip_content_disposition_class, s);
15908 }
15909 #endif
15910
15933 #if SU_HAVE_INLINE
15934 su_inline
15935 #endif
15936 sip_content_disposition_t *sip_content_disposition_format(su_home_t *home, char const *fmt, ...)
15937 __attribute__((__malloc__, __format__ (printf, 2, 3)));
15938
15939 #if SU_HAVE_INLINE
15940 su_inline sip_content_disposition_t *sip_content_disposition_format(su_home_t *home, char const *fmt, ...)
15941 {
15942 sip_header_t *h;
15943 va_list ap;
15944
15945 va_start(ap, fmt);
15946 h = sip_header_vformat(home, sip_content_disposition_class, fmt, ap);
15947 va_end(ap);
15948
15949 return (sip_content_disposition_t *)h;
15950 }
15951 #endif
15952
15960 SOFIAPUBFUN int sip_content_length_d(su_home_t *, msg_header_t *,
15961 char *s, int slen);
15962
15964 SOFIAPUBFUN int sip_content_length_e(char b[], int bsiz,
15965 msg_header_t const *h, int flags);
15966
15970 #define sip_content_length(sip) \
15971 ((sip_content_length_t *)msg_header_access((msg_pub_t*)(sip), sip_content_length_class))
15972
15985 #define SIP_CONTENT_LENGTH_INIT() SIP_HDR_INIT(content_length)
15986
16000 #if SU_HAVE_INLINE
16001 su_inline sip_content_length_t *sip_content_length_init(sip_content_length_t x[1])
16002 {
16003 return SIP_HEADER_INIT(x, sip_content_length_class, sizeof(sip_content_length_t));
16004 }
16005 #else
16006 #define sip_content_length_init(x) \
16007 SIP_HEADER_INIT(x, sip_content_length_class, sizeof(sip_content_length_t))
16008 #endif
16009
16023 #if SU_HAVE_INLINE
16024 su_inline int sip_is_content_length(sip_header_t const *header)
16025 {
16026 return header && header->sh_class->hc_hash == sip_content_length_hash;
16027 }
16028 #else
16029 int sip_is_content_length(sip_header_t const *header);
16030 #endif
16031
16032 #define sip_content_length_p(h) sip_is_content_length((h))
16033
16034
16062 #if SU_HAVE_INLINE
16063 su_inline
16064 #endif
16065 sip_content_length_t *sip_content_length_dup(su_home_t *home, sip_content_length_t const *hdr)
16066 __attribute__((__malloc__));
16067
16068 #if SU_HAVE_INLINE
16069 su_inline
16070 sip_content_length_t *sip_content_length_dup(su_home_t *home, sip_content_length_t const *hdr)
16071 {
16072 return (sip_content_length_t *)
16073 msg_header_dup_as(home, sip_content_length_class, (msg_header_t const *)hdr);
16074 }
16075 #endif
16076
16105 #if SU_HAVE_INLINE
16106 su_inline
16107 #endif
16108 sip_content_length_t *sip_content_length_copy(su_home_t *home, sip_content_length_t const *hdr)
16109 __attribute__((__malloc__));
16110
16111 #if SU_HAVE_INLINE
16112 su_inline
16113 sip_content_length_t *sip_content_length_copy(su_home_t *home, sip_content_length_t const *hdr)
16114 {
16115 return (sip_content_length_t *)
16116 msg_header_copy_as(home, sip_content_length_class, (msg_header_t const *)hdr);
16117 }
16118 #endif
16119
16138 #if SU_HAVE_INLINE
16139 su_inline
16140 #endif
16141 sip_content_length_t *sip_content_length_make(su_home_t *home, char const *s)
16142 __attribute__((__malloc__));
16143
16144 #if SU_HAVE_INLINE
16145 su_inline sip_content_length_t *sip_content_length_make(su_home_t *home, char const *s)
16146 {
16147 return (sip_content_length_t *)sip_header_make(home, sip_content_length_class, s);
16148 }
16149 #endif
16150
16173 #if SU_HAVE_INLINE
16174 su_inline
16175 #endif
16176 sip_content_length_t *sip_content_length_format(su_home_t *home, char const *fmt, ...)
16177 __attribute__((__malloc__, __format__ (printf, 2, 3)));
16178
16179 #if SU_HAVE_INLINE
16180 su_inline sip_content_length_t *sip_content_length_format(su_home_t *home, char const *fmt, ...)
16181 {
16182 sip_header_t *h;
16183 va_list ap;
16184
16185 va_start(ap, fmt);
16186 h = sip_header_vformat(home, sip_content_length_class, fmt, ap);
16187 va_end(ap);
16188
16189 return (sip_content_length_t *)h;
16190 }
16191 #endif
16192
16200 SOFIAPUBFUN int sip_unknown_d(su_home_t *, msg_header_t *,
16201 char *s, int slen);
16202
16204 SOFIAPUBFUN int sip_unknown_e(char b[], int bsiz,
16205 msg_header_t const *h, int flags);
16206
16210 #define sip_unknown(sip) \
16211 ((sip_unknown_t *)msg_header_access((msg_pub_t*)(sip), sip_unknown_class))
16212
16225 #define SIP_UNKNOWN_INIT() SIP_HDR_INIT(unknown)
16226
16240 #if SU_HAVE_INLINE
16241 su_inline sip_unknown_t *sip_unknown_init(sip_unknown_t x[1])
16242 {
16243 return SIP_HEADER_INIT(x, sip_unknown_class, sizeof(sip_unknown_t));
16244 }
16245 #else
16246 #define sip_unknown_init(x) \
16247 SIP_HEADER_INIT(x, sip_unknown_class, sizeof(sip_unknown_t))
16248 #endif
16249
16263 #if SU_HAVE_INLINE
16264 su_inline int sip_is_unknown(sip_header_t const *header)
16265 {
16266 return header && header->sh_class->hc_hash == sip_unknown_hash;
16267 }
16268 #else
16269 int sip_is_unknown(sip_header_t const *header);
16270 #endif
16271
16272 #define sip_unknown_p(h) sip_is_unknown((h))
16273
16274
16302 #if SU_HAVE_INLINE
16303 su_inline
16304 #endif
16305 sip_unknown_t *sip_unknown_dup(su_home_t *home, sip_unknown_t const *hdr)
16306 __attribute__((__malloc__));
16307
16308 #if SU_HAVE_INLINE
16309 su_inline
16310 sip_unknown_t *sip_unknown_dup(su_home_t *home, sip_unknown_t const *hdr)
16311 {
16312 return (sip_unknown_t *)
16313 msg_header_dup_as(home, sip_unknown_class, (msg_header_t const *)hdr);
16314 }
16315 #endif
16316
16345 #if SU_HAVE_INLINE
16346 su_inline
16347 #endif
16348 sip_unknown_t *sip_unknown_copy(su_home_t *home, sip_unknown_t const *hdr)
16349 __attribute__((__malloc__));
16350
16351 #if SU_HAVE_INLINE
16352 su_inline
16353 sip_unknown_t *sip_unknown_copy(su_home_t *home, sip_unknown_t const *hdr)
16354 {
16355 return (sip_unknown_t *)
16356 msg_header_copy_as(home, sip_unknown_class, (msg_header_t const *)hdr);
16357 }
16358 #endif
16359
16378 #if SU_HAVE_INLINE
16379 su_inline
16380 #endif
16381 sip_unknown_t *sip_unknown_make(su_home_t *home, char const *s)
16382 __attribute__((__malloc__));
16383
16384 #if SU_HAVE_INLINE
16385 su_inline sip_unknown_t *sip_unknown_make(su_home_t *home, char const *s)
16386 {
16387 return (sip_unknown_t *)sip_header_make(home, sip_unknown_class, s);
16388 }
16389 #endif
16390
16413 #if SU_HAVE_INLINE
16414 su_inline
16415 #endif
16416 sip_unknown_t *sip_unknown_format(su_home_t *home, char const *fmt, ...)
16417 __attribute__((__malloc__, __format__ (printf, 2, 3)));
16418
16419 #if SU_HAVE_INLINE
16420 su_inline sip_unknown_t *sip_unknown_format(su_home_t *home, char const *fmt, ...)
16421 {
16422 sip_header_t *h;
16423 va_list ap;
16424
16425 va_start(ap, fmt);
16426 h = sip_header_vformat(home, sip_unknown_class, fmt, ap);
16427 va_end(ap);
16428
16429 return (sip_unknown_t *)h;
16430 }
16431 #endif
16432
16440 SOFIAPUBFUN int sip_error_d(su_home_t *, msg_header_t *,
16441 char *s, int slen);
16442
16444 SOFIAPUBFUN int sip_error_e(char b[], int bsiz,
16445 msg_header_t const *h, int flags);
16446
16450 #define sip_error(sip) \
16451 ((sip_error_t *)msg_header_access((msg_pub_t*)(sip), sip_error_class))
16452
16465 #define SIP_ERROR_INIT() SIP_HDR_INIT(error)
16466
16480 #if SU_HAVE_INLINE
16481 su_inline sip_error_t *sip_error_init(sip_error_t x[1])
16482 {
16483 return SIP_HEADER_INIT(x, sip_error_class, sizeof(sip_error_t));
16484 }
16485 #else
16486 #define sip_error_init(x) \
16487 SIP_HEADER_INIT(x, sip_error_class, sizeof(sip_error_t))
16488 #endif
16489
16503 #if SU_HAVE_INLINE
16504 su_inline int sip_is_error(sip_header_t const *header)
16505 {
16506 return header && header->sh_class->hc_hash == sip_error_hash;
16507 }
16508 #else
16509 int sip_is_error(sip_header_t const *header);
16510 #endif
16511
16512 #define sip_error_p(h) sip_is_error((h))
16513
16514
16542 #if SU_HAVE_INLINE
16543 su_inline
16544 #endif
16545 sip_error_t *sip_error_dup(su_home_t *home, sip_error_t const *hdr)
16546 __attribute__((__malloc__));
16547
16548 #if SU_HAVE_INLINE
16549 su_inline
16550 sip_error_t *sip_error_dup(su_home_t *home, sip_error_t const *hdr)
16551 {
16552 return (sip_error_t *)
16553 msg_header_dup_as(home, sip_error_class, (msg_header_t const *)hdr);
16554 }
16555 #endif
16556
16585 #if SU_HAVE_INLINE
16586 su_inline
16587 #endif
16588 sip_error_t *sip_error_copy(su_home_t *home, sip_error_t const *hdr)
16589 __attribute__((__malloc__));
16590
16591 #if SU_HAVE_INLINE
16592 su_inline
16593 sip_error_t *sip_error_copy(su_home_t *home, sip_error_t const *hdr)
16594 {
16595 return (sip_error_t *)
16596 msg_header_copy_as(home, sip_error_class, (msg_header_t const *)hdr);
16597 }
16598 #endif
16599
16618 #if SU_HAVE_INLINE
16619 su_inline
16620 #endif
16621 sip_error_t *sip_error_make(su_home_t *home, char const *s)
16622 __attribute__((__malloc__));
16623
16624 #if SU_HAVE_INLINE
16625 su_inline sip_error_t *sip_error_make(su_home_t *home, char const *s)
16626 {
16627 return (sip_error_t *)sip_header_make(home, sip_error_class, s);
16628 }
16629 #endif
16630
16653 #if SU_HAVE_INLINE
16654 su_inline
16655 #endif
16656 sip_error_t *sip_error_format(su_home_t *home, char const *fmt, ...)
16657 __attribute__((__malloc__, __format__ (printf, 2, 3)));
16658
16659 #if SU_HAVE_INLINE
16660 su_inline sip_error_t *sip_error_format(su_home_t *home, char const *fmt, ...)
16661 {
16662 sip_header_t *h;
16663 va_list ap;
16664
16665 va_start(ap, fmt);
16666 h = sip_header_vformat(home, sip_error_class, fmt, ap);
16667 va_end(ap);
16668
16669 return (sip_error_t *)h;
16670 }
16671 #endif
16672
16680 SOFIAPUBFUN int sip_separator_d(su_home_t *, msg_header_t *,
16681 char *s, int slen);
16682
16684 SOFIAPUBFUN int sip_separator_e(char b[], int bsiz,
16685 msg_header_t const *h, int flags);
16686
16690 #define sip_separator(sip) \
16691 ((sip_separator_t *)msg_header_access((msg_pub_t*)(sip), sip_separator_class))
16692
16705 #define SIP_SEPARATOR_INIT() SIP_HDR_INIT(separator)
16706
16720 #if SU_HAVE_INLINE
16721 su_inline sip_separator_t *sip_separator_init(sip_separator_t x[1])
16722 {
16723 return SIP_HEADER_INIT(x, sip_separator_class, sizeof(sip_separator_t));
16724 }
16725 #else
16726 #define sip_separator_init(x) \
16727 SIP_HEADER_INIT(x, sip_separator_class, sizeof(sip_separator_t))
16728 #endif
16729
16743 #if SU_HAVE_INLINE
16744 su_inline int sip_is_separator(sip_header_t const *header)
16745 {
16746 return header && header->sh_class->hc_hash == sip_separator_hash;
16747 }
16748 #else
16749 int sip_is_separator(sip_header_t const *header);
16750 #endif
16751
16752 #define sip_separator_p(h) sip_is_separator((h))
16753
16754
16782 #if SU_HAVE_INLINE
16783 su_inline
16784 #endif
16785 sip_separator_t *sip_separator_dup(su_home_t *home, sip_separator_t const *hdr)
16786 __attribute__((__malloc__));
16787
16788 #if SU_HAVE_INLINE
16789 su_inline
16790 sip_separator_t *sip_separator_dup(su_home_t *home, sip_separator_t const *hdr)
16791 {
16792 return (sip_separator_t *)
16793 msg_header_dup_as(home, sip_separator_class, (msg_header_t const *)hdr);
16794 }
16795 #endif
16796
16825 #if SU_HAVE_INLINE
16826 su_inline
16827 #endif
16828 sip_separator_t *sip_separator_copy(su_home_t *home, sip_separator_t const *hdr)
16829 __attribute__((__malloc__));
16830
16831 #if SU_HAVE_INLINE
16832 su_inline
16833 sip_separator_t *sip_separator_copy(su_home_t *home, sip_separator_t const *hdr)
16834 {
16835 return (sip_separator_t *)
16836 msg_header_copy_as(home, sip_separator_class, (msg_header_t const *)hdr);
16837 }
16838 #endif
16839
16858 #if SU_HAVE_INLINE
16859 su_inline
16860 #endif
16861 sip_separator_t *sip_separator_make(su_home_t *home, char const *s)
16862 __attribute__((__malloc__));
16863
16864 #if SU_HAVE_INLINE
16865 su_inline sip_separator_t *sip_separator_make(su_home_t *home, char const *s)
16866 {
16867 return (sip_separator_t *)sip_header_make(home, sip_separator_class, s);
16868 }
16869 #endif
16870
16893 #if SU_HAVE_INLINE
16894 su_inline
16895 #endif
16896 sip_separator_t *sip_separator_format(su_home_t *home, char const *fmt, ...)
16897 __attribute__((__malloc__, __format__ (printf, 2, 3)));
16898
16899 #if SU_HAVE_INLINE
16900 su_inline sip_separator_t *sip_separator_format(su_home_t *home, char const *fmt, ...)
16901 {
16902 sip_header_t *h;
16903 va_list ap;
16904
16905 va_start(ap, fmt);
16906 h = sip_header_vformat(home, sip_separator_class, fmt, ap);
16907 va_end(ap);
16908
16909 return (sip_separator_t *)h;
16910 }
16911 #endif
16912
16920 SOFIAPUBFUN int sip_payload_d(su_home_t *, msg_header_t *,
16921 char *s, int slen);
16922
16924 SOFIAPUBFUN int sip_payload_e(char b[], int bsiz,
16925 msg_header_t const *h, int flags);
16926
16930 #define sip_payload(sip) \
16931 ((sip_payload_t *)msg_header_access((msg_pub_t*)(sip), sip_payload_class))
16932
16945 #define SIP_PAYLOAD_INIT() SIP_HDR_INIT(payload)
16946
16960 #if SU_HAVE_INLINE
16961 su_inline sip_payload_t *sip_payload_init(sip_payload_t x[1])
16962 {
16963 return SIP_HEADER_INIT(x, sip_payload_class, sizeof(sip_payload_t));
16964 }
16965 #else
16966 #define sip_payload_init(x) \
16967 SIP_HEADER_INIT(x, sip_payload_class, sizeof(sip_payload_t))
16968 #endif
16969
16983 #if SU_HAVE_INLINE
16984 su_inline int sip_is_payload(sip_header_t const *header)
16985 {
16986 return header && header->sh_class->hc_hash == sip_payload_hash;
16987 }
16988 #else
16989 int sip_is_payload(sip_header_t const *header);
16990 #endif
16991
16992 #define sip_payload_p(h) sip_is_payload((h))
16993
16994
17022 #if SU_HAVE_INLINE
17023 su_inline
17024 #endif
17025 sip_payload_t *sip_payload_dup(su_home_t *home, sip_payload_t const *hdr)
17026 __attribute__((__malloc__));
17027
17028 #if SU_HAVE_INLINE
17029 su_inline
17030 sip_payload_t *sip_payload_dup(su_home_t *home, sip_payload_t const *hdr)
17031 {
17032 return (sip_payload_t *)
17033 msg_header_dup_as(home, sip_payload_class, (msg_header_t const *)hdr);
17034 }
17035 #endif
17036
17065 #if SU_HAVE_INLINE
17066 su_inline
17067 #endif
17068 sip_payload_t *sip_payload_copy(su_home_t *home, sip_payload_t const *hdr)
17069 __attribute__((__malloc__));
17070
17071 #if SU_HAVE_INLINE
17072 su_inline
17073 sip_payload_t *sip_payload_copy(su_home_t *home, sip_payload_t const *hdr)
17074 {
17075 return (sip_payload_t *)
17076 msg_header_copy_as(home, sip_payload_class, (msg_header_t const *)hdr);
17077 }
17078 #endif
17079
17098 #if SU_HAVE_INLINE
17099 su_inline
17100 #endif
17101 sip_payload_t *sip_payload_make(su_home_t *home, char const *s)
17102 __attribute__((__malloc__));
17103
17104 #if SU_HAVE_INLINE
17105 su_inline sip_payload_t *sip_payload_make(su_home_t *home, char const *s)
17106 {
17107 return (sip_payload_t *)sip_header_make(home, sip_payload_class, s);
17108 }
17109 #endif
17110
17133 #if SU_HAVE_INLINE
17134 su_inline
17135 #endif
17136 sip_payload_t *sip_payload_format(su_home_t *home, char const *fmt, ...)
17137 __attribute__((__malloc__, __format__ (printf, 2, 3)));
17138
17139 #if SU_HAVE_INLINE
17140 su_inline sip_payload_t *sip_payload_format(su_home_t *home, char const *fmt, ...)
17141 {
17142 sip_header_t *h;
17143 va_list ap;
17144
17145 va_start(ap, fmt);
17146 h = sip_header_vformat(home, sip_payload_class, fmt, ap);
17147 va_end(ap);
17148
17149 return (sip_payload_t *)h;
17150 }
17151 #endif
17152
17155 SOFIA_END_DECLS
17156 #endif