static issize_t sip_caller_prefs_e(char b[], isize_t bsiz, sip_header_t const *h, int flags) { sip_caller_prefs_t const *cp = h->sh_caller_prefs; char *b0 = b, *end = b + bsiz; MSG_CHAR_E(b, end, '*'); MSG_PARAMS_E(b, end, cp->cp_params, flags); MSG_TERM_E(b, end); return b - b0; }
/** Encode (print) Set-Cookie header */ issize_t http_set_cookie_e(char b[], isize_t bsiz, msg_header_t const *h, int flags) { char *b0 = b, *end = b + bsiz; http_set_cookie_t const *sc = (http_set_cookie_t *)h; size_t i; if (sc->sc_params) { for (i = 0; sc->sc_params[i]; i++) { if (i > 0) MSG_CHAR_E(b, end, ';'); MSG_STRING_E(b, end, sc->sc_params[i]); } } MSG_TERM_E(b, end); return b - b0; }
issize_t sip_timestamp_e(char b[], isize_t bsiz, sip_header_t const *h, int f) { sip_timestamp_t const *ts = h->sh_timestamp; char *end = b + bsiz, *b0 = b; assert(sip_timestamp_p(h)); MSG_STRING_E(b, end, ts->ts_stamp); if (ts->ts_delay) { MSG_CHAR_E(b, end, ' '); MSG_STRING_E(b, end, ts->ts_delay); } MSG_TERM_E(b, end); return b - b0; }