sip
1.12.11
|
00001 /* -*- C -*- 00002 * 00003 * This file is part of the Sofia-SIP package 00004 * 00005 * Copyright (C) 2005 Nokia Corporation. 00006 * 00007 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden> 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public License 00011 * as published by the Free Software Foundation; either version 2.1 of 00012 * the License, or (at your option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, but 00015 * WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00022 * 02110-1301 USA 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 issize_t sip_request_d(su_home_t *, msg_header_t *, 00121 char *s, isize_t slen); 00122 00124 SOFIAPUBFUN issize_t sip_request_e(char b[], isize_t bsiz, 00125 msg_header_t const *h, int flags); 00126 00131 #define sip_request(sip) \ 00132 ((sip_request_t *)msg_header_access((msg_pub_t*)(sip), sip_request_class)) 00133 00148 #define SIP_REQUEST_INIT() SIP_HDR_INIT(request) 00149 00165 #if SU_HAVE_INLINE 00166 su_inline sip_request_t *sip_request_init(sip_request_t x[1]) 00167 { 00168 return SIP_HEADER_INIT(x, sip_request_class, sizeof(sip_request_t)); 00169 } 00170 #else 00171 #define sip_request_init(x) \ 00172 SIP_HEADER_INIT(x, sip_request_class, sizeof(sip_request_t)) 00173 #endif 00174 00187 #if SU_HAVE_INLINE 00188 su_inline int sip_is_request(sip_header_t const *header) 00189 { 00190 return header && header->sh_class->hc_hash == sip_request_hash; 00191 } 00192 #else 00193 int sip_is_request(sip_header_t const *header); 00194 #endif 00195 00196 #define sip_request_p(h) sip_is_request((h)) 00197 00198 00227 #if SU_HAVE_INLINE 00228 su_inline 00229 #endif 00230 sip_request_t *sip_request_dup(su_home_t *home, sip_request_t const *hdr) 00231 __attribute__((__malloc__)); 00232 00233 #if SU_HAVE_INLINE 00234 su_inline 00235 sip_request_t *sip_request_dup(su_home_t *home, sip_request_t const *hdr) 00236 { 00237 return (sip_request_t *) 00238 msg_header_dup_as(home, sip_request_class, (msg_header_t const *)hdr); 00239 } 00240 #endif 00241 00270 #if SU_HAVE_INLINE 00271 su_inline 00272 #endif 00273 sip_request_t *sip_request_copy(su_home_t *home, sip_request_t const *hdr) 00274 __attribute__((__malloc__)); 00275 00276 #if SU_HAVE_INLINE 00277 su_inline 00278 sip_request_t *sip_request_copy(su_home_t *home, sip_request_t const *hdr) 00279 { 00280 return (sip_request_t *) 00281 msg_header_copy_as(home, sip_request_class, (msg_header_t const *)hdr); 00282 } 00283 #endif 00284 00300 #if SU_HAVE_INLINE 00301 su_inline 00302 #endif 00303 sip_request_t *sip_request_make(su_home_t *home, char const *s) 00304 __attribute__((__malloc__)); 00305 00306 #if SU_HAVE_INLINE 00307 su_inline sip_request_t *sip_request_make(su_home_t *home, char const *s) 00308 { 00309 return (sip_request_t *)sip_header_make(home, sip_request_class, s); 00310 } 00311 #endif 00312 00331 #if SU_HAVE_INLINE 00332 su_inline 00333 #endif 00334 sip_request_t *sip_request_format(su_home_t *home, char const *fmt, ...) 00335 __attribute__((__malloc__, __format__ (printf, 2, 3))); 00336 00337 #if SU_HAVE_INLINE 00338 su_inline sip_request_t *sip_request_format(su_home_t *home, char const *fmt, ...) 00339 { 00340 sip_header_t *h; 00341 va_list ap; 00342 00343 va_start(ap, fmt); 00344 h = sip_header_vformat(home, sip_request_class, fmt, ap); 00345 va_end(ap); 00346 00347 return (sip_request_t *)h; 00348 } 00349 #endif 00350 00358 SOFIAPUBFUN issize_t sip_status_d(su_home_t *, msg_header_t *, 00359 char *s, isize_t slen); 00360 00362 SOFIAPUBFUN issize_t sip_status_e(char b[], isize_t bsiz, 00363 msg_header_t const *h, int flags); 00364 00369 #define sip_status(sip) \ 00370 ((sip_status_t *)msg_header_access((msg_pub_t*)(sip), sip_status_class)) 00371 00386 #define SIP_STATUS_INIT() SIP_HDR_INIT(status) 00387 00403 #if SU_HAVE_INLINE 00404 su_inline sip_status_t *sip_status_init(sip_status_t x[1]) 00405 { 00406 return SIP_HEADER_INIT(x, sip_status_class, sizeof(sip_status_t)); 00407 } 00408 #else 00409 #define sip_status_init(x) \ 00410 SIP_HEADER_INIT(x, sip_status_class, sizeof(sip_status_t)) 00411 #endif 00412 00425 #if SU_HAVE_INLINE 00426 su_inline int sip_is_status(sip_header_t const *header) 00427 { 00428 return header && header->sh_class->hc_hash == sip_status_hash; 00429 } 00430 #else 00431 int sip_is_status(sip_header_t const *header); 00432 #endif 00433 00434 #define sip_status_p(h) sip_is_status((h)) 00435 00436 00465 #if SU_HAVE_INLINE 00466 su_inline 00467 #endif 00468 sip_status_t *sip_status_dup(su_home_t *home, sip_status_t const *hdr) 00469 __attribute__((__malloc__)); 00470 00471 #if SU_HAVE_INLINE 00472 su_inline 00473 sip_status_t *sip_status_dup(su_home_t *home, sip_status_t const *hdr) 00474 { 00475 return (sip_status_t *) 00476 msg_header_dup_as(home, sip_status_class, (msg_header_t const *)hdr); 00477 } 00478 #endif 00479 00508 #if SU_HAVE_INLINE 00509 su_inline 00510 #endif 00511 sip_status_t *sip_status_copy(su_home_t *home, sip_status_t const *hdr) 00512 __attribute__((__malloc__)); 00513 00514 #if SU_HAVE_INLINE 00515 su_inline 00516 sip_status_t *sip_status_copy(su_home_t *home, sip_status_t const *hdr) 00517 { 00518 return (sip_status_t *) 00519 msg_header_copy_as(home, sip_status_class, (msg_header_t const *)hdr); 00520 } 00521 #endif 00522 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 00569 #if SU_HAVE_INLINE 00570 su_inline 00571 #endif 00572 sip_status_t *sip_status_format(su_home_t *home, char const *fmt, ...) 00573 __attribute__((__malloc__, __format__ (printf, 2, 3))); 00574 00575 #if SU_HAVE_INLINE 00576 su_inline sip_status_t *sip_status_format(su_home_t *home, char const *fmt, ...) 00577 { 00578 sip_header_t *h; 00579 va_list ap; 00580 00581 va_start(ap, fmt); 00582 h = sip_header_vformat(home, sip_status_class, fmt, ap); 00583 va_end(ap); 00584 00585 return (sip_status_t *)h; 00586 } 00587 #endif 00588 00596 SOFIAPUBFUN issize_t sip_via_d(su_home_t *, msg_header_t *, 00597 char *s, isize_t slen); 00598 00600 SOFIAPUBFUN issize_t sip_via_e(char b[], isize_t bsiz, 00601 msg_header_t const *h, int flags); 00602 00607 #define sip_via(sip) \ 00608 ((sip_via_t *)msg_header_access((msg_pub_t*)(sip), sip_via_class)) 00609 00624 #define SIP_VIA_INIT() SIP_HDR_INIT(via) 00625 00641 #if SU_HAVE_INLINE 00642 su_inline sip_via_t *sip_via_init(sip_via_t x[1]) 00643 { 00644 return SIP_HEADER_INIT(x, sip_via_class, sizeof(sip_via_t)); 00645 } 00646 #else 00647 #define sip_via_init(x) \ 00648 SIP_HEADER_INIT(x, sip_via_class, sizeof(sip_via_t)) 00649 #endif 00650 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 00703 #if SU_HAVE_INLINE 00704 su_inline 00705 #endif 00706 sip_via_t *sip_via_dup(su_home_t *home, sip_via_t const *hdr) 00707 __attribute__((__malloc__)); 00708 00709 #if SU_HAVE_INLINE 00710 su_inline 00711 sip_via_t *sip_via_dup(su_home_t *home, sip_via_t const *hdr) 00712 { 00713 return (sip_via_t *) 00714 msg_header_dup_as(home, sip_via_class, (msg_header_t const *)hdr); 00715 } 00716 #endif 00717 00746 #if SU_HAVE_INLINE 00747 su_inline 00748 #endif 00749 sip_via_t *sip_via_copy(su_home_t *home, sip_via_t const *hdr) 00750 __attribute__((__malloc__)); 00751 00752 #if SU_HAVE_INLINE 00753 su_inline 00754 sip_via_t *sip_via_copy(su_home_t *home, sip_via_t const *hdr) 00755 { 00756 return (sip_via_t *) 00757 msg_header_copy_as(home, sip_via_class, (msg_header_t const *)hdr); 00758 } 00759 #endif 00760 00776 #if SU_HAVE_INLINE 00777 su_inline 00778 #endif 00779 sip_via_t *sip_via_make(su_home_t *home, char const *s) 00780 __attribute__((__malloc__)); 00781 00782 #if SU_HAVE_INLINE 00783 su_inline sip_via_t *sip_via_make(su_home_t *home, char const *s) 00784 { 00785 return (sip_via_t *)sip_header_make(home, sip_via_class, s); 00786 } 00787 #endif 00788 00807 #if SU_HAVE_INLINE 00808 su_inline 00809 #endif 00810 sip_via_t *sip_via_format(su_home_t *home, char const *fmt, ...) 00811 __attribute__((__malloc__, __format__ (printf, 2, 3))); 00812 00813 #if SU_HAVE_INLINE 00814 su_inline sip_via_t *sip_via_format(su_home_t *home, char const *fmt, ...) 00815 { 00816 sip_header_t *h; 00817 va_list ap; 00818 00819 va_start(ap, fmt); 00820 h = sip_header_vformat(home, sip_via_class, fmt, ap); 00821 va_end(ap); 00822 00823 return (sip_via_t *)h; 00824 } 00825 #endif 00826 00834 SOFIAPUBFUN issize_t sip_route_d(su_home_t *, msg_header_t *, 00835 char *s, isize_t slen); 00836 00838 SOFIAPUBFUN issize_t sip_route_e(char b[], isize_t bsiz, 00839 msg_header_t const *h, int flags); 00840 00845 #define sip_route(sip) \ 00846 ((sip_route_t *)msg_header_access((msg_pub_t*)(sip), sip_route_class)) 00847 00862 #define SIP_ROUTE_INIT() SIP_HDR_INIT(route) 00863 00879 #if SU_HAVE_INLINE 00880 su_inline sip_route_t *sip_route_init(sip_route_t x[1]) 00881 { 00882 return SIP_HEADER_INIT(x, sip_route_class, sizeof(sip_route_t)); 00883 } 00884 #else 00885 #define sip_route_init(x) \ 00886 SIP_HEADER_INIT(x, sip_route_class, sizeof(sip_route_t)) 00887 #endif 00888 00901 #if SU_HAVE_INLINE 00902 su_inline int sip_is_route(sip_header_t const *header) 00903 { 00904 return header && header->sh_class->hc_hash == sip_route_hash; 00905 } 00906 #else 00907 int sip_is_route(sip_header_t const *header); 00908 #endif 00909 00910 #define sip_route_p(h) sip_is_route((h)) 00911 00912 00941 #if SU_HAVE_INLINE 00942 su_inline 00943 #endif 00944 sip_route_t *sip_route_dup(su_home_t *home, sip_route_t const *hdr) 00945 __attribute__((__malloc__)); 00946 00947 #if SU_HAVE_INLINE 00948 su_inline 00949 sip_route_t *sip_route_dup(su_home_t *home, sip_route_t const *hdr) 00950 { 00951 return (sip_route_t *) 00952 msg_header_dup_as(home, sip_route_class, (msg_header_t const *)hdr); 00953 } 00954 #endif 00955 00984 #if SU_HAVE_INLINE 00985 su_inline 00986 #endif 00987 sip_route_t *sip_route_copy(su_home_t *home, sip_route_t const *hdr) 00988 __attribute__((__malloc__)); 00989 00990 #if SU_HAVE_INLINE 00991 su_inline 00992 sip_route_t *sip_route_copy(su_home_t *home, sip_route_t const *hdr) 00993 { 00994 return (sip_route_t *) 00995 msg_header_copy_as(home, sip_route_class, (msg_header_t const *)hdr); 00996 } 00997 #endif 00998 01014 #if SU_HAVE_INLINE 01015 su_inline 01016 #endif 01017 sip_route_t *sip_route_make(su_home_t *home, char const *s) 01018 __attribute__((__malloc__)); 01019 01020 #if SU_HAVE_INLINE 01021 su_inline sip_route_t *sip_route_make(su_home_t *home, char const *s) 01022 { 01023 return (sip_route_t *)sip_header_make(home, sip_route_class, s); 01024 } 01025 #endif 01026 01045 #if SU_HAVE_INLINE 01046 su_inline 01047 #endif 01048 sip_route_t *sip_route_format(su_home_t *home, char const *fmt, ...) 01049 __attribute__((__malloc__, __format__ (printf, 2, 3))); 01050 01051 #if SU_HAVE_INLINE 01052 su_inline sip_route_t *sip_route_format(su_home_t *home, char const *fmt, ...) 01053 { 01054 sip_header_t *h; 01055 va_list ap; 01056 01057 va_start(ap, fmt); 01058 h = sip_header_vformat(home, sip_route_class, fmt, ap); 01059 va_end(ap); 01060 01061 return (sip_route_t *)h; 01062 } 01063 #endif 01064 01072 SOFIAPUBFUN issize_t sip_record_route_d(su_home_t *, msg_header_t *, 01073 char *s, isize_t slen); 01074 01076 SOFIAPUBFUN issize_t sip_record_route_e(char b[], isize_t bsiz, 01077 msg_header_t const *h, int flags); 01078 01083 #define sip_record_route(sip) \ 01084 ((sip_record_route_t *)msg_header_access((msg_pub_t*)(sip), sip_record_route_class)) 01085 01100 #define SIP_RECORD_ROUTE_INIT() SIP_HDR_INIT(record_route) 01101 01117 #if SU_HAVE_INLINE 01118 su_inline sip_record_route_t *sip_record_route_init(sip_record_route_t x[1]) 01119 { 01120 return SIP_HEADER_INIT(x, sip_record_route_class, sizeof(sip_record_route_t)); 01121 } 01122 #else 01123 #define sip_record_route_init(x) \ 01124 SIP_HEADER_INIT(x, sip_record_route_class, sizeof(sip_record_route_t)) 01125 #endif 01126 01139 #if SU_HAVE_INLINE 01140 su_inline int sip_is_record_route(sip_header_t const *header) 01141 { 01142 return header && header->sh_class->hc_hash == sip_record_route_hash; 01143 } 01144 #else 01145 int sip_is_record_route(sip_header_t const *header); 01146 #endif 01147 01148 #define sip_record_route_p(h) sip_is_record_route((h)) 01149 01150 01179 #if SU_HAVE_INLINE 01180 su_inline 01181 #endif 01182 sip_record_route_t *sip_record_route_dup(su_home_t *home, sip_record_route_t const *hdr) 01183 __attribute__((__malloc__)); 01184 01185 #if SU_HAVE_INLINE 01186 su_inline 01187 sip_record_route_t *sip_record_route_dup(su_home_t *home, sip_record_route_t const *hdr) 01188 { 01189 return (sip_record_route_t *) 01190 msg_header_dup_as(home, sip_record_route_class, (msg_header_t const *)hdr); 01191 } 01192 #endif 01193 01222 #if SU_HAVE_INLINE 01223 su_inline 01224 #endif 01225 sip_record_route_t *sip_record_route_copy(su_home_t *home, sip_record_route_t const *hdr) 01226 __attribute__((__malloc__)); 01227 01228 #if SU_HAVE_INLINE 01229 su_inline 01230 sip_record_route_t *sip_record_route_copy(su_home_t *home, sip_record_route_t const *hdr) 01231 { 01232 return (sip_record_route_t *) 01233 msg_header_copy_as(home, sip_record_route_class, (msg_header_t const *)hdr); 01234 } 01235 #endif 01236 01252 #if SU_HAVE_INLINE 01253 su_inline 01254 #endif 01255 sip_record_route_t *sip_record_route_make(su_home_t *home, char const *s) 01256 __attribute__((__malloc__)); 01257 01258 #if SU_HAVE_INLINE 01259 su_inline sip_record_route_t *sip_record_route_make(su_home_t *home, char const *s) 01260 { 01261 return (sip_record_route_t *)sip_header_make(home, sip_record_route_class, s); 01262 } 01263 #endif 01264 01283 #if SU_HAVE_INLINE 01284 su_inline 01285 #endif 01286 sip_record_route_t *sip_record_route_format(su_home_t *home, char const *fmt, ...) 01287 __attribute__((__malloc__, __format__ (printf, 2, 3))); 01288 01289 #if SU_HAVE_INLINE 01290 su_inline sip_record_route_t *sip_record_route_format(su_home_t *home, char const *fmt, ...) 01291 { 01292 sip_header_t *h; 01293 va_list ap; 01294 01295 va_start(ap, fmt); 01296 h = sip_header_vformat(home, sip_record_route_class, fmt, ap); 01297 va_end(ap); 01298 01299 return (sip_record_route_t *)h; 01300 } 01301 #endif 01302 01310 SOFIAPUBFUN issize_t sip_max_forwards_d(su_home_t *, msg_header_t *, 01311 char *s, isize_t slen); 01312 01314 SOFIAPUBFUN issize_t sip_max_forwards_e(char b[], isize_t bsiz, 01315 msg_header_t const *h, int flags); 01316 01321 #define sip_max_forwards(sip) \ 01322 ((sip_max_forwards_t *)msg_header_access((msg_pub_t*)(sip), sip_max_forwards_class)) 01323 01338 #define SIP_MAX_FORWARDS_INIT() SIP_HDR_INIT(max_forwards) 01339 01355 #if SU_HAVE_INLINE 01356 su_inline sip_max_forwards_t *sip_max_forwards_init(sip_max_forwards_t x[1]) 01357 { 01358 return SIP_HEADER_INIT(x, sip_max_forwards_class, sizeof(sip_max_forwards_t)); 01359 } 01360 #else 01361 #define sip_max_forwards_init(x) \ 01362 SIP_HEADER_INIT(x, sip_max_forwards_class, sizeof(sip_max_forwards_t)) 01363 #endif 01364 01377 #if SU_HAVE_INLINE 01378 su_inline int sip_is_max_forwards(sip_header_t const *header) 01379 { 01380 return header && header->sh_class->hc_hash == sip_max_forwards_hash; 01381 } 01382 #else 01383 int sip_is_max_forwards(sip_header_t const *header); 01384 #endif 01385 01386 #define sip_max_forwards_p(h) sip_is_max_forwards((h)) 01387 01388 01417 #if SU_HAVE_INLINE 01418 su_inline 01419 #endif 01420 sip_max_forwards_t *sip_max_forwards_dup(su_home_t *home, sip_max_forwards_t const *hdr) 01421 __attribute__((__malloc__)); 01422 01423 #if SU_HAVE_INLINE 01424 su_inline 01425 sip_max_forwards_t *sip_max_forwards_dup(su_home_t *home, sip_max_forwards_t const *hdr) 01426 { 01427 return (sip_max_forwards_t *) 01428 msg_header_dup_as(home, sip_max_forwards_class, (msg_header_t const *)hdr); 01429 } 01430 #endif 01431 01460 #if SU_HAVE_INLINE 01461 su_inline 01462 #endif 01463 sip_max_forwards_t *sip_max_forwards_copy(su_home_t *home, sip_max_forwards_t const *hdr) 01464 __attribute__((__malloc__)); 01465 01466 #if SU_HAVE_INLINE 01467 su_inline 01468 sip_max_forwards_t *sip_max_forwards_copy(su_home_t *home, sip_max_forwards_t const *hdr) 01469 { 01470 return (sip_max_forwards_t *) 01471 msg_header_copy_as(home, sip_max_forwards_class, (msg_header_t const *)hdr); 01472 } 01473 #endif 01474 01490 #if SU_HAVE_INLINE 01491 su_inline 01492 #endif 01493 sip_max_forwards_t *sip_max_forwards_make(su_home_t *home, char const *s) 01494 __attribute__((__malloc__)); 01495 01496 #if SU_HAVE_INLINE 01497 su_inline sip_max_forwards_t *sip_max_forwards_make(su_home_t *home, char const *s) 01498 { 01499 return (sip_max_forwards_t *)sip_header_make(home, sip_max_forwards_class, s); 01500 } 01501 #endif 01502 01521 #if SU_HAVE_INLINE 01522 su_inline 01523 #endif 01524 sip_max_forwards_t *sip_max_forwards_format(su_home_t *home, char const *fmt, ...) 01525 __attribute__((__malloc__, __format__ (printf, 2, 3))); 01526 01527 #if SU_HAVE_INLINE 01528 su_inline sip_max_forwards_t *sip_max_forwards_format(su_home_t *home, char const *fmt, ...) 01529 { 01530 sip_header_t *h; 01531 va_list ap; 01532 01533 va_start(ap, fmt); 01534 h = sip_header_vformat(home, sip_max_forwards_class, fmt, ap); 01535 va_end(ap); 01536 01537 return (sip_max_forwards_t *)h; 01538 } 01539 #endif 01540 01548 SOFIAPUBFUN issize_t sip_proxy_require_d(su_home_t *, msg_header_t *, 01549 char *s, isize_t slen); 01550 01552 SOFIAPUBFUN issize_t sip_proxy_require_e(char b[], isize_t bsiz, 01553 msg_header_t const *h, int flags); 01554 01559 #define sip_proxy_require(sip) \ 01560 ((sip_proxy_require_t *)msg_header_access((msg_pub_t*)(sip), sip_proxy_require_class)) 01561 01576 #define SIP_PROXY_REQUIRE_INIT() SIP_HDR_INIT(proxy_require) 01577 01593 #if SU_HAVE_INLINE 01594 su_inline sip_proxy_require_t *sip_proxy_require_init(sip_proxy_require_t x[1]) 01595 { 01596 return SIP_HEADER_INIT(x, sip_proxy_require_class, sizeof(sip_proxy_require_t)); 01597 } 01598 #else 01599 #define sip_proxy_require_init(x) \ 01600 SIP_HEADER_INIT(x, sip_proxy_require_class, sizeof(sip_proxy_require_t)) 01601 #endif 01602 01615 #if SU_HAVE_INLINE 01616 su_inline int sip_is_proxy_require(sip_header_t const *header) 01617 { 01618 return header && header->sh_class->hc_hash == sip_proxy_require_hash; 01619 } 01620 #else 01621 int sip_is_proxy_require(sip_header_t const *header); 01622 #endif 01623 01624 #define sip_proxy_require_p(h) sip_is_proxy_require((h)) 01625 01626 01655 #if SU_HAVE_INLINE 01656 su_inline 01657 #endif 01658 sip_proxy_require_t *sip_proxy_require_dup(su_home_t *home, sip_proxy_require_t const *hdr) 01659 __attribute__((__malloc__)); 01660 01661 #if SU_HAVE_INLINE 01662 su_inline 01663 sip_proxy_require_t *sip_proxy_require_dup(su_home_t *home, sip_proxy_require_t const *hdr) 01664 { 01665 return (sip_proxy_require_t *) 01666 msg_header_dup_as(home, sip_proxy_require_class, (msg_header_t const *)hdr); 01667 } 01668 #endif 01669 01698 #if SU_HAVE_INLINE 01699 su_inline 01700 #endif 01701 sip_proxy_require_t *sip_proxy_require_copy(su_home_t *home, sip_proxy_require_t const *hdr) 01702 __attribute__((__malloc__)); 01703 01704 #if SU_HAVE_INLINE 01705 su_inline 01706 sip_proxy_require_t *sip_proxy_require_copy(su_home_t *home, sip_proxy_require_t const *hdr) 01707 { 01708 return (sip_proxy_require_t *) 01709 msg_header_copy_as(home, sip_proxy_require_class, (msg_header_t const *)hdr); 01710 } 01711 #endif 01712 01728 #if SU_HAVE_INLINE 01729 su_inline 01730 #endif 01731 sip_proxy_require_t *sip_proxy_require_make(su_home_t *home, char const *s) 01732 __attribute__((__malloc__)); 01733 01734 #if SU_HAVE_INLINE 01735 su_inline sip_proxy_require_t *sip_proxy_require_make(su_home_t *home, char const *s) 01736 { 01737 return (sip_proxy_require_t *)sip_header_make(home, sip_proxy_require_class, s); 01738 } 01739 #endif 01740 01759 #if SU_HAVE_INLINE 01760 su_inline 01761 #endif 01762 sip_proxy_require_t *sip_proxy_require_format(su_home_t *home, char const *fmt, ...) 01763 __attribute__((__malloc__, __format__ (printf, 2, 3))); 01764 01765 #if SU_HAVE_INLINE 01766 su_inline sip_proxy_require_t *sip_proxy_require_format(su_home_t *home, char const *fmt, ...) 01767 { 01768 sip_header_t *h; 01769 va_list ap; 01770 01771 va_start(ap, fmt); 01772 h = sip_header_vformat(home, sip_proxy_require_class, fmt, ap); 01773 va_end(ap); 01774 01775 return (sip_proxy_require_t *)h; 01776 } 01777 #endif 01778 01786 SOFIAPUBFUN issize_t sip_from_d(su_home_t *, msg_header_t *, 01787 char *s, isize_t slen); 01788 01790 SOFIAPUBFUN issize_t sip_from_e(char b[], isize_t bsiz, 01791 msg_header_t const *h, int flags); 01792 01797 #define sip_from(sip) \ 01798 ((sip_from_t *)msg_header_access((msg_pub_t*)(sip), sip_from_class)) 01799 01814 #define SIP_FROM_INIT() SIP_HDR_INIT(from) 01815 01831 #if SU_HAVE_INLINE 01832 su_inline sip_from_t *sip_from_init(sip_from_t x[1]) 01833 { 01834 return SIP_HEADER_INIT(x, sip_from_class, sizeof(sip_from_t)); 01835 } 01836 #else 01837 #define sip_from_init(x) \ 01838 SIP_HEADER_INIT(x, sip_from_class, sizeof(sip_from_t)) 01839 #endif 01840 01853 #if SU_HAVE_INLINE 01854 su_inline int sip_is_from(sip_header_t const *header) 01855 { 01856 return header && header->sh_class->hc_hash == sip_from_hash; 01857 } 01858 #else 01859 int sip_is_from(sip_header_t const *header); 01860 #endif 01861 01862 #define sip_from_p(h) sip_is_from((h)) 01863 01864 01893 #if SU_HAVE_INLINE 01894 su_inline 01895 #endif 01896 sip_from_t *sip_from_dup(su_home_t *home, sip_from_t const *hdr) 01897 __attribute__((__malloc__)); 01898 01899 #if SU_HAVE_INLINE 01900 su_inline 01901 sip_from_t *sip_from_dup(su_home_t *home, sip_from_t const *hdr) 01902 { 01903 return (sip_from_t *) 01904 msg_header_dup_as(home, sip_from_class, (msg_header_t const *)hdr); 01905 } 01906 #endif 01907 01936 #if SU_HAVE_INLINE 01937 su_inline 01938 #endif 01939 sip_from_t *sip_from_copy(su_home_t *home, sip_from_t const *hdr) 01940 __attribute__((__malloc__)); 01941 01942 #if SU_HAVE_INLINE 01943 su_inline 01944 sip_from_t *sip_from_copy(su_home_t *home, sip_from_t const *hdr) 01945 { 01946 return (sip_from_t *) 01947 msg_header_copy_as(home, sip_from_class, (msg_header_t const *)hdr); 01948 } 01949 #endif 01950 01966 #if SU_HAVE_INLINE 01967 su_inline 01968 #endif 01969 sip_from_t *sip_from_make(su_home_t *home, char const *s) 01970 __attribute__((__malloc__)); 01971 01972 #if SU_HAVE_INLINE 01973 su_inline sip_from_t *sip_from_make(su_home_t *home, char const *s) 01974 { 01975 return (sip_from_t *)sip_header_make(home, sip_from_class, s); 01976 } 01977 #endif 01978 01997 #if SU_HAVE_INLINE 01998 su_inline 01999 #endif 02000 sip_from_t *sip_from_format(su_home_t *home, char const *fmt, ...) 02001 __attribute__((__malloc__, __format__ (printf, 2, 3))); 02002 02003 #if SU_HAVE_INLINE 02004 su_inline sip_from_t *sip_from_format(su_home_t *home, char const *fmt, ...) 02005 { 02006 sip_header_t *h; 02007 va_list ap; 02008 02009 va_start(ap, fmt); 02010 h = sip_header_vformat(home, sip_from_class, fmt, ap); 02011 va_end(ap); 02012 02013 return (sip_from_t *)h; 02014 } 02015 #endif 02016 02024 SOFIAPUBFUN issize_t sip_to_d(su_home_t *, msg_header_t *, 02025 char *s, isize_t slen); 02026 02028 SOFIAPUBFUN issize_t sip_to_e(char b[], isize_t bsiz, 02029 msg_header_t const *h, int flags); 02030 02035 #define sip_to(sip) \ 02036 ((sip_to_t *)msg_header_access((msg_pub_t*)(sip), sip_to_class)) 02037 02052 #define SIP_TO_INIT() SIP_HDR_INIT(to) 02053 02069 #if SU_HAVE_INLINE 02070 su_inline sip_to_t *sip_to_init(sip_to_t x[1]) 02071 { 02072 return SIP_HEADER_INIT(x, sip_to_class, sizeof(sip_to_t)); 02073 } 02074 #else 02075 #define sip_to_init(x) \ 02076 SIP_HEADER_INIT(x, sip_to_class, sizeof(sip_to_t)) 02077 #endif 02078 02091 #if SU_HAVE_INLINE 02092 su_inline int sip_is_to(sip_header_t const *header) 02093 { 02094 return header && header->sh_class->hc_hash == sip_to_hash; 02095 } 02096 #else 02097 int sip_is_to(sip_header_t const *header); 02098 #endif 02099 02100 #define sip_to_p(h) sip_is_to((h)) 02101 02102 02131 #if SU_HAVE_INLINE 02132 su_inline 02133 #endif 02134 sip_to_t *sip_to_dup(su_home_t *home, sip_to_t const *hdr) 02135 __attribute__((__malloc__)); 02136 02137 #if SU_HAVE_INLINE 02138 su_inline 02139 sip_to_t *sip_to_dup(su_home_t *home, sip_to_t const *hdr) 02140 { 02141 return (sip_to_t *) 02142 msg_header_dup_as(home, sip_to_class, (msg_header_t const *)hdr); 02143 } 02144 #endif 02145 02174 #if SU_HAVE_INLINE 02175 su_inline 02176 #endif 02177 sip_to_t *sip_to_copy(su_home_t *home, sip_to_t const *hdr) 02178 __attribute__((__malloc__)); 02179 02180 #if SU_HAVE_INLINE 02181 su_inline 02182 sip_to_t *sip_to_copy(su_home_t *home, sip_to_t const *hdr) 02183 { 02184 return (sip_to_t *) 02185 msg_header_copy_as(home, sip_to_class, (msg_header_t const *)hdr); 02186 } 02187 #endif 02188 02204 #if SU_HAVE_INLINE 02205 su_inline 02206 #endif 02207 sip_to_t *sip_to_make(su_home_t *home, char const *s) 02208 __attribute__((__malloc__)); 02209 02210 #if SU_HAVE_INLINE 02211 su_inline sip_to_t *sip_to_make(su_home_t *home, char const *s) 02212 { 02213 return (sip_to_t *)sip_header_make(home, sip_to_class, s); 02214 } 02215 #endif 02216 02235 #if SU_HAVE_INLINE 02236 su_inline 02237 #endif 02238 sip_to_t *sip_to_format(su_home_t *home, char const *fmt, ...) 02239 __attribute__((__malloc__, __format__ (printf, 2, 3))); 02240 02241 #if SU_HAVE_INLINE 02242 su_inline sip_to_t *sip_to_format(su_home_t *home, char const *fmt, ...) 02243 { 02244 sip_header_t *h; 02245 va_list ap; 02246 02247 va_start(ap, fmt); 02248 h = sip_header_vformat(home, sip_to_class, fmt, ap); 02249 va_end(ap); 02250 02251 return (sip_to_t *)h; 02252 } 02253 #endif 02254 02262 SOFIAPUBFUN issize_t sip_call_id_d(su_home_t *, msg_header_t *, 02263 char *s, isize_t slen); 02264 02266 SOFIAPUBFUN issize_t sip_call_id_e(char b[], isize_t bsiz, 02267 msg_header_t const *h, int flags); 02268 02273 #define sip_call_id(sip) \ 02274 ((sip_call_id_t *)msg_header_access((msg_pub_t*)(sip), sip_call_id_class)) 02275 02290 #define SIP_CALL_ID_INIT() SIP_HDR_INIT(call_id) 02291 02307 #if SU_HAVE_INLINE 02308 su_inline sip_call_id_t *sip_call_id_init(sip_call_id_t x[1]) 02309 { 02310 return SIP_HEADER_INIT(x, sip_call_id_class, sizeof(sip_call_id_t)); 02311 } 02312 #else 02313 #define sip_call_id_init(x) \ 02314 SIP_HEADER_INIT(x, sip_call_id_class, sizeof(sip_call_id_t)) 02315 #endif 02316 02329 #if SU_HAVE_INLINE 02330 su_inline int sip_is_call_id(sip_header_t const *header) 02331 { 02332 return header && header->sh_class->hc_hash == sip_call_id_hash; 02333 } 02334 #else 02335 int sip_is_call_id(sip_header_t const *header); 02336 #endif 02337 02338 #define sip_call_id_p(h) sip_is_call_id((h)) 02339 02340 02369 #if SU_HAVE_INLINE 02370 su_inline 02371 #endif 02372 sip_call_id_t *sip_call_id_dup(su_home_t *home, sip_call_id_t const *hdr) 02373 __attribute__((__malloc__)); 02374 02375 #if SU_HAVE_INLINE 02376 su_inline 02377 sip_call_id_t *sip_call_id_dup(su_home_t *home, sip_call_id_t const *hdr) 02378 { 02379 return (sip_call_id_t *) 02380 msg_header_dup_as(home, sip_call_id_class, (msg_header_t const *)hdr); 02381 } 02382 #endif 02383 02412 #if SU_HAVE_INLINE 02413 su_inline 02414 #endif 02415 sip_call_id_t *sip_call_id_copy(su_home_t *home, sip_call_id_t const *hdr) 02416 __attribute__((__malloc__)); 02417 02418 #if SU_HAVE_INLINE 02419 su_inline 02420 sip_call_id_t *sip_call_id_copy(su_home_t *home, sip_call_id_t const *hdr) 02421 { 02422 return (sip_call_id_t *) 02423 msg_header_copy_as(home, sip_call_id_class, (msg_header_t const *)hdr); 02424 } 02425 #endif 02426 02442 #if SU_HAVE_INLINE 02443 su_inline 02444 #endif 02445 sip_call_id_t *sip_call_id_make(su_home_t *home, char const *s) 02446 __attribute__((__malloc__)); 02447 02448 #if SU_HAVE_INLINE 02449 su_inline sip_call_id_t *sip_call_id_make(su_home_t *home, char const *s) 02450 { 02451 return (sip_call_id_t *)sip_header_make(home, sip_call_id_class, s); 02452 } 02453 #endif 02454 02473 #if SU_HAVE_INLINE 02474 su_inline 02475 #endif 02476 sip_call_id_t *sip_call_id_format(su_home_t *home, char const *fmt, ...) 02477 __attribute__((__malloc__, __format__ (printf, 2, 3))); 02478 02479 #if SU_HAVE_INLINE 02480 su_inline sip_call_id_t *sip_call_id_format(su_home_t *home, char const *fmt, ...) 02481 { 02482 sip_header_t *h; 02483 va_list ap; 02484 02485 va_start(ap, fmt); 02486 h = sip_header_vformat(home, sip_call_id_class, fmt, ap); 02487 va_end(ap); 02488 02489 return (sip_call_id_t *)h; 02490 } 02491 #endif 02492 02500 SOFIAPUBFUN issize_t sip_cseq_d(su_home_t *, msg_header_t *, 02501 char *s, isize_t slen); 02502 02504 SOFIAPUBFUN issize_t sip_cseq_e(char b[], isize_t bsiz, 02505 msg_header_t const *h, int flags); 02506 02511 #define sip_cseq(sip) \ 02512 ((sip_cseq_t *)msg_header_access((msg_pub_t*)(sip), sip_cseq_class)) 02513 02528 #define SIP_CSEQ_INIT() SIP_HDR_INIT(cseq) 02529 02545 #if SU_HAVE_INLINE 02546 su_inline sip_cseq_t *sip_cseq_init(sip_cseq_t x[1]) 02547 { 02548 return SIP_HEADER_INIT(x, sip_cseq_class, sizeof(sip_cseq_t)); 02549 } 02550 #else 02551 #define sip_cseq_init(x) \ 02552 SIP_HEADER_INIT(x, sip_cseq_class, sizeof(sip_cseq_t)) 02553 #endif 02554 02567 #if SU_HAVE_INLINE 02568 su_inline int sip_is_cseq(sip_header_t const *header) 02569 { 02570 return header && header->sh_class->hc_hash == sip_cseq_hash; 02571 } 02572 #else 02573 int sip_is_cseq(sip_header_t const *header); 02574 #endif 02575 02576 #define sip_cseq_p(h) sip_is_cseq((h)) 02577 02578 02607 #if SU_HAVE_INLINE 02608 su_inline 02609 #endif 02610 sip_cseq_t *sip_cseq_dup(su_home_t *home, sip_cseq_t const *hdr) 02611 __attribute__((__malloc__)); 02612 02613 #if SU_HAVE_INLINE 02614 su_inline 02615 sip_cseq_t *sip_cseq_dup(su_home_t *home, sip_cseq_t const *hdr) 02616 { 02617 return (sip_cseq_t *) 02618 msg_header_dup_as(home, sip_cseq_class, (msg_header_t const *)hdr); 02619 } 02620 #endif 02621 02650 #if SU_HAVE_INLINE 02651 su_inline 02652 #endif 02653 sip_cseq_t *sip_cseq_copy(su_home_t *home, sip_cseq_t const *hdr) 02654 __attribute__((__malloc__)); 02655 02656 #if SU_HAVE_INLINE 02657 su_inline 02658 sip_cseq_t *sip_cseq_copy(su_home_t *home, sip_cseq_t const *hdr) 02659 { 02660 return (sip_cseq_t *) 02661 msg_header_copy_as(home, sip_cseq_class, (msg_header_t const *)hdr); 02662 } 02663 #endif 02664 02680 #if SU_HAVE_INLINE 02681 su_inline 02682 #endif 02683 sip_cseq_t *sip_cseq_make(su_home_t *home, char const *s) 02684 __attribute__((__malloc__)); 02685 02686 #if SU_HAVE_INLINE 02687 su_inline sip_cseq_t *sip_cseq_make(su_home_t *home, char const *s) 02688 { 02689 return (sip_cseq_t *)sip_header_make(home, sip_cseq_class, s); 02690 } 02691 #endif 02692 02711 #if SU_HAVE_INLINE 02712 su_inline 02713 #endif 02714 sip_cseq_t *sip_cseq_format(su_home_t *home, char const *fmt, ...) 02715 __attribute__((__malloc__, __format__ (printf, 2, 3))); 02716 02717 #if SU_HAVE_INLINE 02718 su_inline sip_cseq_t *sip_cseq_format(su_home_t *home, char const *fmt, ...) 02719 { 02720 sip_header_t *h; 02721 va_list ap; 02722 02723 va_start(ap, fmt); 02724 h = sip_header_vformat(home, sip_cseq_class, fmt, ap); 02725 va_end(ap); 02726 02727 return (sip_cseq_t *)h; 02728 } 02729 #endif 02730 02738 SOFIAPUBFUN issize_t sip_contact_d(su_home_t *, msg_header_t *, 02739 char *s, isize_t slen); 02740 02742 SOFIAPUBFUN issize_t sip_contact_e(char b[], isize_t bsiz, 02743 msg_header_t const *h, int flags); 02744 02749 #define sip_contact(sip) \ 02750 ((sip_contact_t *)msg_header_access((msg_pub_t*)(sip), sip_contact_class)) 02751 02766 #define SIP_CONTACT_INIT() SIP_HDR_INIT(contact) 02767 02783 #if SU_HAVE_INLINE 02784 su_inline sip_contact_t *sip_contact_init(sip_contact_t x[1]) 02785 { 02786 return SIP_HEADER_INIT(x, sip_contact_class, sizeof(sip_contact_t)); 02787 } 02788 #else 02789 #define sip_contact_init(x) \ 02790 SIP_HEADER_INIT(x, sip_contact_class, sizeof(sip_contact_t)) 02791 #endif 02792 02805 #if SU_HAVE_INLINE 02806 su_inline int sip_is_contact(sip_header_t const *header) 02807 { 02808 return header && header->sh_class->hc_hash == sip_contact_hash; 02809 } 02810 #else 02811 int sip_is_contact(sip_header_t const *header); 02812 #endif 02813 02814 #define sip_contact_p(h) sip_is_contact((h)) 02815 02816 02845 #if SU_HAVE_INLINE 02846 su_inline 02847 #endif 02848 sip_contact_t *sip_contact_dup(su_home_t *home, sip_contact_t const *hdr) 02849 __attribute__((__malloc__)); 02850 02851 #if SU_HAVE_INLINE 02852 su_inline 02853 sip_contact_t *sip_contact_dup(su_home_t *home, sip_contact_t const *hdr) 02854 { 02855 return (sip_contact_t *) 02856 msg_header_dup_as(home, sip_contact_class, (msg_header_t const *)hdr); 02857 } 02858 #endif 02859 02888 #if SU_HAVE_INLINE 02889 su_inline 02890 #endif 02891 sip_contact_t *sip_contact_copy(su_home_t *home, sip_contact_t const *hdr) 02892 __attribute__((__malloc__)); 02893 02894 #if SU_HAVE_INLINE 02895 su_inline 02896 sip_contact_t *sip_contact_copy(su_home_t *home, sip_contact_t const *hdr) 02897 { 02898 return (sip_contact_t *) 02899 msg_header_copy_as(home, sip_contact_class, (msg_header_t const *)hdr); 02900 } 02901 #endif 02902 02918 #if SU_HAVE_INLINE 02919 su_inline 02920 #endif 02921 sip_contact_t *sip_contact_make(su_home_t *home, char const *s) 02922 __attribute__((__malloc__)); 02923 02924 #if SU_HAVE_INLINE 02925 su_inline sip_contact_t *sip_contact_make(su_home_t *home, char const *s) 02926 { 02927 return (sip_contact_t *)sip_header_make(home, sip_contact_class, s); 02928 } 02929 #endif 02930 02949 #if SU_HAVE_INLINE 02950 su_inline 02951 #endif 02952 sip_contact_t *sip_contact_format(su_home_t *home, char const *fmt, ...) 02953 __attribute__((__malloc__, __format__ (printf, 2, 3))); 02954 02955 #if SU_HAVE_INLINE 02956 su_inline sip_contact_t *sip_contact_format(su_home_t *home, char const *fmt, ...) 02957 { 02958 sip_header_t *h; 02959 va_list ap; 02960 02961 va_start(ap, fmt); 02962 h = sip_header_vformat(home, sip_contact_class, fmt, ap); 02963 va_end(ap); 02964 02965 return (sip_contact_t *)h; 02966 } 02967 #endif 02968 02976 SOFIAPUBFUN issize_t sip_rseq_d(su_home_t *, msg_header_t *, 02977 char *s, isize_t slen); 02978 02980 SOFIAPUBFUN issize_t sip_rseq_e(char b[], isize_t bsiz, 02981 msg_header_t const *h, int flags); 02982 02987 #define sip_rseq(sip) \ 02988 ((sip_rseq_t *)msg_header_access((msg_pub_t*)(sip), sip_rseq_class)) 02989 03004 #define SIP_RSEQ_INIT() SIP_HDR_INIT(rseq) 03005 03021 #if SU_HAVE_INLINE 03022 su_inline sip_rseq_t *sip_rseq_init(sip_rseq_t x[1]) 03023 { 03024 return SIP_HEADER_INIT(x, sip_rseq_class, sizeof(sip_rseq_t)); 03025 } 03026 #else 03027 #define sip_rseq_init(x) \ 03028 SIP_HEADER_INIT(x, sip_rseq_class, sizeof(sip_rseq_t)) 03029 #endif 03030 03043 #if SU_HAVE_INLINE 03044 su_inline int sip_is_rseq(sip_header_t const *header) 03045 { 03046 return header && header->sh_class->hc_hash == sip_rseq_hash; 03047 } 03048 #else 03049 int sip_is_rseq(sip_header_t const *header); 03050 #endif 03051 03052 #define sip_rseq_p(h) sip_is_rseq((h)) 03053 03054 03083 #if SU_HAVE_INLINE 03084 su_inline 03085 #endif 03086 sip_rseq_t *sip_rseq_dup(su_home_t *home, sip_rseq_t const *hdr) 03087 __attribute__((__malloc__)); 03088 03089 #if SU_HAVE_INLINE 03090 su_inline 03091 sip_rseq_t *sip_rseq_dup(su_home_t *home, sip_rseq_t const *hdr) 03092 { 03093 return (sip_rseq_t *) 03094 msg_header_dup_as(home, sip_rseq_class, (msg_header_t const *)hdr); 03095 } 03096 #endif 03097 03126 #if SU_HAVE_INLINE 03127 su_inline 03128 #endif 03129 sip_rseq_t *sip_rseq_copy(su_home_t *home, sip_rseq_t const *hdr) 03130 __attribute__((__malloc__)); 03131 03132 #if SU_HAVE_INLINE 03133 su_inline 03134 sip_rseq_t *sip_rseq_copy(su_home_t *home, sip_rseq_t const *hdr) 03135 { 03136 return (sip_rseq_t *) 03137 msg_header_copy_as(home, sip_rseq_class, (msg_header_t const *)hdr); 03138 } 03139 #endif 03140 03156 #if SU_HAVE_INLINE 03157 su_inline 03158 #endif 03159 sip_rseq_t *sip_rseq_make(su_home_t *home, char const *s) 03160 __attribute__((__malloc__)); 03161 03162 #if SU_HAVE_INLINE 03163 su_inline sip_rseq_t *sip_rseq_make(su_home_t *home, char const *s) 03164 { 03165 return (sip_rseq_t *)sip_header_make(home, sip_rseq_class, s); 03166 } 03167 #endif 03168 03187 #if SU_HAVE_INLINE 03188 su_inline 03189 #endif 03190 sip_rseq_t *sip_rseq_format(su_home_t *home, char const *fmt, ...) 03191 __attribute__((__malloc__, __format__ (printf, 2, 3))); 03192 03193 #if SU_HAVE_INLINE 03194 su_inline sip_rseq_t *sip_rseq_format(su_home_t *home, char const *fmt, ...) 03195 { 03196 sip_header_t *h; 03197 va_list ap; 03198 03199 va_start(ap, fmt); 03200 h = sip_header_vformat(home, sip_rseq_class, fmt, ap); 03201 va_end(ap); 03202 03203 return (sip_rseq_t *)h; 03204 } 03205 #endif 03206 03214 SOFIAPUBFUN issize_t sip_rack_d(su_home_t *, msg_header_t *, 03215 char *s, isize_t slen); 03216 03218 SOFIAPUBFUN issize_t sip_rack_e(char b[], isize_t bsiz, 03219 msg_header_t const *h, int flags); 03220 03225 #define sip_rack(sip) \ 03226 ((sip_rack_t *)msg_header_access((msg_pub_t*)(sip), sip_rack_class)) 03227 03242 #define SIP_RACK_INIT() SIP_HDR_INIT(rack) 03243 03259 #if SU_HAVE_INLINE 03260 su_inline sip_rack_t *sip_rack_init(sip_rack_t x[1]) 03261 { 03262 return SIP_HEADER_INIT(x, sip_rack_class, sizeof(sip_rack_t)); 03263 } 03264 #else 03265 #define sip_rack_init(x) \ 03266 SIP_HEADER_INIT(x, sip_rack_class, sizeof(sip_rack_t)) 03267 #endif 03268 03281 #if SU_HAVE_INLINE 03282 su_inline int sip_is_rack(sip_header_t const *header) 03283 { 03284 return header && header->sh_class->hc_hash == sip_rack_hash; 03285 } 03286 #else 03287 int sip_is_rack(sip_header_t const *header); 03288 #endif 03289 03290 #define sip_rack_p(h) sip_is_rack((h)) 03291 03292 03321 #if SU_HAVE_INLINE 03322 su_inline 03323 #endif 03324 sip_rack_t *sip_rack_dup(su_home_t *home, sip_rack_t const *hdr) 03325 __attribute__((__malloc__)); 03326 03327 #if SU_HAVE_INLINE 03328 su_inline 03329 sip_rack_t *sip_rack_dup(su_home_t *home, sip_rack_t const *hdr) 03330 { 03331 return (sip_rack_t *) 03332 msg_header_dup_as(home, sip_rack_class, (msg_header_t const *)hdr); 03333 } 03334 #endif 03335 03364 #if SU_HAVE_INLINE 03365 su_inline 03366 #endif 03367 sip_rack_t *sip_rack_copy(su_home_t *home, sip_rack_t const *hdr) 03368 __attribute__((__malloc__)); 03369 03370 #if SU_HAVE_INLINE 03371 su_inline 03372 sip_rack_t *sip_rack_copy(su_home_t *home, sip_rack_t const *hdr) 03373 { 03374 return (sip_rack_t *) 03375 msg_header_copy_as(home, sip_rack_class, (msg_header_t const *)hdr); 03376 } 03377 #endif 03378 03394 #if SU_HAVE_INLINE 03395 su_inline 03396 #endif 03397 sip_rack_t *sip_rack_make(su_home_t *home, char const *s) 03398 __attribute__((__malloc__)); 03399 03400 #if SU_HAVE_INLINE 03401 su_inline sip_rack_t *sip_rack_make(su_home_t *home, char const *s) 03402 { 03403 return (sip_rack_t *)sip_header_make(home, sip_rack_class, s); 03404 } 03405 #endif 03406 03425 #if SU_HAVE_INLINE 03426 su_inline 03427 #endif 03428 sip_rack_t *sip_rack_format(su_home_t *home, char const *fmt, ...) 03429 __attribute__((__malloc__, __format__ (printf, 2, 3))); 03430 03431 #if SU_HAVE_INLINE 03432 su_inline sip_rack_t *sip_rack_format(su_home_t *home, char const *fmt, ...) 03433 { 03434 sip_header_t *h; 03435 va_list ap; 03436 03437 va_start(ap, fmt); 03438 h = sip_header_vformat(home, sip_rack_class, fmt, ap); 03439 va_end(ap); 03440 03441 return (sip_rack_t *)h; 03442 } 03443 #endif 03444 03452 SOFIAPUBFUN issize_t sip_request_disposition_d(su_home_t *, msg_header_t *, 03453 char *s, isize_t slen); 03454 03456 SOFIAPUBFUN issize_t sip_request_disposition_e(char b[], isize_t bsiz, 03457 msg_header_t const *h, int flags); 03458 03463 #define sip_request_disposition(sip) \ 03464 ((sip_request_disposition_t *)msg_header_access((msg_pub_t*)(sip), sip_request_disposition_class)) 03465 03480 #define SIP_REQUEST_DISPOSITION_INIT() SIP_HDR_INIT(request_disposition) 03481 03497 #if SU_HAVE_INLINE 03498 su_inline sip_request_disposition_t *sip_request_disposition_init(sip_request_disposition_t x[1]) 03499 { 03500 return SIP_HEADER_INIT(x, sip_request_disposition_class, sizeof(sip_request_disposition_t)); 03501 } 03502 #else 03503 #define sip_request_disposition_init(x) \ 03504 SIP_HEADER_INIT(x, sip_request_disposition_class, sizeof(sip_request_disposition_t)) 03505 #endif 03506 03519 #if SU_HAVE_INLINE 03520 su_inline int sip_is_request_disposition(sip_header_t const *header) 03521 { 03522 return header && header->sh_class->hc_hash == sip_request_disposition_hash; 03523 } 03524 #else 03525 int sip_is_request_disposition(sip_header_t const *header); 03526 #endif 03527 03528 #define sip_request_disposition_p(h) sip_is_request_disposition((h)) 03529 03530 03559 #if SU_HAVE_INLINE 03560 su_inline 03561 #endif 03562 sip_request_disposition_t *sip_request_disposition_dup(su_home_t *home, sip_request_disposition_t const *hdr) 03563 __attribute__((__malloc__)); 03564 03565 #if SU_HAVE_INLINE 03566 su_inline 03567 sip_request_disposition_t *sip_request_disposition_dup(su_home_t *home, sip_request_disposition_t const *hdr) 03568 { 03569 return (sip_request_disposition_t *) 03570 msg_header_dup_as(home, sip_request_disposition_class, (msg_header_t const *)hdr); 03571 } 03572 #endif 03573 03602 #if SU_HAVE_INLINE 03603 su_inline 03604 #endif 03605 sip_request_disposition_t *sip_request_disposition_copy(su_home_t *home, sip_request_disposition_t const *hdr) 03606 __attribute__((__malloc__)); 03607 03608 #if SU_HAVE_INLINE 03609 su_inline 03610 sip_request_disposition_t *sip_request_disposition_copy(su_home_t *home, sip_request_disposition_t const *hdr) 03611 { 03612 return (sip_request_disposition_t *) 03613 msg_header_copy_as(home, sip_request_disposition_class, (msg_header_t const *)hdr); 03614 } 03615 #endif 03616 03632 #if SU_HAVE_INLINE 03633 su_inline 03634 #endif 03635 sip_request_disposition_t *sip_request_disposition_make(su_home_t *home, char const *s) 03636 __attribute__((__malloc__)); 03637 03638 #if SU_HAVE_INLINE 03639 su_inline sip_request_disposition_t *sip_request_disposition_make(su_home_t *home, char const *s) 03640 { 03641 return (sip_request_disposition_t *)sip_header_make(home, sip_request_disposition_class, s); 03642 } 03643 #endif 03644 03663 #if SU_HAVE_INLINE 03664 su_inline 03665 #endif 03666 sip_request_disposition_t *sip_request_disposition_format(su_home_t *home, char const *fmt, ...) 03667 __attribute__((__malloc__, __format__ (printf, 2, 3))); 03668 03669 #if SU_HAVE_INLINE 03670 su_inline sip_request_disposition_t *sip_request_disposition_format(su_home_t *home, char const *fmt, ...) 03671 { 03672 sip_header_t *h; 03673 va_list ap; 03674 03675 va_start(ap, fmt); 03676 h = sip_header_vformat(home, sip_request_disposition_class, fmt, ap); 03677 va_end(ap); 03678 03679 return (sip_request_disposition_t *)h; 03680 } 03681 #endif 03682 03690 SOFIAPUBFUN issize_t sip_accept_contact_d(su_home_t *, msg_header_t *, 03691 char *s, isize_t slen); 03692 03694 SOFIAPUBFUN issize_t sip_accept_contact_e(char b[], isize_t bsiz, 03695 msg_header_t const *h, int flags); 03696 03701 #define sip_accept_contact(sip) \ 03702 ((sip_accept_contact_t *)msg_header_access((msg_pub_t*)(sip), sip_accept_contact_class)) 03703 03718 #define SIP_ACCEPT_CONTACT_INIT() SIP_HDR_INIT(accept_contact) 03719 03735 #if SU_HAVE_INLINE 03736 su_inline sip_accept_contact_t *sip_accept_contact_init(sip_accept_contact_t x[1]) 03737 { 03738 return SIP_HEADER_INIT(x, sip_accept_contact_class, sizeof(sip_accept_contact_t)); 03739 } 03740 #else 03741 #define sip_accept_contact_init(x) \ 03742 SIP_HEADER_INIT(x, sip_accept_contact_class, sizeof(sip_accept_contact_t)) 03743 #endif 03744 03757 #if SU_HAVE_INLINE 03758 su_inline int sip_is_accept_contact(sip_header_t const *header) 03759 { 03760 return header && header->sh_class->hc_hash == sip_accept_contact_hash; 03761 } 03762 #else 03763 int sip_is_accept_contact(sip_header_t const *header); 03764 #endif 03765 03766 #define sip_accept_contact_p(h) sip_is_accept_contact((h)) 03767 03768 03797 #if SU_HAVE_INLINE 03798 su_inline 03799 #endif 03800 sip_accept_contact_t *sip_accept_contact_dup(su_home_t *home, sip_accept_contact_t const *hdr) 03801 __attribute__((__malloc__)); 03802 03803 #if SU_HAVE_INLINE 03804 su_inline 03805 sip_accept_contact_t *sip_accept_contact_dup(su_home_t *home, sip_accept_contact_t const *hdr) 03806 { 03807 return (sip_accept_contact_t *) 03808 msg_header_dup_as(home, sip_accept_contact_class, (msg_header_t const *)hdr); 03809 } 03810 #endif 03811 03840 #if SU_HAVE_INLINE 03841 su_inline 03842 #endif 03843 sip_accept_contact_t *sip_accept_contact_copy(su_home_t *home, sip_accept_contact_t const *hdr) 03844 __attribute__((__malloc__)); 03845 03846 #if SU_HAVE_INLINE 03847 su_inline 03848 sip_accept_contact_t *sip_accept_contact_copy(su_home_t *home, sip_accept_contact_t const *hdr) 03849 { 03850 return (sip_accept_contact_t *) 03851 msg_header_copy_as(home, sip_accept_contact_class, (msg_header_t const *)hdr); 03852 } 03853 #endif 03854 03870 #if SU_HAVE_INLINE 03871 su_inline 03872 #endif 03873 sip_accept_contact_t *sip_accept_contact_make(su_home_t *home, char const *s) 03874 __attribute__((__malloc__)); 03875 03876 #if SU_HAVE_INLINE 03877 su_inline sip_accept_contact_t *sip_accept_contact_make(su_home_t *home, char const *s) 03878 { 03879 return (sip_accept_contact_t *)sip_header_make(home, sip_accept_contact_class, s); 03880 } 03881 #endif 03882 03901 #if SU_HAVE_INLINE 03902 su_inline 03903 #endif 03904 sip_accept_contact_t *sip_accept_contact_format(su_home_t *home, char const *fmt, ...) 03905 __attribute__((__malloc__, __format__ (printf, 2, 3))); 03906 03907 #if SU_HAVE_INLINE 03908 su_inline sip_accept_contact_t *sip_accept_contact_format(su_home_t *home, char const *fmt, ...) 03909 { 03910 sip_header_t *h; 03911 va_list ap; 03912 03913 va_start(ap, fmt); 03914 h = sip_header_vformat(home, sip_accept_contact_class, fmt, ap); 03915 va_end(ap); 03916 03917 return (sip_accept_contact_t *)h; 03918 } 03919 #endif 03920 03928 SOFIAPUBFUN issize_t sip_reject_contact_d(su_home_t *, msg_header_t *, 03929 char *s, isize_t slen); 03930 03932 SOFIAPUBFUN issize_t sip_reject_contact_e(char b[], isize_t bsiz, 03933 msg_header_t const *h, int flags); 03934 03939 #define sip_reject_contact(sip) \ 03940 ((sip_reject_contact_t *)msg_header_access((msg_pub_t*)(sip), sip_reject_contact_class)) 03941 03956 #define SIP_REJECT_CONTACT_INIT() SIP_HDR_INIT(reject_contact) 03957 03973 #if SU_HAVE_INLINE 03974 su_inline sip_reject_contact_t *sip_reject_contact_init(sip_reject_contact_t x[1]) 03975 { 03976 return SIP_HEADER_INIT(x, sip_reject_contact_class, sizeof(sip_reject_contact_t)); 03977 } 03978 #else 03979 #define sip_reject_contact_init(x) \ 03980 SIP_HEADER_INIT(x, sip_reject_contact_class, sizeof(sip_reject_contact_t)) 03981 #endif 03982 03995 #if SU_HAVE_INLINE 03996 su_inline int sip_is_reject_contact(sip_header_t const *header) 03997 { 03998 return header && header->sh_class->hc_hash == sip_reject_contact_hash; 03999 } 04000 #else 04001 int sip_is_reject_contact(sip_header_t const *header); 04002 #endif 04003 04004 #define sip_reject_contact_p(h) sip_is_reject_contact((h)) 04005 04006 04035 #if SU_HAVE_INLINE 04036 su_inline 04037 #endif 04038 sip_reject_contact_t *sip_reject_contact_dup(su_home_t *home, sip_reject_contact_t const *hdr) 04039 __attribute__((__malloc__)); 04040 04041 #if SU_HAVE_INLINE 04042 su_inline 04043 sip_reject_contact_t *sip_reject_contact_dup(su_home_t *home, sip_reject_contact_t const *hdr) 04044 { 04045 return (sip_reject_contact_t *) 04046 msg_header_dup_as(home, sip_reject_contact_class, (msg_header_t const *)hdr); 04047 } 04048 #endif 04049 04078 #if SU_HAVE_INLINE 04079 su_inline 04080 #endif 04081 sip_reject_contact_t *sip_reject_contact_copy(su_home_t *home, sip_reject_contact_t const *hdr) 04082 __attribute__((__malloc__)); 04083 04084 #if SU_HAVE_INLINE 04085 su_inline 04086 sip_reject_contact_t *sip_reject_contact_copy(su_home_t *home, sip_reject_contact_t const *hdr) 04087 { 04088 return (sip_reject_contact_t *) 04089 msg_header_copy_as(home, sip_reject_contact_class, (msg_header_t const *)hdr); 04090 } 04091 #endif 04092 04108 #if SU_HAVE_INLINE 04109 su_inline 04110 #endif 04111 sip_reject_contact_t *sip_reject_contact_make(su_home_t *home, char const *s) 04112 __attribute__((__malloc__)); 04113 04114 #if SU_HAVE_INLINE 04115 su_inline sip_reject_contact_t *sip_reject_contact_make(su_home_t *home, char const *s) 04116 { 04117 return (sip_reject_contact_t *)sip_header_make(home, sip_reject_contact_class, s); 04118 } 04119 #endif 04120 04139 #if SU_HAVE_INLINE 04140 su_inline 04141 #endif 04142 sip_reject_contact_t *sip_reject_contact_format(su_home_t *home, char const *fmt, ...) 04143 __attribute__((__malloc__, __format__ (printf, 2, 3))); 04144 04145 #if SU_HAVE_INLINE 04146 su_inline sip_reject_contact_t *sip_reject_contact_format(su_home_t *home, char const *fmt, ...) 04147 { 04148 sip_header_t *h; 04149 va_list ap; 04150 04151 va_start(ap, fmt); 04152 h = sip_header_vformat(home, sip_reject_contact_class, fmt, ap); 04153 va_end(ap); 04154 04155 return (sip_reject_contact_t *)h; 04156 } 04157 #endif 04158 04166 SOFIAPUBFUN issize_t sip_expires_d(su_home_t *, msg_header_t *, 04167 char *s, isize_t slen); 04168 04170 SOFIAPUBFUN issize_t sip_expires_e(char b[], isize_t bsiz, 04171 msg_header_t const *h, int flags); 04172 04177 #define sip_expires(sip) \ 04178 ((sip_expires_t *)msg_header_access((msg_pub_t*)(sip), sip_expires_class)) 04179 04194 #define SIP_EXPIRES_INIT() SIP_HDR_INIT(expires) 04195 04211 #if SU_HAVE_INLINE 04212 su_inline sip_expires_t *sip_expires_init(sip_expires_t x[1]) 04213 { 04214 return SIP_HEADER_INIT(x, sip_expires_class, sizeof(sip_expires_t)); 04215 } 04216 #else 04217 #define sip_expires_init(x) \ 04218 SIP_HEADER_INIT(x, sip_expires_class, sizeof(sip_expires_t)) 04219 #endif 04220 04233 #if SU_HAVE_INLINE 04234 su_inline int sip_is_expires(sip_header_t const *header) 04235 { 04236 return header && header->sh_class->hc_hash == sip_expires_hash; 04237 } 04238 #else 04239 int sip_is_expires(sip_header_t const *header); 04240 #endif 04241 04242 #define sip_expires_p(h) sip_is_expires((h)) 04243 04244 04273 #if SU_HAVE_INLINE 04274 su_inline 04275 #endif 04276 sip_expires_t *sip_expires_dup(su_home_t *home, sip_expires_t const *hdr) 04277 __attribute__((__malloc__)); 04278 04279 #if SU_HAVE_INLINE 04280 su_inline 04281 sip_expires_t *sip_expires_dup(su_home_t *home, sip_expires_t const *hdr) 04282 { 04283 return (sip_expires_t *) 04284 msg_header_dup_as(home, sip_expires_class, (msg_header_t const *)hdr); 04285 } 04286 #endif 04287 04316 #if SU_HAVE_INLINE 04317 su_inline 04318 #endif 04319 sip_expires_t *sip_expires_copy(su_home_t *home, sip_expires_t const *hdr) 04320 __attribute__((__malloc__)); 04321 04322 #if SU_HAVE_INLINE 04323 su_inline 04324 sip_expires_t *sip_expires_copy(su_home_t *home, sip_expires_t const *hdr) 04325 { 04326 return (sip_expires_t *) 04327 msg_header_copy_as(home, sip_expires_class, (msg_header_t const *)hdr); 04328 } 04329 #endif 04330 04346 #if SU_HAVE_INLINE 04347 su_inline 04348 #endif 04349 sip_expires_t *sip_expires_make(su_home_t *home, char const *s) 04350 __attribute__((__malloc__)); 04351 04352 #if SU_HAVE_INLINE 04353 su_inline sip_expires_t *sip_expires_make(su_home_t *home, char const *s) 04354 { 04355 return (sip_expires_t *)sip_header_make(home, sip_expires_class, s); 04356 } 04357 #endif 04358 04377 #if SU_HAVE_INLINE 04378 su_inline 04379 #endif 04380 sip_expires_t *sip_expires_format(su_home_t *home, char const *fmt, ...) 04381 __attribute__((__malloc__, __format__ (printf, 2, 3))); 04382 04383 #if SU_HAVE_INLINE 04384 su_inline sip_expires_t *sip_expires_format(su_home_t *home, char const *fmt, ...) 04385 { 04386 sip_header_t *h; 04387 va_list ap; 04388 04389 va_start(ap, fmt); 04390 h = sip_header_vformat(home, sip_expires_class, fmt, ap); 04391 va_end(ap); 04392 04393 return (sip_expires_t *)h; 04394 } 04395 #endif 04396 04404 SOFIAPUBFUN issize_t sip_date_d(su_home_t *, msg_header_t *, 04405 char *s, isize_t slen); 04406 04408 SOFIAPUBFUN issize_t sip_date_e(char b[], isize_t bsiz, 04409 msg_header_t const *h, int flags); 04410 04415 #define sip_date(sip) \ 04416 ((sip_date_t *)msg_header_access((msg_pub_t*)(sip), sip_date_class)) 04417 04432 #define SIP_DATE_INIT() SIP_HDR_INIT(date) 04433 04449 #if SU_HAVE_INLINE 04450 su_inline sip_date_t *sip_date_init(sip_date_t x[1]) 04451 { 04452 return SIP_HEADER_INIT(x, sip_date_class, sizeof(sip_date_t)); 04453 } 04454 #else 04455 #define sip_date_init(x) \ 04456 SIP_HEADER_INIT(x, sip_date_class, sizeof(sip_date_t)) 04457 #endif 04458 04471 #if SU_HAVE_INLINE 04472 su_inline int sip_is_date(sip_header_t const *header) 04473 { 04474 return header && header->sh_class->hc_hash == sip_date_hash; 04475 } 04476 #else 04477 int sip_is_date(sip_header_t const *header); 04478 #endif 04479 04480 #define sip_date_p(h) sip_is_date((h)) 04481 04482 04511 #if SU_HAVE_INLINE 04512 su_inline 04513 #endif 04514 sip_date_t *sip_date_dup(su_home_t *home, sip_date_t const *hdr) 04515 __attribute__((__malloc__)); 04516 04517 #if SU_HAVE_INLINE 04518 su_inline 04519 sip_date_t *sip_date_dup(su_home_t *home, sip_date_t const *hdr) 04520 { 04521 return (sip_date_t *) 04522 msg_header_dup_as(home, sip_date_class, (msg_header_t const *)hdr); 04523 } 04524 #endif 04525 04554 #if SU_HAVE_INLINE 04555 su_inline 04556 #endif 04557 sip_date_t *sip_date_copy(su_home_t *home, sip_date_t const *hdr) 04558 __attribute__((__malloc__)); 04559 04560 #if SU_HAVE_INLINE 04561 su_inline 04562 sip_date_t *sip_date_copy(su_home_t *home, sip_date_t const *hdr) 04563 { 04564 return (sip_date_t *) 04565 msg_header_copy_as(home, sip_date_class, (msg_header_t const *)hdr); 04566 } 04567 #endif 04568 04584 #if SU_HAVE_INLINE 04585 su_inline 04586 #endif 04587 sip_date_t *sip_date_make(su_home_t *home, char const *s) 04588 __attribute__((__malloc__)); 04589 04590 #if SU_HAVE_INLINE 04591 su_inline sip_date_t *sip_date_make(su_home_t *home, char const *s) 04592 { 04593 return (sip_date_t *)sip_header_make(home, sip_date_class, s); 04594 } 04595 #endif 04596 04615 #if SU_HAVE_INLINE 04616 su_inline 04617 #endif 04618 sip_date_t *sip_date_format(su_home_t *home, char const *fmt, ...) 04619 __attribute__((__malloc__, __format__ (printf, 2, 3))); 04620 04621 #if SU_HAVE_INLINE 04622 su_inline sip_date_t *sip_date_format(su_home_t *home, char const *fmt, ...) 04623 { 04624 sip_header_t *h; 04625 va_list ap; 04626 04627 va_start(ap, fmt); 04628 h = sip_header_vformat(home, sip_date_class, fmt, ap); 04629 va_end(ap); 04630 04631 return (sip_date_t *)h; 04632 } 04633 #endif 04634 04642 SOFIAPUBFUN issize_t sip_retry_after_d(su_home_t *, msg_header_t *, 04643 char *s, isize_t slen); 04644 04646 SOFIAPUBFUN issize_t sip_retry_after_e(char b[], isize_t bsiz, 04647 msg_header_t const *h, int flags); 04648 04653 #define sip_retry_after(sip) \ 04654 ((sip_retry_after_t *)msg_header_access((msg_pub_t*)(sip), sip_retry_after_class)) 04655 04670 #define SIP_RETRY_AFTER_INIT() SIP_HDR_INIT(retry_after) 04671 04687 #if SU_HAVE_INLINE 04688 su_inline sip_retry_after_t *sip_retry_after_init(sip_retry_after_t x[1]) 04689 { 04690 return SIP_HEADER_INIT(x, sip_retry_after_class, sizeof(sip_retry_after_t)); 04691 } 04692 #else 04693 #define sip_retry_after_init(x) \ 04694 SIP_HEADER_INIT(x, sip_retry_after_class, sizeof(sip_retry_after_t)) 04695 #endif 04696 04709 #if SU_HAVE_INLINE 04710 su_inline int sip_is_retry_after(sip_header_t const *header) 04711 { 04712 return header && header->sh_class->hc_hash == sip_retry_after_hash; 04713 } 04714 #else 04715 int sip_is_retry_after(sip_header_t const *header); 04716 #endif 04717 04718 #define sip_retry_after_p(h) sip_is_retry_after((h)) 04719 04720 04749 #if SU_HAVE_INLINE 04750 su_inline 04751 #endif 04752 sip_retry_after_t *sip_retry_after_dup(su_home_t *home, sip_retry_after_t const *hdr) 04753 __attribute__((__malloc__)); 04754 04755 #if SU_HAVE_INLINE 04756 su_inline 04757 sip_retry_after_t *sip_retry_after_dup(su_home_t *home, sip_retry_after_t const *hdr) 04758 { 04759 return (sip_retry_after_t *) 04760 msg_header_dup_as(home, sip_retry_after_class, (msg_header_t const *)hdr); 04761 } 04762 #endif 04763 04792 #if SU_HAVE_INLINE 04793 su_inline 04794 #endif 04795 sip_retry_after_t *sip_retry_after_copy(su_home_t *home, sip_retry_after_t const *hdr) 04796 __attribute__((__malloc__)); 04797 04798 #if SU_HAVE_INLINE 04799 su_inline 04800 sip_retry_after_t *sip_retry_after_copy(su_home_t *home, sip_retry_after_t const *hdr) 04801 { 04802 return (sip_retry_after_t *) 04803 msg_header_copy_as(home, sip_retry_after_class, (msg_header_t const *)hdr); 04804 } 04805 #endif 04806 04822 #if SU_HAVE_INLINE 04823 su_inline 04824 #endif 04825 sip_retry_after_t *sip_retry_after_make(su_home_t *home, char const *s) 04826 __attribute__((__malloc__)); 04827 04828 #if SU_HAVE_INLINE 04829 su_inline sip_retry_after_t *sip_retry_after_make(su_home_t *home, char const *s) 04830 { 04831 return (sip_retry_after_t *)sip_header_make(home, sip_retry_after_class, s); 04832 } 04833 #endif 04834 04853 #if SU_HAVE_INLINE 04854 su_inline 04855 #endif 04856 sip_retry_after_t *sip_retry_after_format(su_home_t *home, char const *fmt, ...) 04857 __attribute__((__malloc__, __format__ (printf, 2, 3))); 04858 04859 #if SU_HAVE_INLINE 04860 su_inline sip_retry_after_t *sip_retry_after_format(su_home_t *home, char const *fmt, ...) 04861 { 04862 sip_header_t *h; 04863 va_list ap; 04864 04865 va_start(ap, fmt); 04866 h = sip_header_vformat(home, sip_retry_after_class, fmt, ap); 04867 va_end(ap); 04868 04869 return (sip_retry_after_t *)h; 04870 } 04871 #endif 04872 04880 SOFIAPUBFUN issize_t sip_timestamp_d(su_home_t *, msg_header_t *, 04881 char *s, isize_t slen); 04882 04884 SOFIAPUBFUN issize_t sip_timestamp_e(char b[], isize_t bsiz, 04885 msg_header_t const *h, int flags); 04886 04891 #define sip_timestamp(sip) \ 04892 ((sip_timestamp_t *)msg_header_access((msg_pub_t*)(sip), sip_timestamp_class)) 04893 04908 #define SIP_TIMESTAMP_INIT() SIP_HDR_INIT(timestamp) 04909 04925 #if SU_HAVE_INLINE 04926 su_inline sip_timestamp_t *sip_timestamp_init(sip_timestamp_t x[1]) 04927 { 04928 return SIP_HEADER_INIT(x, sip_timestamp_class, sizeof(sip_timestamp_t)); 04929 } 04930 #else 04931 #define sip_timestamp_init(x) \ 04932 SIP_HEADER_INIT(x, sip_timestamp_class, sizeof(sip_timestamp_t)) 04933 #endif 04934 04947 #if SU_HAVE_INLINE 04948 su_inline int sip_is_timestamp(sip_header_t const *header) 04949 { 04950 return header && header->sh_class->hc_hash == sip_timestamp_hash; 04951 } 04952 #else 04953 int sip_is_timestamp(sip_header_t const *header); 04954 #endif 04955 04956 #define sip_timestamp_p(h) sip_is_timestamp((h)) 04957 04958 04987 #if SU_HAVE_INLINE 04988 su_inline 04989 #endif 04990 sip_timestamp_t *sip_timestamp_dup(su_home_t *home, sip_timestamp_t const *hdr) 04991 __attribute__((__malloc__)); 04992 04993 #if SU_HAVE_INLINE 04994 su_inline 04995 sip_timestamp_t *sip_timestamp_dup(su_home_t *home, sip_timestamp_t const *hdr) 04996 { 04997 return (sip_timestamp_t *) 04998 msg_header_dup_as(home, sip_timestamp_class, (msg_header_t const *)hdr); 04999 } 05000 #endif 05001 05030 #if SU_HAVE_INLINE 05031 su_inline 05032 #endif 05033 sip_timestamp_t *sip_timestamp_copy(su_home_t *home, sip_timestamp_t const *hdr) 05034 __attribute__((__malloc__)); 05035 05036 #if SU_HAVE_INLINE 05037 su_inline 05038 sip_timestamp_t *sip_timestamp_copy(su_home_t *home, sip_timestamp_t const *hdr) 05039 { 05040 return (sip_timestamp_t *) 05041 msg_header_copy_as(home, sip_timestamp_class, (msg_header_t const *)hdr); 05042 } 05043 #endif 05044 05060 #if SU_HAVE_INLINE 05061 su_inline 05062 #endif 05063 sip_timestamp_t *sip_timestamp_make(su_home_t *home, char const *s) 05064 __attribute__((__malloc__)); 05065 05066 #if SU_HAVE_INLINE 05067 su_inline sip_timestamp_t *sip_timestamp_make(su_home_t *home, char const *s) 05068 { 05069 return (sip_timestamp_t *)sip_header_make(home, sip_timestamp_class, s); 05070 } 05071 #endif 05072 05091 #if SU_HAVE_INLINE 05092 su_inline 05093 #endif 05094 sip_timestamp_t *sip_timestamp_format(su_home_t *home, char const *fmt, ...) 05095 __attribute__((__malloc__, __format__ (printf, 2, 3))); 05096 05097 #if SU_HAVE_INLINE 05098 su_inline sip_timestamp_t *sip_timestamp_format(su_home_t *home, char const *fmt, ...) 05099 { 05100 sip_header_t *h; 05101 va_list ap; 05102 05103 va_start(ap, fmt); 05104 h = sip_header_vformat(home, sip_timestamp_class, fmt, ap); 05105 va_end(ap); 05106 05107 return (sip_timestamp_t *)h; 05108 } 05109 #endif 05110 05118 SOFIAPUBFUN issize_t sip_min_expires_d(su_home_t *, msg_header_t *, 05119 char *s, isize_t slen); 05120 05122 SOFIAPUBFUN issize_t sip_min_expires_e(char b[], isize_t bsiz, 05123 msg_header_t const *h, int flags); 05124 05129 #define sip_min_expires(sip) \ 05130 ((sip_min_expires_t *)msg_header_access((msg_pub_t*)(sip), sip_min_expires_class)) 05131 05146 #define SIP_MIN_EXPIRES_INIT() SIP_HDR_INIT(min_expires) 05147 05163 #if SU_HAVE_INLINE 05164 su_inline sip_min_expires_t *sip_min_expires_init(sip_min_expires_t x[1]) 05165 { 05166 return SIP_HEADER_INIT(x, sip_min_expires_class, sizeof(sip_min_expires_t)); 05167 } 05168 #else 05169 #define sip_min_expires_init(x) \ 05170 SIP_HEADER_INIT(x, sip_min_expires_class, sizeof(sip_min_expires_t)) 05171 #endif 05172 05185 #if SU_HAVE_INLINE 05186 su_inline int sip_is_min_expires(sip_header_t const *header) 05187 { 05188 return header && header->sh_class->hc_hash == sip_min_expires_hash; 05189 } 05190 #else 05191 int sip_is_min_expires(sip_header_t const *header); 05192 #endif 05193 05194 #define sip_min_expires_p(h) sip_is_min_expires((h)) 05195 05196 05225 #if SU_HAVE_INLINE 05226 su_inline 05227 #endif 05228 sip_min_expires_t *sip_min_expires_dup(su_home_t *home, sip_min_expires_t const *hdr) 05229 __attribute__((__malloc__)); 05230 05231 #if SU_HAVE_INLINE 05232 su_inline 05233 sip_min_expires_t *sip_min_expires_dup(su_home_t *home, sip_min_expires_t const *hdr) 05234 { 05235 return (sip_min_expires_t *) 05236 msg_header_dup_as(home, sip_min_expires_class, (msg_header_t const *)hdr); 05237 } 05238 #endif 05239 05268 #if SU_HAVE_INLINE 05269 su_inline 05270 #endif 05271 sip_min_expires_t *sip_min_expires_copy(su_home_t *home, sip_min_expires_t const *hdr) 05272 __attribute__((__malloc__)); 05273 05274 #if SU_HAVE_INLINE 05275 su_inline 05276 sip_min_expires_t *sip_min_expires_copy(su_home_t *home, sip_min_expires_t const *hdr) 05277 { 05278 return (sip_min_expires_t *) 05279 msg_header_copy_as(home, sip_min_expires_class, (msg_header_t const *)hdr); 05280 } 05281 #endif 05282 05298 #if SU_HAVE_INLINE 05299 su_inline 05300 #endif 05301 sip_min_expires_t *sip_min_expires_make(su_home_t *home, char const *s) 05302 __attribute__((__malloc__)); 05303 05304 #if SU_HAVE_INLINE 05305 su_inline sip_min_expires_t *sip_min_expires_make(su_home_t *home, char const *s) 05306 { 05307 return (sip_min_expires_t *)sip_header_make(home, sip_min_expires_class, s); 05308 } 05309 #endif 05310 05329 #if SU_HAVE_INLINE 05330 su_inline 05331 #endif 05332 sip_min_expires_t *sip_min_expires_format(su_home_t *home, char const *fmt, ...) 05333 __attribute__((__malloc__, __format__ (printf, 2, 3))); 05334 05335 #if SU_HAVE_INLINE 05336 su_inline sip_min_expires_t *sip_min_expires_format(su_home_t *home, char const *fmt, ...) 05337 { 05338 sip_header_t *h; 05339 va_list ap; 05340 05341 va_start(ap, fmt); 05342 h = sip_header_vformat(home, sip_min_expires_class, fmt, ap); 05343 va_end(ap); 05344 05345 return (sip_min_expires_t *)h; 05346 } 05347 #endif 05348 05356 SOFIAPUBFUN issize_t sip_subject_d(su_home_t *, msg_header_t *, 05357 char *s, isize_t slen); 05358 05360 SOFIAPUBFUN issize_t sip_subject_e(char b[], isize_t bsiz, 05361 msg_header_t const *h, int flags); 05362 05367 #define sip_subject(sip) \ 05368 ((sip_subject_t *)msg_header_access((msg_pub_t*)(sip), sip_subject_class)) 05369 05384 #define SIP_SUBJECT_INIT() SIP_HDR_INIT(subject) 05385 05401 #if SU_HAVE_INLINE 05402 su_inline sip_subject_t *sip_subject_init(sip_subject_t x[1]) 05403 { 05404 return SIP_HEADER_INIT(x, sip_subject_class, sizeof(sip_subject_t)); 05405 } 05406 #else 05407 #define sip_subject_init(x) \ 05408 SIP_HEADER_INIT(x, sip_subject_class, sizeof(sip_subject_t)) 05409 #endif 05410 05423 #if SU_HAVE_INLINE 05424 su_inline int sip_is_subject(sip_header_t const *header) 05425 { 05426 return header && header->sh_class->hc_hash == sip_subject_hash; 05427 } 05428 #else 05429 int sip_is_subject(sip_header_t const *header); 05430 #endif 05431 05432 #define sip_subject_p(h) sip_is_subject((h)) 05433 05434 05463 #if SU_HAVE_INLINE 05464 su_inline 05465 #endif 05466 sip_subject_t *sip_subject_dup(su_home_t *home, sip_subject_t const *hdr) 05467 __attribute__((__malloc__)); 05468 05469 #if SU_HAVE_INLINE 05470 su_inline 05471 sip_subject_t *sip_subject_dup(su_home_t *home, sip_subject_t const *hdr) 05472 { 05473 return (sip_subject_t *) 05474 msg_header_dup_as(home, sip_subject_class, (msg_header_t const *)hdr); 05475 } 05476 #endif 05477 05506 #if SU_HAVE_INLINE 05507 su_inline 05508 #endif 05509 sip_subject_t *sip_subject_copy(su_home_t *home, sip_subject_t const *hdr) 05510 __attribute__((__malloc__)); 05511 05512 #if SU_HAVE_INLINE 05513 su_inline 05514 sip_subject_t *sip_subject_copy(su_home_t *home, sip_subject_t const *hdr) 05515 { 05516 return (sip_subject_t *) 05517 msg_header_copy_as(home, sip_subject_class, (msg_header_t const *)hdr); 05518 } 05519 #endif 05520 05536 #if SU_HAVE_INLINE 05537 su_inline 05538 #endif 05539 sip_subject_t *sip_subject_make(su_home_t *home, char const *s) 05540 __attribute__((__malloc__)); 05541 05542 #if SU_HAVE_INLINE 05543 su_inline sip_subject_t *sip_subject_make(su_home_t *home, char const *s) 05544 { 05545 return (sip_subject_t *)sip_header_make(home, sip_subject_class, s); 05546 } 05547 #endif 05548 05567 #if SU_HAVE_INLINE 05568 su_inline 05569 #endif 05570 sip_subject_t *sip_subject_format(su_home_t *home, char const *fmt, ...) 05571 __attribute__((__malloc__, __format__ (printf, 2, 3))); 05572 05573 #if SU_HAVE_INLINE 05574 su_inline sip_subject_t *sip_subject_format(su_home_t *home, char const *fmt, ...) 05575 { 05576 sip_header_t *h; 05577 va_list ap; 05578 05579 va_start(ap, fmt); 05580 h = sip_header_vformat(home, sip_subject_class, fmt, ap); 05581 va_end(ap); 05582 05583 return (sip_subject_t *)h; 05584 } 05585 #endif 05586 05594 SOFIAPUBFUN issize_t sip_priority_d(su_home_t *, msg_header_t *, 05595 char *s, isize_t slen); 05596 05598 SOFIAPUBFUN issize_t sip_priority_e(char b[], isize_t bsiz, 05599 msg_header_t const *h, int flags); 05600 05605 #define sip_priority(sip) \ 05606 ((sip_priority_t *)msg_header_access((msg_pub_t*)(sip), sip_priority_class)) 05607 05622 #define SIP_PRIORITY_INIT() SIP_HDR_INIT(priority) 05623 05639 #if SU_HAVE_INLINE 05640 su_inline sip_priority_t *sip_priority_init(sip_priority_t x[1]) 05641 { 05642 return SIP_HEADER_INIT(x, sip_priority_class, sizeof(sip_priority_t)); 05643 } 05644 #else 05645 #define sip_priority_init(x) \ 05646 SIP_HEADER_INIT(x, sip_priority_class, sizeof(sip_priority_t)) 05647 #endif 05648 05661 #if SU_HAVE_INLINE 05662 su_inline int sip_is_priority(sip_header_t const *header) 05663 { 05664 return header && header->sh_class->hc_hash == sip_priority_hash; 05665 } 05666 #else 05667 int sip_is_priority(sip_header_t const *header); 05668 #endif 05669 05670 #define sip_priority_p(h) sip_is_priority((h)) 05671 05672 05701 #if SU_HAVE_INLINE 05702 su_inline 05703 #endif 05704 sip_priority_t *sip_priority_dup(su_home_t *home, sip_priority_t const *hdr) 05705 __attribute__((__malloc__)); 05706 05707 #if SU_HAVE_INLINE 05708 su_inline 05709 sip_priority_t *sip_priority_dup(su_home_t *home, sip_priority_t const *hdr) 05710 { 05711 return (sip_priority_t *) 05712 msg_header_dup_as(home, sip_priority_class, (msg_header_t const *)hdr); 05713 } 05714 #endif 05715 05744 #if SU_HAVE_INLINE 05745 su_inline 05746 #endif 05747 sip_priority_t *sip_priority_copy(su_home_t *home, sip_priority_t const *hdr) 05748 __attribute__((__malloc__)); 05749 05750 #if SU_HAVE_INLINE 05751 su_inline 05752 sip_priority_t *sip_priority_copy(su_home_t *home, sip_priority_t const *hdr) 05753 { 05754 return (sip_priority_t *) 05755 msg_header_copy_as(home, sip_priority_class, (msg_header_t const *)hdr); 05756 } 05757 #endif 05758 05774 #if SU_HAVE_INLINE 05775 su_inline 05776 #endif 05777 sip_priority_t *sip_priority_make(su_home_t *home, char const *s) 05778 __attribute__((__malloc__)); 05779 05780 #if SU_HAVE_INLINE 05781 su_inline sip_priority_t *sip_priority_make(su_home_t *home, char const *s) 05782 { 05783 return (sip_priority_t *)sip_header_make(home, sip_priority_class, s); 05784 } 05785 #endif 05786 05805 #if SU_HAVE_INLINE 05806 su_inline 05807 #endif 05808 sip_priority_t *sip_priority_format(su_home_t *home, char const *fmt, ...) 05809 __attribute__((__malloc__, __format__ (printf, 2, 3))); 05810 05811 #if SU_HAVE_INLINE 05812 su_inline sip_priority_t *sip_priority_format(su_home_t *home, char const *fmt, ...) 05813 { 05814 sip_header_t *h; 05815 va_list ap; 05816 05817 va_start(ap, fmt); 05818 h = sip_header_vformat(home, sip_priority_class, fmt, ap); 05819 va_end(ap); 05820 05821 return (sip_priority_t *)h; 05822 } 05823 #endif 05824 05832 SOFIAPUBFUN issize_t sip_call_info_d(su_home_t *, msg_header_t *, 05833 char *s, isize_t slen); 05834 05836 SOFIAPUBFUN issize_t sip_call_info_e(char b[], isize_t bsiz, 05837 msg_header_t const *h, int flags); 05838 05843 #define sip_call_info(sip) \ 05844 ((sip_call_info_t *)msg_header_access((msg_pub_t*)(sip), sip_call_info_class)) 05845 05860 #define SIP_CALL_INFO_INIT() SIP_HDR_INIT(call_info) 05861 05877 #if SU_HAVE_INLINE 05878 su_inline sip_call_info_t *sip_call_info_init(sip_call_info_t x[1]) 05879 { 05880 return SIP_HEADER_INIT(x, sip_call_info_class, sizeof(sip_call_info_t)); 05881 } 05882 #else 05883 #define sip_call_info_init(x) \ 05884 SIP_HEADER_INIT(x, sip_call_info_class, sizeof(sip_call_info_t)) 05885 #endif 05886 05899 #if SU_HAVE_INLINE 05900 su_inline int sip_is_call_info(sip_header_t const *header) 05901 { 05902 return header && header->sh_class->hc_hash == sip_call_info_hash; 05903 } 05904 #else 05905 int sip_is_call_info(sip_header_t const *header); 05906 #endif 05907 05908 #define sip_call_info_p(h) sip_is_call_info((h)) 05909 05910 05939 #if SU_HAVE_INLINE 05940 su_inline 05941 #endif 05942 sip_call_info_t *sip_call_info_dup(su_home_t *home, sip_call_info_t const *hdr) 05943 __attribute__((__malloc__)); 05944 05945 #if SU_HAVE_INLINE 05946 su_inline 05947 sip_call_info_t *sip_call_info_dup(su_home_t *home, sip_call_info_t const *hdr) 05948 { 05949 return (sip_call_info_t *) 05950 msg_header_dup_as(home, sip_call_info_class, (msg_header_t const *)hdr); 05951 } 05952 #endif 05953 05982 #if SU_HAVE_INLINE 05983 su_inline 05984 #endif 05985 sip_call_info_t *sip_call_info_copy(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_copy(su_home_t *home, sip_call_info_t const *hdr) 05991 { 05992 return (sip_call_info_t *) 05993 msg_header_copy_as(home, sip_call_info_class, (msg_header_t const *)hdr); 05994 } 05995 #endif 05996 06012 #if SU_HAVE_INLINE 06013 su_inline 06014 #endif 06015 sip_call_info_t *sip_call_info_make(su_home_t *home, char const *s) 06016 __attribute__((__malloc__)); 06017 06018 #if SU_HAVE_INLINE 06019 su_inline sip_call_info_t *sip_call_info_make(su_home_t *home, char const *s) 06020 { 06021 return (sip_call_info_t *)sip_header_make(home, sip_call_info_class, s); 06022 } 06023 #endif 06024 06043 #if SU_HAVE_INLINE 06044 su_inline 06045 #endif 06046 sip_call_info_t *sip_call_info_format(su_home_t *home, char const *fmt, ...) 06047 __attribute__((__malloc__, __format__ (printf, 2, 3))); 06048 06049 #if SU_HAVE_INLINE 06050 su_inline sip_call_info_t *sip_call_info_format(su_home_t *home, char const *fmt, ...) 06051 { 06052 sip_header_t *h; 06053 va_list ap; 06054 06055 va_start(ap, fmt); 06056 h = sip_header_vformat(home, sip_call_info_class, fmt, ap); 06057 va_end(ap); 06058 06059 return (sip_call_info_t *)h; 06060 } 06061 #endif 06062 06070 SOFIAPUBFUN issize_t sip_organization_d(su_home_t *, msg_header_t *, 06071 char *s, isize_t slen); 06072 06074 SOFIAPUBFUN issize_t sip_organization_e(char b[], isize_t bsiz, 06075 msg_header_t const *h, int flags); 06076 06081 #define sip_organization(sip) \ 06082 ((sip_organization_t *)msg_header_access((msg_pub_t*)(sip), sip_organization_class)) 06083 06098 #define SIP_ORGANIZATION_INIT() SIP_HDR_INIT(organization) 06099 06115 #if SU_HAVE_INLINE 06116 su_inline sip_organization_t *sip_organization_init(sip_organization_t x[1]) 06117 { 06118 return SIP_HEADER_INIT(x, sip_organization_class, sizeof(sip_organization_t)); 06119 } 06120 #else 06121 #define sip_organization_init(x) \ 06122 SIP_HEADER_INIT(x, sip_organization_class, sizeof(sip_organization_t)) 06123 #endif 06124 06137 #if SU_HAVE_INLINE 06138 su_inline int sip_is_organization(sip_header_t const *header) 06139 { 06140 return header && header->sh_class->hc_hash == sip_organization_hash; 06141 } 06142 #else 06143 int sip_is_organization(sip_header_t const *header); 06144 #endif 06145 06146 #define sip_organization_p(h) sip_is_organization((h)) 06147 06148 06177 #if SU_HAVE_INLINE 06178 su_inline 06179 #endif 06180 sip_organization_t *sip_organization_dup(su_home_t *home, sip_organization_t const *hdr) 06181 __attribute__((__malloc__)); 06182 06183 #if SU_HAVE_INLINE 06184 su_inline 06185 sip_organization_t *sip_organization_dup(su_home_t *home, sip_organization_t const *hdr) 06186 { 06187 return (sip_organization_t *) 06188 msg_header_dup_as(home, sip_organization_class, (msg_header_t const *)hdr); 06189 } 06190 #endif 06191 06220 #if SU_HAVE_INLINE 06221 su_inline 06222 #endif 06223 sip_organization_t *sip_organization_copy(su_home_t *home, sip_organization_t const *hdr) 06224 __attribute__((__malloc__)); 06225 06226 #if SU_HAVE_INLINE 06227 su_inline 06228 sip_organization_t *sip_organization_copy(su_home_t *home, sip_organization_t const *hdr) 06229 { 06230 return (sip_organization_t *) 06231 msg_header_copy_as(home, sip_organization_class, (msg_header_t const *)hdr); 06232 } 06233 #endif 06234 06250 #if SU_HAVE_INLINE 06251 su_inline 06252 #endif 06253 sip_organization_t *sip_organization_make(su_home_t *home, char const *s) 06254 __attribute__((__malloc__)); 06255 06256 #if SU_HAVE_INLINE 06257 su_inline sip_organization_t *sip_organization_make(su_home_t *home, char const *s) 06258 { 06259 return (sip_organization_t *)sip_header_make(home, sip_organization_class, s); 06260 } 06261 #endif 06262 06281 #if SU_HAVE_INLINE 06282 su_inline 06283 #endif 06284 sip_organization_t *sip_organization_format(su_home_t *home, char const *fmt, ...) 06285 __attribute__((__malloc__, __format__ (printf, 2, 3))); 06286 06287 #if SU_HAVE_INLINE 06288 su_inline sip_organization_t *sip_organization_format(su_home_t *home, char const *fmt, ...) 06289 { 06290 sip_header_t *h; 06291 va_list ap; 06292 06293 va_start(ap, fmt); 06294 h = sip_header_vformat(home, sip_organization_class, fmt, ap); 06295 va_end(ap); 06296 06297 return (sip_organization_t *)h; 06298 } 06299 #endif 06300 06308 SOFIAPUBFUN issize_t sip_server_d(su_home_t *, msg_header_t *, 06309 char *s, isize_t slen); 06310 06312 SOFIAPUBFUN issize_t sip_server_e(char b[], isize_t bsiz, 06313 msg_header_t const *h, int flags); 06314 06319 #define sip_server(sip) \ 06320 ((sip_server_t *)msg_header_access((msg_pub_t*)(sip), sip_server_class)) 06321 06336 #define SIP_SERVER_INIT() SIP_HDR_INIT(server) 06337 06353 #if SU_HAVE_INLINE 06354 su_inline sip_server_t *sip_server_init(sip_server_t x[1]) 06355 { 06356 return SIP_HEADER_INIT(x, sip_server_class, sizeof(sip_server_t)); 06357 } 06358 #else 06359 #define sip_server_init(x) \ 06360 SIP_HEADER_INIT(x, sip_server_class, sizeof(sip_server_t)) 06361 #endif 06362 06375 #if SU_HAVE_INLINE 06376 su_inline int sip_is_server(sip_header_t const *header) 06377 { 06378 return header && header->sh_class->hc_hash == sip_server_hash; 06379 } 06380 #else 06381 int sip_is_server(sip_header_t const *header); 06382 #endif 06383 06384 #define sip_server_p(h) sip_is_server((h)) 06385 06386 06415 #if SU_HAVE_INLINE 06416 su_inline 06417 #endif 06418 sip_server_t *sip_server_dup(su_home_t *home, sip_server_t const *hdr) 06419 __attribute__((__malloc__)); 06420 06421 #if SU_HAVE_INLINE 06422 su_inline 06423 sip_server_t *sip_server_dup(su_home_t *home, sip_server_t const *hdr) 06424 { 06425 return (sip_server_t *) 06426 msg_header_dup_as(home, sip_server_class, (msg_header_t const *)hdr); 06427 } 06428 #endif 06429 06458 #if SU_HAVE_INLINE 06459 su_inline 06460 #endif 06461 sip_server_t *sip_server_copy(su_home_t *home, sip_server_t const *hdr) 06462 __attribute__((__malloc__)); 06463 06464 #if SU_HAVE_INLINE 06465 su_inline 06466 sip_server_t *sip_server_copy(su_home_t *home, sip_server_t const *hdr) 06467 { 06468 return (sip_server_t *) 06469 msg_header_copy_as(home, sip_server_class, (msg_header_t const *)hdr); 06470 } 06471 #endif 06472 06488 #if SU_HAVE_INLINE 06489 su_inline 06490 #endif 06491 sip_server_t *sip_server_make(su_home_t *home, char const *s) 06492 __attribute__((__malloc__)); 06493 06494 #if SU_HAVE_INLINE 06495 su_inline sip_server_t *sip_server_make(su_home_t *home, char const *s) 06496 { 06497 return (sip_server_t *)sip_header_make(home, sip_server_class, s); 06498 } 06499 #endif 06500 06519 #if SU_HAVE_INLINE 06520 su_inline 06521 #endif 06522 sip_server_t *sip_server_format(su_home_t *home, char const *fmt, ...) 06523 __attribute__((__malloc__, __format__ (printf, 2, 3))); 06524 06525 #if SU_HAVE_INLINE 06526 su_inline sip_server_t *sip_server_format(su_home_t *home, char const *fmt, ...) 06527 { 06528 sip_header_t *h; 06529 va_list ap; 06530 06531 va_start(ap, fmt); 06532 h = sip_header_vformat(home, sip_server_class, fmt, ap); 06533 va_end(ap); 06534 06535 return (sip_server_t *)h; 06536 } 06537 #endif 06538 06546 SOFIAPUBFUN issize_t sip_user_agent_d(su_home_t *, msg_header_t *, 06547 char *s, isize_t slen); 06548 06550 SOFIAPUBFUN issize_t sip_user_agent_e(char b[], isize_t bsiz, 06551 msg_header_t const *h, int flags); 06552 06557 #define sip_user_agent(sip) \ 06558 ((sip_user_agent_t *)msg_header_access((msg_pub_t*)(sip), sip_user_agent_class)) 06559 06574 #define SIP_USER_AGENT_INIT() SIP_HDR_INIT(user_agent) 06575 06591 #if SU_HAVE_INLINE 06592 su_inline sip_user_agent_t *sip_user_agent_init(sip_user_agent_t x[1]) 06593 { 06594 return SIP_HEADER_INIT(x, sip_user_agent_class, sizeof(sip_user_agent_t)); 06595 } 06596 #else 06597 #define sip_user_agent_init(x) \ 06598 SIP_HEADER_INIT(x, sip_user_agent_class, sizeof(sip_user_agent_t)) 06599 #endif 06600 06613 #if SU_HAVE_INLINE 06614 su_inline int sip_is_user_agent(sip_header_t const *header) 06615 { 06616 return header && header->sh_class->hc_hash == sip_user_agent_hash; 06617 } 06618 #else 06619 int sip_is_user_agent(sip_header_t const *header); 06620 #endif 06621 06622 #define sip_user_agent_p(h) sip_is_user_agent((h)) 06623 06624 06653 #if SU_HAVE_INLINE 06654 su_inline 06655 #endif 06656 sip_user_agent_t *sip_user_agent_dup(su_home_t *home, sip_user_agent_t const *hdr) 06657 __attribute__((__malloc__)); 06658 06659 #if SU_HAVE_INLINE 06660 su_inline 06661 sip_user_agent_t *sip_user_agent_dup(su_home_t *home, sip_user_agent_t const *hdr) 06662 { 06663 return (sip_user_agent_t *) 06664 msg_header_dup_as(home, sip_user_agent_class, (msg_header_t const *)hdr); 06665 } 06666 #endif 06667 06696 #if SU_HAVE_INLINE 06697 su_inline 06698 #endif 06699 sip_user_agent_t *sip_user_agent_copy(su_home_t *home, sip_user_agent_t const *hdr) 06700 __attribute__((__malloc__)); 06701 06702 #if SU_HAVE_INLINE 06703 su_inline 06704 sip_user_agent_t *sip_user_agent_copy(su_home_t *home, sip_user_agent_t const *hdr) 06705 { 06706 return (sip_user_agent_t *) 06707 msg_header_copy_as(home, sip_user_agent_class, (msg_header_t const *)hdr); 06708 } 06709 #endif 06710 06726 #if SU_HAVE_INLINE 06727 su_inline 06728 #endif 06729 sip_user_agent_t *sip_user_agent_make(su_home_t *home, char const *s) 06730 __attribute__((__malloc__)); 06731 06732 #if SU_HAVE_INLINE 06733 su_inline sip_user_agent_t *sip_user_agent_make(su_home_t *home, char const *s) 06734 { 06735 return (sip_user_agent_t *)sip_header_make(home, sip_user_agent_class, s); 06736 } 06737 #endif 06738 06757 #if SU_HAVE_INLINE 06758 su_inline 06759 #endif 06760 sip_user_agent_t *sip_user_agent_format(su_home_t *home, char const *fmt, ...) 06761 __attribute__((__malloc__, __format__ (printf, 2, 3))); 06762 06763 #if SU_HAVE_INLINE 06764 su_inline sip_user_agent_t *sip_user_agent_format(su_home_t *home, char const *fmt, ...) 06765 { 06766 sip_header_t *h; 06767 va_list ap; 06768 06769 va_start(ap, fmt); 06770 h = sip_header_vformat(home, sip_user_agent_class, fmt, ap); 06771 va_end(ap); 06772 06773 return (sip_user_agent_t *)h; 06774 } 06775 #endif 06776 06784 SOFIAPUBFUN issize_t sip_in_reply_to_d(su_home_t *, msg_header_t *, 06785 char *s, isize_t slen); 06786 06788 SOFIAPUBFUN issize_t sip_in_reply_to_e(char b[], isize_t bsiz, 06789 msg_header_t const *h, int flags); 06790 06795 #define sip_in_reply_to(sip) \ 06796 ((sip_in_reply_to_t *)msg_header_access((msg_pub_t*)(sip), sip_in_reply_to_class)) 06797 06812 #define SIP_IN_REPLY_TO_INIT() SIP_HDR_INIT(in_reply_to) 06813 06829 #if SU_HAVE_INLINE 06830 su_inline sip_in_reply_to_t *sip_in_reply_to_init(sip_in_reply_to_t x[1]) 06831 { 06832 return SIP_HEADER_INIT(x, sip_in_reply_to_class, sizeof(sip_in_reply_to_t)); 06833 } 06834 #else 06835 #define sip_in_reply_to_init(x) \ 06836 SIP_HEADER_INIT(x, sip_in_reply_to_class, sizeof(sip_in_reply_to_t)) 06837 #endif 06838 06851 #if SU_HAVE_INLINE 06852 su_inline int sip_is_in_reply_to(sip_header_t const *header) 06853 { 06854 return header && header->sh_class->hc_hash == sip_in_reply_to_hash; 06855 } 06856 #else 06857 int sip_is_in_reply_to(sip_header_t const *header); 06858 #endif 06859 06860 #define sip_in_reply_to_p(h) sip_is_in_reply_to((h)) 06861 06862 06891 #if SU_HAVE_INLINE 06892 su_inline 06893 #endif 06894 sip_in_reply_to_t *sip_in_reply_to_dup(su_home_t *home, sip_in_reply_to_t const *hdr) 06895 __attribute__((__malloc__)); 06896 06897 #if SU_HAVE_INLINE 06898 su_inline 06899 sip_in_reply_to_t *sip_in_reply_to_dup(su_home_t *home, sip_in_reply_to_t const *hdr) 06900 { 06901 return (sip_in_reply_to_t *) 06902 msg_header_dup_as(home, sip_in_reply_to_class, (msg_header_t const *)hdr); 06903 } 06904 #endif 06905 06934 #if SU_HAVE_INLINE 06935 su_inline 06936 #endif 06937 sip_in_reply_to_t *sip_in_reply_to_copy(su_home_t *home, sip_in_reply_to_t const *hdr) 06938 __attribute__((__malloc__)); 06939 06940 #if SU_HAVE_INLINE 06941 su_inline 06942 sip_in_reply_to_t *sip_in_reply_to_copy(su_home_t *home, sip_in_reply_to_t const *hdr) 06943 { 06944 return (sip_in_reply_to_t *) 06945 msg_header_copy_as(home, sip_in_reply_to_class, (msg_header_t const *)hdr); 06946 } 06947 #endif 06948 06964 #if SU_HAVE_INLINE 06965 su_inline 06966 #endif 06967 sip_in_reply_to_t *sip_in_reply_to_make(su_home_t *home, char const *s) 06968 __attribute__((__malloc__)); 06969 06970 #if SU_HAVE_INLINE 06971 su_inline sip_in_reply_to_t *sip_in_reply_to_make(su_home_t *home, char const *s) 06972 { 06973 return (sip_in_reply_to_t *)sip_header_make(home, sip_in_reply_to_class, s); 06974 } 06975 #endif 06976 06995 #if SU_HAVE_INLINE 06996 su_inline 06997 #endif 06998 sip_in_reply_to_t *sip_in_reply_to_format(su_home_t *home, char const *fmt, ...) 06999 __attribute__((__malloc__, __format__ (printf, 2, 3))); 07000 07001 #if SU_HAVE_INLINE 07002 su_inline sip_in_reply_to_t *sip_in_reply_to_format(su_home_t *home, char const *fmt, ...) 07003 { 07004 sip_header_t *h; 07005 va_list ap; 07006 07007 va_start(ap, fmt); 07008 h = sip_header_vformat(home, sip_in_reply_to_class, fmt, ap); 07009 va_end(ap); 07010 07011 return (sip_in_reply_to_t *)h; 07012 } 07013 #endif 07014 07022 SOFIAPUBFUN issize_t sip_accept_d(su_home_t *, msg_header_t *, 07023 char *s, isize_t slen); 07024 07026 SOFIAPUBFUN issize_t sip_accept_e(char b[], isize_t bsiz, 07027 msg_header_t const *h, int flags); 07028 07033 #define sip_accept(sip) \ 07034 ((sip_accept_t *)msg_header_access((msg_pub_t*)(sip), sip_accept_class)) 07035 07050 #define SIP_ACCEPT_INIT() SIP_HDR_INIT(accept) 07051 07067 #if SU_HAVE_INLINE 07068 su_inline sip_accept_t *sip_accept_init(sip_accept_t x[1]) 07069 { 07070 return SIP_HEADER_INIT(x, sip_accept_class, sizeof(sip_accept_t)); 07071 } 07072 #else 07073 #define sip_accept_init(x) \ 07074 SIP_HEADER_INIT(x, sip_accept_class, sizeof(sip_accept_t)) 07075 #endif 07076 07089 #if SU_HAVE_INLINE 07090 su_inline int sip_is_accept(sip_header_t const *header) 07091 { 07092 return header && header->sh_class->hc_hash == sip_accept_hash; 07093 } 07094 #else 07095 int sip_is_accept(sip_header_t const *header); 07096 #endif 07097 07098 #define sip_accept_p(h) sip_is_accept((h)) 07099 07100 07129 #if SU_HAVE_INLINE 07130 su_inline 07131 #endif 07132 sip_accept_t *sip_accept_dup(su_home_t *home, sip_accept_t const *hdr) 07133 __attribute__((__malloc__)); 07134 07135 #if SU_HAVE_INLINE 07136 su_inline 07137 sip_accept_t *sip_accept_dup(su_home_t *home, sip_accept_t const *hdr) 07138 { 07139 return (sip_accept_t *) 07140 msg_header_dup_as(home, sip_accept_class, (msg_header_t const *)hdr); 07141 } 07142 #endif 07143 07172 #if SU_HAVE_INLINE 07173 su_inline 07174 #endif 07175 sip_accept_t *sip_accept_copy(su_home_t *home, sip_accept_t const *hdr) 07176 __attribute__((__malloc__)); 07177 07178 #if SU_HAVE_INLINE 07179 su_inline 07180 sip_accept_t *sip_accept_copy(su_home_t *home, sip_accept_t const *hdr) 07181 { 07182 return (sip_accept_t *) 07183 msg_header_copy_as(home, sip_accept_class, (msg_header_t const *)hdr); 07184 } 07185 #endif 07186 07202 #if SU_HAVE_INLINE 07203 su_inline 07204 #endif 07205 sip_accept_t *sip_accept_make(su_home_t *home, char const *s) 07206 __attribute__((__malloc__)); 07207 07208 #if SU_HAVE_INLINE 07209 su_inline sip_accept_t *sip_accept_make(su_home_t *home, char const *s) 07210 { 07211 return (sip_accept_t *)sip_header_make(home, sip_accept_class, s); 07212 } 07213 #endif 07214 07233 #if SU_HAVE_INLINE 07234 su_inline 07235 #endif 07236 sip_accept_t *sip_accept_format(su_home_t *home, char const *fmt, ...) 07237 __attribute__((__malloc__, __format__ (printf, 2, 3))); 07238 07239 #if SU_HAVE_INLINE 07240 su_inline sip_accept_t *sip_accept_format(su_home_t *home, char const *fmt, ...) 07241 { 07242 sip_header_t *h; 07243 va_list ap; 07244 07245 va_start(ap, fmt); 07246 h = sip_header_vformat(home, sip_accept_class, fmt, ap); 07247 va_end(ap); 07248 07249 return (sip_accept_t *)h; 07250 } 07251 #endif 07252 07260 SOFIAPUBFUN issize_t sip_accept_encoding_d(su_home_t *, msg_header_t *, 07261 char *s, isize_t slen); 07262 07264 SOFIAPUBFUN issize_t sip_accept_encoding_e(char b[], isize_t bsiz, 07265 msg_header_t const *h, int flags); 07266 07271 #define sip_accept_encoding(sip) \ 07272 ((sip_accept_encoding_t *)msg_header_access((msg_pub_t*)(sip), sip_accept_encoding_class)) 07273 07288 #define SIP_ACCEPT_ENCODING_INIT() SIP_HDR_INIT(accept_encoding) 07289 07305 #if SU_HAVE_INLINE 07306 su_inline sip_accept_encoding_t *sip_accept_encoding_init(sip_accept_encoding_t x[1]) 07307 { 07308 return SIP_HEADER_INIT(x, sip_accept_encoding_class, sizeof(sip_accept_encoding_t)); 07309 } 07310 #else 07311 #define sip_accept_encoding_init(x) \ 07312 SIP_HEADER_INIT(x, sip_accept_encoding_class, sizeof(sip_accept_encoding_t)) 07313 #endif 07314 07327 #if SU_HAVE_INLINE 07328 su_inline int sip_is_accept_encoding(sip_header_t const *header) 07329 { 07330 return header && header->sh_class->hc_hash == sip_accept_encoding_hash; 07331 } 07332 #else 07333 int sip_is_accept_encoding(sip_header_t const *header); 07334 #endif 07335 07336 #define sip_accept_encoding_p(h) sip_is_accept_encoding((h)) 07337 07338 07367 #if SU_HAVE_INLINE 07368 su_inline 07369 #endif 07370 sip_accept_encoding_t *sip_accept_encoding_dup(su_home_t *home, sip_accept_encoding_t const *hdr) 07371 __attribute__((__malloc__)); 07372 07373 #if SU_HAVE_INLINE 07374 su_inline 07375 sip_accept_encoding_t *sip_accept_encoding_dup(su_home_t *home, sip_accept_encoding_t const *hdr) 07376 { 07377 return (sip_accept_encoding_t *) 07378 msg_header_dup_as(home, sip_accept_encoding_class, (msg_header_t const *)hdr); 07379 } 07380 #endif 07381 07410 #if SU_HAVE_INLINE 07411 su_inline 07412 #endif 07413 sip_accept_encoding_t *sip_accept_encoding_copy(su_home_t *home, sip_accept_encoding_t const *hdr) 07414 __attribute__((__malloc__)); 07415 07416 #if SU_HAVE_INLINE 07417 su_inline 07418 sip_accept_encoding_t *sip_accept_encoding_copy(su_home_t *home, sip_accept_encoding_t const *hdr) 07419 { 07420 return (sip_accept_encoding_t *) 07421 msg_header_copy_as(home, sip_accept_encoding_class, (msg_header_t const *)hdr); 07422 } 07423 #endif 07424 07440 #if SU_HAVE_INLINE 07441 su_inline 07442 #endif 07443 sip_accept_encoding_t *sip_accept_encoding_make(su_home_t *home, char const *s) 07444 __attribute__((__malloc__)); 07445 07446 #if SU_HAVE_INLINE 07447 su_inline sip_accept_encoding_t *sip_accept_encoding_make(su_home_t *home, char const *s) 07448 { 07449 return (sip_accept_encoding_t *)sip_header_make(home, sip_accept_encoding_class, s); 07450 } 07451 #endif 07452 07471 #if SU_HAVE_INLINE 07472 su_inline 07473 #endif 07474 sip_accept_encoding_t *sip_accept_encoding_format(su_home_t *home, char const *fmt, ...) 07475 __attribute__((__malloc__, __format__ (printf, 2, 3))); 07476 07477 #if SU_HAVE_INLINE 07478 su_inline sip_accept_encoding_t *sip_accept_encoding_format(su_home_t *home, char const *fmt, ...) 07479 { 07480 sip_header_t *h; 07481 va_list ap; 07482 07483 va_start(ap, fmt); 07484 h = sip_header_vformat(home, sip_accept_encoding_class, fmt, ap); 07485 va_end(ap); 07486 07487 return (sip_accept_encoding_t *)h; 07488 } 07489 #endif 07490 07498 SOFIAPUBFUN issize_t sip_accept_language_d(su_home_t *, msg_header_t *, 07499 char *s, isize_t slen); 07500 07502 SOFIAPUBFUN issize_t sip_accept_language_e(char b[], isize_t bsiz, 07503 msg_header_t const *h, int flags); 07504 07509 #define sip_accept_language(sip) \ 07510 ((sip_accept_language_t *)msg_header_access((msg_pub_t*)(sip), sip_accept_language_class)) 07511 07526 #define SIP_ACCEPT_LANGUAGE_INIT() SIP_HDR_INIT(accept_language) 07527 07543 #if SU_HAVE_INLINE 07544 su_inline sip_accept_language_t *sip_accept_language_init(sip_accept_language_t x[1]) 07545 { 07546 return SIP_HEADER_INIT(x, sip_accept_language_class, sizeof(sip_accept_language_t)); 07547 } 07548 #else 07549 #define sip_accept_language_init(x) \ 07550 SIP_HEADER_INIT(x, sip_accept_language_class, sizeof(sip_accept_language_t)) 07551 #endif 07552 07565 #if SU_HAVE_INLINE 07566 su_inline int sip_is_accept_language(sip_header_t const *header) 07567 { 07568 return header && header->sh_class->hc_hash == sip_accept_language_hash; 07569 } 07570 #else 07571 int sip_is_accept_language(sip_header_t const *header); 07572 #endif 07573 07574 #define sip_accept_language_p(h) sip_is_accept_language((h)) 07575 07576 07605 #if SU_HAVE_INLINE 07606 su_inline 07607 #endif 07608 sip_accept_language_t *sip_accept_language_dup(su_home_t *home, sip_accept_language_t const *hdr) 07609 __attribute__((__malloc__)); 07610 07611 #if SU_HAVE_INLINE 07612 su_inline 07613 sip_accept_language_t *sip_accept_language_dup(su_home_t *home, sip_accept_language_t const *hdr) 07614 { 07615 return (sip_accept_language_t *) 07616 msg_header_dup_as(home, sip_accept_language_class, (msg_header_t const *)hdr); 07617 } 07618 #endif 07619 07648 #if SU_HAVE_INLINE 07649 su_inline 07650 #endif 07651 sip_accept_language_t *sip_accept_language_copy(su_home_t *home, sip_accept_language_t const *hdr) 07652 __attribute__((__malloc__)); 07653 07654 #if SU_HAVE_INLINE 07655 su_inline 07656 sip_accept_language_t *sip_accept_language_copy(su_home_t *home, sip_accept_language_t const *hdr) 07657 { 07658 return (sip_accept_language_t *) 07659 msg_header_copy_as(home, sip_accept_language_class, (msg_header_t const *)hdr); 07660 } 07661 #endif 07662 07678 #if SU_HAVE_INLINE 07679 su_inline 07680 #endif 07681 sip_accept_language_t *sip_accept_language_make(su_home_t *home, char const *s) 07682 __attribute__((__malloc__)); 07683 07684 #if SU_HAVE_INLINE 07685 su_inline sip_accept_language_t *sip_accept_language_make(su_home_t *home, char const *s) 07686 { 07687 return (sip_accept_language_t *)sip_header_make(home, sip_accept_language_class, s); 07688 } 07689 #endif 07690 07709 #if SU_HAVE_INLINE 07710 su_inline 07711 #endif 07712 sip_accept_language_t *sip_accept_language_format(su_home_t *home, char const *fmt, ...) 07713 __attribute__((__malloc__, __format__ (printf, 2, 3))); 07714 07715 #if SU_HAVE_INLINE 07716 su_inline sip_accept_language_t *sip_accept_language_format(su_home_t *home, char const *fmt, ...) 07717 { 07718 sip_header_t *h; 07719 va_list ap; 07720 07721 va_start(ap, fmt); 07722 h = sip_header_vformat(home, sip_accept_language_class, fmt, ap); 07723 va_end(ap); 07724 07725 return (sip_accept_language_t *)h; 07726 } 07727 #endif 07728 07736 SOFIAPUBFUN issize_t sip_allow_d(su_home_t *, msg_header_t *, 07737 char *s, isize_t slen); 07738 07740 SOFIAPUBFUN issize_t sip_allow_e(char b[], isize_t bsiz, 07741 msg_header_t const *h, int flags); 07742 07747 #define sip_allow(sip) \ 07748 ((sip_allow_t *)msg_header_access((msg_pub_t*)(sip), sip_allow_class)) 07749 07764 #define SIP_ALLOW_INIT() SIP_HDR_INIT(allow) 07765 07781 #if SU_HAVE_INLINE 07782 su_inline sip_allow_t *sip_allow_init(sip_allow_t x[1]) 07783 { 07784 return SIP_HEADER_INIT(x, sip_allow_class, sizeof(sip_allow_t)); 07785 } 07786 #else 07787 #define sip_allow_init(x) \ 07788 SIP_HEADER_INIT(x, sip_allow_class, sizeof(sip_allow_t)) 07789 #endif 07790 07803 #if SU_HAVE_INLINE 07804 su_inline int sip_is_allow(sip_header_t const *header) 07805 { 07806 return header && header->sh_class->hc_hash == sip_allow_hash; 07807 } 07808 #else 07809 int sip_is_allow(sip_header_t const *header); 07810 #endif 07811 07812 #define sip_allow_p(h) sip_is_allow((h)) 07813 07814 07843 #if SU_HAVE_INLINE 07844 su_inline 07845 #endif 07846 sip_allow_t *sip_allow_dup(su_home_t *home, sip_allow_t const *hdr) 07847 __attribute__((__malloc__)); 07848 07849 #if SU_HAVE_INLINE 07850 su_inline 07851 sip_allow_t *sip_allow_dup(su_home_t *home, sip_allow_t const *hdr) 07852 { 07853 return (sip_allow_t *) 07854 msg_header_dup_as(home, sip_allow_class, (msg_header_t const *)hdr); 07855 } 07856 #endif 07857 07886 #if SU_HAVE_INLINE 07887 su_inline 07888 #endif 07889 sip_allow_t *sip_allow_copy(su_home_t *home, sip_allow_t const *hdr) 07890 __attribute__((__malloc__)); 07891 07892 #if SU_HAVE_INLINE 07893 su_inline 07894 sip_allow_t *sip_allow_copy(su_home_t *home, sip_allow_t const *hdr) 07895 { 07896 return (sip_allow_t *) 07897 msg_header_copy_as(home, sip_allow_class, (msg_header_t const *)hdr); 07898 } 07899 #endif 07900 07916 #if SU_HAVE_INLINE 07917 su_inline 07918 #endif 07919 sip_allow_t *sip_allow_make(su_home_t *home, char const *s) 07920 __attribute__((__malloc__)); 07921 07922 #if SU_HAVE_INLINE 07923 su_inline sip_allow_t *sip_allow_make(su_home_t *home, char const *s) 07924 { 07925 return (sip_allow_t *)sip_header_make(home, sip_allow_class, s); 07926 } 07927 #endif 07928 07947 #if SU_HAVE_INLINE 07948 su_inline 07949 #endif 07950 sip_allow_t *sip_allow_format(su_home_t *home, char const *fmt, ...) 07951 __attribute__((__malloc__, __format__ (printf, 2, 3))); 07952 07953 #if SU_HAVE_INLINE 07954 su_inline sip_allow_t *sip_allow_format(su_home_t *home, char const *fmt, ...) 07955 { 07956 sip_header_t *h; 07957 va_list ap; 07958 07959 va_start(ap, fmt); 07960 h = sip_header_vformat(home, sip_allow_class, fmt, ap); 07961 va_end(ap); 07962 07963 return (sip_allow_t *)h; 07964 } 07965 #endif 07966 07974 SOFIAPUBFUN issize_t sip_require_d(su_home_t *, msg_header_t *, 07975 char *s, isize_t slen); 07976 07978 SOFIAPUBFUN issize_t sip_require_e(char b[], isize_t bsiz, 07979 msg_header_t const *h, int flags); 07980 07985 #define sip_require(sip) \ 07986 ((sip_require_t *)msg_header_access((msg_pub_t*)(sip), sip_require_class)) 07987 08002 #define SIP_REQUIRE_INIT() SIP_HDR_INIT(require) 08003 08019 #if SU_HAVE_INLINE 08020 su_inline sip_require_t *sip_require_init(sip_require_t x[1]) 08021 { 08022 return SIP_HEADER_INIT(x, sip_require_class, sizeof(sip_require_t)); 08023 } 08024 #else 08025 #define sip_require_init(x) \ 08026 SIP_HEADER_INIT(x, sip_require_class, sizeof(sip_require_t)) 08027 #endif 08028 08041 #if SU_HAVE_INLINE 08042 su_inline int sip_is_require(sip_header_t const *header) 08043 { 08044 return header && header->sh_class->hc_hash == sip_require_hash; 08045 } 08046 #else 08047 int sip_is_require(sip_header_t const *header); 08048 #endif 08049 08050 #define sip_require_p(h) sip_is_require((h)) 08051 08052 08081 #if SU_HAVE_INLINE 08082 su_inline 08083 #endif 08084 sip_require_t *sip_require_dup(su_home_t *home, sip_require_t const *hdr) 08085 __attribute__((__malloc__)); 08086 08087 #if SU_HAVE_INLINE 08088 su_inline 08089 sip_require_t *sip_require_dup(su_home_t *home, sip_require_t const *hdr) 08090 { 08091 return (sip_require_t *) 08092 msg_header_dup_as(home, sip_require_class, (msg_header_t const *)hdr); 08093 } 08094 #endif 08095 08124 #if SU_HAVE_INLINE 08125 su_inline 08126 #endif 08127 sip_require_t *sip_require_copy(su_home_t *home, sip_require_t const *hdr) 08128 __attribute__((__malloc__)); 08129 08130 #if SU_HAVE_INLINE 08131 su_inline 08132 sip_require_t *sip_require_copy(su_home_t *home, sip_require_t const *hdr) 08133 { 08134 return (sip_require_t *) 08135 msg_header_copy_as(home, sip_require_class, (msg_header_t const *)hdr); 08136 } 08137 #endif 08138 08154 #if SU_HAVE_INLINE 08155 su_inline 08156 #endif 08157 sip_require_t *sip_require_make(su_home_t *home, char const *s) 08158 __attribute__((__malloc__)); 08159 08160 #if SU_HAVE_INLINE 08161 su_inline sip_require_t *sip_require_make(su_home_t *home, char const *s) 08162 { 08163 return (sip_require_t *)sip_header_make(home, sip_require_class, s); 08164 } 08165 #endif 08166 08185 #if SU_HAVE_INLINE 08186 su_inline 08187 #endif 08188 sip_require_t *sip_require_format(su_home_t *home, char const *fmt, ...) 08189 __attribute__((__malloc__, __format__ (printf, 2, 3))); 08190 08191 #if SU_HAVE_INLINE 08192 su_inline sip_require_t *sip_require_format(su_home_t *home, char const *fmt, ...) 08193 { 08194 sip_header_t *h; 08195 va_list ap; 08196 08197 va_start(ap, fmt); 08198 h = sip_header_vformat(home, sip_require_class, fmt, ap); 08199 va_end(ap); 08200 08201 return (sip_require_t *)h; 08202 } 08203 #endif 08204 08212 SOFIAPUBFUN issize_t sip_supported_d(su_home_t *, msg_header_t *, 08213 char *s, isize_t slen); 08214 08216 SOFIAPUBFUN issize_t sip_supported_e(char b[], isize_t bsiz, 08217 msg_header_t const *h, int flags); 08218 08223 #define sip_supported(sip) \ 08224 ((sip_supported_t *)msg_header_access((msg_pub_t*)(sip), sip_supported_class)) 08225 08240 #define SIP_SUPPORTED_INIT() SIP_HDR_INIT(supported) 08241 08257 #if SU_HAVE_INLINE 08258 su_inline sip_supported_t *sip_supported_init(sip_supported_t x[1]) 08259 { 08260 return SIP_HEADER_INIT(x, sip_supported_class, sizeof(sip_supported_t)); 08261 } 08262 #else 08263 #define sip_supported_init(x) \ 08264 SIP_HEADER_INIT(x, sip_supported_class, sizeof(sip_supported_t)) 08265 #endif 08266 08279 #if SU_HAVE_INLINE 08280 su_inline int sip_is_supported(sip_header_t const *header) 08281 { 08282 return header && header->sh_class->hc_hash == sip_supported_hash; 08283 } 08284 #else 08285 int sip_is_supported(sip_header_t const *header); 08286 #endif 08287 08288 #define sip_supported_p(h) sip_is_supported((h)) 08289 08290 08319 #if SU_HAVE_INLINE 08320 su_inline 08321 #endif 08322 sip_supported_t *sip_supported_dup(su_home_t *home, sip_supported_t const *hdr) 08323 __attribute__((__malloc__)); 08324 08325 #if SU_HAVE_INLINE 08326 su_inline 08327 sip_supported_t *sip_supported_dup(su_home_t *home, sip_supported_t const *hdr) 08328 { 08329 return (sip_supported_t *) 08330 msg_header_dup_as(home, sip_supported_class, (msg_header_t const *)hdr); 08331 } 08332 #endif 08333 08362 #if SU_HAVE_INLINE 08363 su_inline 08364 #endif 08365 sip_supported_t *sip_supported_copy(su_home_t *home, sip_supported_t const *hdr) 08366 __attribute__((__malloc__)); 08367 08368 #if SU_HAVE_INLINE 08369 su_inline 08370 sip_supported_t *sip_supported_copy(su_home_t *home, sip_supported_t const *hdr) 08371 { 08372 return (sip_supported_t *) 08373 msg_header_copy_as(home, sip_supported_class, (msg_header_t const *)hdr); 08374 } 08375 #endif 08376 08392 #if SU_HAVE_INLINE 08393 su_inline 08394 #endif 08395 sip_supported_t *sip_supported_make(su_home_t *home, char const *s) 08396 __attribute__((__malloc__)); 08397 08398 #if SU_HAVE_INLINE 08399 su_inline sip_supported_t *sip_supported_make(su_home_t *home, char const *s) 08400 { 08401 return (sip_supported_t *)sip_header_make(home, sip_supported_class, s); 08402 } 08403 #endif 08404 08423 #if SU_HAVE_INLINE 08424 su_inline 08425 #endif 08426 sip_supported_t *sip_supported_format(su_home_t *home, char const *fmt, ...) 08427 __attribute__((__malloc__, __format__ (printf, 2, 3))); 08428 08429 #if SU_HAVE_INLINE 08430 su_inline sip_supported_t *sip_supported_format(su_home_t *home, char const *fmt, ...) 08431 { 08432 sip_header_t *h; 08433 va_list ap; 08434 08435 va_start(ap, fmt); 08436 h = sip_header_vformat(home, sip_supported_class, fmt, ap); 08437 va_end(ap); 08438 08439 return (sip_supported_t *)h; 08440 } 08441 #endif 08442 08450 SOFIAPUBFUN issize_t sip_unsupported_d(su_home_t *, msg_header_t *, 08451 char *s, isize_t slen); 08452 08454 SOFIAPUBFUN issize_t sip_unsupported_e(char b[], isize_t bsiz, 08455 msg_header_t const *h, int flags); 08456 08461 #define sip_unsupported(sip) \ 08462 ((sip_unsupported_t *)msg_header_access((msg_pub_t*)(sip), sip_unsupported_class)) 08463 08478 #define SIP_UNSUPPORTED_INIT() SIP_HDR_INIT(unsupported) 08479 08495 #if SU_HAVE_INLINE 08496 su_inline sip_unsupported_t *sip_unsupported_init(sip_unsupported_t x[1]) 08497 { 08498 return SIP_HEADER_INIT(x, sip_unsupported_class, sizeof(sip_unsupported_t)); 08499 } 08500 #else 08501 #define sip_unsupported_init(x) \ 08502 SIP_HEADER_INIT(x, sip_unsupported_class, sizeof(sip_unsupported_t)) 08503 #endif 08504 08517 #if SU_HAVE_INLINE 08518 su_inline int sip_is_unsupported(sip_header_t const *header) 08519 { 08520 return header && header->sh_class->hc_hash == sip_unsupported_hash; 08521 } 08522 #else 08523 int sip_is_unsupported(sip_header_t const *header); 08524 #endif 08525 08526 #define sip_unsupported_p(h) sip_is_unsupported((h)) 08527 08528 08557 #if SU_HAVE_INLINE 08558 su_inline 08559 #endif 08560 sip_unsupported_t *sip_unsupported_dup(su_home_t *home, sip_unsupported_t const *hdr) 08561 __attribute__((__malloc__)); 08562 08563 #if SU_HAVE_INLINE 08564 su_inline 08565 sip_unsupported_t *sip_unsupported_dup(su_home_t *home, sip_unsupported_t const *hdr) 08566 { 08567 return (sip_unsupported_t *) 08568 msg_header_dup_as(home, sip_unsupported_class, (msg_header_t const *)hdr); 08569 } 08570 #endif 08571 08600 #if SU_HAVE_INLINE 08601 su_inline 08602 #endif 08603 sip_unsupported_t *sip_unsupported_copy(su_home_t *home, sip_unsupported_t const *hdr) 08604 __attribute__((__malloc__)); 08605 08606 #if SU_HAVE_INLINE 08607 su_inline 08608 sip_unsupported_t *sip_unsupported_copy(su_home_t *home, sip_unsupported_t const *hdr) 08609 { 08610 return (sip_unsupported_t *) 08611 msg_header_copy_as(home, sip_unsupported_class, (msg_header_t const *)hdr); 08612 } 08613 #endif 08614 08630 #if SU_HAVE_INLINE 08631 su_inline 08632 #endif 08633 sip_unsupported_t *sip_unsupported_make(su_home_t *home, char const *s) 08634 __attribute__((__malloc__)); 08635 08636 #if SU_HAVE_INLINE 08637 su_inline sip_unsupported_t *sip_unsupported_make(su_home_t *home, char const *s) 08638 { 08639 return (sip_unsupported_t *)sip_header_make(home, sip_unsupported_class, s); 08640 } 08641 #endif 08642 08661 #if SU_HAVE_INLINE 08662 su_inline 08663 #endif 08664 sip_unsupported_t *sip_unsupported_format(su_home_t *home, char const *fmt, ...) 08665 __attribute__((__malloc__, __format__ (printf, 2, 3))); 08666 08667 #if SU_HAVE_INLINE 08668 su_inline sip_unsupported_t *sip_unsupported_format(su_home_t *home, char const *fmt, ...) 08669 { 08670 sip_header_t *h; 08671 va_list ap; 08672 08673 va_start(ap, fmt); 08674 h = sip_header_vformat(home, sip_unsupported_class, fmt, ap); 08675 va_end(ap); 08676 08677 return (sip_unsupported_t *)h; 08678 } 08679 #endif 08680 08688 SOFIAPUBFUN issize_t sip_event_d(su_home_t *, msg_header_t *, 08689 char *s, isize_t slen); 08690 08692 SOFIAPUBFUN issize_t sip_event_e(char b[], isize_t bsiz, 08693 msg_header_t const *h, int flags); 08694 08699 #define sip_event(sip) \ 08700 ((sip_event_t *)msg_header_access((msg_pub_t*)(sip), sip_event_class)) 08701 08716 #define SIP_EVENT_INIT() SIP_HDR_INIT(event) 08717 08733 #if SU_HAVE_INLINE 08734 su_inline sip_event_t *sip_event_init(sip_event_t x[1]) 08735 { 08736 return SIP_HEADER_INIT(x, sip_event_class, sizeof(sip_event_t)); 08737 } 08738 #else 08739 #define sip_event_init(x) \ 08740 SIP_HEADER_INIT(x, sip_event_class, sizeof(sip_event_t)) 08741 #endif 08742 08755 #if SU_HAVE_INLINE 08756 su_inline int sip_is_event(sip_header_t const *header) 08757 { 08758 return header && header->sh_class->hc_hash == sip_event_hash; 08759 } 08760 #else 08761 int sip_is_event(sip_header_t const *header); 08762 #endif 08763 08764 #define sip_event_p(h) sip_is_event((h)) 08765 08766 08795 #if SU_HAVE_INLINE 08796 su_inline 08797 #endif 08798 sip_event_t *sip_event_dup(su_home_t *home, sip_event_t const *hdr) 08799 __attribute__((__malloc__)); 08800 08801 #if SU_HAVE_INLINE 08802 su_inline 08803 sip_event_t *sip_event_dup(su_home_t *home, sip_event_t const *hdr) 08804 { 08805 return (sip_event_t *) 08806 msg_header_dup_as(home, sip_event_class, (msg_header_t const *)hdr); 08807 } 08808 #endif 08809 08838 #if SU_HAVE_INLINE 08839 su_inline 08840 #endif 08841 sip_event_t *sip_event_copy(su_home_t *home, sip_event_t const *hdr) 08842 __attribute__((__malloc__)); 08843 08844 #if SU_HAVE_INLINE 08845 su_inline 08846 sip_event_t *sip_event_copy(su_home_t *home, sip_event_t const *hdr) 08847 { 08848 return (sip_event_t *) 08849 msg_header_copy_as(home, sip_event_class, (msg_header_t const *)hdr); 08850 } 08851 #endif 08852 08868 #if SU_HAVE_INLINE 08869 su_inline 08870 #endif 08871 sip_event_t *sip_event_make(su_home_t *home, char const *s) 08872 __attribute__((__malloc__)); 08873 08874 #if SU_HAVE_INLINE 08875 su_inline sip_event_t *sip_event_make(su_home_t *home, char const *s) 08876 { 08877 return (sip_event_t *)sip_header_make(home, sip_event_class, s); 08878 } 08879 #endif 08880 08899 #if SU_HAVE_INLINE 08900 su_inline 08901 #endif 08902 sip_event_t *sip_event_format(su_home_t *home, char const *fmt, ...) 08903 __attribute__((__malloc__, __format__ (printf, 2, 3))); 08904 08905 #if SU_HAVE_INLINE 08906 su_inline sip_event_t *sip_event_format(su_home_t *home, char const *fmt, ...) 08907 { 08908 sip_header_t *h; 08909 va_list ap; 08910 08911 va_start(ap, fmt); 08912 h = sip_header_vformat(home, sip_event_class, fmt, ap); 08913 va_end(ap); 08914 08915 return (sip_event_t *)h; 08916 } 08917 #endif 08918 08926 SOFIAPUBFUN issize_t sip_allow_events_d(su_home_t *, msg_header_t *, 08927 char *s, isize_t slen); 08928 08930 SOFIAPUBFUN issize_t sip_allow_events_e(char b[], isize_t bsiz, 08931 msg_header_t const *h, int flags); 08932 08937 #define sip_allow_events(sip) \ 08938 ((sip_allow_events_t *)msg_header_access((msg_pub_t*)(sip), sip_allow_events_class)) 08939 08954 #define SIP_ALLOW_EVENTS_INIT() SIP_HDR_INIT(allow_events) 08955 08971 #if SU_HAVE_INLINE 08972 su_inline sip_allow_events_t *sip_allow_events_init(sip_allow_events_t x[1]) 08973 { 08974 return SIP_HEADER_INIT(x, sip_allow_events_class, sizeof(sip_allow_events_t)); 08975 } 08976 #else 08977 #define sip_allow_events_init(x) \ 08978 SIP_HEADER_INIT(x, sip_allow_events_class, sizeof(sip_allow_events_t)) 08979 #endif 08980 08993 #if SU_HAVE_INLINE 08994 su_inline int sip_is_allow_events(sip_header_t const *header) 08995 { 08996 return header && header->sh_class->hc_hash == sip_allow_events_hash; 08997 } 08998 #else 08999 int sip_is_allow_events(sip_header_t const *header); 09000 #endif 09001 09002 #define sip_allow_events_p(h) sip_is_allow_events((h)) 09003 09004 09033 #if SU_HAVE_INLINE 09034 su_inline 09035 #endif 09036 sip_allow_events_t *sip_allow_events_dup(su_home_t *home, sip_allow_events_t const *hdr) 09037 __attribute__((__malloc__)); 09038 09039 #if SU_HAVE_INLINE 09040 su_inline 09041 sip_allow_events_t *sip_allow_events_dup(su_home_t *home, sip_allow_events_t const *hdr) 09042 { 09043 return (sip_allow_events_t *) 09044 msg_header_dup_as(home, sip_allow_events_class, (msg_header_t const *)hdr); 09045 } 09046 #endif 09047 09076 #if SU_HAVE_INLINE 09077 su_inline 09078 #endif 09079 sip_allow_events_t *sip_allow_events_copy(su_home_t *home, sip_allow_events_t const *hdr) 09080 __attribute__((__malloc__)); 09081 09082 #if SU_HAVE_INLINE 09083 su_inline 09084 sip_allow_events_t *sip_allow_events_copy(su_home_t *home, sip_allow_events_t const *hdr) 09085 { 09086 return (sip_allow_events_t *) 09087 msg_header_copy_as(home, sip_allow_events_class, (msg_header_t const *)hdr); 09088 } 09089 #endif 09090 09106 #if SU_HAVE_INLINE 09107 su_inline 09108 #endif 09109 sip_allow_events_t *sip_allow_events_make(su_home_t *home, char const *s) 09110 __attribute__((__malloc__)); 09111 09112 #if SU_HAVE_INLINE 09113 su_inline sip_allow_events_t *sip_allow_events_make(su_home_t *home, char const *s) 09114 { 09115 return (sip_allow_events_t *)sip_header_make(home, sip_allow_events_class, s); 09116 } 09117 #endif 09118 09137 #if SU_HAVE_INLINE 09138 su_inline 09139 #endif 09140 sip_allow_events_t *sip_allow_events_format(su_home_t *home, char const *fmt, ...) 09141 __attribute__((__malloc__, __format__ (printf, 2, 3))); 09142 09143 #if SU_HAVE_INLINE 09144 su_inline sip_allow_events_t *sip_allow_events_format(su_home_t *home, char const *fmt, ...) 09145 { 09146 sip_header_t *h; 09147 va_list ap; 09148 09149 va_start(ap, fmt); 09150 h = sip_header_vformat(home, sip_allow_events_class, fmt, ap); 09151 va_end(ap); 09152 09153 return (sip_allow_events_t *)h; 09154 } 09155 #endif 09156 09164 SOFIAPUBFUN issize_t sip_subscription_state_d(su_home_t *, msg_header_t *, 09165 char *s, isize_t slen); 09166 09168 SOFIAPUBFUN issize_t sip_subscription_state_e(char b[], isize_t bsiz, 09169 msg_header_t const *h, int flags); 09170 09175 #define sip_subscription_state(sip) \ 09176 ((sip_subscription_state_t *)msg_header_access((msg_pub_t*)(sip), sip_subscription_state_class)) 09177 09192 #define SIP_SUBSCRIPTION_STATE_INIT() SIP_HDR_INIT(subscription_state) 09193 09209 #if SU_HAVE_INLINE 09210 su_inline sip_subscription_state_t *sip_subscription_state_init(sip_subscription_state_t x[1]) 09211 { 09212 return SIP_HEADER_INIT(x, sip_subscription_state_class, sizeof(sip_subscription_state_t)); 09213 } 09214 #else 09215 #define sip_subscription_state_init(x) \ 09216 SIP_HEADER_INIT(x, sip_subscription_state_class, sizeof(sip_subscription_state_t)) 09217 #endif 09218 09231 #if SU_HAVE_INLINE 09232 su_inline int sip_is_subscription_state(sip_header_t const *header) 09233 { 09234 return header && header->sh_class->hc_hash == sip_subscription_state_hash; 09235 } 09236 #else 09237 int sip_is_subscription_state(sip_header_t const *header); 09238 #endif 09239 09240 #define sip_subscription_state_p(h) sip_is_subscription_state((h)) 09241 09242 09271 #if SU_HAVE_INLINE 09272 su_inline 09273 #endif 09274 sip_subscription_state_t *sip_subscription_state_dup(su_home_t *home, sip_subscription_state_t const *hdr) 09275 __attribute__((__malloc__)); 09276 09277 #if SU_HAVE_INLINE 09278 su_inline 09279 sip_subscription_state_t *sip_subscription_state_dup(su_home_t *home, sip_subscription_state_t const *hdr) 09280 { 09281 return (sip_subscription_state_t *) 09282 msg_header_dup_as(home, sip_subscription_state_class, (msg_header_t const *)hdr); 09283 } 09284 #endif 09285 09314 #if SU_HAVE_INLINE 09315 su_inline 09316 #endif 09317 sip_subscription_state_t *sip_subscription_state_copy(su_home_t *home, sip_subscription_state_t const *hdr) 09318 __attribute__((__malloc__)); 09319 09320 #if SU_HAVE_INLINE 09321 su_inline 09322 sip_subscription_state_t *sip_subscription_state_copy(su_home_t *home, sip_subscription_state_t const *hdr) 09323 { 09324 return (sip_subscription_state_t *) 09325 msg_header_copy_as(home, sip_subscription_state_class, (msg_header_t const *)hdr); 09326 } 09327 #endif 09328 09344 #if SU_HAVE_INLINE 09345 su_inline 09346 #endif 09347 sip_subscription_state_t *sip_subscription_state_make(su_home_t *home, char const *s) 09348 __attribute__((__malloc__)); 09349 09350 #if SU_HAVE_INLINE 09351 su_inline sip_subscription_state_t *sip_subscription_state_make(su_home_t *home, char const *s) 09352 { 09353 return (sip_subscription_state_t *)sip_header_make(home, sip_subscription_state_class, s); 09354 } 09355 #endif 09356 09375 #if SU_HAVE_INLINE 09376 su_inline 09377 #endif 09378 sip_subscription_state_t *sip_subscription_state_format(su_home_t *home, char const *fmt, ...) 09379 __attribute__((__malloc__, __format__ (printf, 2, 3))); 09380 09381 #if SU_HAVE_INLINE 09382 su_inline sip_subscription_state_t *sip_subscription_state_format(su_home_t *home, char const *fmt, ...) 09383 { 09384 sip_header_t *h; 09385 va_list ap; 09386 09387 va_start(ap, fmt); 09388 h = sip_header_vformat(home, sip_subscription_state_class, fmt, ap); 09389 va_end(ap); 09390 09391 return (sip_subscription_state_t *)h; 09392 } 09393 #endif 09394 09402 SOFIAPUBFUN issize_t sip_proxy_authenticate_d(su_home_t *, msg_header_t *, 09403 char *s, isize_t slen); 09404 09406 SOFIAPUBFUN issize_t sip_proxy_authenticate_e(char b[], isize_t bsiz, 09407 msg_header_t const *h, int flags); 09408 09413 #define sip_proxy_authenticate(sip) \ 09414 ((sip_proxy_authenticate_t *)msg_header_access((msg_pub_t*)(sip), sip_proxy_authenticate_class)) 09415 09430 #define SIP_PROXY_AUTHENTICATE_INIT() SIP_HDR_INIT(proxy_authenticate) 09431 09447 #if SU_HAVE_INLINE 09448 su_inline sip_proxy_authenticate_t *sip_proxy_authenticate_init(sip_proxy_authenticate_t x[1]) 09449 { 09450 return SIP_HEADER_INIT(x, sip_proxy_authenticate_class, sizeof(sip_proxy_authenticate_t)); 09451 } 09452 #else 09453 #define sip_proxy_authenticate_init(x) \ 09454 SIP_HEADER_INIT(x, sip_proxy_authenticate_class, sizeof(sip_proxy_authenticate_t)) 09455 #endif 09456 09469 #if SU_HAVE_INLINE 09470 su_inline int sip_is_proxy_authenticate(sip_header_t const *header) 09471 { 09472 return header && header->sh_class->hc_hash == sip_proxy_authenticate_hash; 09473 } 09474 #else 09475 int sip_is_proxy_authenticate(sip_header_t const *header); 09476 #endif 09477 09478 #define sip_proxy_authenticate_p(h) sip_is_proxy_authenticate((h)) 09479 09480 09509 #if SU_HAVE_INLINE 09510 su_inline 09511 #endif 09512 sip_proxy_authenticate_t *sip_proxy_authenticate_dup(su_home_t *home, sip_proxy_authenticate_t const *hdr) 09513 __attribute__((__malloc__)); 09514 09515 #if SU_HAVE_INLINE 09516 su_inline 09517 sip_proxy_authenticate_t *sip_proxy_authenticate_dup(su_home_t *home, sip_proxy_authenticate_t const *hdr) 09518 { 09519 return (sip_proxy_authenticate_t *) 09520 msg_header_dup_as(home, sip_proxy_authenticate_class, (msg_header_t const *)hdr); 09521 } 09522 #endif 09523 09552 #if SU_HAVE_INLINE 09553 su_inline 09554 #endif 09555 sip_proxy_authenticate_t *sip_proxy_authenticate_copy(su_home_t *home, sip_proxy_authenticate_t const *hdr) 09556 __attribute__((__malloc__)); 09557 09558 #if SU_HAVE_INLINE 09559 su_inline 09560 sip_proxy_authenticate_t *sip_proxy_authenticate_copy(su_home_t *home, sip_proxy_authenticate_t const *hdr) 09561 { 09562 return (sip_proxy_authenticate_t *) 09563 msg_header_copy_as(home, sip_proxy_authenticate_class, (msg_header_t const *)hdr); 09564 } 09565 #endif 09566 09582 #if SU_HAVE_INLINE 09583 su_inline 09584 #endif 09585 sip_proxy_authenticate_t *sip_proxy_authenticate_make(su_home_t *home, char const *s) 09586 __attribute__((__malloc__)); 09587 09588 #if SU_HAVE_INLINE 09589 su_inline sip_proxy_authenticate_t *sip_proxy_authenticate_make(su_home_t *home, char const *s) 09590 { 09591 return (sip_proxy_authenticate_t *)sip_header_make(home, sip_proxy_authenticate_class, s); 09592 } 09593 #endif 09594 09613 #if SU_HAVE_INLINE 09614 su_inline 09615 #endif 09616 sip_proxy_authenticate_t *sip_proxy_authenticate_format(su_home_t *home, char const *fmt, ...) 09617 __attribute__((__malloc__, __format__ (printf, 2, 3))); 09618 09619 #if SU_HAVE_INLINE 09620 su_inline sip_proxy_authenticate_t *sip_proxy_authenticate_format(su_home_t *home, char const *fmt, ...) 09621 { 09622 sip_header_t *h; 09623 va_list ap; 09624 09625 va_start(ap, fmt); 09626 h = sip_header_vformat(home, sip_proxy_authenticate_class, fmt, ap); 09627 va_end(ap); 09628 09629 return (sip_proxy_authenticate_t *)h; 09630 } 09631 #endif 09632 09640 SOFIAPUBFUN issize_t sip_proxy_authentication_info_d(su_home_t *, msg_header_t *, 09641 char *s, isize_t slen); 09642 09644 SOFIAPUBFUN issize_t sip_proxy_authentication_info_e(char b[], isize_t bsiz, 09645 msg_header_t const *h, int flags); 09646 09651 #define sip_proxy_authentication_info(sip) \ 09652 ((sip_proxy_authentication_info_t *)msg_header_access((msg_pub_t*)(sip), sip_proxy_authentication_info_class)) 09653 09668 #define SIP_PROXY_AUTHENTICATION_INFO_INIT() SIP_HDR_INIT(proxy_authentication_info) 09669 09685 #if SU_HAVE_INLINE 09686 su_inline sip_proxy_authentication_info_t *sip_proxy_authentication_info_init(sip_proxy_authentication_info_t x[1]) 09687 { 09688 return SIP_HEADER_INIT(x, sip_proxy_authentication_info_class, sizeof(sip_proxy_authentication_info_t)); 09689 } 09690 #else 09691 #define sip_proxy_authentication_info_init(x) \ 09692 SIP_HEADER_INIT(x, sip_proxy_authentication_info_class, sizeof(sip_proxy_authentication_info_t)) 09693 #endif 09694 09707 #if SU_HAVE_INLINE 09708 su_inline int sip_is_proxy_authentication_info(sip_header_t const *header) 09709 { 09710 return header && header->sh_class->hc_hash == sip_proxy_authentication_info_hash; 09711 } 09712 #else 09713 int sip_is_proxy_authentication_info(sip_header_t const *header); 09714 #endif 09715 09716 #define sip_proxy_authentication_info_p(h) sip_is_proxy_authentication_info((h)) 09717 09718 09747 #if SU_HAVE_INLINE 09748 su_inline 09749 #endif 09750 sip_proxy_authentication_info_t *sip_proxy_authentication_info_dup(su_home_t *home, sip_proxy_authentication_info_t const *hdr) 09751 __attribute__((__malloc__)); 09752 09753 #if SU_HAVE_INLINE 09754 su_inline 09755 sip_proxy_authentication_info_t *sip_proxy_authentication_info_dup(su_home_t *home, sip_proxy_authentication_info_t const *hdr) 09756 { 09757 return (sip_proxy_authentication_info_t *) 09758 msg_header_dup_as(home, sip_proxy_authentication_info_class, (msg_header_t const *)hdr); 09759 } 09760 #endif 09761 09790 #if SU_HAVE_INLINE 09791 su_inline 09792 #endif 09793 sip_proxy_authentication_info_t *sip_proxy_authentication_info_copy(su_home_t *home, sip_proxy_authentication_info_t const *hdr) 09794 __attribute__((__malloc__)); 09795 09796 #if SU_HAVE_INLINE 09797 su_inline 09798 sip_proxy_authentication_info_t *sip_proxy_authentication_info_copy(su_home_t *home, sip_proxy_authentication_info_t const *hdr) 09799 { 09800 return (sip_proxy_authentication_info_t *) 09801 msg_header_copy_as(home, sip_proxy_authentication_info_class, (msg_header_t const *)hdr); 09802 } 09803 #endif 09804 09820 #if SU_HAVE_INLINE 09821 su_inline 09822 #endif 09823 sip_proxy_authentication_info_t *sip_proxy_authentication_info_make(su_home_t *home, char const *s) 09824 __attribute__((__malloc__)); 09825 09826 #if SU_HAVE_INLINE 09827 su_inline sip_proxy_authentication_info_t *sip_proxy_authentication_info_make(su_home_t *home, char const *s) 09828 { 09829 return (sip_proxy_authentication_info_t *)sip_header_make(home, sip_proxy_authentication_info_class, s); 09830 } 09831 #endif 09832 09851 #if SU_HAVE_INLINE 09852 su_inline 09853 #endif 09854 sip_proxy_authentication_info_t *sip_proxy_authentication_info_format(su_home_t *home, char const *fmt, ...) 09855 __attribute__((__malloc__, __format__ (printf, 2, 3))); 09856 09857 #if SU_HAVE_INLINE 09858 su_inline sip_proxy_authentication_info_t *sip_proxy_authentication_info_format(su_home_t *home, char const *fmt, ...) 09859 { 09860 sip_header_t *h; 09861 va_list ap; 09862 09863 va_start(ap, fmt); 09864 h = sip_header_vformat(home, sip_proxy_authentication_info_class, fmt, ap); 09865 va_end(ap); 09866 09867 return (sip_proxy_authentication_info_t *)h; 09868 } 09869 #endif 09870 09878 SOFIAPUBFUN issize_t sip_proxy_authorization_d(su_home_t *, msg_header_t *, 09879 char *s, isize_t slen); 09880 09882 SOFIAPUBFUN issize_t sip_proxy_authorization_e(char b[], isize_t bsiz, 09883 msg_header_t const *h, int flags); 09884 09889 #define sip_proxy_authorization(sip) \ 09890 ((sip_proxy_authorization_t *)msg_header_access((msg_pub_t*)(sip), sip_proxy_authorization_class)) 09891 09906 #define SIP_PROXY_AUTHORIZATION_INIT() SIP_HDR_INIT(proxy_authorization) 09907 09923 #if SU_HAVE_INLINE 09924 su_inline sip_proxy_authorization_t *sip_proxy_authorization_init(sip_proxy_authorization_t x[1]) 09925 { 09926 return SIP_HEADER_INIT(x, sip_proxy_authorization_class, sizeof(sip_proxy_authorization_t)); 09927 } 09928 #else 09929 #define sip_proxy_authorization_init(x) \ 09930 SIP_HEADER_INIT(x, sip_proxy_authorization_class, sizeof(sip_proxy_authorization_t)) 09931 #endif 09932 09945 #if SU_HAVE_INLINE 09946 su_inline int sip_is_proxy_authorization(sip_header_t const *header) 09947 { 09948 return header && header->sh_class->hc_hash == sip_proxy_authorization_hash; 09949 } 09950 #else 09951 int sip_is_proxy_authorization(sip_header_t const *header); 09952 #endif 09953 09954 #define sip_proxy_authorization_p(h) sip_is_proxy_authorization((h)) 09955 09956 09985 #if SU_HAVE_INLINE 09986 su_inline 09987 #endif 09988 sip_proxy_authorization_t *sip_proxy_authorization_dup(su_home_t *home, sip_proxy_authorization_t const *hdr) 09989 __attribute__((__malloc__)); 09990 09991 #if SU_HAVE_INLINE 09992 su_inline 09993 sip_proxy_authorization_t *sip_proxy_authorization_dup(su_home_t *home, sip_proxy_authorization_t const *hdr) 09994 { 09995 return (sip_proxy_authorization_t *) 09996 msg_header_dup_as(home, sip_proxy_authorization_class, (msg_header_t const *)hdr); 09997 } 09998 #endif 09999 10028 #if SU_HAVE_INLINE 10029 su_inline 10030 #endif 10031 sip_proxy_authorization_t *sip_proxy_authorization_copy(su_home_t *home, sip_proxy_authorization_t const *hdr) 10032 __attribute__((__malloc__)); 10033 10034 #if SU_HAVE_INLINE 10035 su_inline 10036 sip_proxy_authorization_t *sip_proxy_authorization_copy(su_home_t *home, sip_proxy_authorization_t const *hdr) 10037 { 10038 return (sip_proxy_authorization_t *) 10039 msg_header_copy_as(home, sip_proxy_authorization_class, (msg_header_t const *)hdr); 10040 } 10041 #endif 10042 10058 #if SU_HAVE_INLINE 10059 su_inline 10060 #endif 10061 sip_proxy_authorization_t *sip_proxy_authorization_make(su_home_t *home, char const *s) 10062 __attribute__((__malloc__)); 10063 10064 #if SU_HAVE_INLINE 10065 su_inline sip_proxy_authorization_t *sip_proxy_authorization_make(su_home_t *home, char const *s) 10066 { 10067 return (sip_proxy_authorization_t *)sip_header_make(home, sip_proxy_authorization_class, s); 10068 } 10069 #endif 10070 10089 #if SU_HAVE_INLINE 10090 su_inline 10091 #endif 10092 sip_proxy_authorization_t *sip_proxy_authorization_format(su_home_t *home, char const *fmt, ...) 10093 __attribute__((__malloc__, __format__ (printf, 2, 3))); 10094 10095 #if SU_HAVE_INLINE 10096 su_inline sip_proxy_authorization_t *sip_proxy_authorization_format(su_home_t *home, char const *fmt, ...) 10097 { 10098 sip_header_t *h; 10099 va_list ap; 10100 10101 va_start(ap, fmt); 10102 h = sip_header_vformat(home, sip_proxy_authorization_class, fmt, ap); 10103 va_end(ap); 10104 10105 return (sip_proxy_authorization_t *)h; 10106 } 10107 #endif 10108 10116 SOFIAPUBFUN issize_t sip_authorization_d(su_home_t *, msg_header_t *, 10117 char *s, isize_t slen); 10118 10120 SOFIAPUBFUN issize_t sip_authorization_e(char b[], isize_t bsiz, 10121 msg_header_t const *h, int flags); 10122 10127 #define sip_authorization(sip) \ 10128 ((sip_authorization_t *)msg_header_access((msg_pub_t*)(sip), sip_authorization_class)) 10129 10144 #define SIP_AUTHORIZATION_INIT() SIP_HDR_INIT(authorization) 10145 10161 #if SU_HAVE_INLINE 10162 su_inline sip_authorization_t *sip_authorization_init(sip_authorization_t x[1]) 10163 { 10164 return SIP_HEADER_INIT(x, sip_authorization_class, sizeof(sip_authorization_t)); 10165 } 10166 #else 10167 #define sip_authorization_init(x) \ 10168 SIP_HEADER_INIT(x, sip_authorization_class, sizeof(sip_authorization_t)) 10169 #endif 10170 10183 #if SU_HAVE_INLINE 10184 su_inline int sip_is_authorization(sip_header_t const *header) 10185 { 10186 return header && header->sh_class->hc_hash == sip_authorization_hash; 10187 } 10188 #else 10189 int sip_is_authorization(sip_header_t const *header); 10190 #endif 10191 10192 #define sip_authorization_p(h) sip_is_authorization((h)) 10193 10194 10223 #if SU_HAVE_INLINE 10224 su_inline 10225 #endif 10226 sip_authorization_t *sip_authorization_dup(su_home_t *home, sip_authorization_t const *hdr) 10227 __attribute__((__malloc__)); 10228 10229 #if SU_HAVE_INLINE 10230 su_inline 10231 sip_authorization_t *sip_authorization_dup(su_home_t *home, sip_authorization_t const *hdr) 10232 { 10233 return (sip_authorization_t *) 10234 msg_header_dup_as(home, sip_authorization_class, (msg_header_t const *)hdr); 10235 } 10236 #endif 10237 10266 #if SU_HAVE_INLINE 10267 su_inline 10268 #endif 10269 sip_authorization_t *sip_authorization_copy(su_home_t *home, sip_authorization_t const *hdr) 10270 __attribute__((__malloc__)); 10271 10272 #if SU_HAVE_INLINE 10273 su_inline 10274 sip_authorization_t *sip_authorization_copy(su_home_t *home, sip_authorization_t const *hdr) 10275 { 10276 return (sip_authorization_t *) 10277 msg_header_copy_as(home, sip_authorization_class, (msg_header_t const *)hdr); 10278 } 10279 #endif 10280 10296 #if SU_HAVE_INLINE 10297 su_inline 10298 #endif 10299 sip_authorization_t *sip_authorization_make(su_home_t *home, char const *s) 10300 __attribute__((__malloc__)); 10301 10302 #if SU_HAVE_INLINE 10303 su_inline sip_authorization_t *sip_authorization_make(su_home_t *home, char const *s) 10304 { 10305 return (sip_authorization_t *)sip_header_make(home, sip_authorization_class, s); 10306 } 10307 #endif 10308 10327 #if SU_HAVE_INLINE 10328 su_inline 10329 #endif 10330 sip_authorization_t *sip_authorization_format(su_home_t *home, char const *fmt, ...) 10331 __attribute__((__malloc__, __format__ (printf, 2, 3))); 10332 10333 #if SU_HAVE_INLINE 10334 su_inline sip_authorization_t *sip_authorization_format(su_home_t *home, char const *fmt, ...) 10335 { 10336 sip_header_t *h; 10337 va_list ap; 10338 10339 va_start(ap, fmt); 10340 h = sip_header_vformat(home, sip_authorization_class, fmt, ap); 10341 va_end(ap); 10342 10343 return (sip_authorization_t *)h; 10344 } 10345 #endif 10346 10354 SOFIAPUBFUN issize_t sip_www_authenticate_d(su_home_t *, msg_header_t *, 10355 char *s, isize_t slen); 10356 10358 SOFIAPUBFUN issize_t sip_www_authenticate_e(char b[], isize_t bsiz, 10359 msg_header_t const *h, int flags); 10360 10365 #define sip_www_authenticate(sip) \ 10366 ((sip_www_authenticate_t *)msg_header_access((msg_pub_t*)(sip), sip_www_authenticate_class)) 10367 10382 #define SIP_WWW_AUTHENTICATE_INIT() SIP_HDR_INIT(www_authenticate) 10383 10399 #if SU_HAVE_INLINE 10400 su_inline sip_www_authenticate_t *sip_www_authenticate_init(sip_www_authenticate_t x[1]) 10401 { 10402 return SIP_HEADER_INIT(x, sip_www_authenticate_class, sizeof(sip_www_authenticate_t)); 10403 } 10404 #else 10405 #define sip_www_authenticate_init(x) \ 10406 SIP_HEADER_INIT(x, sip_www_authenticate_class, sizeof(sip_www_authenticate_t)) 10407 #endif 10408 10421 #if SU_HAVE_INLINE 10422 su_inline int sip_is_www_authenticate(sip_header_t const *header) 10423 { 10424 return header && header->sh_class->hc_hash == sip_www_authenticate_hash; 10425 } 10426 #else 10427 int sip_is_www_authenticate(sip_header_t const *header); 10428 #endif 10429 10430 #define sip_www_authenticate_p(h) sip_is_www_authenticate((h)) 10431 10432 10461 #if SU_HAVE_INLINE 10462 su_inline 10463 #endif 10464 sip_www_authenticate_t *sip_www_authenticate_dup(su_home_t *home, sip_www_authenticate_t const *hdr) 10465 __attribute__((__malloc__)); 10466 10467 #if SU_HAVE_INLINE 10468 su_inline 10469 sip_www_authenticate_t *sip_www_authenticate_dup(su_home_t *home, sip_www_authenticate_t const *hdr) 10470 { 10471 return (sip_www_authenticate_t *) 10472 msg_header_dup_as(home, sip_www_authenticate_class, (msg_header_t const *)hdr); 10473 } 10474 #endif 10475 10504 #if SU_HAVE_INLINE 10505 su_inline 10506 #endif 10507 sip_www_authenticate_t *sip_www_authenticate_copy(su_home_t *home, sip_www_authenticate_t const *hdr) 10508 __attribute__((__malloc__)); 10509 10510 #if SU_HAVE_INLINE 10511 su_inline 10512 sip_www_authenticate_t *sip_www_authenticate_copy(su_home_t *home, sip_www_authenticate_t const *hdr) 10513 { 10514 return (sip_www_authenticate_t *) 10515 msg_header_copy_as(home, sip_www_authenticate_class, (msg_header_t const *)hdr); 10516 } 10517 #endif 10518 10534 #if SU_HAVE_INLINE 10535 su_inline 10536 #endif 10537 sip_www_authenticate_t *sip_www_authenticate_make(su_home_t *home, char const *s) 10538 __attribute__((__malloc__)); 10539 10540 #if SU_HAVE_INLINE 10541 su_inline sip_www_authenticate_t *sip_www_authenticate_make(su_home_t *home, char const *s) 10542 { 10543 return (sip_www_authenticate_t *)sip_header_make(home, sip_www_authenticate_class, s); 10544 } 10545 #endif 10546 10565 #if SU_HAVE_INLINE 10566 su_inline 10567 #endif 10568 sip_www_authenticate_t *sip_www_authenticate_format(su_home_t *home, char const *fmt, ...) 10569 __attribute__((__malloc__, __format__ (printf, 2, 3))); 10570 10571 #if SU_HAVE_INLINE 10572 su_inline sip_www_authenticate_t *sip_www_authenticate_format(su_home_t *home, char const *fmt, ...) 10573 { 10574 sip_header_t *h; 10575 va_list ap; 10576 10577 va_start(ap, fmt); 10578 h = sip_header_vformat(home, sip_www_authenticate_class, fmt, ap); 10579 va_end(ap); 10580 10581 return (sip_www_authenticate_t *)h; 10582 } 10583 #endif 10584 10592 SOFIAPUBFUN issize_t sip_authentication_info_d(su_home_t *, msg_header_t *, 10593 char *s, isize_t slen); 10594 10596 SOFIAPUBFUN issize_t sip_authentication_info_e(char b[], isize_t bsiz, 10597 msg_header_t const *h, int flags); 10598 10603 #define sip_authentication_info(sip) \ 10604 ((sip_authentication_info_t *)msg_header_access((msg_pub_t*)(sip), sip_authentication_info_class)) 10605 10620 #define SIP_AUTHENTICATION_INFO_INIT() SIP_HDR_INIT(authentication_info) 10621 10637 #if SU_HAVE_INLINE 10638 su_inline sip_authentication_info_t *sip_authentication_info_init(sip_authentication_info_t x[1]) 10639 { 10640 return SIP_HEADER_INIT(x, sip_authentication_info_class, sizeof(sip_authentication_info_t)); 10641 } 10642 #else 10643 #define sip_authentication_info_init(x) \ 10644 SIP_HEADER_INIT(x, sip_authentication_info_class, sizeof(sip_authentication_info_t)) 10645 #endif 10646 10659 #if SU_HAVE_INLINE 10660 su_inline int sip_is_authentication_info(sip_header_t const *header) 10661 { 10662 return header && header->sh_class->hc_hash == sip_authentication_info_hash; 10663 } 10664 #else 10665 int sip_is_authentication_info(sip_header_t const *header); 10666 #endif 10667 10668 #define sip_authentication_info_p(h) sip_is_authentication_info((h)) 10669 10670 10699 #if SU_HAVE_INLINE 10700 su_inline 10701 #endif 10702 sip_authentication_info_t *sip_authentication_info_dup(su_home_t *home, sip_authentication_info_t const *hdr) 10703 __attribute__((__malloc__)); 10704 10705 #if SU_HAVE_INLINE 10706 su_inline 10707 sip_authentication_info_t *sip_authentication_info_dup(su_home_t *home, sip_authentication_info_t const *hdr) 10708 { 10709 return (sip_authentication_info_t *) 10710 msg_header_dup_as(home, sip_authentication_info_class, (msg_header_t const *)hdr); 10711 } 10712 #endif 10713 10742 #if SU_HAVE_INLINE 10743 su_inline 10744 #endif 10745 sip_authentication_info_t *sip_authentication_info_copy(su_home_t *home, sip_authentication_info_t const *hdr) 10746 __attribute__((__malloc__)); 10747 10748 #if SU_HAVE_INLINE 10749 su_inline 10750 sip_authentication_info_t *sip_authentication_info_copy(su_home_t *home, sip_authentication_info_t const *hdr) 10751 { 10752 return (sip_authentication_info_t *) 10753 msg_header_copy_as(home, sip_authentication_info_class, (msg_header_t const *)hdr); 10754 } 10755 #endif 10756 10772 #if SU_HAVE_INLINE 10773 su_inline 10774 #endif 10775 sip_authentication_info_t *sip_authentication_info_make(su_home_t *home, char const *s) 10776 __attribute__((__malloc__)); 10777 10778 #if SU_HAVE_INLINE 10779 su_inline sip_authentication_info_t *sip_authentication_info_make(su_home_t *home, char const *s) 10780 { 10781 return (sip_authentication_info_t *)sip_header_make(home, sip_authentication_info_class, s); 10782 } 10783 #endif 10784 10803 #if SU_HAVE_INLINE 10804 su_inline 10805 #endif 10806 sip_authentication_info_t *sip_authentication_info_format(su_home_t *home, char const *fmt, ...) 10807 __attribute__((__malloc__, __format__ (printf, 2, 3))); 10808 10809 #if SU_HAVE_INLINE 10810 su_inline sip_authentication_info_t *sip_authentication_info_format(su_home_t *home, char const *fmt, ...) 10811 { 10812 sip_header_t *h; 10813 va_list ap; 10814 10815 va_start(ap, fmt); 10816 h = sip_header_vformat(home, sip_authentication_info_class, fmt, ap); 10817 va_end(ap); 10818 10819 return (sip_authentication_info_t *)h; 10820 } 10821 #endif 10822 10830 SOFIAPUBFUN issize_t sip_error_info_d(su_home_t *, msg_header_t *, 10831 char *s, isize_t slen); 10832 10834 SOFIAPUBFUN issize_t sip_error_info_e(char b[], isize_t bsiz, 10835 msg_header_t const *h, int flags); 10836 10841 #define sip_error_info(sip) \ 10842 ((sip_error_info_t *)msg_header_access((msg_pub_t*)(sip), sip_error_info_class)) 10843 10858 #define SIP_ERROR_INFO_INIT() SIP_HDR_INIT(error_info) 10859 10875 #if SU_HAVE_INLINE 10876 su_inline sip_error_info_t *sip_error_info_init(sip_error_info_t x[1]) 10877 { 10878 return SIP_HEADER_INIT(x, sip_error_info_class, sizeof(sip_error_info_t)); 10879 } 10880 #else 10881 #define sip_error_info_init(x) \ 10882 SIP_HEADER_INIT(x, sip_error_info_class, sizeof(sip_error_info_t)) 10883 #endif 10884 10897 #if SU_HAVE_INLINE 10898 su_inline int sip_is_error_info(sip_header_t const *header) 10899 { 10900 return header && header->sh_class->hc_hash == sip_error_info_hash; 10901 } 10902 #else 10903 int sip_is_error_info(sip_header_t const *header); 10904 #endif 10905 10906 #define sip_error_info_p(h) sip_is_error_info((h)) 10907 10908 10937 #if SU_HAVE_INLINE 10938 su_inline 10939 #endif 10940 sip_error_info_t *sip_error_info_dup(su_home_t *home, sip_error_info_t const *hdr) 10941 __attribute__((__malloc__)); 10942 10943 #if SU_HAVE_INLINE 10944 su_inline 10945 sip_error_info_t *sip_error_info_dup(su_home_t *home, sip_error_info_t const *hdr) 10946 { 10947 return (sip_error_info_t *) 10948 msg_header_dup_as(home, sip_error_info_class, (msg_header_t const *)hdr); 10949 } 10950 #endif 10951 10980 #if SU_HAVE_INLINE 10981 su_inline 10982 #endif 10983 sip_error_info_t *sip_error_info_copy(su_home_t *home, sip_error_info_t const *hdr) 10984 __attribute__((__malloc__)); 10985 10986 #if SU_HAVE_INLINE 10987 su_inline 10988 sip_error_info_t *sip_error_info_copy(su_home_t *home, sip_error_info_t const *hdr) 10989 { 10990 return (sip_error_info_t *) 10991 msg_header_copy_as(home, sip_error_info_class, (msg_header_t const *)hdr); 10992 } 10993 #endif 10994 11010 #if SU_HAVE_INLINE 11011 su_inline 11012 #endif 11013 sip_error_info_t *sip_error_info_make(su_home_t *home, char const *s) 11014 __attribute__((__malloc__)); 11015 11016 #if SU_HAVE_INLINE 11017 su_inline sip_error_info_t *sip_error_info_make(su_home_t *home, char const *s) 11018 { 11019 return (sip_error_info_t *)sip_header_make(home, sip_error_info_class, s); 11020 } 11021 #endif 11022 11041 #if SU_HAVE_INLINE 11042 su_inline 11043 #endif 11044 sip_error_info_t *sip_error_info_format(su_home_t *home, char const *fmt, ...) 11045 __attribute__((__malloc__, __format__ (printf, 2, 3))); 11046 11047 #if SU_HAVE_INLINE 11048 su_inline sip_error_info_t *sip_error_info_format(su_home_t *home, char const *fmt, ...) 11049 { 11050 sip_header_t *h; 11051 va_list ap; 11052 11053 va_start(ap, fmt); 11054 h = sip_header_vformat(home, sip_error_info_class, fmt, ap); 11055 va_end(ap); 11056 11057 return (sip_error_info_t *)h; 11058 } 11059 #endif 11060 11068 SOFIAPUBFUN issize_t sip_warning_d(su_home_t *, msg_header_t *, 11069 char *s, isize_t slen); 11070 11072 SOFIAPUBFUN issize_t sip_warning_e(char b[], isize_t bsiz, 11073 msg_header_t const *h, int flags); 11074 11079 #define sip_warning(sip) \ 11080 ((sip_warning_t *)msg_header_access((msg_pub_t*)(sip), sip_warning_class)) 11081 11096 #define SIP_WARNING_INIT() SIP_HDR_INIT(warning) 11097 11113 #if SU_HAVE_INLINE 11114 su_inline sip_warning_t *sip_warning_init(sip_warning_t x[1]) 11115 { 11116 return SIP_HEADER_INIT(x, sip_warning_class, sizeof(sip_warning_t)); 11117 } 11118 #else 11119 #define sip_warning_init(x) \ 11120 SIP_HEADER_INIT(x, sip_warning_class, sizeof(sip_warning_t)) 11121 #endif 11122 11135 #if SU_HAVE_INLINE 11136 su_inline int sip_is_warning(sip_header_t const *header) 11137 { 11138 return header && header->sh_class->hc_hash == sip_warning_hash; 11139 } 11140 #else 11141 int sip_is_warning(sip_header_t const *header); 11142 #endif 11143 11144 #define sip_warning_p(h) sip_is_warning((h)) 11145 11146 11175 #if SU_HAVE_INLINE 11176 su_inline 11177 #endif 11178 sip_warning_t *sip_warning_dup(su_home_t *home, sip_warning_t const *hdr) 11179 __attribute__((__malloc__)); 11180 11181 #if SU_HAVE_INLINE 11182 su_inline 11183 sip_warning_t *sip_warning_dup(su_home_t *home, sip_warning_t const *hdr) 11184 { 11185 return (sip_warning_t *) 11186 msg_header_dup_as(home, sip_warning_class, (msg_header_t const *)hdr); 11187 } 11188 #endif 11189 11218 #if SU_HAVE_INLINE 11219 su_inline 11220 #endif 11221 sip_warning_t *sip_warning_copy(su_home_t *home, sip_warning_t const *hdr) 11222 __attribute__((__malloc__)); 11223 11224 #if SU_HAVE_INLINE 11225 su_inline 11226 sip_warning_t *sip_warning_copy(su_home_t *home, sip_warning_t const *hdr) 11227 { 11228 return (sip_warning_t *) 11229 msg_header_copy_as(home, sip_warning_class, (msg_header_t const *)hdr); 11230 } 11231 #endif 11232 11248 #if SU_HAVE_INLINE 11249 su_inline 11250 #endif 11251 sip_warning_t *sip_warning_make(su_home_t *home, char const *s) 11252 __attribute__((__malloc__)); 11253 11254 #if SU_HAVE_INLINE 11255 su_inline sip_warning_t *sip_warning_make(su_home_t *home, char const *s) 11256 { 11257 return (sip_warning_t *)sip_header_make(home, sip_warning_class, s); 11258 } 11259 #endif 11260 11279 #if SU_HAVE_INLINE 11280 su_inline 11281 #endif 11282 sip_warning_t *sip_warning_format(su_home_t *home, char const *fmt, ...) 11283 __attribute__((__malloc__, __format__ (printf, 2, 3))); 11284 11285 #if SU_HAVE_INLINE 11286 su_inline sip_warning_t *sip_warning_format(su_home_t *home, char const *fmt, ...) 11287 { 11288 sip_header_t *h; 11289 va_list ap; 11290 11291 va_start(ap, fmt); 11292 h = sip_header_vformat(home, sip_warning_class, fmt, ap); 11293 va_end(ap); 11294 11295 return (sip_warning_t *)h; 11296 } 11297 #endif 11298 11306 SOFIAPUBFUN issize_t sip_refer_to_d(su_home_t *, msg_header_t *, 11307 char *s, isize_t slen); 11308 11310 SOFIAPUBFUN issize_t sip_refer_to_e(char b[], isize_t bsiz, 11311 msg_header_t const *h, int flags); 11312 11317 #define sip_refer_to(sip) \ 11318 ((sip_refer_to_t *)msg_header_access((msg_pub_t*)(sip), sip_refer_to_class)) 11319 11334 #define SIP_REFER_TO_INIT() SIP_HDR_INIT(refer_to) 11335 11351 #if SU_HAVE_INLINE 11352 su_inline sip_refer_to_t *sip_refer_to_init(sip_refer_to_t x[1]) 11353 { 11354 return SIP_HEADER_INIT(x, sip_refer_to_class, sizeof(sip_refer_to_t)); 11355 } 11356 #else 11357 #define sip_refer_to_init(x) \ 11358 SIP_HEADER_INIT(x, sip_refer_to_class, sizeof(sip_refer_to_t)) 11359 #endif 11360 11373 #if SU_HAVE_INLINE 11374 su_inline int sip_is_refer_to(sip_header_t const *header) 11375 { 11376 return header && header->sh_class->hc_hash == sip_refer_to_hash; 11377 } 11378 #else 11379 int sip_is_refer_to(sip_header_t const *header); 11380 #endif 11381 11382 #define sip_refer_to_p(h) sip_is_refer_to((h)) 11383 11384 11413 #if SU_HAVE_INLINE 11414 su_inline 11415 #endif 11416 sip_refer_to_t *sip_refer_to_dup(su_home_t *home, sip_refer_to_t const *hdr) 11417 __attribute__((__malloc__)); 11418 11419 #if SU_HAVE_INLINE 11420 su_inline 11421 sip_refer_to_t *sip_refer_to_dup(su_home_t *home, sip_refer_to_t const *hdr) 11422 { 11423 return (sip_refer_to_t *) 11424 msg_header_dup_as(home, sip_refer_to_class, (msg_header_t const *)hdr); 11425 } 11426 #endif 11427 11456 #if SU_HAVE_INLINE 11457 su_inline 11458 #endif 11459 sip_refer_to_t *sip_refer_to_copy(su_home_t *home, sip_refer_to_t const *hdr) 11460 __attribute__((__malloc__)); 11461 11462 #if SU_HAVE_INLINE 11463 su_inline 11464 sip_refer_to_t *sip_refer_to_copy(su_home_t *home, sip_refer_to_t const *hdr) 11465 { 11466 return (sip_refer_to_t *) 11467 msg_header_copy_as(home, sip_refer_to_class, (msg_header_t const *)hdr); 11468 } 11469 #endif 11470 11486 #if SU_HAVE_INLINE 11487 su_inline 11488 #endif 11489 sip_refer_to_t *sip_refer_to_make(su_home_t *home, char const *s) 11490 __attribute__((__malloc__)); 11491 11492 #if SU_HAVE_INLINE 11493 su_inline sip_refer_to_t *sip_refer_to_make(su_home_t *home, char const *s) 11494 { 11495 return (sip_refer_to_t *)sip_header_make(home, sip_refer_to_class, s); 11496 } 11497 #endif 11498 11517 #if SU_HAVE_INLINE 11518 su_inline 11519 #endif 11520 sip_refer_to_t *sip_refer_to_format(su_home_t *home, char const *fmt, ...) 11521 __attribute__((__malloc__, __format__ (printf, 2, 3))); 11522 11523 #if SU_HAVE_INLINE 11524 su_inline sip_refer_to_t *sip_refer_to_format(su_home_t *home, char const *fmt, ...) 11525 { 11526 sip_header_t *h; 11527 va_list ap; 11528 11529 va_start(ap, fmt); 11530 h = sip_header_vformat(home, sip_refer_to_class, fmt, ap); 11531 va_end(ap); 11532 11533 return (sip_refer_to_t *)h; 11534 } 11535 #endif 11536 11544 SOFIAPUBFUN issize_t sip_referred_by_d(su_home_t *, msg_header_t *, 11545 char *s, isize_t slen); 11546 11548 SOFIAPUBFUN issize_t sip_referred_by_e(char b[], isize_t bsiz, 11549 msg_header_t const *h, int flags); 11550 11555 #define sip_referred_by(sip) \ 11556 ((sip_referred_by_t *)msg_header_access((msg_pub_t*)(sip), sip_referred_by_class)) 11557 11572 #define SIP_REFERRED_BY_INIT() SIP_HDR_INIT(referred_by) 11573 11589 #if SU_HAVE_INLINE 11590 su_inline sip_referred_by_t *sip_referred_by_init(sip_referred_by_t x[1]) 11591 { 11592 return SIP_HEADER_INIT(x, sip_referred_by_class, sizeof(sip_referred_by_t)); 11593 } 11594 #else 11595 #define sip_referred_by_init(x) \ 11596 SIP_HEADER_INIT(x, sip_referred_by_class, sizeof(sip_referred_by_t)) 11597 #endif 11598 11611 #if SU_HAVE_INLINE 11612 su_inline int sip_is_referred_by(sip_header_t const *header) 11613 { 11614 return header && header->sh_class->hc_hash == sip_referred_by_hash; 11615 } 11616 #else 11617 int sip_is_referred_by(sip_header_t const *header); 11618 #endif 11619 11620 #define sip_referred_by_p(h) sip_is_referred_by((h)) 11621 11622 11651 #if SU_HAVE_INLINE 11652 su_inline 11653 #endif 11654 sip_referred_by_t *sip_referred_by_dup(su_home_t *home, sip_referred_by_t const *hdr) 11655 __attribute__((__malloc__)); 11656 11657 #if SU_HAVE_INLINE 11658 su_inline 11659 sip_referred_by_t *sip_referred_by_dup(su_home_t *home, sip_referred_by_t const *hdr) 11660 { 11661 return (sip_referred_by_t *) 11662 msg_header_dup_as(home, sip_referred_by_class, (msg_header_t const *)hdr); 11663 } 11664 #endif 11665 11694 #if SU_HAVE_INLINE 11695 su_inline 11696 #endif 11697 sip_referred_by_t *sip_referred_by_copy(su_home_t *home, sip_referred_by_t const *hdr) 11698 __attribute__((__malloc__)); 11699 11700 #if SU_HAVE_INLINE 11701 su_inline 11702 sip_referred_by_t *sip_referred_by_copy(su_home_t *home, sip_referred_by_t const *hdr) 11703 { 11704 return (sip_referred_by_t *) 11705 msg_header_copy_as(home, sip_referred_by_class, (msg_header_t const *)hdr); 11706 } 11707 #endif 11708 11724 #if SU_HAVE_INLINE 11725 su_inline 11726 #endif 11727 sip_referred_by_t *sip_referred_by_make(su_home_t *home, char const *s) 11728 __attribute__((__malloc__)); 11729 11730 #if SU_HAVE_INLINE 11731 su_inline sip_referred_by_t *sip_referred_by_make(su_home_t *home, char const *s) 11732 { 11733 return (sip_referred_by_t *)sip_header_make(home, sip_referred_by_class, s); 11734 } 11735 #endif 11736 11755 #if SU_HAVE_INLINE 11756 su_inline 11757 #endif 11758 sip_referred_by_t *sip_referred_by_format(su_home_t *home, char const *fmt, ...) 11759 __attribute__((__malloc__, __format__ (printf, 2, 3))); 11760 11761 #if SU_HAVE_INLINE 11762 su_inline sip_referred_by_t *sip_referred_by_format(su_home_t *home, char const *fmt, ...) 11763 { 11764 sip_header_t *h; 11765 va_list ap; 11766 11767 va_start(ap, fmt); 11768 h = sip_header_vformat(home, sip_referred_by_class, fmt, ap); 11769 va_end(ap); 11770 11771 return (sip_referred_by_t *)h; 11772 } 11773 #endif 11774 11782 SOFIAPUBFUN issize_t sip_replaces_d(su_home_t *, msg_header_t *, 11783 char *s, isize_t slen); 11784 11786 SOFIAPUBFUN issize_t sip_replaces_e(char b[], isize_t bsiz, 11787 msg_header_t const *h, int flags); 11788 11793 #define sip_replaces(sip) \ 11794 ((sip_replaces_t *)msg_header_access((msg_pub_t*)(sip), sip_replaces_class)) 11795 11810 #define SIP_REPLACES_INIT() SIP_HDR_INIT(replaces) 11811 11827 #if SU_HAVE_INLINE 11828 su_inline sip_replaces_t *sip_replaces_init(sip_replaces_t x[1]) 11829 { 11830 return SIP_HEADER_INIT(x, sip_replaces_class, sizeof(sip_replaces_t)); 11831 } 11832 #else 11833 #define sip_replaces_init(x) \ 11834 SIP_HEADER_INIT(x, sip_replaces_class, sizeof(sip_replaces_t)) 11835 #endif 11836 11849 #if SU_HAVE_INLINE 11850 su_inline int sip_is_replaces(sip_header_t const *header) 11851 { 11852 return header && header->sh_class->hc_hash == sip_replaces_hash; 11853 } 11854 #else 11855 int sip_is_replaces(sip_header_t const *header); 11856 #endif 11857 11858 #define sip_replaces_p(h) sip_is_replaces((h)) 11859 11860 11889 #if SU_HAVE_INLINE 11890 su_inline 11891 #endif 11892 sip_replaces_t *sip_replaces_dup(su_home_t *home, sip_replaces_t const *hdr) 11893 __attribute__((__malloc__)); 11894 11895 #if SU_HAVE_INLINE 11896 su_inline 11897 sip_replaces_t *sip_replaces_dup(su_home_t *home, sip_replaces_t const *hdr) 11898 { 11899 return (sip_replaces_t *) 11900 msg_header_dup_as(home, sip_replaces_class, (msg_header_t const *)hdr); 11901 } 11902 #endif 11903 11932 #if SU_HAVE_INLINE 11933 su_inline 11934 #endif 11935 sip_replaces_t *sip_replaces_copy(su_home_t *home, sip_replaces_t const *hdr) 11936 __attribute__((__malloc__)); 11937 11938 #if SU_HAVE_INLINE 11939 su_inline 11940 sip_replaces_t *sip_replaces_copy(su_home_t *home, sip_replaces_t const *hdr) 11941 { 11942 return (sip_replaces_t *) 11943 msg_header_copy_as(home, sip_replaces_class, (msg_header_t const *)hdr); 11944 } 11945 #endif 11946 11962 #if SU_HAVE_INLINE 11963 su_inline 11964 #endif 11965 sip_replaces_t *sip_replaces_make(su_home_t *home, char const *s) 11966 __attribute__((__malloc__)); 11967 11968 #if SU_HAVE_INLINE 11969 su_inline sip_replaces_t *sip_replaces_make(su_home_t *home, char const *s) 11970 { 11971 return (sip_replaces_t *)sip_header_make(home, sip_replaces_class, s); 11972 } 11973 #endif 11974 11993 #if SU_HAVE_INLINE 11994 su_inline 11995 #endif 11996 sip_replaces_t *sip_replaces_format(su_home_t *home, char const *fmt, ...) 11997 __attribute__((__malloc__, __format__ (printf, 2, 3))); 11998 11999 #if SU_HAVE_INLINE 12000 su_inline sip_replaces_t *sip_replaces_format(su_home_t *home, char const *fmt, ...) 12001 { 12002 sip_header_t *h; 12003 va_list ap; 12004 12005 va_start(ap, fmt); 12006 h = sip_header_vformat(home, sip_replaces_class, fmt, ap); 12007 va_end(ap); 12008 12009 return (sip_replaces_t *)h; 12010 } 12011 #endif 12012 12020 SOFIAPUBFUN issize_t sip_session_expires_d(su_home_t *, msg_header_t *, 12021 char *s, isize_t slen); 12022 12024 SOFIAPUBFUN issize_t sip_session_expires_e(char b[], isize_t bsiz, 12025 msg_header_t const *h, int flags); 12026 12031 #define sip_session_expires(sip) \ 12032 ((sip_session_expires_t *)msg_header_access((msg_pub_t*)(sip), sip_session_expires_class)) 12033 12048 #define SIP_SESSION_EXPIRES_INIT() SIP_HDR_INIT(session_expires) 12049 12065 #if SU_HAVE_INLINE 12066 su_inline sip_session_expires_t *sip_session_expires_init(sip_session_expires_t x[1]) 12067 { 12068 return SIP_HEADER_INIT(x, sip_session_expires_class, sizeof(sip_session_expires_t)); 12069 } 12070 #else 12071 #define sip_session_expires_init(x) \ 12072 SIP_HEADER_INIT(x, sip_session_expires_class, sizeof(sip_session_expires_t)) 12073 #endif 12074 12087 #if SU_HAVE_INLINE 12088 su_inline int sip_is_session_expires(sip_header_t const *header) 12089 { 12090 return header && header->sh_class->hc_hash == sip_session_expires_hash; 12091 } 12092 #else 12093 int sip_is_session_expires(sip_header_t const *header); 12094 #endif 12095 12096 #define sip_session_expires_p(h) sip_is_session_expires((h)) 12097 12098 12127 #if SU_HAVE_INLINE 12128 su_inline 12129 #endif 12130 sip_session_expires_t *sip_session_expires_dup(su_home_t *home, sip_session_expires_t const *hdr) 12131 __attribute__((__malloc__)); 12132 12133 #if SU_HAVE_INLINE 12134 su_inline 12135 sip_session_expires_t *sip_session_expires_dup(su_home_t *home, sip_session_expires_t const *hdr) 12136 { 12137 return (sip_session_expires_t *) 12138 msg_header_dup_as(home, sip_session_expires_class, (msg_header_t const *)hdr); 12139 } 12140 #endif 12141 12170 #if SU_HAVE_INLINE 12171 su_inline 12172 #endif 12173 sip_session_expires_t *sip_session_expires_copy(su_home_t *home, sip_session_expires_t const *hdr) 12174 __attribute__((__malloc__)); 12175 12176 #if SU_HAVE_INLINE 12177 su_inline 12178 sip_session_expires_t *sip_session_expires_copy(su_home_t *home, sip_session_expires_t const *hdr) 12179 { 12180 return (sip_session_expires_t *) 12181 msg_header_copy_as(home, sip_session_expires_class, (msg_header_t const *)hdr); 12182 } 12183 #endif 12184 12200 #if SU_HAVE_INLINE 12201 su_inline 12202 #endif 12203 sip_session_expires_t *sip_session_expires_make(su_home_t *home, char const *s) 12204 __attribute__((__malloc__)); 12205 12206 #if SU_HAVE_INLINE 12207 su_inline sip_session_expires_t *sip_session_expires_make(su_home_t *home, char const *s) 12208 { 12209 return (sip_session_expires_t *)sip_header_make(home, sip_session_expires_class, s); 12210 } 12211 #endif 12212 12231 #if SU_HAVE_INLINE 12232 su_inline 12233 #endif 12234 sip_session_expires_t *sip_session_expires_format(su_home_t *home, char const *fmt, ...) 12235 __attribute__((__malloc__, __format__ (printf, 2, 3))); 12236 12237 #if SU_HAVE_INLINE 12238 su_inline sip_session_expires_t *sip_session_expires_format(su_home_t *home, char const *fmt, ...) 12239 { 12240 sip_header_t *h; 12241 va_list ap; 12242 12243 va_start(ap, fmt); 12244 h = sip_header_vformat(home, sip_session_expires_class, fmt, ap); 12245 va_end(ap); 12246 12247 return (sip_session_expires_t *)h; 12248 } 12249 #endif 12250 12258 SOFIAPUBFUN issize_t sip_min_se_d(su_home_t *, msg_header_t *, 12259 char *s, isize_t slen); 12260 12262 SOFIAPUBFUN issize_t sip_min_se_e(char b[], isize_t bsiz, 12263 msg_header_t const *h, int flags); 12264 12269 #define sip_min_se(sip) \ 12270 ((sip_min_se_t *)msg_header_access((msg_pub_t*)(sip), sip_min_se_class)) 12271 12286 #define SIP_MIN_SE_INIT() SIP_HDR_INIT(min_se) 12287 12303 #if SU_HAVE_INLINE 12304 su_inline sip_min_se_t *sip_min_se_init(sip_min_se_t x[1]) 12305 { 12306 return SIP_HEADER_INIT(x, sip_min_se_class, sizeof(sip_min_se_t)); 12307 } 12308 #else 12309 #define sip_min_se_init(x) \ 12310 SIP_HEADER_INIT(x, sip_min_se_class, sizeof(sip_min_se_t)) 12311 #endif 12312 12325 #if SU_HAVE_INLINE 12326 su_inline int sip_is_min_se(sip_header_t const *header) 12327 { 12328 return header && header->sh_class->hc_hash == sip_min_se_hash; 12329 } 12330 #else 12331 int sip_is_min_se(sip_header_t const *header); 12332 #endif 12333 12334 #define sip_min_se_p(h) sip_is_min_se((h)) 12335 12336 12365 #if SU_HAVE_INLINE 12366 su_inline 12367 #endif 12368 sip_min_se_t *sip_min_se_dup(su_home_t *home, sip_min_se_t const *hdr) 12369 __attribute__((__malloc__)); 12370 12371 #if SU_HAVE_INLINE 12372 su_inline 12373 sip_min_se_t *sip_min_se_dup(su_home_t *home, sip_min_se_t const *hdr) 12374 { 12375 return (sip_min_se_t *) 12376 msg_header_dup_as(home, sip_min_se_class, (msg_header_t const *)hdr); 12377 } 12378 #endif 12379 12408 #if SU_HAVE_INLINE 12409 su_inline 12410 #endif 12411 sip_min_se_t *sip_min_se_copy(su_home_t *home, sip_min_se_t const *hdr) 12412 __attribute__((__malloc__)); 12413 12414 #if SU_HAVE_INLINE 12415 su_inline 12416 sip_min_se_t *sip_min_se_copy(su_home_t *home, sip_min_se_t const *hdr) 12417 { 12418 return (sip_min_se_t *) 12419 msg_header_copy_as(home, sip_min_se_class, (msg_header_t const *)hdr); 12420 } 12421 #endif 12422 12438 #if SU_HAVE_INLINE 12439 su_inline 12440 #endif 12441 sip_min_se_t *sip_min_se_make(su_home_t *home, char const *s) 12442 __attribute__((__malloc__)); 12443 12444 #if SU_HAVE_INLINE 12445 su_inline sip_min_se_t *sip_min_se_make(su_home_t *home, char const *s) 12446 { 12447 return (sip_min_se_t *)sip_header_make(home, sip_min_se_class, s); 12448 } 12449 #endif 12450 12469 #if SU_HAVE_INLINE 12470 su_inline 12471 #endif 12472 sip_min_se_t *sip_min_se_format(su_home_t *home, char const *fmt, ...) 12473 __attribute__((__malloc__, __format__ (printf, 2, 3))); 12474 12475 #if SU_HAVE_INLINE 12476 su_inline sip_min_se_t *sip_min_se_format(su_home_t *home, char const *fmt, ...) 12477 { 12478 sip_header_t *h; 12479 va_list ap; 12480 12481 va_start(ap, fmt); 12482 h = sip_header_vformat(home, sip_min_se_class, fmt, ap); 12483 va_end(ap); 12484 12485 return (sip_min_se_t *)h; 12486 } 12487 #endif 12488 12496 SOFIAPUBFUN issize_t sip_path_d(su_home_t *, msg_header_t *, 12497 char *s, isize_t slen); 12498 12500 SOFIAPUBFUN issize_t sip_path_e(char b[], isize_t bsiz, 12501 msg_header_t const *h, int flags); 12502 12507 #define sip_path(sip) \ 12508 ((sip_path_t *)msg_header_access((msg_pub_t*)(sip), sip_path_class)) 12509 12524 #define SIP_PATH_INIT() SIP_HDR_INIT(path) 12525 12541 #if SU_HAVE_INLINE 12542 su_inline sip_path_t *sip_path_init(sip_path_t x[1]) 12543 { 12544 return SIP_HEADER_INIT(x, sip_path_class, sizeof(sip_path_t)); 12545 } 12546 #else 12547 #define sip_path_init(x) \ 12548 SIP_HEADER_INIT(x, sip_path_class, sizeof(sip_path_t)) 12549 #endif 12550 12563 #if SU_HAVE_INLINE 12564 su_inline int sip_is_path(sip_header_t const *header) 12565 { 12566 return header && header->sh_class->hc_hash == sip_path_hash; 12567 } 12568 #else 12569 int sip_is_path(sip_header_t const *header); 12570 #endif 12571 12572 #define sip_path_p(h) sip_is_path((h)) 12573 12574 12603 #if SU_HAVE_INLINE 12604 su_inline 12605 #endif 12606 sip_path_t *sip_path_dup(su_home_t *home, sip_path_t const *hdr) 12607 __attribute__((__malloc__)); 12608 12609 #if SU_HAVE_INLINE 12610 su_inline 12611 sip_path_t *sip_path_dup(su_home_t *home, sip_path_t const *hdr) 12612 { 12613 return (sip_path_t *) 12614 msg_header_dup_as(home, sip_path_class, (msg_header_t const *)hdr); 12615 } 12616 #endif 12617 12646 #if SU_HAVE_INLINE 12647 su_inline 12648 #endif 12649 sip_path_t *sip_path_copy(su_home_t *home, sip_path_t const *hdr) 12650 __attribute__((__malloc__)); 12651 12652 #if SU_HAVE_INLINE 12653 su_inline 12654 sip_path_t *sip_path_copy(su_home_t *home, sip_path_t const *hdr) 12655 { 12656 return (sip_path_t *) 12657 msg_header_copy_as(home, sip_path_class, (msg_header_t const *)hdr); 12658 } 12659 #endif 12660 12676 #if SU_HAVE_INLINE 12677 su_inline 12678 #endif 12679 sip_path_t *sip_path_make(su_home_t *home, char const *s) 12680 __attribute__((__malloc__)); 12681 12682 #if SU_HAVE_INLINE 12683 su_inline sip_path_t *sip_path_make(su_home_t *home, char const *s) 12684 { 12685 return (sip_path_t *)sip_header_make(home, sip_path_class, s); 12686 } 12687 #endif 12688 12707 #if SU_HAVE_INLINE 12708 su_inline 12709 #endif 12710 sip_path_t *sip_path_format(su_home_t *home, char const *fmt, ...) 12711 __attribute__((__malloc__, __format__ (printf, 2, 3))); 12712 12713 #if SU_HAVE_INLINE 12714 su_inline sip_path_t *sip_path_format(su_home_t *home, char const *fmt, ...) 12715 { 12716 sip_header_t *h; 12717 va_list ap; 12718 12719 va_start(ap, fmt); 12720 h = sip_header_vformat(home, sip_path_class, fmt, ap); 12721 va_end(ap); 12722 12723 return (sip_path_t *)h; 12724 } 12725 #endif 12726 12734 SOFIAPUBFUN issize_t sip_service_route_d(su_home_t *, msg_header_t *, 12735 char *s, isize_t slen); 12736 12738 SOFIAPUBFUN issize_t sip_service_route_e(char b[], isize_t bsiz, 12739 msg_header_t const *h, int flags); 12740 12745 #define sip_service_route(sip) \ 12746 ((sip_service_route_t *)msg_header_access((msg_pub_t*)(sip), sip_service_route_class)) 12747 12762 #define SIP_SERVICE_ROUTE_INIT() SIP_HDR_INIT(service_route) 12763 12779 #if SU_HAVE_INLINE 12780 su_inline sip_service_route_t *sip_service_route_init(sip_service_route_t x[1]) 12781 { 12782 return SIP_HEADER_INIT(x, sip_service_route_class, sizeof(sip_service_route_t)); 12783 } 12784 #else 12785 #define sip_service_route_init(x) \ 12786 SIP_HEADER_INIT(x, sip_service_route_class, sizeof(sip_service_route_t)) 12787 #endif 12788 12801 #if SU_HAVE_INLINE 12802 su_inline int sip_is_service_route(sip_header_t const *header) 12803 { 12804 return header && header->sh_class->hc_hash == sip_service_route_hash; 12805 } 12806 #else 12807 int sip_is_service_route(sip_header_t const *header); 12808 #endif 12809 12810 #define sip_service_route_p(h) sip_is_service_route((h)) 12811 12812 12841 #if SU_HAVE_INLINE 12842 su_inline 12843 #endif 12844 sip_service_route_t *sip_service_route_dup(su_home_t *home, sip_service_route_t const *hdr) 12845 __attribute__((__malloc__)); 12846 12847 #if SU_HAVE_INLINE 12848 su_inline 12849 sip_service_route_t *sip_service_route_dup(su_home_t *home, sip_service_route_t const *hdr) 12850 { 12851 return (sip_service_route_t *) 12852 msg_header_dup_as(home, sip_service_route_class, (msg_header_t const *)hdr); 12853 } 12854 #endif 12855 12884 #if SU_HAVE_INLINE 12885 su_inline 12886 #endif 12887 sip_service_route_t *sip_service_route_copy(su_home_t *home, sip_service_route_t const *hdr) 12888 __attribute__((__malloc__)); 12889 12890 #if SU_HAVE_INLINE 12891 su_inline 12892 sip_service_route_t *sip_service_route_copy(su_home_t *home, sip_service_route_t const *hdr) 12893 { 12894 return (sip_service_route_t *) 12895 msg_header_copy_as(home, sip_service_route_class, (msg_header_t const *)hdr); 12896 } 12897 #endif 12898 12914 #if SU_HAVE_INLINE 12915 su_inline 12916 #endif 12917 sip_service_route_t *sip_service_route_make(su_home_t *home, char const *s) 12918 __attribute__((__malloc__)); 12919 12920 #if SU_HAVE_INLINE 12921 su_inline sip_service_route_t *sip_service_route_make(su_home_t *home, char const *s) 12922 { 12923 return (sip_service_route_t *)sip_header_make(home, sip_service_route_class, s); 12924 } 12925 #endif 12926 12945 #if SU_HAVE_INLINE 12946 su_inline 12947 #endif 12948 sip_service_route_t *sip_service_route_format(su_home_t *home, char const *fmt, ...) 12949 __attribute__((__malloc__, __format__ (printf, 2, 3))); 12950 12951 #if SU_HAVE_INLINE 12952 su_inline sip_service_route_t *sip_service_route_format(su_home_t *home, char const *fmt, ...) 12953 { 12954 sip_header_t *h; 12955 va_list ap; 12956 12957 va_start(ap, fmt); 12958 h = sip_header_vformat(home, sip_service_route_class, fmt, ap); 12959 va_end(ap); 12960 12961 return (sip_service_route_t *)h; 12962 } 12963 #endif 12964 12972 SOFIAPUBFUN issize_t sip_reason_d(su_home_t *, msg_header_t *, 12973 char *s, isize_t slen); 12974 12976 SOFIAPUBFUN issize_t sip_reason_e(char b[], isize_t bsiz, 12977 msg_header_t const *h, int flags); 12978 12983 #define sip_reason(sip) \ 12984 ((sip_reason_t *)msg_header_access((msg_pub_t*)(sip), sip_reason_class)) 12985 13000 #define SIP_REASON_INIT() SIP_HDR_INIT(reason) 13001 13017 #if SU_HAVE_INLINE 13018 su_inline sip_reason_t *sip_reason_init(sip_reason_t x[1]) 13019 { 13020 return SIP_HEADER_INIT(x, sip_reason_class, sizeof(sip_reason_t)); 13021 } 13022 #else 13023 #define sip_reason_init(x) \ 13024 SIP_HEADER_INIT(x, sip_reason_class, sizeof(sip_reason_t)) 13025 #endif 13026 13039 #if SU_HAVE_INLINE 13040 su_inline int sip_is_reason(sip_header_t const *header) 13041 { 13042 return header && header->sh_class->hc_hash == sip_reason_hash; 13043 } 13044 #else 13045 int sip_is_reason(sip_header_t const *header); 13046 #endif 13047 13048 #define sip_reason_p(h) sip_is_reason((h)) 13049 13050 13079 #if SU_HAVE_INLINE 13080 su_inline 13081 #endif 13082 sip_reason_t *sip_reason_dup(su_home_t *home, sip_reason_t const *hdr) 13083 __attribute__((__malloc__)); 13084 13085 #if SU_HAVE_INLINE 13086 su_inline 13087 sip_reason_t *sip_reason_dup(su_home_t *home, sip_reason_t const *hdr) 13088 { 13089 return (sip_reason_t *) 13090 msg_header_dup_as(home, sip_reason_class, (msg_header_t const *)hdr); 13091 } 13092 #endif 13093 13122 #if SU_HAVE_INLINE 13123 su_inline 13124 #endif 13125 sip_reason_t *sip_reason_copy(su_home_t *home, sip_reason_t const *hdr) 13126 __attribute__((__malloc__)); 13127 13128 #if SU_HAVE_INLINE 13129 su_inline 13130 sip_reason_t *sip_reason_copy(su_home_t *home, sip_reason_t const *hdr) 13131 { 13132 return (sip_reason_t *) 13133 msg_header_copy_as(home, sip_reason_class, (msg_header_t const *)hdr); 13134 } 13135 #endif 13136 13152 #if SU_HAVE_INLINE 13153 su_inline 13154 #endif 13155 sip_reason_t *sip_reason_make(su_home_t *home, char const *s) 13156 __attribute__((__malloc__)); 13157 13158 #if SU_HAVE_INLINE 13159 su_inline sip_reason_t *sip_reason_make(su_home_t *home, char const *s) 13160 { 13161 return (sip_reason_t *)sip_header_make(home, sip_reason_class, s); 13162 } 13163 #endif 13164 13183 #if SU_HAVE_INLINE 13184 su_inline 13185 #endif 13186 sip_reason_t *sip_reason_format(su_home_t *home, char const *fmt, ...) 13187 __attribute__((__malloc__, __format__ (printf, 2, 3))); 13188 13189 #if SU_HAVE_INLINE 13190 su_inline sip_reason_t *sip_reason_format(su_home_t *home, char const *fmt, ...) 13191 { 13192 sip_header_t *h; 13193 va_list ap; 13194 13195 va_start(ap, fmt); 13196 h = sip_header_vformat(home, sip_reason_class, fmt, ap); 13197 va_end(ap); 13198 13199 return (sip_reason_t *)h; 13200 } 13201 #endif 13202 13210 SOFIAPUBFUN issize_t sip_security_client_d(su_home_t *, msg_header_t *, 13211 char *s, isize_t slen); 13212 13214 SOFIAPUBFUN issize_t sip_security_client_e(char b[], isize_t bsiz, 13215 msg_header_t const *h, int flags); 13216 13221 #define sip_security_client(sip) \ 13222 ((sip_security_client_t *)msg_header_access((msg_pub_t*)(sip), sip_security_client_class)) 13223 13238 #define SIP_SECURITY_CLIENT_INIT() SIP_HDR_INIT(security_client) 13239 13255 #if SU_HAVE_INLINE 13256 su_inline sip_security_client_t *sip_security_client_init(sip_security_client_t x[1]) 13257 { 13258 return SIP_HEADER_INIT(x, sip_security_client_class, sizeof(sip_security_client_t)); 13259 } 13260 #else 13261 #define sip_security_client_init(x) \ 13262 SIP_HEADER_INIT(x, sip_security_client_class, sizeof(sip_security_client_t)) 13263 #endif 13264 13277 #if SU_HAVE_INLINE 13278 su_inline int sip_is_security_client(sip_header_t const *header) 13279 { 13280 return header && header->sh_class->hc_hash == sip_security_client_hash; 13281 } 13282 #else 13283 int sip_is_security_client(sip_header_t const *header); 13284 #endif 13285 13286 #define sip_security_client_p(h) sip_is_security_client((h)) 13287 13288 13317 #if SU_HAVE_INLINE 13318 su_inline 13319 #endif 13320 sip_security_client_t *sip_security_client_dup(su_home_t *home, sip_security_client_t const *hdr) 13321 __attribute__((__malloc__)); 13322 13323 #if SU_HAVE_INLINE 13324 su_inline 13325 sip_security_client_t *sip_security_client_dup(su_home_t *home, sip_security_client_t const *hdr) 13326 { 13327 return (sip_security_client_t *) 13328 msg_header_dup_as(home, sip_security_client_class, (msg_header_t const *)hdr); 13329 } 13330 #endif 13331 13360 #if SU_HAVE_INLINE 13361 su_inline 13362 #endif 13363 sip_security_client_t *sip_security_client_copy(su_home_t *home, sip_security_client_t const *hdr) 13364 __attribute__((__malloc__)); 13365 13366 #if SU_HAVE_INLINE 13367 su_inline 13368 sip_security_client_t *sip_security_client_copy(su_home_t *home, sip_security_client_t const *hdr) 13369 { 13370 return (sip_security_client_t *) 13371 msg_header_copy_as(home, sip_security_client_class, (msg_header_t const *)hdr); 13372 } 13373 #endif 13374 13390 #if SU_HAVE_INLINE 13391 su_inline 13392 #endif 13393 sip_security_client_t *sip_security_client_make(su_home_t *home, char const *s) 13394 __attribute__((__malloc__)); 13395 13396 #if SU_HAVE_INLINE 13397 su_inline sip_security_client_t *sip_security_client_make(su_home_t *home, char const *s) 13398 { 13399 return (sip_security_client_t *)sip_header_make(home, sip_security_client_class, s); 13400 } 13401 #endif 13402 13421 #if SU_HAVE_INLINE 13422 su_inline 13423 #endif 13424 sip_security_client_t *sip_security_client_format(su_home_t *home, char const *fmt, ...) 13425 __attribute__((__malloc__, __format__ (printf, 2, 3))); 13426 13427 #if SU_HAVE_INLINE 13428 su_inline sip_security_client_t *sip_security_client_format(su_home_t *home, char const *fmt, ...) 13429 { 13430 sip_header_t *h; 13431 va_list ap; 13432 13433 va_start(ap, fmt); 13434 h = sip_header_vformat(home, sip_security_client_class, fmt, ap); 13435 va_end(ap); 13436 13437 return (sip_security_client_t *)h; 13438 } 13439 #endif 13440 13448 SOFIAPUBFUN issize_t sip_security_server_d(su_home_t *, msg_header_t *, 13449 char *s, isize_t slen); 13450 13452 SOFIAPUBFUN issize_t sip_security_server_e(char b[], isize_t bsiz, 13453 msg_header_t const *h, int flags); 13454 13459 #define sip_security_server(sip) \ 13460 ((sip_security_server_t *)msg_header_access((msg_pub_t*)(sip), sip_security_server_class)) 13461 13476 #define SIP_SECURITY_SERVER_INIT() SIP_HDR_INIT(security_server) 13477 13493 #if SU_HAVE_INLINE 13494 su_inline sip_security_server_t *sip_security_server_init(sip_security_server_t x[1]) 13495 { 13496 return SIP_HEADER_INIT(x, sip_security_server_class, sizeof(sip_security_server_t)); 13497 } 13498 #else 13499 #define sip_security_server_init(x) \ 13500 SIP_HEADER_INIT(x, sip_security_server_class, sizeof(sip_security_server_t)) 13501 #endif 13502 13515 #if SU_HAVE_INLINE 13516 su_inline int sip_is_security_server(sip_header_t const *header) 13517 { 13518 return header && header->sh_class->hc_hash == sip_security_server_hash; 13519 } 13520 #else 13521 int sip_is_security_server(sip_header_t const *header); 13522 #endif 13523 13524 #define sip_security_server_p(h) sip_is_security_server((h)) 13525 13526 13555 #if SU_HAVE_INLINE 13556 su_inline 13557 #endif 13558 sip_security_server_t *sip_security_server_dup(su_home_t *home, sip_security_server_t const *hdr) 13559 __attribute__((__malloc__)); 13560 13561 #if SU_HAVE_INLINE 13562 su_inline 13563 sip_security_server_t *sip_security_server_dup(su_home_t *home, sip_security_server_t const *hdr) 13564 { 13565 return (sip_security_server_t *) 13566 msg_header_dup_as(home, sip_security_server_class, (msg_header_t const *)hdr); 13567 } 13568 #endif 13569 13598 #if SU_HAVE_INLINE 13599 su_inline 13600 #endif 13601 sip_security_server_t *sip_security_server_copy(su_home_t *home, sip_security_server_t const *hdr) 13602 __attribute__((__malloc__)); 13603 13604 #if SU_HAVE_INLINE 13605 su_inline 13606 sip_security_server_t *sip_security_server_copy(su_home_t *home, sip_security_server_t const *hdr) 13607 { 13608 return (sip_security_server_t *) 13609 msg_header_copy_as(home, sip_security_server_class, (msg_header_t const *)hdr); 13610 } 13611 #endif 13612 13628 #if SU_HAVE_INLINE 13629 su_inline 13630 #endif 13631 sip_security_server_t *sip_security_server_make(su_home_t *home, char const *s) 13632 __attribute__((__malloc__)); 13633 13634 #if SU_HAVE_INLINE 13635 su_inline sip_security_server_t *sip_security_server_make(su_home_t *home, char const *s) 13636 { 13637 return (sip_security_server_t *)sip_header_make(home, sip_security_server_class, s); 13638 } 13639 #endif 13640 13659 #if SU_HAVE_INLINE 13660 su_inline 13661 #endif 13662 sip_security_server_t *sip_security_server_format(su_home_t *home, char const *fmt, ...) 13663 __attribute__((__malloc__, __format__ (printf, 2, 3))); 13664 13665 #if SU_HAVE_INLINE 13666 su_inline sip_security_server_t *sip_security_server_format(su_home_t *home, char const *fmt, ...) 13667 { 13668 sip_header_t *h; 13669 va_list ap; 13670 13671 va_start(ap, fmt); 13672 h = sip_header_vformat(home, sip_security_server_class, fmt, ap); 13673 va_end(ap); 13674 13675 return (sip_security_server_t *)h; 13676 } 13677 #endif 13678 13686 SOFIAPUBFUN issize_t sip_security_verify_d(su_home_t *, msg_header_t *, 13687 char *s, isize_t slen); 13688 13690 SOFIAPUBFUN issize_t sip_security_verify_e(char b[], isize_t bsiz, 13691 msg_header_t const *h, int flags); 13692 13697 #define sip_security_verify(sip) \ 13698 ((sip_security_verify_t *)msg_header_access((msg_pub_t*)(sip), sip_security_verify_class)) 13699 13714 #define SIP_SECURITY_VERIFY_INIT() SIP_HDR_INIT(security_verify) 13715 13731 #if SU_HAVE_INLINE 13732 su_inline sip_security_verify_t *sip_security_verify_init(sip_security_verify_t x[1]) 13733 { 13734 return SIP_HEADER_INIT(x, sip_security_verify_class, sizeof(sip_security_verify_t)); 13735 } 13736 #else 13737 #define sip_security_verify_init(x) \ 13738 SIP_HEADER_INIT(x, sip_security_verify_class, sizeof(sip_security_verify_t)) 13739 #endif 13740 13753 #if SU_HAVE_INLINE 13754 su_inline int sip_is_security_verify(sip_header_t const *header) 13755 { 13756 return header && header->sh_class->hc_hash == sip_security_verify_hash; 13757 } 13758 #else 13759 int sip_is_security_verify(sip_header_t const *header); 13760 #endif 13761 13762 #define sip_security_verify_p(h) sip_is_security_verify((h)) 13763 13764 13793 #if SU_HAVE_INLINE 13794 su_inline 13795 #endif 13796 sip_security_verify_t *sip_security_verify_dup(su_home_t *home, sip_security_verify_t const *hdr) 13797 __attribute__((__malloc__)); 13798 13799 #if SU_HAVE_INLINE 13800 su_inline 13801 sip_security_verify_t *sip_security_verify_dup(su_home_t *home, sip_security_verify_t const *hdr) 13802 { 13803 return (sip_security_verify_t *) 13804 msg_header_dup_as(home, sip_security_verify_class, (msg_header_t const *)hdr); 13805 } 13806 #endif 13807 13836 #if SU_HAVE_INLINE 13837 su_inline 13838 #endif 13839 sip_security_verify_t *sip_security_verify_copy(su_home_t *home, sip_security_verify_t const *hdr) 13840 __attribute__((__malloc__)); 13841 13842 #if SU_HAVE_INLINE 13843 su_inline 13844 sip_security_verify_t *sip_security_verify_copy(su_home_t *home, sip_security_verify_t const *hdr) 13845 { 13846 return (sip_security_verify_t *) 13847 msg_header_copy_as(home, sip_security_verify_class, (msg_header_t const *)hdr); 13848 } 13849 #endif 13850 13866 #if SU_HAVE_INLINE 13867 su_inline 13868 #endif 13869 sip_security_verify_t *sip_security_verify_make(su_home_t *home, char const *s) 13870 __attribute__((__malloc__)); 13871 13872 #if SU_HAVE_INLINE 13873 su_inline sip_security_verify_t *sip_security_verify_make(su_home_t *home, char const *s) 13874 { 13875 return (sip_security_verify_t *)sip_header_make(home, sip_security_verify_class, s); 13876 } 13877 #endif 13878 13897 #if SU_HAVE_INLINE 13898 su_inline 13899 #endif 13900 sip_security_verify_t *sip_security_verify_format(su_home_t *home, char const *fmt, ...) 13901 __attribute__((__malloc__, __format__ (printf, 2, 3))); 13902 13903 #if SU_HAVE_INLINE 13904 su_inline sip_security_verify_t *sip_security_verify_format(su_home_t *home, char const *fmt, ...) 13905 { 13906 sip_header_t *h; 13907 va_list ap; 13908 13909 va_start(ap, fmt); 13910 h = sip_header_vformat(home, sip_security_verify_class, fmt, ap); 13911 va_end(ap); 13912 13913 return (sip_security_verify_t *)h; 13914 } 13915 #endif 13916 13924 SOFIAPUBFUN issize_t sip_privacy_d(su_home_t *, msg_header_t *, 13925 char *s, isize_t slen); 13926 13928 SOFIAPUBFUN issize_t sip_privacy_e(char b[], isize_t bsiz, 13929 msg_header_t const *h, int flags); 13930 13935 #define sip_privacy(sip) \ 13936 ((sip_privacy_t *)msg_header_access((msg_pub_t*)(sip), sip_privacy_class)) 13937 13952 #define SIP_PRIVACY_INIT() SIP_HDR_INIT(privacy) 13953 13969 #if SU_HAVE_INLINE 13970 su_inline sip_privacy_t *sip_privacy_init(sip_privacy_t x[1]) 13971 { 13972 return SIP_HEADER_INIT(x, sip_privacy_class, sizeof(sip_privacy_t)); 13973 } 13974 #else 13975 #define sip_privacy_init(x) \ 13976 SIP_HEADER_INIT(x, sip_privacy_class, sizeof(sip_privacy_t)) 13977 #endif 13978 13991 #if SU_HAVE_INLINE 13992 su_inline int sip_is_privacy(sip_header_t const *header) 13993 { 13994 return header && header->sh_class->hc_hash == sip_privacy_hash; 13995 } 13996 #else 13997 int sip_is_privacy(sip_header_t const *header); 13998 #endif 13999 14000 #define sip_privacy_p(h) sip_is_privacy((h)) 14001 14002 14031 #if SU_HAVE_INLINE 14032 su_inline 14033 #endif 14034 sip_privacy_t *sip_privacy_dup(su_home_t *home, sip_privacy_t const *hdr) 14035 __attribute__((__malloc__)); 14036 14037 #if SU_HAVE_INLINE 14038 su_inline 14039 sip_privacy_t *sip_privacy_dup(su_home_t *home, sip_privacy_t const *hdr) 14040 { 14041 return (sip_privacy_t *) 14042 msg_header_dup_as(home, sip_privacy_class, (msg_header_t const *)hdr); 14043 } 14044 #endif 14045 14074 #if SU_HAVE_INLINE 14075 su_inline 14076 #endif 14077 sip_privacy_t *sip_privacy_copy(su_home_t *home, sip_privacy_t const *hdr) 14078 __attribute__((__malloc__)); 14079 14080 #if SU_HAVE_INLINE 14081 su_inline 14082 sip_privacy_t *sip_privacy_copy(su_home_t *home, sip_privacy_t const *hdr) 14083 { 14084 return (sip_privacy_t *) 14085 msg_header_copy_as(home, sip_privacy_class, (msg_header_t const *)hdr); 14086 } 14087 #endif 14088 14104 #if SU_HAVE_INLINE 14105 su_inline 14106 #endif 14107 sip_privacy_t *sip_privacy_make(su_home_t *home, char const *s) 14108 __attribute__((__malloc__)); 14109 14110 #if SU_HAVE_INLINE 14111 su_inline sip_privacy_t *sip_privacy_make(su_home_t *home, char const *s) 14112 { 14113 return (sip_privacy_t *)sip_header_make(home, sip_privacy_class, s); 14114 } 14115 #endif 14116 14135 #if SU_HAVE_INLINE 14136 su_inline 14137 #endif 14138 sip_privacy_t *sip_privacy_format(su_home_t *home, char const *fmt, ...) 14139 __attribute__((__malloc__, __format__ (printf, 2, 3))); 14140 14141 #if SU_HAVE_INLINE 14142 su_inline sip_privacy_t *sip_privacy_format(su_home_t *home, char const *fmt, ...) 14143 { 14144 sip_header_t *h; 14145 va_list ap; 14146 14147 va_start(ap, fmt); 14148 h = sip_header_vformat(home, sip_privacy_class, fmt, ap); 14149 va_end(ap); 14150 14151 return (sip_privacy_t *)h; 14152 } 14153 #endif 14154 14162 SOFIAPUBFUN issize_t sip_etag_d(su_home_t *, msg_header_t *, 14163 char *s, isize_t slen); 14164 14166 SOFIAPUBFUN issize_t sip_etag_e(char b[], isize_t bsiz, 14167 msg_header_t const *h, int flags); 14168 14173 #define sip_etag(sip) \ 14174 ((sip_etag_t *)msg_header_access((msg_pub_t*)(sip), sip_etag_class)) 14175 14190 #define SIP_ETAG_INIT() SIP_HDR_INIT(etag) 14191 14207 #if SU_HAVE_INLINE 14208 su_inline sip_etag_t *sip_etag_init(sip_etag_t x[1]) 14209 { 14210 return SIP_HEADER_INIT(x, sip_etag_class, sizeof(sip_etag_t)); 14211 } 14212 #else 14213 #define sip_etag_init(x) \ 14214 SIP_HEADER_INIT(x, sip_etag_class, sizeof(sip_etag_t)) 14215 #endif 14216 14229 #if SU_HAVE_INLINE 14230 su_inline int sip_is_etag(sip_header_t const *header) 14231 { 14232 return header && header->sh_class->hc_hash == sip_etag_hash; 14233 } 14234 #else 14235 int sip_is_etag(sip_header_t const *header); 14236 #endif 14237 14238 #define sip_etag_p(h) sip_is_etag((h)) 14239 14240 14269 #if SU_HAVE_INLINE 14270 su_inline 14271 #endif 14272 sip_etag_t *sip_etag_dup(su_home_t *home, sip_etag_t const *hdr) 14273 __attribute__((__malloc__)); 14274 14275 #if SU_HAVE_INLINE 14276 su_inline 14277 sip_etag_t *sip_etag_dup(su_home_t *home, sip_etag_t const *hdr) 14278 { 14279 return (sip_etag_t *) 14280 msg_header_dup_as(home, sip_etag_class, (msg_header_t const *)hdr); 14281 } 14282 #endif 14283 14312 #if SU_HAVE_INLINE 14313 su_inline 14314 #endif 14315 sip_etag_t *sip_etag_copy(su_home_t *home, sip_etag_t const *hdr) 14316 __attribute__((__malloc__)); 14317 14318 #if SU_HAVE_INLINE 14319 su_inline 14320 sip_etag_t *sip_etag_copy(su_home_t *home, sip_etag_t const *hdr) 14321 { 14322 return (sip_etag_t *) 14323 msg_header_copy_as(home, sip_etag_class, (msg_header_t const *)hdr); 14324 } 14325 #endif 14326 14342 #if SU_HAVE_INLINE 14343 su_inline 14344 #endif 14345 sip_etag_t *sip_etag_make(su_home_t *home, char const *s) 14346 __attribute__((__malloc__)); 14347 14348 #if SU_HAVE_INLINE 14349 su_inline sip_etag_t *sip_etag_make(su_home_t *home, char const *s) 14350 { 14351 return (sip_etag_t *)sip_header_make(home, sip_etag_class, s); 14352 } 14353 #endif 14354 14373 #if SU_HAVE_INLINE 14374 su_inline 14375 #endif 14376 sip_etag_t *sip_etag_format(su_home_t *home, char const *fmt, ...) 14377 __attribute__((__malloc__, __format__ (printf, 2, 3))); 14378 14379 #if SU_HAVE_INLINE 14380 su_inline sip_etag_t *sip_etag_format(su_home_t *home, char const *fmt, ...) 14381 { 14382 sip_header_t *h; 14383 va_list ap; 14384 14385 va_start(ap, fmt); 14386 h = sip_header_vformat(home, sip_etag_class, fmt, ap); 14387 va_end(ap); 14388 14389 return (sip_etag_t *)h; 14390 } 14391 #endif 14392 14400 SOFIAPUBFUN issize_t sip_if_match_d(su_home_t *, msg_header_t *, 14401 char *s, isize_t slen); 14402 14404 SOFIAPUBFUN issize_t sip_if_match_e(char b[], isize_t bsiz, 14405 msg_header_t const *h, int flags); 14406 14411 #define sip_if_match(sip) \ 14412 ((sip_if_match_t *)msg_header_access((msg_pub_t*)(sip), sip_if_match_class)) 14413 14428 #define SIP_IF_MATCH_INIT() SIP_HDR_INIT(if_match) 14429 14445 #if SU_HAVE_INLINE 14446 su_inline sip_if_match_t *sip_if_match_init(sip_if_match_t x[1]) 14447 { 14448 return SIP_HEADER_INIT(x, sip_if_match_class, sizeof(sip_if_match_t)); 14449 } 14450 #else 14451 #define sip_if_match_init(x) \ 14452 SIP_HEADER_INIT(x, sip_if_match_class, sizeof(sip_if_match_t)) 14453 #endif 14454 14467 #if SU_HAVE_INLINE 14468 su_inline int sip_is_if_match(sip_header_t const *header) 14469 { 14470 return header && header->sh_class->hc_hash == sip_if_match_hash; 14471 } 14472 #else 14473 int sip_is_if_match(sip_header_t const *header); 14474 #endif 14475 14476 #define sip_if_match_p(h) sip_is_if_match((h)) 14477 14478 14507 #if SU_HAVE_INLINE 14508 su_inline 14509 #endif 14510 sip_if_match_t *sip_if_match_dup(su_home_t *home, sip_if_match_t const *hdr) 14511 __attribute__((__malloc__)); 14512 14513 #if SU_HAVE_INLINE 14514 su_inline 14515 sip_if_match_t *sip_if_match_dup(su_home_t *home, sip_if_match_t const *hdr) 14516 { 14517 return (sip_if_match_t *) 14518 msg_header_dup_as(home, sip_if_match_class, (msg_header_t const *)hdr); 14519 } 14520 #endif 14521 14550 #if SU_HAVE_INLINE 14551 su_inline 14552 #endif 14553 sip_if_match_t *sip_if_match_copy(su_home_t *home, sip_if_match_t const *hdr) 14554 __attribute__((__malloc__)); 14555 14556 #if SU_HAVE_INLINE 14557 su_inline 14558 sip_if_match_t *sip_if_match_copy(su_home_t *home, sip_if_match_t const *hdr) 14559 { 14560 return (sip_if_match_t *) 14561 msg_header_copy_as(home, sip_if_match_class, (msg_header_t const *)hdr); 14562 } 14563 #endif 14564 14580 #if SU_HAVE_INLINE 14581 su_inline 14582 #endif 14583 sip_if_match_t *sip_if_match_make(su_home_t *home, char const *s) 14584 __attribute__((__malloc__)); 14585 14586 #if SU_HAVE_INLINE 14587 su_inline sip_if_match_t *sip_if_match_make(su_home_t *home, char const *s) 14588 { 14589 return (sip_if_match_t *)sip_header_make(home, sip_if_match_class, s); 14590 } 14591 #endif 14592 14611 #if SU_HAVE_INLINE 14612 su_inline 14613 #endif 14614 sip_if_match_t *sip_if_match_format(su_home_t *home, char const *fmt, ...) 14615 __attribute__((__malloc__, __format__ (printf, 2, 3))); 14616 14617 #if SU_HAVE_INLINE 14618 su_inline sip_if_match_t *sip_if_match_format(su_home_t *home, char const *fmt, ...) 14619 { 14620 sip_header_t *h; 14621 va_list ap; 14622 14623 va_start(ap, fmt); 14624 h = sip_header_vformat(home, sip_if_match_class, fmt, ap); 14625 va_end(ap); 14626 14627 return (sip_if_match_t *)h; 14628 } 14629 #endif 14630 14638 SOFIAPUBFUN issize_t sip_mime_version_d(su_home_t *, msg_header_t *, 14639 char *s, isize_t slen); 14640 14642 SOFIAPUBFUN issize_t sip_mime_version_e(char b[], isize_t bsiz, 14643 msg_header_t const *h, int flags); 14644 14649 #define sip_mime_version(sip) \ 14650 ((sip_mime_version_t *)msg_header_access((msg_pub_t*)(sip), sip_mime_version_class)) 14651 14666 #define SIP_MIME_VERSION_INIT() SIP_HDR_INIT(mime_version) 14667 14683 #if SU_HAVE_INLINE 14684 su_inline sip_mime_version_t *sip_mime_version_init(sip_mime_version_t x[1]) 14685 { 14686 return SIP_HEADER_INIT(x, sip_mime_version_class, sizeof(sip_mime_version_t)); 14687 } 14688 #else 14689 #define sip_mime_version_init(x) \ 14690 SIP_HEADER_INIT(x, sip_mime_version_class, sizeof(sip_mime_version_t)) 14691 #endif 14692 14705 #if SU_HAVE_INLINE 14706 su_inline int sip_is_mime_version(sip_header_t const *header) 14707 { 14708 return header && header->sh_class->hc_hash == sip_mime_version_hash; 14709 } 14710 #else 14711 int sip_is_mime_version(sip_header_t const *header); 14712 #endif 14713 14714 #define sip_mime_version_p(h) sip_is_mime_version((h)) 14715 14716 14745 #if SU_HAVE_INLINE 14746 su_inline 14747 #endif 14748 sip_mime_version_t *sip_mime_version_dup(su_home_t *home, sip_mime_version_t const *hdr) 14749 __attribute__((__malloc__)); 14750 14751 #if SU_HAVE_INLINE 14752 su_inline 14753 sip_mime_version_t *sip_mime_version_dup(su_home_t *home, sip_mime_version_t const *hdr) 14754 { 14755 return (sip_mime_version_t *) 14756 msg_header_dup_as(home, sip_mime_version_class, (msg_header_t const *)hdr); 14757 } 14758 #endif 14759 14788 #if SU_HAVE_INLINE 14789 su_inline 14790 #endif 14791 sip_mime_version_t *sip_mime_version_copy(su_home_t *home, sip_mime_version_t const *hdr) 14792 __attribute__((__malloc__)); 14793 14794 #if SU_HAVE_INLINE 14795 su_inline 14796 sip_mime_version_t *sip_mime_version_copy(su_home_t *home, sip_mime_version_t const *hdr) 14797 { 14798 return (sip_mime_version_t *) 14799 msg_header_copy_as(home, sip_mime_version_class, (msg_header_t const *)hdr); 14800 } 14801 #endif 14802 14818 #if SU_HAVE_INLINE 14819 su_inline 14820 #endif 14821 sip_mime_version_t *sip_mime_version_make(su_home_t *home, char const *s) 14822 __attribute__((__malloc__)); 14823 14824 #if SU_HAVE_INLINE 14825 su_inline sip_mime_version_t *sip_mime_version_make(su_home_t *home, char const *s) 14826 { 14827 return (sip_mime_version_t *)sip_header_make(home, sip_mime_version_class, s); 14828 } 14829 #endif 14830 14849 #if SU_HAVE_INLINE 14850 su_inline 14851 #endif 14852 sip_mime_version_t *sip_mime_version_format(su_home_t *home, char const *fmt, ...) 14853 __attribute__((__malloc__, __format__ (printf, 2, 3))); 14854 14855 #if SU_HAVE_INLINE 14856 su_inline sip_mime_version_t *sip_mime_version_format(su_home_t *home, char const *fmt, ...) 14857 { 14858 sip_header_t *h; 14859 va_list ap; 14860 14861 va_start(ap, fmt); 14862 h = sip_header_vformat(home, sip_mime_version_class, fmt, ap); 14863 va_end(ap); 14864 14865 return (sip_mime_version_t *)h; 14866 } 14867 #endif 14868 14876 SOFIAPUBFUN issize_t sip_content_type_d(su_home_t *, msg_header_t *, 14877 char *s, isize_t slen); 14878 14880 SOFIAPUBFUN issize_t sip_content_type_e(char b[], isize_t bsiz, 14881 msg_header_t const *h, int flags); 14882 14887 #define sip_content_type(sip) \ 14888 ((sip_content_type_t *)msg_header_access((msg_pub_t*)(sip), sip_content_type_class)) 14889 14904 #define SIP_CONTENT_TYPE_INIT() SIP_HDR_INIT(content_type) 14905 14921 #if SU_HAVE_INLINE 14922 su_inline sip_content_type_t *sip_content_type_init(sip_content_type_t x[1]) 14923 { 14924 return SIP_HEADER_INIT(x, sip_content_type_class, sizeof(sip_content_type_t)); 14925 } 14926 #else 14927 #define sip_content_type_init(x) \ 14928 SIP_HEADER_INIT(x, sip_content_type_class, sizeof(sip_content_type_t)) 14929 #endif 14930 14943 #if SU_HAVE_INLINE 14944 su_inline int sip_is_content_type(sip_header_t const *header) 14945 { 14946 return header && header->sh_class->hc_hash == sip_content_type_hash; 14947 } 14948 #else 14949 int sip_is_content_type(sip_header_t const *header); 14950 #endif 14951 14952 #define sip_content_type_p(h) sip_is_content_type((h)) 14953 14954 14983 #if SU_HAVE_INLINE 14984 su_inline 14985 #endif 14986 sip_content_type_t *sip_content_type_dup(su_home_t *home, sip_content_type_t const *hdr) 14987 __attribute__((__malloc__)); 14988 14989 #if SU_HAVE_INLINE 14990 su_inline 14991 sip_content_type_t *sip_content_type_dup(su_home_t *home, sip_content_type_t const *hdr) 14992 { 14993 return (sip_content_type_t *) 14994 msg_header_dup_as(home, sip_content_type_class, (msg_header_t const *)hdr); 14995 } 14996 #endif 14997 15026 #if SU_HAVE_INLINE 15027 su_inline 15028 #endif 15029 sip_content_type_t *sip_content_type_copy(su_home_t *home, sip_content_type_t const *hdr) 15030 __attribute__((__malloc__)); 15031 15032 #if SU_HAVE_INLINE 15033 su_inline 15034 sip_content_type_t *sip_content_type_copy(su_home_t *home, sip_content_type_t const *hdr) 15035 { 15036 return (sip_content_type_t *) 15037 msg_header_copy_as(home, sip_content_type_class, (msg_header_t const *)hdr); 15038 } 15039 #endif 15040 15056 #if SU_HAVE_INLINE 15057 su_inline 15058 #endif 15059 sip_content_type_t *sip_content_type_make(su_home_t *home, char const *s) 15060 __attribute__((__malloc__)); 15061 15062 #if SU_HAVE_INLINE 15063 su_inline sip_content_type_t *sip_content_type_make(su_home_t *home, char const *s) 15064 { 15065 return (sip_content_type_t *)sip_header_make(home, sip_content_type_class, s); 15066 } 15067 #endif 15068 15087 #if SU_HAVE_INLINE 15088 su_inline 15089 #endif 15090 sip_content_type_t *sip_content_type_format(su_home_t *home, char const *fmt, ...) 15091 __attribute__((__malloc__, __format__ (printf, 2, 3))); 15092 15093 #if SU_HAVE_INLINE 15094 su_inline sip_content_type_t *sip_content_type_format(su_home_t *home, char const *fmt, ...) 15095 { 15096 sip_header_t *h; 15097 va_list ap; 15098 15099 va_start(ap, fmt); 15100 h = sip_header_vformat(home, sip_content_type_class, fmt, ap); 15101 va_end(ap); 15102 15103 return (sip_content_type_t *)h; 15104 } 15105 #endif 15106 15114 SOFIAPUBFUN issize_t sip_content_encoding_d(su_home_t *, msg_header_t *, 15115 char *s, isize_t slen); 15116 15118 SOFIAPUBFUN issize_t sip_content_encoding_e(char b[], isize_t bsiz, 15119 msg_header_t const *h, int flags); 15120 15125 #define sip_content_encoding(sip) \ 15126 ((sip_content_encoding_t *)msg_header_access((msg_pub_t*)(sip), sip_content_encoding_class)) 15127 15142 #define SIP_CONTENT_ENCODING_INIT() SIP_HDR_INIT(content_encoding) 15143 15159 #if SU_HAVE_INLINE 15160 su_inline sip_content_encoding_t *sip_content_encoding_init(sip_content_encoding_t x[1]) 15161 { 15162 return SIP_HEADER_INIT(x, sip_content_encoding_class, sizeof(sip_content_encoding_t)); 15163 } 15164 #else 15165 #define sip_content_encoding_init(x) \ 15166 SIP_HEADER_INIT(x, sip_content_encoding_class, sizeof(sip_content_encoding_t)) 15167 #endif 15168 15181 #if SU_HAVE_INLINE 15182 su_inline int sip_is_content_encoding(sip_header_t const *header) 15183 { 15184 return header && header->sh_class->hc_hash == sip_content_encoding_hash; 15185 } 15186 #else 15187 int sip_is_content_encoding(sip_header_t const *header); 15188 #endif 15189 15190 #define sip_content_encoding_p(h) sip_is_content_encoding((h)) 15191 15192 15221 #if SU_HAVE_INLINE 15222 su_inline 15223 #endif 15224 sip_content_encoding_t *sip_content_encoding_dup(su_home_t *home, sip_content_encoding_t const *hdr) 15225 __attribute__((__malloc__)); 15226 15227 #if SU_HAVE_INLINE 15228 su_inline 15229 sip_content_encoding_t *sip_content_encoding_dup(su_home_t *home, sip_content_encoding_t const *hdr) 15230 { 15231 return (sip_content_encoding_t *) 15232 msg_header_dup_as(home, sip_content_encoding_class, (msg_header_t const *)hdr); 15233 } 15234 #endif 15235 15264 #if SU_HAVE_INLINE 15265 su_inline 15266 #endif 15267 sip_content_encoding_t *sip_content_encoding_copy(su_home_t *home, sip_content_encoding_t const *hdr) 15268 __attribute__((__malloc__)); 15269 15270 #if SU_HAVE_INLINE 15271 su_inline 15272 sip_content_encoding_t *sip_content_encoding_copy(su_home_t *home, sip_content_encoding_t const *hdr) 15273 { 15274 return (sip_content_encoding_t *) 15275 msg_header_copy_as(home, sip_content_encoding_class, (msg_header_t const *)hdr); 15276 } 15277 #endif 15278 15294 #if SU_HAVE_INLINE 15295 su_inline 15296 #endif 15297 sip_content_encoding_t *sip_content_encoding_make(su_home_t *home, char const *s) 15298 __attribute__((__malloc__)); 15299 15300 #if SU_HAVE_INLINE 15301 su_inline sip_content_encoding_t *sip_content_encoding_make(su_home_t *home, char const *s) 15302 { 15303 return (sip_content_encoding_t *)sip_header_make(home, sip_content_encoding_class, s); 15304 } 15305 #endif 15306 15325 #if SU_HAVE_INLINE 15326 su_inline 15327 #endif 15328 sip_content_encoding_t *sip_content_encoding_format(su_home_t *home, char const *fmt, ...) 15329 __attribute__((__malloc__, __format__ (printf, 2, 3))); 15330 15331 #if SU_HAVE_INLINE 15332 su_inline sip_content_encoding_t *sip_content_encoding_format(su_home_t *home, char const *fmt, ...) 15333 { 15334 sip_header_t *h; 15335 va_list ap; 15336 15337 va_start(ap, fmt); 15338 h = sip_header_vformat(home, sip_content_encoding_class, fmt, ap); 15339 va_end(ap); 15340 15341 return (sip_content_encoding_t *)h; 15342 } 15343 #endif 15344 15352 SOFIAPUBFUN issize_t sip_content_language_d(su_home_t *, msg_header_t *, 15353 char *s, isize_t slen); 15354 15356 SOFIAPUBFUN issize_t sip_content_language_e(char b[], isize_t bsiz, 15357 msg_header_t const *h, int flags); 15358 15363 #define sip_content_language(sip) \ 15364 ((sip_content_language_t *)msg_header_access((msg_pub_t*)(sip), sip_content_language_class)) 15365 15380 #define SIP_CONTENT_LANGUAGE_INIT() SIP_HDR_INIT(content_language) 15381 15397 #if SU_HAVE_INLINE 15398 su_inline sip_content_language_t *sip_content_language_init(sip_content_language_t x[1]) 15399 { 15400 return SIP_HEADER_INIT(x, sip_content_language_class, sizeof(sip_content_language_t)); 15401 } 15402 #else 15403 #define sip_content_language_init(x) \ 15404 SIP_HEADER_INIT(x, sip_content_language_class, sizeof(sip_content_language_t)) 15405 #endif 15406 15419 #if SU_HAVE_INLINE 15420 su_inline int sip_is_content_language(sip_header_t const *header) 15421 { 15422 return header && header->sh_class->hc_hash == sip_content_language_hash; 15423 } 15424 #else 15425 int sip_is_content_language(sip_header_t const *header); 15426 #endif 15427 15428 #define sip_content_language_p(h) sip_is_content_language((h)) 15429 15430 15459 #if SU_HAVE_INLINE 15460 su_inline 15461 #endif 15462 sip_content_language_t *sip_content_language_dup(su_home_t *home, sip_content_language_t const *hdr) 15463 __attribute__((__malloc__)); 15464 15465 #if SU_HAVE_INLINE 15466 su_inline 15467 sip_content_language_t *sip_content_language_dup(su_home_t *home, sip_content_language_t const *hdr) 15468 { 15469 return (sip_content_language_t *) 15470 msg_header_dup_as(home, sip_content_language_class, (msg_header_t const *)hdr); 15471 } 15472 #endif 15473 15502 #if SU_HAVE_INLINE 15503 su_inline 15504 #endif 15505 sip_content_language_t *sip_content_language_copy(su_home_t *home, sip_content_language_t const *hdr) 15506 __attribute__((__malloc__)); 15507 15508 #if SU_HAVE_INLINE 15509 su_inline 15510 sip_content_language_t *sip_content_language_copy(su_home_t *home, sip_content_language_t const *hdr) 15511 { 15512 return (sip_content_language_t *) 15513 msg_header_copy_as(home, sip_content_language_class, (msg_header_t const *)hdr); 15514 } 15515 #endif 15516 15532 #if SU_HAVE_INLINE 15533 su_inline 15534 #endif 15535 sip_content_language_t *sip_content_language_make(su_home_t *home, char const *s) 15536 __attribute__((__malloc__)); 15537 15538 #if SU_HAVE_INLINE 15539 su_inline sip_content_language_t *sip_content_language_make(su_home_t *home, char const *s) 15540 { 15541 return (sip_content_language_t *)sip_header_make(home, sip_content_language_class, s); 15542 } 15543 #endif 15544 15563 #if SU_HAVE_INLINE 15564 su_inline 15565 #endif 15566 sip_content_language_t *sip_content_language_format(su_home_t *home, char const *fmt, ...) 15567 __attribute__((__malloc__, __format__ (printf, 2, 3))); 15568 15569 #if SU_HAVE_INLINE 15570 su_inline sip_content_language_t *sip_content_language_format(su_home_t *home, char const *fmt, ...) 15571 { 15572 sip_header_t *h; 15573 va_list ap; 15574 15575 va_start(ap, fmt); 15576 h = sip_header_vformat(home, sip_content_language_class, fmt, ap); 15577 va_end(ap); 15578 15579 return (sip_content_language_t *)h; 15580 } 15581 #endif 15582 15590 SOFIAPUBFUN issize_t sip_content_disposition_d(su_home_t *, msg_header_t *, 15591 char *s, isize_t slen); 15592 15594 SOFIAPUBFUN issize_t sip_content_disposition_e(char b[], isize_t bsiz, 15595 msg_header_t const *h, int flags); 15596 15601 #define sip_content_disposition(sip) \ 15602 ((sip_content_disposition_t *)msg_header_access((msg_pub_t*)(sip), sip_content_disposition_class)) 15603 15618 #define SIP_CONTENT_DISPOSITION_INIT() SIP_HDR_INIT(content_disposition) 15619 15635 #if SU_HAVE_INLINE 15636 su_inline sip_content_disposition_t *sip_content_disposition_init(sip_content_disposition_t x[1]) 15637 { 15638 return SIP_HEADER_INIT(x, sip_content_disposition_class, sizeof(sip_content_disposition_t)); 15639 } 15640 #else 15641 #define sip_content_disposition_init(x) \ 15642 SIP_HEADER_INIT(x, sip_content_disposition_class, sizeof(sip_content_disposition_t)) 15643 #endif 15644 15657 #if SU_HAVE_INLINE 15658 su_inline int sip_is_content_disposition(sip_header_t const *header) 15659 { 15660 return header && header->sh_class->hc_hash == sip_content_disposition_hash; 15661 } 15662 #else 15663 int sip_is_content_disposition(sip_header_t const *header); 15664 #endif 15665 15666 #define sip_content_disposition_p(h) sip_is_content_disposition((h)) 15667 15668 15697 #if SU_HAVE_INLINE 15698 su_inline 15699 #endif 15700 sip_content_disposition_t *sip_content_disposition_dup(su_home_t *home, sip_content_disposition_t const *hdr) 15701 __attribute__((__malloc__)); 15702 15703 #if SU_HAVE_INLINE 15704 su_inline 15705 sip_content_disposition_t *sip_content_disposition_dup(su_home_t *home, sip_content_disposition_t const *hdr) 15706 { 15707 return (sip_content_disposition_t *) 15708 msg_header_dup_as(home, sip_content_disposition_class, (msg_header_t const *)hdr); 15709 } 15710 #endif 15711 15740 #if SU_HAVE_INLINE 15741 su_inline 15742 #endif 15743 sip_content_disposition_t *sip_content_disposition_copy(su_home_t *home, sip_content_disposition_t const *hdr) 15744 __attribute__((__malloc__)); 15745 15746 #if SU_HAVE_INLINE 15747 su_inline 15748 sip_content_disposition_t *sip_content_disposition_copy(su_home_t *home, sip_content_disposition_t const *hdr) 15749 { 15750 return (sip_content_disposition_t *) 15751 msg_header_copy_as(home, sip_content_disposition_class, (msg_header_t const *)hdr); 15752 } 15753 #endif 15754 15770 #if SU_HAVE_INLINE 15771 su_inline 15772 #endif 15773 sip_content_disposition_t *sip_content_disposition_make(su_home_t *home, char const *s) 15774 __attribute__((__malloc__)); 15775 15776 #if SU_HAVE_INLINE 15777 su_inline sip_content_disposition_t *sip_content_disposition_make(su_home_t *home, char const *s) 15778 { 15779 return (sip_content_disposition_t *)sip_header_make(home, sip_content_disposition_class, s); 15780 } 15781 #endif 15782 15801 #if SU_HAVE_INLINE 15802 su_inline 15803 #endif 15804 sip_content_disposition_t *sip_content_disposition_format(su_home_t *home, char const *fmt, ...) 15805 __attribute__((__malloc__, __format__ (printf, 2, 3))); 15806 15807 #if SU_HAVE_INLINE 15808 su_inline sip_content_disposition_t *sip_content_disposition_format(su_home_t *home, char const *fmt, ...) 15809 { 15810 sip_header_t *h; 15811 va_list ap; 15812 15813 va_start(ap, fmt); 15814 h = sip_header_vformat(home, sip_content_disposition_class, fmt, ap); 15815 va_end(ap); 15816 15817 return (sip_content_disposition_t *)h; 15818 } 15819 #endif 15820 15828 SOFIAPUBFUN issize_t sip_content_length_d(su_home_t *, msg_header_t *, 15829 char *s, isize_t slen); 15830 15832 SOFIAPUBFUN issize_t sip_content_length_e(char b[], isize_t bsiz, 15833 msg_header_t const *h, int flags); 15834 15839 #define sip_content_length(sip) \ 15840 ((sip_content_length_t *)msg_header_access((msg_pub_t*)(sip), sip_content_length_class)) 15841 15856 #define SIP_CONTENT_LENGTH_INIT() SIP_HDR_INIT(content_length) 15857 15873 #if SU_HAVE_INLINE 15874 su_inline sip_content_length_t *sip_content_length_init(sip_content_length_t x[1]) 15875 { 15876 return SIP_HEADER_INIT(x, sip_content_length_class, sizeof(sip_content_length_t)); 15877 } 15878 #else 15879 #define sip_content_length_init(x) \ 15880 SIP_HEADER_INIT(x, sip_content_length_class, sizeof(sip_content_length_t)) 15881 #endif 15882 15895 #if SU_HAVE_INLINE 15896 su_inline int sip_is_content_length(sip_header_t const *header) 15897 { 15898 return header && header->sh_class->hc_hash == sip_content_length_hash; 15899 } 15900 #else 15901 int sip_is_content_length(sip_header_t const *header); 15902 #endif 15903 15904 #define sip_content_length_p(h) sip_is_content_length((h)) 15905 15906 15935 #if SU_HAVE_INLINE 15936 su_inline 15937 #endif 15938 sip_content_length_t *sip_content_length_dup(su_home_t *home, sip_content_length_t const *hdr) 15939 __attribute__((__malloc__)); 15940 15941 #if SU_HAVE_INLINE 15942 su_inline 15943 sip_content_length_t *sip_content_length_dup(su_home_t *home, sip_content_length_t const *hdr) 15944 { 15945 return (sip_content_length_t *) 15946 msg_header_dup_as(home, sip_content_length_class, (msg_header_t const *)hdr); 15947 } 15948 #endif 15949 15978 #if SU_HAVE_INLINE 15979 su_inline 15980 #endif 15981 sip_content_length_t *sip_content_length_copy(su_home_t *home, sip_content_length_t const *hdr) 15982 __attribute__((__malloc__)); 15983 15984 #if SU_HAVE_INLINE 15985 su_inline 15986 sip_content_length_t *sip_content_length_copy(su_home_t *home, sip_content_length_t const *hdr) 15987 { 15988 return (sip_content_length_t *) 15989 msg_header_copy_as(home, sip_content_length_class, (msg_header_t const *)hdr); 15990 } 15991 #endif 15992 16008 #if SU_HAVE_INLINE 16009 su_inline 16010 #endif 16011 sip_content_length_t *sip_content_length_make(su_home_t *home, char const *s) 16012 __attribute__((__malloc__)); 16013 16014 #if SU_HAVE_INLINE 16015 su_inline sip_content_length_t *sip_content_length_make(su_home_t *home, char const *s) 16016 { 16017 return (sip_content_length_t *)sip_header_make(home, sip_content_length_class, s); 16018 } 16019 #endif 16020 16039 #if SU_HAVE_INLINE 16040 su_inline 16041 #endif 16042 sip_content_length_t *sip_content_length_format(su_home_t *home, char const *fmt, ...) 16043 __attribute__((__malloc__, __format__ (printf, 2, 3))); 16044 16045 #if SU_HAVE_INLINE 16046 su_inline sip_content_length_t *sip_content_length_format(su_home_t *home, char const *fmt, ...) 16047 { 16048 sip_header_t *h; 16049 va_list ap; 16050 16051 va_start(ap, fmt); 16052 h = sip_header_vformat(home, sip_content_length_class, fmt, ap); 16053 va_end(ap); 16054 16055 return (sip_content_length_t *)h; 16056 } 16057 #endif 16058 16066 SOFIAPUBFUN issize_t sip_unknown_d(su_home_t *, msg_header_t *, 16067 char *s, isize_t slen); 16068 16070 SOFIAPUBFUN issize_t sip_unknown_e(char b[], isize_t bsiz, 16071 msg_header_t const *h, int flags); 16072 16077 #define sip_unknown(sip) \ 16078 ((sip_unknown_t *)msg_header_access((msg_pub_t*)(sip), sip_unknown_class)) 16079 16094 #define SIP_UNKNOWN_INIT() SIP_HDR_INIT(unknown) 16095 16111 #if SU_HAVE_INLINE 16112 su_inline sip_unknown_t *sip_unknown_init(sip_unknown_t x[1]) 16113 { 16114 return SIP_HEADER_INIT(x, sip_unknown_class, sizeof(sip_unknown_t)); 16115 } 16116 #else 16117 #define sip_unknown_init(x) \ 16118 SIP_HEADER_INIT(x, sip_unknown_class, sizeof(sip_unknown_t)) 16119 #endif 16120 16133 #if SU_HAVE_INLINE 16134 su_inline int sip_is_unknown(sip_header_t const *header) 16135 { 16136 return header && header->sh_class->hc_hash == sip_unknown_hash; 16137 } 16138 #else 16139 int sip_is_unknown(sip_header_t const *header); 16140 #endif 16141 16142 #define sip_unknown_p(h) sip_is_unknown((h)) 16143 16144 16173 #if SU_HAVE_INLINE 16174 su_inline 16175 #endif 16176 sip_unknown_t *sip_unknown_dup(su_home_t *home, sip_unknown_t const *hdr) 16177 __attribute__((__malloc__)); 16178 16179 #if SU_HAVE_INLINE 16180 su_inline 16181 sip_unknown_t *sip_unknown_dup(su_home_t *home, sip_unknown_t const *hdr) 16182 { 16183 return (sip_unknown_t *) 16184 msg_header_dup_as(home, sip_unknown_class, (msg_header_t const *)hdr); 16185 } 16186 #endif 16187 16216 #if SU_HAVE_INLINE 16217 su_inline 16218 #endif 16219 sip_unknown_t *sip_unknown_copy(su_home_t *home, sip_unknown_t const *hdr) 16220 __attribute__((__malloc__)); 16221 16222 #if SU_HAVE_INLINE 16223 su_inline 16224 sip_unknown_t *sip_unknown_copy(su_home_t *home, sip_unknown_t const *hdr) 16225 { 16226 return (sip_unknown_t *) 16227 msg_header_copy_as(home, sip_unknown_class, (msg_header_t const *)hdr); 16228 } 16229 #endif 16230 16246 #if SU_HAVE_INLINE 16247 su_inline 16248 #endif 16249 sip_unknown_t *sip_unknown_make(su_home_t *home, char const *s) 16250 __attribute__((__malloc__)); 16251 16252 #if SU_HAVE_INLINE 16253 su_inline sip_unknown_t *sip_unknown_make(su_home_t *home, char const *s) 16254 { 16255 return (sip_unknown_t *)sip_header_make(home, sip_unknown_class, s); 16256 } 16257 #endif 16258 16277 #if SU_HAVE_INLINE 16278 su_inline 16279 #endif 16280 sip_unknown_t *sip_unknown_format(su_home_t *home, char const *fmt, ...) 16281 __attribute__((__malloc__, __format__ (printf, 2, 3))); 16282 16283 #if SU_HAVE_INLINE 16284 su_inline sip_unknown_t *sip_unknown_format(su_home_t *home, char const *fmt, ...) 16285 { 16286 sip_header_t *h; 16287 va_list ap; 16288 16289 va_start(ap, fmt); 16290 h = sip_header_vformat(home, sip_unknown_class, fmt, ap); 16291 va_end(ap); 16292 16293 return (sip_unknown_t *)h; 16294 } 16295 #endif 16296 16304 SOFIAPUBFUN issize_t sip_error_d(su_home_t *, msg_header_t *, 16305 char *s, isize_t slen); 16306 16308 SOFIAPUBFUN issize_t sip_error_e(char b[], isize_t bsiz, 16309 msg_header_t const *h, int flags); 16310 16315 #define sip_error(sip) \ 16316 ((sip_error_t *)msg_header_access((msg_pub_t*)(sip), sip_error_class)) 16317 16332 #define SIP_ERROR_INIT() SIP_HDR_INIT(error) 16333 16349 #if SU_HAVE_INLINE 16350 su_inline sip_error_t *sip_error_init(sip_error_t x[1]) 16351 { 16352 return SIP_HEADER_INIT(x, sip_error_class, sizeof(sip_error_t)); 16353 } 16354 #else 16355 #define sip_error_init(x) \ 16356 SIP_HEADER_INIT(x, sip_error_class, sizeof(sip_error_t)) 16357 #endif 16358 16371 #if SU_HAVE_INLINE 16372 su_inline int sip_is_error(sip_header_t const *header) 16373 { 16374 return header && header->sh_class->hc_hash == sip_error_hash; 16375 } 16376 #else 16377 int sip_is_error(sip_header_t const *header); 16378 #endif 16379 16380 #define sip_error_p(h) sip_is_error((h)) 16381 16382 16411 #if SU_HAVE_INLINE 16412 su_inline 16413 #endif 16414 sip_error_t *sip_error_dup(su_home_t *home, sip_error_t const *hdr) 16415 __attribute__((__malloc__)); 16416 16417 #if SU_HAVE_INLINE 16418 su_inline 16419 sip_error_t *sip_error_dup(su_home_t *home, sip_error_t const *hdr) 16420 { 16421 return (sip_error_t *) 16422 msg_header_dup_as(home, sip_error_class, (msg_header_t const *)hdr); 16423 } 16424 #endif 16425 16454 #if SU_HAVE_INLINE 16455 su_inline 16456 #endif 16457 sip_error_t *sip_error_copy(su_home_t *home, sip_error_t const *hdr) 16458 __attribute__((__malloc__)); 16459 16460 #if SU_HAVE_INLINE 16461 su_inline 16462 sip_error_t *sip_error_copy(su_home_t *home, sip_error_t const *hdr) 16463 { 16464 return (sip_error_t *) 16465 msg_header_copy_as(home, sip_error_class, (msg_header_t const *)hdr); 16466 } 16467 #endif 16468 16484 #if SU_HAVE_INLINE 16485 su_inline 16486 #endif 16487 sip_error_t *sip_error_make(su_home_t *home, char const *s) 16488 __attribute__((__malloc__)); 16489 16490 #if SU_HAVE_INLINE 16491 su_inline sip_error_t *sip_error_make(su_home_t *home, char const *s) 16492 { 16493 return (sip_error_t *)sip_header_make(home, sip_error_class, s); 16494 } 16495 #endif 16496 16515 #if SU_HAVE_INLINE 16516 su_inline 16517 #endif 16518 sip_error_t *sip_error_format(su_home_t *home, char const *fmt, ...) 16519 __attribute__((__malloc__, __format__ (printf, 2, 3))); 16520 16521 #if SU_HAVE_INLINE 16522 su_inline sip_error_t *sip_error_format(su_home_t *home, char const *fmt, ...) 16523 { 16524 sip_header_t *h; 16525 va_list ap; 16526 16527 va_start(ap, fmt); 16528 h = sip_header_vformat(home, sip_error_class, fmt, ap); 16529 va_end(ap); 16530 16531 return (sip_error_t *)h; 16532 } 16533 #endif 16534 16542 SOFIAPUBFUN issize_t sip_separator_d(su_home_t *, msg_header_t *, 16543 char *s, isize_t slen); 16544 16546 SOFIAPUBFUN issize_t sip_separator_e(char b[], isize_t bsiz, 16547 msg_header_t const *h, int flags); 16548 16553 #define sip_separator(sip) \ 16554 ((sip_separator_t *)msg_header_access((msg_pub_t*)(sip), sip_separator_class)) 16555 16570 #define SIP_SEPARATOR_INIT() SIP_HDR_INIT(separator) 16571 16587 #if SU_HAVE_INLINE 16588 su_inline sip_separator_t *sip_separator_init(sip_separator_t x[1]) 16589 { 16590 return SIP_HEADER_INIT(x, sip_separator_class, sizeof(sip_separator_t)); 16591 } 16592 #else 16593 #define sip_separator_init(x) \ 16594 SIP_HEADER_INIT(x, sip_separator_class, sizeof(sip_separator_t)) 16595 #endif 16596 16609 #if SU_HAVE_INLINE 16610 su_inline int sip_is_separator(sip_header_t const *header) 16611 { 16612 return header && header->sh_class->hc_hash == sip_separator_hash; 16613 } 16614 #else 16615 int sip_is_separator(sip_header_t const *header); 16616 #endif 16617 16618 #define sip_separator_p(h) sip_is_separator((h)) 16619 16620 16649 #if SU_HAVE_INLINE 16650 su_inline 16651 #endif 16652 sip_separator_t *sip_separator_dup(su_home_t *home, sip_separator_t const *hdr) 16653 __attribute__((__malloc__)); 16654 16655 #if SU_HAVE_INLINE 16656 su_inline 16657 sip_separator_t *sip_separator_dup(su_home_t *home, sip_separator_t const *hdr) 16658 { 16659 return (sip_separator_t *) 16660 msg_header_dup_as(home, sip_separator_class, (msg_header_t const *)hdr); 16661 } 16662 #endif 16663 16692 #if SU_HAVE_INLINE 16693 su_inline 16694 #endif 16695 sip_separator_t *sip_separator_copy(su_home_t *home, sip_separator_t const *hdr) 16696 __attribute__((__malloc__)); 16697 16698 #if SU_HAVE_INLINE 16699 su_inline 16700 sip_separator_t *sip_separator_copy(su_home_t *home, sip_separator_t const *hdr) 16701 { 16702 return (sip_separator_t *) 16703 msg_header_copy_as(home, sip_separator_class, (msg_header_t const *)hdr); 16704 } 16705 #endif 16706 16722 #if SU_HAVE_INLINE 16723 su_inline 16724 #endif 16725 sip_separator_t *sip_separator_make(su_home_t *home, char const *s) 16726 __attribute__((__malloc__)); 16727 16728 #if SU_HAVE_INLINE 16729 su_inline sip_separator_t *sip_separator_make(su_home_t *home, char const *s) 16730 { 16731 return (sip_separator_t *)sip_header_make(home, sip_separator_class, s); 16732 } 16733 #endif 16734 16753 #if SU_HAVE_INLINE 16754 su_inline 16755 #endif 16756 sip_separator_t *sip_separator_format(su_home_t *home, char const *fmt, ...) 16757 __attribute__((__malloc__, __format__ (printf, 2, 3))); 16758 16759 #if SU_HAVE_INLINE 16760 su_inline sip_separator_t *sip_separator_format(su_home_t *home, char const *fmt, ...) 16761 { 16762 sip_header_t *h; 16763 va_list ap; 16764 16765 va_start(ap, fmt); 16766 h = sip_header_vformat(home, sip_separator_class, fmt, ap); 16767 va_end(ap); 16768 16769 return (sip_separator_t *)h; 16770 } 16771 #endif 16772 16780 SOFIAPUBFUN issize_t sip_payload_d(su_home_t *, msg_header_t *, 16781 char *s, isize_t slen); 16782 16784 SOFIAPUBFUN issize_t sip_payload_e(char b[], isize_t bsiz, 16785 msg_header_t const *h, int flags); 16786 16791 #define sip_payload(sip) \ 16792 ((sip_payload_t *)msg_header_access((msg_pub_t*)(sip), sip_payload_class)) 16793 16808 #define SIP_PAYLOAD_INIT() SIP_HDR_INIT(payload) 16809 16825 #if SU_HAVE_INLINE 16826 su_inline sip_payload_t *sip_payload_init(sip_payload_t x[1]) 16827 { 16828 return SIP_HEADER_INIT(x, sip_payload_class, sizeof(sip_payload_t)); 16829 } 16830 #else 16831 #define sip_payload_init(x) \ 16832 SIP_HEADER_INIT(x, sip_payload_class, sizeof(sip_payload_t)) 16833 #endif 16834 16847 #if SU_HAVE_INLINE 16848 su_inline int sip_is_payload(sip_header_t const *header) 16849 { 16850 return header && header->sh_class->hc_hash == sip_payload_hash; 16851 } 16852 #else 16853 int sip_is_payload(sip_header_t const *header); 16854 #endif 16855 16856 #define sip_payload_p(h) sip_is_payload((h)) 16857 16858 16887 #if SU_HAVE_INLINE 16888 su_inline 16889 #endif 16890 sip_payload_t *sip_payload_dup(su_home_t *home, sip_payload_t const *hdr) 16891 __attribute__((__malloc__)); 16892 16893 #if SU_HAVE_INLINE 16894 su_inline 16895 sip_payload_t *sip_payload_dup(su_home_t *home, sip_payload_t const *hdr) 16896 { 16897 return (sip_payload_t *) 16898 msg_header_dup_as(home, sip_payload_class, (msg_header_t const *)hdr); 16899 } 16900 #endif 16901 16930 #if SU_HAVE_INLINE 16931 su_inline 16932 #endif 16933 sip_payload_t *sip_payload_copy(su_home_t *home, sip_payload_t const *hdr) 16934 __attribute__((__malloc__)); 16935 16936 #if SU_HAVE_INLINE 16937 su_inline 16938 sip_payload_t *sip_payload_copy(su_home_t *home, sip_payload_t const *hdr) 16939 { 16940 return (sip_payload_t *) 16941 msg_header_copy_as(home, sip_payload_class, (msg_header_t const *)hdr); 16942 } 16943 #endif 16944 16960 #if SU_HAVE_INLINE 16961 su_inline 16962 #endif 16963 sip_payload_t *sip_payload_make(su_home_t *home, char const *s) 16964 __attribute__((__malloc__)); 16965 16966 #if SU_HAVE_INLINE 16967 su_inline sip_payload_t *sip_payload_make(su_home_t *home, char const *s) 16968 { 16969 return (sip_payload_t *)sip_header_make(home, sip_payload_class, s); 16970 } 16971 #endif 16972 16991 #if SU_HAVE_INLINE 16992 su_inline 16993 #endif 16994 sip_payload_t *sip_payload_format(su_home_t *home, char const *fmt, ...) 16995 __attribute__((__malloc__, __format__ (printf, 2, 3))); 16996 16997 #if SU_HAVE_INLINE 16998 su_inline sip_payload_t *sip_payload_format(su_home_t *home, char const *fmt, ...) 16999 { 17000 sip_header_t *h; 17001 va_list ap; 17002 17003 va_start(ap, fmt); 17004 h = sip_header_vformat(home, sip_payload_class, fmt, ap); 17005 va_end(ap); 17006 17007 return (sip_payload_t *)h; 17008 } 17009 #endif 17010 17013 SOFIA_END_DECLS 17014 #endif /* !defined(SIP_PROTOS_H) */