diff options
author | Richard Lowe <richlowe@richlowe.net> | 2011-03-14 14:05:30 -0400 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2011-03-14 14:05:30 -0400 |
commit | c10c16dec587a0662068f6e2991c29ed3a9db943 (patch) | |
tree | f414286f4bba41d75683ed4fbbaa6bfa4bf7fabd /usr/src/man/man3sip | |
parent | 68caef18a23a498d9e3017b983562c0f4fd8ab23 (diff) | |
download | illumos-joyent-c10c16dec587a0662068f6e2991c29ed3a9db943.tar.gz |
243 system manual pages should live with the software
Reviewed by: garrett@nexenta.com
Reviewed by: gwr@nexenta.com
Reviewed by: trisk@opensolaris.org
Approved by: gwr@nexenta.com
--HG--
extra : rebase_source : 0c599d0bec0dc8865fbba67721a7a6cd6b1feefb
Diffstat (limited to 'usr/src/man/man3sip')
44 files changed, 7470 insertions, 0 deletions
diff --git a/usr/src/man/man3sip/Makefile b/usr/src/man/man3sip/Makefile new file mode 100644 index 0000000000..824f1ba6ae --- /dev/null +++ b/usr/src/man/man3sip/Makefile @@ -0,0 +1,492 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet +# at http://www.illumos.org/license/CDDL. +# + +# Copyright 2011, Richard Lowe + +include ../../Makefile.master + +MANSECT = 3sip + +MANFILES = sip_add_branchid_to_via.3sip \ + sip_add_from.3sip \ + sip_add_header.3sip \ + sip_add_param.3sip \ + sip_add_request_line.3sip \ + sip_branchid.3sip \ + sip_clone_msg.3sip \ + sip_copy_start_line.3sip \ + sip_create_OKack.3sip \ + sip_create_dialog_req.3sip \ + sip_create_response.3sip \ + sip_delete_dialog.3sip \ + sip_delete_start_line.3sip \ + sip_enable_counters.3sip \ + sip_enable_trans_logging.3sip \ + sip_get_contact_display_name.3sip \ + sip_get_cseq.3sip \ + sip_get_dialog_state.3sip \ + sip_get_header.3sip \ + sip_get_header_value.3sip \ + sip_get_msg_len.3sip \ + sip_get_num_via.3sip \ + sip_get_param_value.3sip \ + sip_get_request_method.3sip \ + sip_get_request_uri_str.3sip \ + sip_get_resp_desc.3sip \ + sip_get_trans.3sip \ + sip_get_trans_method.3sip \ + sip_get_uri_parsed.3sip \ + sip_guid.3sip \ + sip_hold_dialog.3sip \ + sip_hold_msg.3sip \ + sip_hold_trans.3sip \ + sip_init_conn_object.3sip \ + sip_is_sip_uri.3sip \ + sip_msg_is_request.3sip \ + sip_msg_to_str.3sip \ + sip_new_msg.3sip \ + sip_parse_uri.3sip \ + sip_process_new_packet.3sip \ + sip_register_sent_by.3sip \ + sip_sendmsg.3sip \ + sip_stack_init.3sip + +MANSOFILES = sip_add_accept.3sip \ + sip_add_accept_enc.3sip \ + sip_add_accept_lang.3sip \ + sip_add_alert_info.3sip \ + sip_add_allow.3sip \ + sip_add_allow_events.3sip \ + sip_add_authen_info.3sip \ + sip_add_author.3sip \ + sip_add_call_info.3sip \ + sip_add_callid.3sip \ + sip_add_contact.3sip \ + sip_add_content.3sip \ + sip_add_content_disp.3sip \ + sip_add_content_enc.3sip \ + sip_add_content_lang.3sip \ + sip_add_content_type.3sip \ + sip_add_cseq.3sip \ + sip_add_date.3sip \ + sip_add_error_info.3sip \ + sip_add_event.3sip \ + sip_add_expires.3sip \ + sip_add_in_reply_to.3sip \ + sip_add_maxforward.3sip \ + sip_add_mime_version.3sip \ + sip_add_min_expires.3sip \ + sip_add_org.3sip \ + sip_add_passertedid.3sip \ + sip_add_ppreferredid.3sip \ + sip_add_priority.3sip \ + sip_add_privacy.3sip \ + sip_add_proxy_authen.3sip \ + sip_add_proxy_author.3sip \ + sip_add_proxy_require.3sip \ + sip_add_rack.3sip \ + sip_add_record_route.3sip \ + sip_add_reply_to.3sip \ + sip_add_require.3sip \ + sip_add_response_line.3sip \ + sip_add_retry_after.3sip \ + sip_add_route.3sip \ + sip_add_rseq.3sip \ + sip_add_server.3sip \ + sip_add_subject.3sip \ + sip_add_substate.3sip \ + sip_add_supported.3sip \ + sip_add_to.3sip \ + sip_add_tstamp.3sip \ + sip_add_unsupported.3sip \ + sip_add_user_agent.3sip \ + sip_add_via.3sip \ + sip_add_warning.3sip \ + sip_add_www_authen.3sip \ + sip_clear_stale_data.3sip \ + sip_conn_destroyed.3sip \ + sip_copy_all_headers.3sip \ + sip_copy_header.3sip \ + sip_copy_header_by_name.3sip \ + sip_create_dialog_req_nocontact.3sip \ + sip_delete_header.3sip \ + sip_delete_header_by_name.3sip \ + sip_delete_value.3sip \ + sip_disable_counters.3sip \ + sip_disable_dialog_logging.3sip \ + sip_disable_trans_logging.3sip \ + sip_enable_dialog_logging.3sip \ + sip_free_msg.3sip \ + sip_free_parsed_uri.3sip \ + sip_get_accept_enc.3sip \ + sip_get_accept_lang.3sip \ + sip_get_accept_sub_type.3sip \ + sip_get_accept_type.3sip \ + sip_get_alert_info_uri.3sip \ + sip_get_allow_events.3sip \ + sip_get_allow_method.3sip \ + sip_get_authen_info.3sip \ + sip_get_author_param.3sip \ + sip_get_author_scheme.3sip \ + sip_get_branchid.3sip \ + sip_get_call_info_uri.3sip \ + sip_get_callid.3sip \ + sip_get_callseq_method.3sip \ + sip_get_callseq_num.3sip \ + sip_get_contact_uri_str.3sip \ + sip_get_content.3sip \ + sip_get_content_disp.3sip \ + sip_get_content_enc.3sip \ + sip_get_content_lang.3sip \ + sip_get_content_length.3sip \ + sip_get_content_sub_type.3sip \ + sip_get_content_type.3sip \ + sip_get_counter_value.3sip \ + sip_get_date_day.3sip \ + sip_get_date_month.3sip \ + sip_get_date_time.3sip \ + sip_get_date_timezone.3sip \ + sip_get_date_wkday.3sip \ + sip_get_date_year.3sip \ + sip_get_dialog_callid.3sip \ + sip_get_dialog_local_contact_uri.3sip \ + sip_get_dialog_local_cseq.3sip \ + sip_get_dialog_local_tag.3sip \ + sip_get_dialog_local_uri.3sip \ + sip_get_dialog_method.3sip \ + sip_get_dialog_msgcnt.3sip \ + sip_get_dialog_remote_cseq.3sip \ + sip_get_dialog_remote_tag.3sip \ + sip_get_dialog_remote_target_uri.3sip \ + sip_get_dialog_remote_uri.3sip \ + sip_get_dialog_route_set.3sip \ + sip_get_dialog_type.3sip \ + sip_get_error_info_uri.3sip \ + sip_get_event.3sip \ + sip_get_expires.3sip \ + sip_get_from_display_name.3sip \ + sip_get_from_tag.3sip \ + sip_get_from_uri_str.3sip \ + sip_get_in_reply_to.3sip \ + sip_get_maxforward.3sip \ + sip_get_mime_version.3sip \ + sip_get_min_expires.3sip \ + sip_get_next_value.3sip \ + sip_get_org.3sip \ + sip_get_params.3sip \ + sip_get_passertedid_display_name.3sip \ + sip_get_passertedid_uri_str.3sip \ + sip_get_ppreferredid_display_name.3sip \ + sip_get_ppreferredid_uri_str.3sip \ + sip_get_priority.3sip \ + sip_get_priv_value.3sip \ + sip_get_proxy_authen_param.3sip \ + sip_get_proxy_authen_scheme.3sip \ + sip_get_proxy_author_param.3sip \ + sip_get_proxy_author_scheme.3sip \ + sip_get_proxy_require.3sip \ + sip_get_rack_cseq_num.3sip \ + sip_get_rack_method.3sip \ + sip_get_rack_resp_num.3sip \ + sip_get_replyto_display_name.3sip \ + sip_get_replyto_uri_str.3sip \ + sip_get_require.3sip \ + sip_get_response_code.3sip \ + sip_get_response_phrase.3sip \ + sip_get_retry_after_cmts.3sip \ + sip_get_retry_after_time.3sip \ + sip_get_route_display_name.3sip \ + sip_get_route_uri_str.3sip \ + sip_get_rseq.3sip \ + sip_get_rseq_resp_num.3sip \ + sip_get_server.3sip \ + sip_get_sip_version.3sip \ + sip_get_subject.3sip \ + sip_get_substate.3sip \ + sip_get_supported.3sip \ + sip_get_to_display_name.3sip \ + sip_get_to_tag.3sip \ + sip_get_to_uri_str.3sip \ + sip_get_trans_branchid.3sip \ + sip_get_trans_conn_obj.3sip \ + sip_get_trans_orig_msg.3sip \ + sip_get_trans_resp_msg.3sip \ + sip_get_trans_state.3sip \ + sip_get_tstamp_delay.3sip \ + sip_get_tstamp_value.3sip \ + sip_get_unsupported.3sip \ + sip_get_uri_errflags.3sip \ + sip_get_uri_headers.3sip \ + sip_get_uri_host.3sip \ + sip_get_uri_opaque.3sip \ + sip_get_uri_params.3sip \ + sip_get_uri_password.3sip \ + sip_get_uri_path.3sip \ + sip_get_uri_port.3sip \ + sip_get_uri_query.3sip \ + sip_get_uri_regname.3sip \ + sip_get_uri_scheme.3sip \ + sip_get_uri_user.3sip \ + sip_get_user_agent.3sip \ + sip_get_via_sent_by_host.3sip \ + sip_get_via_sent_by_port.3sip \ + sip_get_via_sent_protocol_name.3sip \ + sip_get_via_sent_protocol_version.3sip \ + sip_get_via_sent_transport.3sip \ + sip_get_warning_agent.3sip \ + sip_get_warning_code.3sip \ + sip_get_warning_text.3sip \ + sip_get_www_authen_param.3sip \ + sip_get_www_authen_scheme.3sip \ + sip_hdr_to_str.3sip \ + sip_is_dialog_secure.3sip \ + sip_is_param_present.3sip \ + sip_is_uri_teluser.3sip \ + sip_message_is_response.3sip \ + sip_release_dialog.3sip \ + sip_release_trans.3sip \ + sip_reqline_to_str.3sip \ + sip_respline_to_str.3sip \ + sip_sent_by_to_str.3sip \ + sip_unregister_all_sent_by.3sip \ + sip_unregister_sent_by.3sip \ + sip_uri_errflags_to_str.3sip + +MANFILES += $(MANSOFILES) + +sip_add_accept.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_accept_enc.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_accept_lang.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_alert_info.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_allow.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_allow_events.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_authen_info.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_author.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_call_info.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_callid.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_contact.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_content.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_content_disp.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_content_enc.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_content_lang.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_content_type.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_cseq.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_date.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_error_info.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_event.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_expires.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_in_reply_to.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_maxforward.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_mime_version.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_min_expires.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_org.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_passertedid.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_ppreferredid.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_priority.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_privacy.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_proxy_authen.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_proxy_author.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_proxy_require.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_rack.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_record_route.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_reply_to.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_require.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_retry_after.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_route.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_rseq.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_server.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_subject.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_substate.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_supported.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_to.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_tstamp.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_unsupported.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_user_agent.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_via.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_warning.3sip := SOSRC = man3sip/sip_add_from.3sip +sip_add_www_authen.3sip := SOSRC = man3sip/sip_add_from.3sip + +sip_add_response_line.3sip := SOSRC = man3sip/sip_add_request_line.3sip + +sip_copy_all_headers.3sip := SOSRC = man3sip/sip_copy_start_line.3sip +sip_copy_header.3sip := SOSRC = man3sip/sip_copy_start_line.3sip +sip_copy_header_by_name.3sip := SOSRC = man3sip/sip_copy_start_line.3sip + +sip_create_dialog_req_nocontact.3sip := SOSRC = man3sip/sip_create_dialog_req.3sip + +sip_delete_header.3sip := SOSRC = man3sip/sip_delete_start_line.3sip +sip_delete_header_by_name.3sip := SOSRC = man3sip/sip_delete_start_line.3sip +sip_delete_value.3sip := SOSRC = man3sip/sip_delete_start_line.3sip + +sip_disable_counters.3sip := SOSRC = man3sip/sip_enable_counters.3sip +sip_get_counter_value.3sip := SOSRC = man3sip/sip_enable_counters.3sip + +sip_disable_dialog_logging.3sip := SOSRC = man3sip/sip_enable_trans_logging.3sip +sip_disable_trans_logging.3sip := SOSRC = man3sip/sip_enable_trans_logging.3sip +sip_enable_dialog_logging.3sip := SOSRC = man3sip/sip_enable_trans_logging.3sip + +sip_get_accept_enc.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_accept_lang.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_accept_sub_type.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_accept_type.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_alert_info_uri.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_allow_events.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_allow_method.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_authen_info.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_author_param.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_author_scheme.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_call_info_uri.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_callid.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_callseq_method.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_callseq_num.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_contact_uri_str.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_content.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_content_disp.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_content_enc.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_content_lang.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_content_length.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_content_sub_type.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_content_type.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_date_day.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_date_month.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_date_time.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_date_timezone.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_date_wkday.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_date_year.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_error_info_uri.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_event.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_expires.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_from_display_name.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_from_tag.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_from_uri_str.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_in_reply_to.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_maxforward.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_mime_version.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_min_expires.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_org.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_passertedid_display_name.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_passertedid_uri_str.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_ppreferredid_display_name.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_ppreferredid_uri_str.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_priority.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_priv_value.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_proxy_authen_param.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_proxy_authen_scheme.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_proxy_author_param.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_proxy_author_scheme.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_proxy_require.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_rack_cseq_num.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_rack_method.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_rack_resp_num.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_replyto_display_name.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_replyto_uri_str.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_require.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_retry_after_cmts.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_retry_after_time.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_route_display_name.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_route_uri_str.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_rseq_resp_num.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_server.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_subject.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_substate.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_supported.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_to_display_name.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_to_tag.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_to_uri_str.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_tstamp_delay.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_tstamp_value.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_unsupported.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_user_agent.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_via_sent_by_host.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_via_sent_by_port.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_via_sent_protocol_name.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_via_sent_protocol_version.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_via_sent_transport.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_warning_agent.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_warning_code.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_warning_text.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_www_authen_param.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip +sip_get_www_authen_scheme.3sip := SOSRC = man3sip/sip_get_contact_display_name.3sip + +sip_get_rseq.3sip := SOSRC = man3sip/sip_get_cseq.3sip + +sip_get_dialog_callid.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_local_contact_uri.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_local_cseq.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_local_tag.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_local_uri.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_method.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_msgcnt.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_remote_cseq.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_remote_tag.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_remote_target_uri.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_remote_uri.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_route_set.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_dialog_type.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_is_dialog_secure.3sip := SOSRC = man3sip/sip_get_dialog_state.3sip +sip_get_next_value.3sip := SOSRC = man3sip/sip_get_header_value.3sip + +sip_get_branchid.3sip := SOSRC = man3sip/sip_get_num_via.3sip + +sip_get_params.3sip := SOSRC = man3sip/sip_get_param_value.3sip +sip_is_param_present.3sip := SOSRC = man3sip/sip_get_param_value.3sip + +sip_get_response_code.3sip := SOSRC = man3sip/sip_get_request_method.3sip +sip_get_response_phrase.3sip := SOSRC = man3sip/sip_get_request_method.3sip +sip_get_sip_version.3sip := SOSRC = man3sip/sip_get_request_method.3sip + +sip_get_trans_branchid.3sip := SOSRC = man3sip/sip_get_trans_method.3sip +sip_get_trans_conn_obj.3sip := SOSRC = man3sip/sip_get_trans_method.3sip +sip_get_trans_orig_msg.3sip := SOSRC = man3sip/sip_get_trans_method.3sip +sip_get_trans_resp_msg.3sip := SOSRC = man3sip/sip_get_trans_method.3sip +sip_get_trans_state.3sip := SOSRC = man3sip/sip_get_trans_method.3sip + +sip_release_dialog.3sip := SOSRC = man3sip/sip_hold_dialog.3sip + +sip_free_msg.3sip := SOSRC = man3sip/sip_hold_msg.3sip + +sip_release_trans.3sip := SOSRC = man3sip/sip_hold_trans.3sip + +sip_clear_stale_data.3sip := SOSRC = man3sip/sip_init_conn_object.3sip +sip_conn_destroyed.3sip := SOSRC = man3sip/sip_init_conn_object.3sip + +sip_get_uri_errflags.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_headers.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_host.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_opaque.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_params.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_password.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_path.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_port.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_query.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_regname.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_scheme.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_get_uri_user.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_is_uri_teluser.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip +sip_uri_errflags_to_str.3sip := SOSRC = man3sip/sip_is_sip_uri.3sip + +sip_message_is_response.3sip := SOSRC = man3sip/sip_msg_is_request.3sip + +sip_hdr_to_str.3sip := SOSRC = man3sip/sip_msg_to_str.3sip +sip_reqline_to_str.3sip := SOSRC = man3sip/sip_msg_to_str.3sip +sip_respline_to_str.3sip := SOSRC = man3sip/sip_msg_to_str.3sip +sip_sent_by_to_str.3sip := SOSRC = man3sip/sip_msg_to_str.3sip + +sip_free_parsed_uri.3sip := SOSRC = man3sip/sip_parse_uri.3sip + +sip_unregister_all_sent_by.3sip := SOSRC = man3sip/sip_register_sent_by.3sip +sip_unregister_sent_by.3sip := SOSRC = man3sip/sip_register_sent_by.3sip + +.KEEP_STATE: + +include ../Makefile.man + +install: $(ROOTMANFILES) diff --git a/usr/src/man/man3sip/sip_add_branchid_to_via.3sip b/usr/src/man/man3sip/sip_add_branchid_to_via.3sip new file mode 100644 index 0000000000..a5900dac31 --- /dev/null +++ b/usr/src/man/man3sip/sip_add_branchid_to_via.3sip @@ -0,0 +1,95 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_add_branchid_to_via 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_add_branchid_to_via \- add a branch parameter to the topmost VIA header in +the SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_add_branchid_to_via\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIbranchid\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_add_branchid_to_via()\fR function adds a branch \fIparam\fR to the +topmost \fBVIA\fR header in the \fBSIP\fR message \fIsip_msg\fR. Note that a +new header is created as a result of adding the branch parameter and the old +header is marked deleted. Applications with multiple threads working on the +same \fBVIA\fR header need to take note of this. +.SH RETURN VALUES +.sp +.LP +These functions return \fB0\fR on success and the appropriate error value on +failure. +.SH ERRORS +.sp +.LP +On failure, functions that return an error value may return one of the +following: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +Mandatory parameters are not provided or are NULL. +.sp +For \fBsip_add_branchid_to_via()\fR, the topmost \fBVIA\fR header already has a +branch \fIparam\fR or the \fBSIP\fR message does not have a \fBVIA\fR header. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPERM\fR\fR +.ad +.RS 10n +.rt +The message cannot be modified. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +There is an error allocating memory for creating headers/parameters. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_add_from.3sip b/usr/src/man/man3sip/sip_add_from.3sip new file mode 100644 index 0000000000..1f5aa6810d --- /dev/null +++ b/usr/src/man/man3sip/sip_add_from.3sip @@ -0,0 +1,799 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_add_from 3SIP "09 Feb 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_add_from, sip_add_to, sip_add_contact, sip_add_via, sip_add_maxforward, +sip_add_callid, sip_add_cseq, sip_add_content_type, sip_add_content, +sip_add_accept, sip_add_accept_enc, sip_add_accept_lang, sip_add_alert_info, +sip_add_allow, sip_add_call_info, sip_add_content_disp, sip_add_content_enc, +sip_add_content_lang, sip_add_date, sip_add_error_info, sip_add_expires, +sip_add_in_reply_to, sip_add_mime_version, sip_add_min_expires, sip_add_org, +sip_add_priority, sip_add_reply_to, sip_add_passertedid, sip_add_ppreferredid, +sip_add_require, sip_add_retry_after, sip_add_route, sip_add_record_route, +sip_add_server, sip_add_subject, sip_add_supported, sip_add_tstamp, +sip_add_unsupported, sip_add_user_agent, sip_add_warning, sip_add_rseq, +sip_add_privacy, sip_add_rack, sip_add_author, sip_add_authen_info, +sip_add_proxy_authen, sip_add_proxy_author, sip_add_proxy_require, +sip_add_www_authen, sip_add_allow_events, sip_add_event, sip_add_substate \- +add specific SIP headers to the SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_add_from\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdisplay_name\fR, \fBchar *\fR\fIfrom_uri\fR, + \fBchar *\fR\fIfrom_tag\fR, \fBboolean_t\fR \fIadd_aquot\fR, \fBchar *\fR\fIfrom_params\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_to\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdisplay_name\fR, \fBchar *\fR\fIto_uri\fR, + \fBchar *\fR\fIto_tag\fR, \fBboolean_t\fR \fIadd_aquot\fR, \fBchar *\fR\fIto_params\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_contact\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdisplay_name\fR, + \fBchar *\fR\fIcontact_uri\fR, \fBboolean_t\fR \fIadd_aquot\fR, \fBchar *\fR\fIcontact_params\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_via\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIsent_protocol_transport\fR, + \fBchar *\fR\fIsent_by_host\fR, \fBint\fR \fIsent_by_port\fR, \fBchar *\fR\fIvia_params\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_maxforward\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBuint_t\fR \fImaxforward\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_callid\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIcallid\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_cseq\fR(\fBsip_msg_t\fR \fIsip_msg,\fR \fBsip_method_t\fR \fImethod\fR, \fBuint32_t\fR \fIcseq\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_content_type\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR \fItype\fR, \fBchar *\fR\fIsubtype\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_content\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR \fIcontent\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_accept\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fItype\fR, \fBchar *\fR\fIsubtype\fR, + \fBchar *\fR\fImedia_param\fR, \fBchar *\fR\fIaccept_param\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_accept_enc\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIcode\fR, + \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_accept_lang\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIlang\fR, + \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_alert_info\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIalert\fR, + \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_allow\fR(\fBsip_msg_t\fR \fIsip_msg,\fR \fBsip_method_t\fR \fImethod_name\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_call_info\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIuri\fR, + \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_content_disp\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdis_type\fR, \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_content_enc\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIcode\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_content_lang\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIlang\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_date\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdate\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_error_info\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIuri\fR, \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_expires\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBint\fR \fIsecs\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_in_reply_to\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIreply_id\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_mime_version\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIversion\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_min_expires\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBint\fR \fIsecs\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_org\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIorg\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_priority\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIprio\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_reply_to\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdisplay_name\fR, + \fBchar *\fR\fIaddr\fR, \fBchar *\fR\fIparam\fR, \fBboolean_t\fR \fIadd_aquot\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_passertedid\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdisplay_name\fR, + \fBchar *\fR\fIaddr\fR, \fBboolean_t\fR \fIadd_aqout\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_ppreferredid\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdisplay_name\fR, + \fBchar *\fR\fIaddr\fR, \fBboolean_t\fR \fIadd_aquot\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_require\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIreq\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_retry_after\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBint\fR \fIsecs\fR, \fBchar *\fR\fIcmt\fR, + \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_route\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdisplay_name\fR, \fBchar *\fR\fIuri\fR, + \fBchar *\fR\fIroute_params\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_record_route\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIdisplay_name\fR, + \fBchar *\fR\fIuri\fR, \fBchar *\fR\fIroute_params\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_server\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIsvr\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_subject\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIsubject\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_supported\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIsupport\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_tstamp\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fItime\fR, \fBchar *\fR\fIdelay\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_unsupported\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIunsupport\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_user_agent\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIusr\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_warning\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBint\fR \fIcode\fR, \fBchar *\fR\fIaddr\fR, \fBchar *\fR\fImsg\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_privacy\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIpriv_val\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_rseq\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBint\fR \fIresp_num\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_rack\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBint\fR \fIresp_num\fR, \fBint\fR \fIcseq\fR, + \fBsip_method_t\fR \fImethod\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_author\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIscheme\fR, \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_authen_info\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIainfo\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_proxy_authen\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIpascheme\fR, + \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_proxy_author\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIpascheme\fR, + \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_proxy_require\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIopt\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_www_authen\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIwascheme\fR, + \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_allow_events\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIevents\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_event\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIevent\fR, \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_substate\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIsub\fR, \fBchar *\fR\fIparam\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +For each of the following functions that add a header to a \fBSIP\fR message, +the function adds a \fBCRLF\fR before appending the header to the \fBSIP\fR +message. +.sp +.LP +The \fBsip_add_from()\fR and \fBsip_add_to()\fR functions appends a \fBFROM\fR +and \fBTO\fR header respectively to the \fBSIP\fR message \fIsip_msg\fR. The +header is created using the \fIdisplay_name\fR, if non-null, and the \fIuri\fR +values. The \fIadd_aquot\fR parameter is used to specify whether the \fIuri\fR +should be enclosed within '\fI<>\fR\&'. If a \fIdisplay_name\fR is provided +then \fIadd_aquot\fR cannot be \fBB_FALSE\fR. The \fIdisplay_name\fR parameter, +if provided, is enclosed within quotes before creating to the \fBSIP\fR header. +Tag value for the \fBFROM/TO\fR header can be specified which will be added to +the \fBSIP\fR header by prefixing it with "\fBTAG=\fR". Any generic parameters +can be specified as the last argument, which will be added, as is, to the +\fBSIP\fR header. +.sp +.LP +Either the tag or the generic parameter can be specified not both, if both are +specified, the resulting header contains only the tag parameter. +.sp +.LP +The \fBsip_add_contact()\fR function appends a \fBCONTACT\fR header to the +\fBSIP\fR message \fIsip_msg\fR using the \fIdisplay_name\fR and +\fIcontact_uri\fR. The \fIadd_aquot\fR parameter has the same semantics as in +\fBsip_add_from()\fR/\fBsip_add_to()\fR. Any contact parameters specified in +\fIcontact_param\fR is added to the \fBCONTACT\fR header before appending the +header to the message. +.sp +.LP +The \fBsip_add_via()\fR function appends a \fBVIA\fR header to the \fBSIP\fR +message \fIsip_msg\fR. The \fBVIA\fR header is constructed using +\fBsent_protocol_transport\fR, \fBsent_by_host\fR and \fIsent_by_port\fR. A +value of \fB0\fR for \fIsent_by_port\fR means that the port information is not +present in the resulting \fBVIA\fR header. The \fBVIA\fR header that is created +has the protocol set to "\fBSIP\fR" and version set to "2.0". Any parameters +specific in \fIvia_params\fR is added to the \fBVIA\fR header before appending +the header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_maxforward()\fR function appends a \fBMAX-FORWARDS\fR header to +the \fBSIP\fR message \fIsip_msg\fR using the value in \fImaxforward\fR. The +\fImaxforward\fR value is a positive integer. +.sp +.LP +The \fBsip_add_callid()\fR function appends a \fBCALL-ID\fR header to the +\fBSIP\fR message \fIsip_msg\fR using the value in \fIcallid\fR, if non-null. +If \fIcallid\fR is null, this function creates a \fBCALL-ID\fR header using a +randomly generated value. +.sp +.LP +The \fBsip_add_cseq()\fR function appends a \fBCSEQ\fR header to the \fBSIP\fR +message using the values in \fImethod\fR and \fIcseq\fR. Permissible values for +method include: +.br +.in +2 +INVITE +.in -2 +.br +.in +2 +ACK +.in -2 +.br +.in +2 +OPTIONS +.in -2 +.br +.in +2 +BYE +.in -2 +.br +.in +2 +CANCEL +.in -2 +.br +.in +2 +REGISTER +.in -2 +.br +.in +2 +REFER +.in -2 +.br +.in +2 +SUBSCRIBE +.in -2 +.br +.in +2 +NOTIFY +.in -2 +.br +.in +2 +PRACK +.in -2 +.br +.in +2 +INFO +.in -2 +.sp +.LP +The \fIcseq\fR value is a positive integer. +.sp +.LP +The \fBsip_add_content_type()\fR function appends a \fBCONTENT-TYPE\fR to the +\fBSIP\fR message \fIsip_msg\fR. The \fBCONTENT-TYPE\fR is created using the +type and subtype, both should be non-null. +.sp +.LP +The \fBsip_add_content()\fR function adds a message body to the \fBSIP\fR +message \fIsip_msg\fR. The message body is given by the null terminated string +contents. Once the function returns, the caller may reuse or delete contents as +\fBsip_add_content()\fR creates a new buffer and copies over contents for its +use. +.sp +.LP +The \fBsip_add_accept()\fR function appends an \fBACCEPT\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBACCEPT\fR header is created using type +and subtype. If both type and subtype are null, then an empty \fBACCEPT\fR +header is added to the \fBSIP\fR message. If type is non-null, but subtype is +null, then the \fBACCEPT\fR header has the specified type and sets the subtype +in the header to '\fB*\fR'. Any \fIaccept_param\fR or \fImedia_param\fR, if +provided, are added to the \fBACCEPT\fR header before appending the header to +the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_accept_enc()\fR function appends an \fBACCEPT-ENCODING\fR header +to the \fBSIP\fR message \fIsip_msg\fR. The \fBACCEPT-ENCODING\fR is created +using code. Any parameter specified in \fIparam\fR is added to the +\fBACCEPT-ENCODING\fR header before appending the header to the \fBSIP\fR +message. +.sp +.LP +The \fBsip_add_accept_lang()\fR function appends an \fBACCEPT-LANGUAGE\fR +header to the \fBSIP\fR message \fIsip_msg\fR. The \fBACCEPT-LANGUAGE\fR header +is created using lang. Any parameter specified in \fIparam\fR is added to the +\fBACCEPT-LANGUAGE\fR header before appending the header to the \fBSIP\fR +message. +.sp +.LP +The \fBsip_add_alert_info()\fR function appends an \fBALERT-INFO\fR header to +the \fBSIP\fR message \fIsip_msg\fR. The \fBALERT-INFO\fR header is created +using alert. Any parameter specified in \fIparam\fR is added to the +\fBALERT-INFO\fR header before appending the header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_allow()\fR function appends an \fBALLOW\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBALLOW\fR header is created using alert +and method. Permissible values for method include: +.br +.in +2 +INVITE +.in -2 +.br +.in +2 +ACK +.in -2 +.br +.in +2 +OPTIONS +.in -2 +.br +.in +2 +BYE +.in -2 +.br +.in +2 +CANCEL +.in -2 +.br +.in +2 +REGISTER +.in -2 +.br +.in +2 +REFER +.in -2 +.br +.in +2 +INFO +.in -2 +.br +.in +2 +SUBSCRIBE +.in -2 +.br +.in +2 +NOTIFY +.in -2 +.br +.in +2 +PRACK +.in -2 +.sp +.LP +The \fBsip_add_call_info()\fR function appends a \fBCALL-INFO\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBCALL-INFO\fR header is created using +\fIuri\fR. Any parameter specified in \fIparam\fR is added to the +\fBCALL-INFO\fR before appending the header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_content_disp()\fR function appends a \fBCONTENT-DISPOSITION\fR +header to the \fBSIP\fR message \fIsip_msg\fR. The \fBCONTENT-DISPOSITION\fR +header is created using \fIdisp_type\fR. Any parameter specified in \fIparam\fR +is added to the \fBCONTENT-DISPOSITION\fR header before appending the header to +the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_content_enc()\fR function appends a \fBCONTENT-ENCODING\fR +header to the \fBSIP\fR message \fIsip_msg\fR. The \fBCONTENT-ENCODING\fR +header is created using code. +.sp +.LP +The \fBsip_add_content_lang()\fR function appends a \fBCONTENT-LANGUAGE\fR +header to the \fBSIP\fR message \fIsip_msg\fR. The \fBCONTENT-LANGUAGE\fR +header is created using \fIlang\fR. +.sp +.LP +The \fBsip_add_date()\fR appends a \fBDATE\fR header to the \fBSIP\fR message +\fIsip_msg\fR. The \fBDATE\fR header is created using the date information +specified in date. The semantics for the date string is given is RFC 3261, +section 25.1. +.sp +.LP +The \fBsip_add_error_info()\fR function appends an \fBERROR-INFO\fR header to +the \fBSIP\fR message \fIsip_msg\fR. The \fBERROR-INFO\fR header is created +using \fIuri\fR. An parameters specified in \fIparam\fR is added to the +\fBERROR-INFO\fR header before adding the header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_expires()\fR function appends an \fBEXPIRES\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBEXPIRES\fR header is created using the +seconds specified in \fIsecs\fR. +.sp +.LP +The \fBsip_add_in_reply_to()\fR function appends a \fBIN-REPLY-TO\fR header to +the \fBSIP\fR message \fIsip_msg\fR. The \fBIN-REPLY-TO\fR header is created +using the \fIcall-id\fR value specified in \fIreply_id\fR. +.sp +.LP +The \fBsip_add_mime_version()\fR function appends a \fBMIME-VERSION\fR header +to the \fBSIP\fR message \fIsip_msg\fR. The \fBMIME-VERSION\fR header is +created using version. +.sp +.LP +The \fBsip_add_min_expires()\fR function appends a \fBMIN-EXPIRES\fR header to +the \fBSIP\fR message \fIsip_msg\fR. The \fBMIN-EXPIRES\fR is created using the +time in seconds specified in \fIsecs\fR. +.sp +.LP +The \fBsip_add_org()\fR function appends a \fBORGANIZATION\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBORGANIZATION\fR header is created using +the information specified in \fIorg\fR. +.sp +.LP +The \fBsip_add_priority()\fR function appends a \fBPRIORITY\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBPRIORITY\fR header is created using the +value specified in \fIprio\fR. +.sp +.LP +The \fBsip_add_reply_to()\fR function appends a \fBREPLY-TO\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBREPLY-TO\fR header is created using the +\fIdisplay_name\fR, if provided, and \fIaddr\fR. The \fIadd_aquot\fR parameter +has the same semantics as in \fBsip_add_from()\fR/\fBsip_add_to()\fR. Any +parameters specified in \fIparam\fR is added to the \fBREPLY-TO\fR header +before appending the header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_passertedid()\fR function appends a \fBP-ASSERTED-IDENTITY\fR +header to the \fBSIP\fR message \fIsip_msg\fR. The \fBP-ASSERTED-IDENTITY\fR +header is created using the \fIdisplay_name\fR, if provided, and the +\fIaddr\fR. The \fIadd_aquot\fR parameter has the same semantics as in +\fBsip_add_from()\fR/\fBsip_add_to()\fR. +.sp +.LP +The \fBsip_add_ppreferredid()\fR function appends a \fBP-PREFERRED-IDENTITY\fR +header to the \fBSIP\fR message \fIsip_msg\fR. The \fBP-PREFERRED-IDENTITY\fR +header is created using the \fIdisplay_name\fR, if provided, and the +\fIaddr\fR. The \fIadd_aquot\fR parameter has the same semantics as in +\fBsip_add_from()\fR/\fBsip_add_to()\fR. +.sp +.LP +The \fBsip_add_require()\fR function appends a \fBREQUIRE\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBREQUIRE\fR header is created using the +information in \fIreq\fR. +.sp +.LP +The \fBsip_add_retry_after()\fR function appends a \fBRETRY-AFTER\fR header to +the \fBSIP\fR message \fIsip_msg\fR. The \fBRETRY-AFTER\fR is created using the +time in seconds specified in \fIsecs\fR comments, if any, in \fIcmt\fR. Any +parameters specified in \fIparam\fR, if provided, is added to the +\fBRETRY-AFTER\fR header before appending the header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_route()\fR function appends a \fBROUTE\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBROUTE\fR header is created using the +\fIdisplay_name\fR, if any, and the \fIuri\fR. The \fIuri\fR is enclosed +in '<>' before adding to the header. Parameters specified in \fIroute_params\fR +are added to the \fBROUTE\fR header before appending the header to the +\fBSIP\fR message. +.sp +.LP +The \fBsip_add_record_route()\fR function appends a \fBRECORD-ROUTE\fR header +to the \fBSIP\fR message \fIsip_msg\fR. The \fBRECORD-ROUTE\fR header is +created using the \fIdisplay_name\fR, if any, and the \fIuri\fR. The \fIuri\fR +parameter is enclosed in '<>' before adding to the header. Any parameters +specified in \fIroute_params\fR is added to the \fBROUTE\fR header before +appending the header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_server()\fR function appends a \fBSERVER\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBSERVER\fR header is created using the +information in \fIsrv\fR. +.sp +.LP +The \fBsip_add_subject()\fR function appends a \fBSUBJECT\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBSUBJECT\fR header is created using the +information in \fIsubject\fR. +.sp +.LP +The \fBsip_add_supported()\fR function appends a \fBSUPPORTED\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBSUPPORTED\fR header is created using +the information in \fIsupport\fR. +.sp +.LP +The \fBsip_add_tstamp()\fR function appends a \fBTIMESTAMP\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBTIMESTAMP\fR header is created using +the time value in \fItime\fR and the delay value, if provided, in \fIdelay\fR. +.sp +.LP +The \fBsip_add_unsupported()\fR function appends an \fBUNSUPPORTED\fR header to +the \fBSIP\fR message \fIsip_msg\fR. The \fBUNSUPPORTED\fR header is created +using the \fBoption-tag\fR value in \fIunsupport\fR. +.sp +.LP +The \fBsip_add_user_agent()\fR function appends an \fBUSER-AGENT\fR header to +the \fBSIP\fR message \fIsip_msg\fR. The \fBUSER-AGENT\fR header is created +using the \fBserver-val\fR specified in \fIusr\fR. +.sp +.LP +The \fBsip_add_warning()\fR function appends a \fBWARNING\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBWARNING\fR header is created using the +\fBwarn-code\fR in \fIcode\fR, \fBwarn-agent\fR in \fIaddr\fR and +\fBwarn-test\fR in \fImsg\fR. +.sp +.LP +The \fBsip_add_privacy()\fR function appends a \fBPRIVACY\fR header to the +\fBSIP\fR message \fIsip_msg\fR. The \fBPRIVACY\fR header is created using the +privacy value specified in \fIpriv_val\fR. +.sp +.LP +The \fBsip_add_rseq()\fR function appends a \fBRSEQ\fR header to the \fBSIP\fR +message \fIsip_msg\fR. The \fBRSEQ\fR header is created using the sequence +number specified in \fIresp_num\fR. +.sp +.LP +The \fBsip_add_rack()\fR function appends a \fBRACK\fR header to the \fBSIP\fR +message \fIsip_msg\fR. The \fBRACK\fR header is created using the sequence +number in \fIresp_num\fR, the \fBSIP\fR method in \fImethod\fR and the +\fBCSEQ\fR number in \fIcseq\fR. Permissible values for method include: +\fBINVITE\fR, \fBACK\fR, \fBOPTIONS\fR, \fBBYE\fR, \fBCANCEL\fR, +\fBREGISTER\fR, \fBREFER\fR, \fBINFO\fR, \fBSUBSCRIBE\fR, \fBNOTIFY\fR, +\fBPRACK\fR. +.sp +.LP +The \fBsip_add_author()\fR function appends an \fBAUTHORIZATION\fR header to +the \fBSIP\fR message \fIsip_msg\fR. The \fBAUTHORIZATION\fR header is created +using scheme. Any parameter specified in \fIparam\fR is added to the +\fBAUTHORIZATION\fR header before the header is appended to the \fBSIP\fR +message. +.sp +.LP +The \fBsip_add_authen_info()\fR function appends an \fBAUTHENTICATION-INFO()\fR +header to the \fBSIP\fR message \fIsip_msg\fR. The \fBAUTHENTICATION-INFO\fR +header is created using the authentication information in \fIainfo\fR. +.sp +.LP +The \fBsip_add_proxy_authen()\fR function appends a \fBPROXY-AUTHENTICATE\fR +header to the \fBSIP\fR message \fIsip_msg\fR. The \fBPROXY-AUTHENTICATE\fR is +created using the value specified in \fIpsacheme\fR. Any parameter in +\fIparam\fR is added to the \fBPROXY-AUTHENTICATE\fR header before adding the +header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_proxy_author()\fR function appends a \fBPROXY-AUTHORIZATION\fR +header to the \fBSIP\fR message \fIsip_msg\fR. The \fBPROXY-AUTHORIZATION\fR +header is created using the value specified in \fIpascheme\fR. Any parameter in +\fIparam\fR is added to the \fBPROXY-AUTHORIZATION\fR header before adding the +header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_proxy_require()\fR function appends a \fBPROXY-REQUIRE\fR header +to the \fBSIP\fR message \fIsip_msg\fR. The \fBPROXY-REQUIRE\fR header is +created using the \fBoption-tag\fR in \fIopt\fR. +.sp +.LP +The \fBsip_add_www_authen()\fR function appends a \fBWWW-AUTHENTICATE\fR header +to the \fBSIP\fR message \fIsip_msg\fR. The \fBWWW-AUTHENTICATE\fR header is +created using the challenge in \fIwascheme\fR. Any parameter in \fIparam\fR is +added to the \fBWWW-AUTHENTICATE\fR header before adding the header to the +\fBSIP\fR message. +.sp +.LP +The \fBsip_add_allow_events()\fR function appends an \fBALLOW-EVENTS\fR header +to the \fBSIP\fR message The \fBALLOW-EVENTS\fR header is created using the +event specified in events. +.sp +.LP +The \fBsip_add_event()\fR function appends an \fBEVENT\fR header to the +\fBSIP\fR message. The \fBEVENT\fR header is created using the value specified +in \fIevent\fR. Any parameter in \fIparam\fR is added to the \fBEVENT\fR header +before appending the header to the \fBSIP\fR message. +.sp +.LP +The \fBsip_add_substate()\fR function appends a \fBSUBSCRIPTION-STATE\fR header +to the \fBSIP\fR message. The \fBSUBSCRIPTION-STATE\fR header is created using +the \fBstate\fR specified in \fIsub\fR. Any parameter in \fIparam\fR is added +to the \fBSUBSCRIPTION-STATE\fR header before appending the header to the +\fBSIP\fR message. +.SH RETURN VALUES +.sp +.LP +These functions return \fB0\fR on success and the appropriate error value on +failure. +.SH ERRORS +.sp +.LP +On failure, functions that return an error value can return one of the +following: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +Mandatory parameters are not provided, i.e. null. +.sp +For \fBsip_add_from()\fR, \fBsip_add_to()\fR, \fBsip_add_contact()\fR, +\fBsip_add_reply_to()\fR, \fBsip_add_passertedid()\fR, +\fBsip_add_ppreferredid()\fR if \fIdisplay_name\fR is non-null and +\fIadd_aquot\fR is \fBB_FALSE\fR. +.sp +For \fBsip_add_branchid_to_via()\fR the topmost \fBVIA\fR header already has a +branch \fIparam\fR or the \fBSIP\fR message does not have a \fBVIA\fR header. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPERM\fR\fR +.ad +.RS 10n +.rt +The message cannot be modified. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +There is an error allocating memory for creating headers/parameters. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_add_header.3sip b/usr/src/man/man3sip/sip_add_header.3sip new file mode 100644 index 0000000000..5927fd9f99 --- /dev/null +++ b/usr/src/man/man3sip/sip_add_header.3sip @@ -0,0 +1,90 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_add_header 3SIP "09 Feb 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_add_header \- add a SIP header to the SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_add_header\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBchar *\fR\fIheader_string\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_add_header()\fR function takes the \fBSIP\fR header +\fIheader_string\fR, adds a \fBCRLF\fR (carriage return/line feed) and appends +it to the \fBSIP\fR message \fIsip_msg\fR. The \fBsip_add_header()\fR function +is typically used when adding a \fBSIP\fR header with multiple values. +.SH RETURN VALUES +.sp +.LP +The \fBsip_add_header()\fR function returns \fB0\fR on success and the +appropriate error value on failure. +.SH ERRORS +.sp +.LP +On failure, the \fBsip_add_header()\fR function can return one of the following +error values: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +Mandatory parameters are not provided, i.e. null. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPERM\fR\fR +.ad +.RS 10n +.rt +The message cannot be modified. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +Error allocating memory for creating headers/parameters. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_add_param.3sip b/usr/src/man/man3sip/sip_add_param.3sip new file mode 100644 index 0000000000..78d83a3dcd --- /dev/null +++ b/usr/src/man/man3sip/sip_add_param.3sip @@ -0,0 +1,98 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_add_param 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_add_param \- add a parameter to the SIP header +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBsip_header_t\fR \fIsip_add_param\fR(\fBsip_header_t\fR \fIsip_header\fR, \fBchar *\fR\fIparam\fR, + \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_add_param()\fR function adds the parameter provided in \fIparam\fR +to the \fBSIP\fR header \fIsip_header\fR. The function returns the header with +the parameter added. A new header is created as a result of adding the +parameter and the old header is marked deleted. Applications with multiple +threads working on the same \fBSIP\fR header need to take note of this. If +error is non-null, it (the location pointer by the variable) is set to \fB0\fR +on success and the appropriate error value on error. +.SH RETURN VALUES +.sp +.LP +The \fBsip_add_param()\fR function returns the new header on success and null +on failure. Further, if error is non-null, then on success the value in the +location pointed by error is \fB0\fR and the appropriate error value on +failure. +.SH ERRORS +.sp +.LP +On failure, functions that return an error value may return one of the +following: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +Mandatory parameters are not provided, i.e. null. +.sp +For \fBsip_add_param()\fR, the header to be modified is marked deleted. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPERM\fR\fR +.ad +.RS 10n +.rt +The message cannot be modified. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +There is an error allocating memory for creating headers/parameters. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_add_request_line.3sip b/usr/src/man/man3sip/sip_add_request_line.3sip new file mode 100644 index 0000000000..9060f2952d --- /dev/null +++ b/usr/src/man/man3sip/sip_add_request_line.3sip @@ -0,0 +1,159 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_add_request_line 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_add_request_line, sip_add_response_line \- add a request/response line to a +SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fBsip_add_request_line\fR(\fBsip_msg_t\fR \fIsip_request\fR, + \fBsip_method_t\fR \fImethod\fR, \fBchar *\fR\fIrequest_uri\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_add_response_line\fR(\fBsip_msg_t\fR \fIsip_response\fR, + \fBint\fR \fIresponse_code\fR, \fBchar *\fR\fIresponse_phase\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_add_request_line()\fR function adds a request line to the \fBSIP\fR +message \fIsip_request\fR. The request line is created using the \fBSIP\fR +method specified in \fImethod\fR and the \fBURI\fR in \fIrequest_uri\fR. The +\fBSIP\fR method can be one of the following: +.br +.in +2 +\fBINVITE\fR +.in -2 +.br +.in +2 +\fBACK\fR +.in -2 +.br +.in +2 +\fBOPTIONS\fR +.in -2 +.br +.in +2 +\fBBYE\fR +.in -2 +.br +.in +2 +\fBCANCEL\fR +.in -2 +.br +.in +2 +\fBREGISTER\fR +.in -2 +.br +.in +2 +\fBREFER\fR +.in -2 +.br +.in +2 +\fBSUBSCRIBE\fR +.in -2 +.br +.in +2 +\fBNOTIFY\fR +.in -2 +.br +.in +2 +\fBPRACK\fR +.in -2 +.br +.in +2 +\fBINFO\fR +.in -2 +.sp +.LP +The resulting request line has the \fBSIP\fR-Version of "2.0". +.sp +.LP +The \fBsip_add_response_line()\fR function adds a response line to the +\fBSIP\fR message \fIsip_response\fR. The response line is created using the +response code \fIresponse_code\fR and the phrase in \fIresponse_phrase\fR. If +the \fIresponse_code\fR is one that is listed in RFC 3261, +\fBsip_get_resp_desc()\fR can be used to get the response phase for the +\fIresponse_code\fR. The resulting response line has the \fBSIP\fR-Version of +"2.0". +.SH RETURN VALUES +.sp +.LP +The \fBsip_add_response_line()\fR and \fBsip_add_request_line()\fR functions +return \fB0\fR on success and the appropriate error value in case of failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +On failure, the \fBsip_add_response_line()\fR and \fBsip_add_request_line()\fR +functions could return one of the following errors: +.sp +.ne 2 +.mk +.na +\fBEINVAL\fR +.ad +.RS 11n +.rt +If mandatory input is not provided or if the input is invalid. +.RE + +.sp +.ne 2 +.mk +.na +\fBENOTSUP\fR +.ad +.RS 11n +.rt +If the input \fBSIP\fR message cannot be modified. +.RE + +.sp +.ne 2 +.mk +.na +\fBENOMEM\fR +.ad +.RS 11n +.rt +If memory allocation fails when creating the request/response line or when +creating headers in the \fBACK\fR request. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_branchid.3sip b/usr/src/man/man3sip/sip_branchid.3sip new file mode 100644 index 0000000000..eee7a9a315 --- /dev/null +++ b/usr/src/man/man3sip/sip_branchid.3sip @@ -0,0 +1,59 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_branchid 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_branchid \- generate a RFC 3261 complaint branch ID +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBchar *\fR\fIsip_branchid\fR(\fBsip_msg_t\fR \fIsip_msg\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_branchid()\fR function can be used to generate a value for the +branch parameter for a \fBVIA\fR header. The returned string is prefixed with +\fBz9hG4bK\fR to conform to RFC 3261. If \fIsip_msg\fR is null or \fIsip_msg\fR +does not have a \fBVIA\fR header, a random value is generated. Otherwise, the +value is generated using the \fBMD5\fR hash of the \fBVIA\fR, \fBFROM\fR, +\fBCALL-ID\fR, \fBCSEQ\fR headers and the \fBURI\fR from the request line. The +caller is responsible for freeing the returned string. +.SH RETURN VALUES +.sp +.LP +The \fBsip_branchid()\fR function returns a string on success and \fBNULL\fR on +failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_clone_msg.3sip b/usr/src/man/man3sip/sip_clone_msg.3sip new file mode 100644 index 0000000000..ad8caa8297 --- /dev/null +++ b/usr/src/man/man3sip/sip_clone_msg.3sip @@ -0,0 +1,55 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_clone_msg 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_clone_msg \- clone a SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBsip_msg_t\fR \fIsip_clone_msg\fR(\fBsip_msg_t\fR \fIsip_msg\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_clone_msg()\fR function clones the input \fBSIP\fR message and +returns the cloned message. The resulting cloned message has all the \fBSIP\fR +headers and message body, if present, from the input message. +.SH RETURN VALUES +.sp +.LP +The \fBsip_clone_msg()\fR function returns the cloned message on success and +\fBNULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_copy_start_line.3sip b/usr/src/man/man3sip/sip_copy_start_line.3sip new file mode 100644 index 0000000000..d4626c4b0b --- /dev/null +++ b/usr/src/man/man3sip/sip_copy_start_line.3sip @@ -0,0 +1,125 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_copy_start_line 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_copy_start_line, sip_copy_header, sip_copy_header_by_name, +sip_copy_all_headers \- copy headers from a SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_copy_start_line\fR(\fBsip_msg_t\fR \fIfrom_msg\fR, \fBsip_msg_t\fR \fIto_msg\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_copy_header\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBsip_header_t\fR \fIsip_header\fR, + \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_copy_header_by_name\fR(\fBsip_msg_t\fR \fIfrom_msg\fR, \fBsip_msg_t\fR \fIto_msg\fR, + \fBchar *\fR\fIheader_name\fR, \fBchar *\fR\fIparam\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_copy_all_headers\fR(\fBsip_msg_t\fR \fIfrom_msg\fR, \fBsip_msg_t\fR \fIto_msg\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_copy_start_line()\fR function copies the start line, a request or a +response line, from \fIfrom_msg\fR to \fIto_msg\fR. +.sp +.LP +The \fBsip_copy_header()\fR function copies the \fBSIP\fR header specified by +\fIsip_header\fR to the \fBSIP\fR message \fIsip_msg\fR. A new \fBSIP\fR header +is created from \fIsip_header\fR and \fIparam\fR, and is appended to +\fIsip_msg\fR. The \fIparam\fR can be non-null. +.sp +.LP +The \fBsip_copy_header_by_name()\fR function copies the header specified by +\fIheader_name\fR (long or short form) from \fIfrom_msg\fR to \fIto_msg\fR. The +new header is created using the header value from \fIfrom_msg\fR and +\fIparam\fR, if non-null, and appended to \fIto_msg\fR. +.sp +.LP +The \fBsip_copy_all_headers()\fR copies all the headers from \fIfrom_msg\fR to +\fIto_msg\fR. +.SH RETURN VALUES +.sp +.LP +These functions return \fB0\fR on success and the appropriate error on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +These functions can return one of the following errors in case of failure: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +If the required input parameters are \fBNULL\fR or if the header being copied +does not exist or is deleted in source \fBSIP\fR message. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +Error while allocating memory for creating the new header. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPERM\fR\fR +.ad +.RS 10n +.rt +If the input SIP message cannot be modified. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_create_OKack.3sip b/usr/src/man/man3sip/sip_create_OKack.3sip new file mode 100644 index 0000000000..402ea05ac1 --- /dev/null +++ b/usr/src/man/man3sip/sip_create_OKack.3sip @@ -0,0 +1,126 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_create_OKack 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_create_OKack \- create an ACK request for a final response +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_create_OKack\fR(\fBsip_msg_t\fR \fIresponse\fR, + \fBsip_msg_t\fR \fIack_msg\fR, \fBchar *\fR\fItransport\fR, + \fBchar *\fR\fIsent_by\fR, \fBint\fR \fIsent_by_port\fR, + \fBchar *\fR\fIvia_params\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_create_OKack()\fR function constructs an \fBACK\fR request in +\fIack_msg\fR for the final \fB2\fR\fIXX\fR \fBSIP\fR response. The request +line is created using the \fBURI\fR in the \fBCONTACT\fR header from the +\fIresponse\fR. The SIP-Version in the request line is "2.0". The \fBVIA\fR +header for the \fBACK\fR request is created using \fItransport\fR, +\fIsent_by\fR, \fIsent_by_port\fR (if non-zero), and \fIvia_params\fR (if +non-null). The following headers are copied to \fIack_msg\fR from +\fIresponse\fR: +.br +.in +2 +\fBFROM\fR +.in -2 +.br +.in +2 +\fBTO\fR +.in -2 +.br +.in +2 +\fBCALL-ID\fR +.in -2 +.br +.in +2 +\fBMAX_FORWARDS\fR +.in -2 +.sp +.LP +The \fBCSEQ\fR header is created using the method as \fBACK\fR and the sequence +number from the \fBCSEQ\fR header in \fIresponse\fR. +.SH RETURN VALUES +.sp +.LP +The \fBsip_create_OKack()\fR function returns \fB0\fR on success and the +appropriate error value in case of failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +On failure, the \fBsip_create_OKack()\fR function could return one of the +following errors: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 11n +.rt +If mandatory input is not provided or if the input is invalid. +.sp +The \fBsip_create_OKack()\fR function can return this error if it does not find +a \fBCONTACT\fR header or if it is unable to obtain the \fBURI\fR from the +\fBCONTACT\fR header for the request line. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOTSUP\fR\fR +.ad +.RS 11n +.rt +If the input \fBSIP\fR message cannot be modified. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 11n +.rt +If memory allocation fails when creating the request/response line or when +creating headers in the \fBACK\fR request. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_create_dialog_req.3sip b/usr/src/man/man3sip/sip_create_dialog_req.3sip new file mode 100644 index 0000000000..475720067d --- /dev/null +++ b/usr/src/man/man3sip/sip_create_dialog_req.3sip @@ -0,0 +1,132 @@ +'\" te +.\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_create_dialog_req 3SIP "6 Aug 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_create_dialog_req, sip_create_dialog_req_nocontact \- create an in-dialog +request +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBsip_msg_t\fR \fBsip_create_dialog_req\fR(\fBsip_method_t\fR \fImethod\fR, + \fBsip_dialog_t\fR \fIdialog\fR, \fBchar *\fR\fItransport\fR, \fBchar *\fR\fIsent_by\fR, + \fBint\fR \fIsent_by_port\fR, \fBchar *\fR\fIvia_param\fR, \fBuint32_t\fR \fIsmaxforward\fR, + \fBint\fR \fIcseq\fR); +.fi + +.LP +.nf +\fBsip_msg_t\fR \fBsip_create_dialog_req_nocontact\fR(\fBsip_method_t\fR \fImethod\fR, + \fBsip_dialog_t\fR \fIdialog\fR, \fBchar *\fR\fItransport\fR, \fBchar *\fR\fIsent_by\fR, + \fBint\fR \fIsent_by_port\fR, \fBchar *\fR\fIvia_param\fR, \fBuint32_t\fR \fIsmaxforward\fR, + \fBint\fR \fIcseq\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_create_dialog_req()\fR function creates and returns a \fBSIP\fR +request with the state information contained in \fIdialog\fR. The method in the +resulting request is from \fImethod\fR. The method can be one of the following: +.br +.in +2 +\fBINVITE\fR +.in -2 +.br +.in +2 +\fBACK\fR +.in -2 +.br +.in +2 +\fBOPTIONS\fR +.in -2 +.br +.in +2 +\fBBYE\fR +.in -2 +.br +.in +2 +\fBCANCEL\fR +.in -2 +.br +.in +2 +\fBREGISTER\fR +.in -2 +.br +.in +2 +\fBREFER\fR +.in -2 +.br +.in +2 +\fBINFO\fR +.in -2 +.br +.in +2 +\fBSUBSCRIBE\fR +.in -2 +.br +.in +2 +\fBNOTIFY\fR +.in -2 +.br +.in +2 +\fBPRACK\fR +.in -2 +.sp +.LP +The resulting request line in the \fBSIP\fR message has the \fBSIP\fR-Version +of "2.0". The \fBURI\fR in the request line is from the remote target in the +\fIdialog\fR or from the route set in the \fIdialog\fR, if present. See RFC +3261 (section 12.2) for details. The \fBFROM\fR, \fBTO\fR, and \fBCALL-ID\fR +headers are added from the \fIdialog\fR. The \fBMAX-FORWARDS\fR header is added +using the value in \fImaxforward\fR. The \fBCSEQ\fR header is added using the +\fBSIP\fR method in \fImethod\fR and the sequence number value in \fIcseq\fR. +If \fIcseq\fR is \fB-1\fR, the sequence number is obtained from the local +sequence number in the \fIdialog\fR. The local sequence number in the +\fIdialog\fR is incremented and is used in the \fBCSEQ\fR header. The \fBVIA\fR +header added is created using the \fItransport\fR, \fIsent_by\fR, +\fIsent_by_port\fR (if \fInon-zero\fR), and \fIvia_param\fR (if any). If +\fIdialog\fR has a non-empty route set, the resulting \fBSIP\fR request has the +route set from the \fIdialog\fR. +.sp +.LP +The \fBsip_create_dialog_req_nocontact()\fR function is similar to +\fBsip_create_dialog_req()\fR, except that it does not add the contact header. +.SH RETURN VALUES +.sp +.LP +The \fBsip_create_dialog_req()\fR and \fBsip_create_dialog_req_nocontact()\fR +functions return the resulting \fBSIP\fR message on success and \fBNULL\fR on +failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB), \fBattributes\fR(5) diff --git a/usr/src/man/man3sip/sip_create_response.3sip b/usr/src/man/man3sip/sip_create_response.3sip new file mode 100644 index 0000000000..7832aa0ce6 --- /dev/null +++ b/usr/src/man/man3sip/sip_create_response.3sip @@ -0,0 +1,92 @@ +'\" te +.\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_create_response 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_create_response \- create a response for a SIP request +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBsip_msg_t\fR \fIsip_create_response\fR(\fBsip_msg_t\fR \fIsip_request\fR, + \fBint\fR \fIresponse_code\fR, \fBchar *\fR\fIresponse_phase\fR, + \fBchar *\fR\fItotag\fR, \fBchar *\fR\fIcontact_uri\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_create_response()\fR function creates and returns a \fBSIP\fR +message in response to the \fBSIP\fR request \fIsip_request\fR. The response +line in the resulting \fBSIP\fR message is created using the response code in +\fIresponse_code\fR and the phrase in \fIresponse_phrase\fR. The response line +has the \fBSIP\fR-Version of "2.0". If a non-null \fItotag\fR is specified, the +resulting \fBSIP\fR response has a \fBTO\fR header with a tag value from +\fItotag\fR. If \fItotag\fR is null and the \fIresponse_code\fR is anything +other than \fB100\fR (\fBTRYING\fR), \fBsip_create_response()\fR adds a +\fBTO\fR header with a randomly generated tag value. If the \fIresponse_code\fR +is \fB100\fR and \fItotag\fR is null, the \fBSIP\fR response has a \fBTO\fR +header without a tag parameter. If \fIcontact_uri\fR is non-null, a +\fBCONTACT\fR header is added to the \fBSIP\fR response with the \fBURI\fR +specified in \fIcontact_uri\fR. The \fBSIP\fR response has the following +headers copied from \fIsip_request\fR: +.br +.in +2 +All \fBVIA\fR headers +.in -2 +.br +.in +2 +\fBFROM\fR header +.in -2 +.br +.in +2 +\fBTO\fR header (with tag added, if required, as stated above) +.in -2 +.br +.in +2 +\fBCALL-ID\fR header +.in -2 +.br +.in +2 +\fBCSEQ\fR header +.in -2 +.br +.in +2 +All \fBRECORD-ROUTE\fR headers +.in -2 +.SH RETURN VALUES +.sp +.LP +The \fBsip_create_response()\fR function returns the resulting \fBSIP\fR +message on success and \fBNULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_delete_dialog.3sip b/usr/src/man/man3sip/sip_delete_dialog.3sip new file mode 100644 index 0000000000..e82aacc467 --- /dev/null +++ b/usr/src/man/man3sip/sip_delete_dialog.3sip @@ -0,0 +1,70 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_delete_dialog 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_delete_dialog \- delete a dialog +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBvoid\fR \fIsip_delete_dialog\fR(\fBsip_dialog_t\fR \fIdialog\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +For functions that return a pointer of type \fBsip_str_t\fR, \fBsip_str_t\fR is +supplied by: +.sp +.in +2 +.nf +typedef struct sip_str { + char *sip_str_ptr; + int sip_str_len; +}sip_str_t; +.fi +.in -2 + +.sp +.LP +The \fIsip_str_ptr\fR parameter points to a specified value at the start of an +input string. The \fIsip_str_len\fR supplies the length of the returned value +starting from \fIsip_str_ptr\fR. +.sp +.LP +The \fBsip_delete_dialog()\fR function is used to delete the dialog specified +in \fIdialog\fR. The dialog is not freed if it has outstanding references on +it. When the last reference is released the dialog is freed. +.SH RETURN VALUES +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_delete_start_line.3sip b/usr/src/man/man3sip/sip_delete_start_line.3sip new file mode 100644 index 0000000000..f0761dcc6b --- /dev/null +++ b/usr/src/man/man3sip/sip_delete_start_line.3sip @@ -0,0 +1,119 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_delete_start_line 3SIP "20 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_delete_start_line, sip_delete_header, sip_delete_header_by_name, +sip_delete_value \- delete a SIP header or a header value +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_delete_start_line\fR(\fBsip_msg_t\fR \fIsip_msg\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_delete_header\fR(\fBsip_msg_t\fR \fIsip_header\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_delete_header_by_name\fR(\fBsip_msg_t\fR \fImsg\fR, + \fBchar *\fR\fIheader_name\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_delete_value\fR(\fBsip_header_t\fR \fIsip_header\fR, + \fBsip_header_value_t\fR \fIsip_header_value\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_delete_start_line()\fR function deletes the start line, a request or +a response line, from the SIP message \fIsip_msg\fR. +.sp +.LP +The \fBsip_delete_header()\fR function deletes the \fBSIP\fR header specified +by \fIsip_header\fR from the associated \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_delete_header_by_name()\fR function deletes the \fBSIP\fR header +name specified by \fIheader_name\fR (long or compact form) from the \fBSIP\fR +message \fIsip_msg\fR. +.sp +.LP +The \fBsip_delete_value()\fR deletes the \fBSIP\fR header value specified by +\fIsip_header_value\fR from the \fBSIP\fR header \fIsip_header\fR. +.sp +.LP +When a \fBSIP\fR header or value is deleted, the corresponding header or value +is marked as deleted. Lookups ignore headers or values that are marked as +deleted. +.SH RETURN VALUES +.sp +.LP +These functions return \fB0\fR on success and the appropriate error on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +On failure, the returned error could be one of the following: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +If any of the required input is \fBNULL\fR. +.sp +If the header or value to be deleted does not exist. +.sp +If the header or value to be deleted has already been deleted. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPERM\fR\fR +.ad +.RS 10n +.rt +If the \fBSIP\fR message cannot be modified. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_enable_counters.3sip b/usr/src/man/man3sip/sip_enable_counters.3sip new file mode 100644 index 0000000000..2f94fe507b --- /dev/null +++ b/usr/src/man/man3sip/sip_enable_counters.3sip @@ -0,0 +1,173 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_enable_counters 3SIP "11 Jan 2008" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_enable_counters, sip_disable_counters, sip_get_counter_value \- counter +operations +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... -\fBlsip\fR [ \fIlibrary\fR... ] +#include <sip.h> + +\fBint\fR \fBsip_enable_counters\fR(\fBint\fR \fIcounter_group\fR); +.fi + +.LP +.nf +\fBint\fR \fBsip_disable_counters\fR(\fBint\fR \fIcounter_group\fR); +.fi + +.LP +.nf +\fBint\fR \fBsip_get_counter_value\fR(\fBint\fR \fIgroup\fR, \fBint\fR \fIcounter\fR, \fBvoid *\fR\fIcounterval\fR, + \fBsize_t\fR \fIcounterlen\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_enable_counters()\fR function enables the measurement and counting +of the selected counter group. The only allowed value for the +\fIcounter_group\fR is \fBSIP_TRAFFIC_COUNTERS\fR, which is defined in +\fB<sip.h>\fR. Once enabled, the SIP stack starts measuring end-to-end SIP +traffic. The SIP stack keeps track of: +.RS +4 +.TP +.ie t \(bu +.el o +the number of SIP requests sent and received (broken down by methods), +.RE +.RS +4 +.TP +.ie t \(bu +.el o +the number of SIP responses sent and received (broken down by response codes), +and +.RE +.RS +4 +.TP +.ie t \(bu +.el o +the number of bytes sent and received. +.RE +.sp +.LP +The following counters are defined in \fB<sip.h>\fR for the +\fBSIP_TRAFFIC_COUNTERS\fR group. These counter values are retrieved using the +\fBsip_get_counter_value()\fR function. +.sp +.in +2 +.nf +SIP_TOTAL_BYTES_RCVD +SIP_TOTAL_BYTES_SENT +SIP_TOTAL_REQ_RCVD +SIP_TOTAL_REQ_SENT +SIP_TOTAL_RESP_RCVD +SIP_TOTAL_RESP_SENT +SIP_ACK_REQ_RCVD +SIP_ACK_REQ_SENT +SIP_BYE_REQ_RCVD +SIP_BYE_REQ_SENT +SIP_CANCEL_REQ_RCVD +SIP_CANCEL_REQ_SENT +SIP_INFO_REQ_RCVD +SIP_INFO_REQ_SENT +SIP_INVITE_REQ_RCVD +SIP_INVITE_REQ_SENT +SIP_NOTIFY_REQ_RCVD +SIP_NOTIFY_REQ_SENT +SIP_OPTIONS_REQ_RCVD +SIP_OPTIONS_REQ_SENT +SIP_PRACK_REQ_RCVD +SIP_PRACK_REQ_SENT +SIP_REFER_REQ_RCVD +SIP_REFER_REQ_SENT +SIP_REGISTER_REQ_RCVD +SIP_REGISTER_REQ_SENT +SIP_SUBSCRIBE_REQ_RCVD +SIP_SUBSCRIBE_REQ_SENT +SIP_UPDATE_REQ_RCVD +SIP_UPDATE_REQ_SENT +SIP_1XX_RESP_RCVD +SIP_1XX_RESP_SENT +SIP_2XX_RESP_RCVD +SIP_2XX_RESP_SENT +SIP_3XX_RESP_RCVD +SIP_3XX_RESP_SENT +SIP_4XX_RESP_RCVD +SIP_4XX_RESP_SENT +SIP_5XX_RESP_RCVD +SIP_5XX_RESP_SENT +SIP_6XX_RESP_RCVD +SIP_6xx_RESP_SENT +SIP_COUNTER_START_TIME /* records time when counting was enabled */ +SIP_COUNTER_STOP_TIME /* records time when counting was disabled */ +.fi +.in -2 + +.sp +.LP +All of the above counters are defined to be \fBuint64_t\fR, except for +\fBSIP_COUNTER_START_TIME\fR and \fBSIP_COUNTER_STOP_TIME\fR, which are defined +to be \fBtime_t\fR. +.sp +.LP +The \fBsip_disable_counters()\fR function disables measurement and counting for +the specified \fIcounter_group\fR. When disabled, the counter values are not +reset and are retained until the measurement is enabled again. Calling +\fBsip_enable_counters()\fR again would reset all counter values to zero and +counting would start afresh. +.sp +.LP +The \fBsip_get_counter_value()\fR function retrieves the value of the specified +counter within the specified counter group. The value is copied to the user +provided buffer, \fIcounterval\fR, of length \fIcounterlen\fR. For example, +after the following call, \fIinvite_rcvd\fR would have the correct value. +.sp +.in +2 +.nf +uint64_t invite_rcvd; + +sip_get_counter_value(SIP_TRAFFIC_COUNTERS, SIP_INVITE_REQ_RCVD, + &invite_rcvd, sizeof (uint64_t)); +.fi +.in -2 + +.SH RETURN VALUES +.sp +.LP +Upon successful completion, \fBsip_enable_counters()\fR and +\fBsip_disable_counters()\fR return 0. They will return \fBEINVAL\fR if an +incorrect group is specified. +.sp +.LP +Upon successful completion, \fBsip_get_counter_value()\fR returns 0. It +returns \fBEINVAL\fR if an incorrect counter name or counter size is specified, +or if \fIcounterval\fR is \fINULL\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBattributes\fR(5) diff --git a/usr/src/man/man3sip/sip_enable_trans_logging.3sip b/usr/src/man/man3sip/sip_enable_trans_logging.3sip new file mode 100644 index 0000000000..4b33a3ceb8 --- /dev/null +++ b/usr/src/man/man3sip/sip_enable_trans_logging.3sip @@ -0,0 +1,165 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_enable_trans_logging 3SIP "11 Jan 2008" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_enable_trans_logging, sip_enable_dialog_logging, +sip_disable_dialog_logging, sip_disable_trans_logging \- transaction and dialog +logging operations +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... -\fBlsip\fR [ \fIlibrary\fR... ] +#include <sip.h> + +\fBint\fR \fBsip_enable_trans_logging\fR(\fBFILE *\fR\fIlogfile\fR, \fBint\fR \fIflags\fR); +.fi + +.LP +.nf +\fBint\fR \fBsip_enable_dialog_logging\fR(\fBFILE *\fR\fIlogfile\fR, \fBint\fR \fIflags\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBsip_disable_dialog_logging\fR(); +.fi + +.LP +.nf +\fBvoid\fR \fBsip_disable_trans_logging\fR(); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_enable_trans_logging()\fR and \fBsip_enable_dialog_logging()\fR +functions enable transaction and dialog logging respectively. The \fIlogfile\fR +argument points to a file to which the SIP messages are logged. The flags +argument controls the amount of logging. The only flag defined in \fB<sip.h>\fR +is \fBSIP_DETAIL_LOGGING\fR. Either transaction or dialog logging, or both, can +be enabled at any time. For dialog logging to work, the SIP stack must be +enabled to manage dialogs (using \fBSIP_STACK_DIALOGS\fR, see +\fBsip_stack_init\fR(3SIP)) when the stack is initialized. +.sp +.LP +All the messages exchanged within a transaction/dialog is captured and later +dumped to a log file when the transaction or dialog is deleted or terminated. +Upon termination, each dialog writes to the file the messages that were +processed in its context. Similarly, upon termination each transaction writes +to the file the messages that were processed in its context. +.sp +.LP +The \fBsip_disable_trans_logging()\fR and \fBsip_disable_dialog_logging()\fR +functions disable the transaction or dialog logging. These functions do not +close the files. It is the responsibility of the application to close them. +.sp +.LP +The log contains the state of the transaction or dialog at the time the message +was processed. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, \fBsip_enable_trans_logging()\fR and +\fBsip_enable_dialog_logging()\fR return 0. They return \fBEINVAL\fR if +\fIlogfile\fR is \fINULL\fR or \fIflags\fR is unrecognized. +.SH EXAMPLES +.LP +\fBExample 1 \fRDialog logging +.sp +.LP +The following is an example of dialog logging. + +.sp +.in +2 +.nf +FILE *logfile; + +logfile = fopen("/tmp/ApplicationA", "a+"); +sip_enable_dialog_logging(logfile, SIP_DETAIL_LOGGING); + +/* Application sends INVITE, recieves 180 and 200 response and dialog is + created. */ +/* Application sends ACK request */ +/* Application sends BYE and recieves 200 response */ + +/* Application disables logging */ +sip_disable_dialog_logging(); + +The log file will be of the following format. + + +************* Begin Dialog ************* +Digest : 43854 43825 26120 9475 5415 21595 25658 18538 + +----------------------------- +Dialog State : SIP_DLG_NEW + +Tue Nov 27 15:53:34 2007| Message - 1 +INVITE sip:user@example.com SIP/2.0 +From: "Me" < sip:me@mydomain.com > ; TAG=tag-from-01 +To: "You" < sip:you@yourdomain.com > +Contact: < sip:myhome.host.com > +MAX-FORWARDS: 70 +Call-ID: 1261K6A6492KF33549XM +CSeq: 111 INVITE +CONTENT-TYPE: application/sdp +Via: SIP/2.0/UDP 192.0.0.1 : 5060 ;branch=z9hG4bK-via-EVERYTHINGIDO-05 +Record-Route: <sip:server1.com;lr> +Record-Route: <sip:server2.com;lr> +CONTENT-LENGTH : 0 + +Tue Nov 27 15:53:34 2007| Message - 2 +SIP/2.0 180 Ringing +Via: SIP/2.0/UDP 192.0.0.1 : 5060 ;branch=z9hG4bK-via-EVERYTHINGIDO-05 +From: "Me" < sip:me@mydomain.com > ; TAG=tag-from-01 +To: "You" < sip:you@yourdomain.com >;tag=1 +Call-ID: 1261K6A6492KF33549XM +CSeq: 111 INVITE +Contact: <sip:whitestar2-0.East.Sun.COM:5060;transport=UDP> +Record-Route: <sip:server1.com;lr> +Record-Route: <sip:server2.com;lr> +Content-Length: 0 + +----------------------------- +Dialog State : SIP_DLG_EARLY + +/* Entire 200 OK SIP Response */ + +----------------------------- +Dialog State : SIP_DLG_CONFIRMED + +/* Entire ACK Request */ + +/* Entire BYE Request */ +/* Entire 200 OK Response */ +----------------------------- +************* End Dialog ************* +.fi +.in -2 + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBsip_stack_init\fR(3SIP), \fBattributes\fR(5) diff --git a/usr/src/man/man3sip/sip_get_contact_display_name.3sip b/usr/src/man/man3sip/sip_get_contact_display_name.3sip new file mode 100644 index 0000000000..1f93a60c82 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_contact_display_name.3sip @@ -0,0 +1,1111 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_contact_display_name 3SIP "10 Feb 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_contact_display_name, sip_get_from_display_name, +sip_get_to_display_name, sip_get_from_tag, sip_get_to_tag, sip_get_callid, +sip_get_callseq_num, sip_get_callseq_method, sip_get_via_sent_by_host, +sip_get_via_sent_by_port, sip_get_via_sent_protocol_version, +sip_get_via_sent_protocol_name, sip_get_via_sent_transport, sip_get_maxforward, +sip_get_content_length, sip_get_content_type, sip_get_content_sub_type, +sip_get_content, sip_get_accept_type, sip_get_accept_sub_type, +sip_get_accept_enc, sip_get_accept_lang, sip_get_alert_info_uri, +sip_get_allow_method, sip_get_min_expires, sip_get_mime_version, sip_get_org, +sip_get_priority, sip_get_replyto_display_name, sip_get_replyto_uri_str, +sip_get_date_time, sip_get_date_day, sip_get_date_month, sip_get_date_wkday, +sip_get_date_year, sip_get_date_timezone, sip_get_content_disp, +sip_get_content_enc, sip_get_error_info_uri, sip_get_expires, sip_get_require, +sip_get_subject, sip_get_supported, sip_get_tstamp_delay, sip_get_unsupported, +sip_get_server, sip_get_user_agent, sip_get_warning_code, +sip_get_warning_agent, sip_get_warning_text, sip_get_call_info_uri, +sip_get_in_reply_to, sip_get_retry_after_time, sip_get_retry_after_cmts, +sip_get_rack_resp_num, sip_get_rack_cseq_num, sip_get_rack_method, +sip_get_rseq_resp_num, sip_get_priv_value, sip_get_passertedid_display_name, +sip_get_passertedid_uri_str, sip_get_ppreferredid_display_name, +sip_get_ppreferredid_uri_str, sip_get_author_scheme, sip_get_author_param, +sip_get_authen_info, sip_get_proxy_authen_scheme, sip_get_proxy_authen_param, +sip_get_proxy_author_scheme, sip_get_proxy_author_param, sip_get_proxy_require, +sip_get_www_authen_scheme, sip_get_www_authen_param, sip_get_allow_events, +sip_get_event, sip_get_substate, sip_get_content_lang, sip_get_tstamp_value, +sip_get_route_uri_str, sip_get_route_display_name, sip_get_contact_uri_str, +sip_get_from_uri_str, sip_get_to_uri_str \- obtain header specific attributes +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBconst sip_str_t *\fR\fIsip_get_contact_display_name\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_from_display_name\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_to_display_name\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_contact_uri_str\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_from_uri_str\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_to_uri_str\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_from_tag\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_to_tag\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_callid\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_callseq_num\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBsip_method_t\fR \fIsip_get_callseq_method\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_via_sent_by_host\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_via_sent_by_port\fR (\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_via_sent_protocol_version\fR + (\fBsip_header_value_t\fR \fIvalue\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_via_sent_transport\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_maxforward\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_content_length\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_content_type\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_content_sub_type\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBchar *\fR\fIsip_get_content\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_accept_type\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_accept_sub_type\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_accept_enc\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_accept_lang\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_alert_info_uri\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBsip_method_t\fR \fIsip_get_allow_method\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_min_expire\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_mime_version\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_org\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_priority\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_replyto_display_name\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_replyto_uri_str\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_date_time\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_date_day\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_date_month\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_date_year\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_date_wkday\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_date_timezone\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_content_disp\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_content_enc\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_error_info_uri\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_expires\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_require\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_subject\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_supported\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_tstamp_delay\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_unsupported\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_server\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_user_agent\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_warning_code\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_warning_agent\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_warning_text\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_call_info_uri\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_in_reply_to\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_retry_after_time\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_retry_after_cmts\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_passertedid_display_name\fR + (\fBsip_header_value_t\fR \fIvalue\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_passertedid_uri_str\fR + (\fBsip_header_value_t\fR \fIvalue\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_rack_resp_num\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR sip_get_rack_cseq_num\fI\fR(\fBsip_msg_t\fR \fIsip_msg, int *error);\fR +.fi + +.LP +.nf +sip_method_t\fB\fR \fIsip_get_rack_method\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_rseq_resp_num\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_priv_value\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_author_scheme\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_author_param\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBchar *\fR\fIname\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_authen_info\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_proxy_authen_scheme\fR(\fBsip_msg_t\fR \fImsg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_proxy_authen_param\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBchar *\fR\fIname\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_proxy_author_scheme\fR(\fBsip_msg_t\fR \fImsg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_proxy_author_param\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBchar *\fR\fIname\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_proxy_require\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_www_authen_scheme\fR(\fBsip_msg_t\fR \fImsg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_www_authen_param\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBchar *\fR\fIname\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_allow_events\fR(\fBsip_header_value_t\fR \fIvalue, + int *error);\fR +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_event\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_substate\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_content_lang\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_tstamp_value\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_route_uri_str\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_route_display_name\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +For functions that return a pointer of type \fBsip_str_t\fR, \fBsip_str_t\fR is +supplied by: +.sp +.in +2 +.nf +typedef struct sip_str { + char *sip_str_ptr; + int sip_str_len; +}sip_str_t; +.fi +.in -2 + +.sp +.LP +The \fIsip_str_ptr\fR parameter points to the start of the returned value and +\fIsip_str_len\fR supplies the length of the returned value. +.sp +.LP +For example, given the following request line in a \fBSIP\fR message +\fIsip_msg\fR that is input to \fBsip_get_request_uri_str()\fR: +.sp +.in +2 +.nf +FROM : <Alice sip:alice@atlanta.com>;tag=1928301774 +.fi +.in -2 + +.sp +.LP +the return is a pointer to \fIsip_str_t\fR with the \fIsip_str_ptr\fR member +pointing to "\fBA\fR" of \fBAlice\fR and \fIsip_str_len\fR being set to +\fB5\fR, the length of \fBAlice\fR. +.sp +.LP +Access functions for headers that can have multiple values take the value as +the input, while those that can have only one value take the \fBSIP\fR message +\fIsip_msg\fR as the input. +.sp +.LP +The \fBsip_get_contact_display_name()\fR, \fBsip_get_from_display_name()\fR, +and \fBsip_get_to_display_name()\fR functions will return the display name, if +present, from the \fBCONTACT\fR header value, \fBFROM\fR and \fBTO\fR header +respectively. +.sp +.LP +The \fBsip_get_contact_uri_str()\fR, \fBsip_get_from_uri_str()\fR, and +\fBsip_get_to_uri_str()\fR functions will return the \fBURI\fR string from the +\fBCONTACT\fR value, \fBFROM\fR and \fBTO\fR header respectively. +.sp +.LP +The \fBsip_get_from_tag()\fR and \fBsip_get_to_tag()\fR functions will return +the \fBTAG\fR parameter value, if present, from the \fBFROM\fR and \fBTO\fR +header, respectively, in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_callid()\fR function will return the value from the +\fBCALL-ID\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_callseq_num()\fR function will return the call sequence number +from the \fBCSEQ\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_callseq_method()\fR function will return the method from the +\fBCSEQ\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. The method +can be one of the following: +.br +.in +2 +INVITE +.in -2 +.br +.in +2 +ACK +.in -2 +.br +.in +2 +OPTIONS +.in -2 +.br +.in +2 +BYE +.in -2 +.br +.in +2 +CANCEL +.in -2 +.br +.in +2 +REGISTER +.in -2 +.br +.in +2 +REFER +.in -2 +.br +.in +2 +INFO +.in -2 +.br +.in +2 +SUBSCRIBE +.in -2 +.br +.in +2 +NOTIFY +.in -2 +.br +.in +2 +PRACK +.in -2 +.br +.in +2 +UNKNOWN +.in -2 +.sp +.LP +The \fBsip_get_via_sent_by_host()\fR, \fBsip_get_via_sent_by_port()\fR, +\fBsip_get_via_sent_protocol_version()\fR, +\fBsip_get_via_sent_protocol_name()\fR, and \fBsip_get_via_sent_transport()\fR +functions will return the sent-by host, port (if present), protocol version, +protocol name and transport information from the provided \fBVIA\fR header +value. Example, if the \fBVIA\fR value is given by \fBSIP/2.0/UDP +bobspc.biloxi.com:5060\fR, then the sent-by host is "\fBbobspc.biloxi.com\fR", +protocol name is "\fBSIP\fR", protocol version is "\fB2.0\fR", port is +\fB5060\fR and transport is \fBUDP\fR. +.sp +.LP +The \fBsip_get_maxforward()\fR function will return the value of the +\fBMAX-FORWARDS\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.br +.in +2 +INVITE +.in -2 +.br +.in +2 +ACK +.in -2 +.br +.in +2 +OPTIONS +.in -2 +.br +.in +2 +BYE +.in -2 +.br +.in +2 +CANCEL +.in -2 +.br +.in +2 +REGISTER +.in -2 +.br +.in +2 +REFER +.in -2 +.br +.in +2 +INFO +.in -2 +.br +.in +2 +SUBSCRIBE +.in -2 +.br +.in +2 +NOTIFY +.in -2 +.br +.in +2 +PRACK +.in -2 +.br +.in +2 +UNKNOWN +.in -2 +.sp +.LP +The \fBsip_get_content_length()\fR function will return the value of the +\fBCONTENT-LENGTH\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +The method can return one of the following: +.sp +.LP +The \fBsip_get_content_type()\fR and \fBsip_get_content_sub_type()\fR functions +will return the value of the Type and Sub-Type field, respectively, from the +\fBCONTENT-TYPE\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_content()\fR function will return the message body from the +provided \fBSIP\fR message \fIsip_msg\fR. The returned string is a copy of the +message body and the caller is responsible for freeing the string after use. +.sp +.LP +The \fBsip_get_accept_type()\fR and \fBsip_get_accept_sub_type()\fR functions +will return the value of the Type and Sub-Type field, respectively, from the +provided \fBACCEPT\fR header value. +.sp +.LP +The \fBsip_get_accept_enc()\fR function will return the content-coding from the +provided \fBACCEPT-ENCODING\fR header value. +.sp +.LP +The \fBsip_get_accept_lang()\fR function will return the language from the +provided \fBACCEPT-LANGUAGE\fR header value. +.sp +.LP +The \fBsip_get_alert_info_uri()\fR function will return the \fBURI\fR string +from the provided \fBALERT-INFO\fR header value. +.sp +.LP +The \fBsip_get_allow_method()\fR function will return the \fBSIP\fR method from +the provided \fBALLOW\fR header value. The method can return one of the +following: +.br +.in +2 +INVITE +.in -2 +.br +.in +2 +ACK +.in -2 +.br +.in +2 +OPTIONS +.in -2 +.br +.in +2 +BYE +.in -2 +.br +.in +2 +CANCEL +.in -2 +.br +.in +2 +REGISTER +.in -2 +.br +.in +2 +REFER +.in -2 +.br +.in +2 +INFO +.in -2 +.br +.in +2 +SUBSCRIBE +.in -2 +.br +.in +2 +NOTIFY +.in -2 +.br +.in +2 +PRACK +.in -2 +.br +.in +2 +UNKNOWN +.in -2 +.sp +.LP +The \fBsip_get_min_expire()\fR function will return the time in seconds from +the \fBMIN-EXPIRES\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_mime_version()\fR function will return the \fBMIME\fR version +string from the \fBMIME-VERSION\fR header in the provided \fBSIP\fR message +\fIsip_msg\fR. +.sp +.LP +The \fBsip_get_org()\fR function will return the organization string value from +the \fBORGANIZATION\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_priority()\fR function will return the priority string value +from the \fBPRIORITY\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_replyto_display_name()\fR and \fBsip_get_replyto_uri_str()\fR +functions will return the display name (if present) and the \fBURI\fR string, +respectively, from the \fBREPLY-TO\fR header in the provided \fBSIP\fR message +\fIsip_msg\fR. +.sp +.LP +The \fBsip_get_date_time()\fR, \fBsip_get_date_day()\fR, +\fBsip_get_date_month()\fR, \fBsip_get_date_wkday()\fR, +\fBsip_get_date_year()\fR and \fBsip_get_date_timezone()\fR functions will +return the time, day, month, week day, year and timezone value from the +\fBDATE\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. Example, if +the DATE header has the following value: +.sp +.in +2 +.nf +Sat, 13 Nov 2010 23:29:00 GMT +.fi +.in -2 + +.sp +.LP +the time is "\fB23:29:00\fR ", week day is "\fBSat\fR", day is "\fB13\fR", +month is "\fBNov\fR", year is "\fB2010\fR", timezone is "\fBGMT\fR". +.sp +.LP +The \fBsip_get_content_disp()\fR function will return the content-disposition +type from the \fBCONTENT-DISPOSITION\fR header in the provided \fBSIP\fR +message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_content_enc()\fR function will return the content-coding value +from the \fBCONTENT-ENCODING\fR header value. +.sp +.LP +The \fBsip_get_error_info_uri()\fR function will return the \fBURI\fR string +from the provided \fBERROR-INFO\fR header value. +.sp +.LP +The \fBsip_get_expires()\fR function will return the time in seconds from the +\fBEXPIRES\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_require()\fR function will return the option-tag value from the +provided \fBREQUIRE\fR header value. +.sp +.LP +The \fBsip_get_subject()\fR function will return the value of the \fBSUBJECT\fR +header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_supported()\fR function will return the extension value from the +provided \fBSUPPORTED\fR header value. +.sp +.LP +The \fBsip_get_tstamp_delay()\fR function will return the value from the +\fBTIMESTAMP\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_unsupported()\fR function will return the extension value from +the provided \fBUNSUPPORTED\fR header value. +.sp +.LP +The \fBsip_get_server()\fR function will return the value from the \fBSERVER\fR +header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_user_agent()\fR function will return the value from the +\fBUSER-AGENT\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_warning_code()\fR, \fBsip_get_warning_agent()\fR, and +\fBsip_get_warning_text()\fR functions will return the value of the warn-code, +warn-agent and warn-text, respectively, in the provided \fBWARNING\fR header +value. +.sp +.LP +The \fBsip_get_call_info_uri()\fR function will return the \fBURI\fR string in +the provided \fBCALL-INFO\fR header value. +.sp +.LP +The \fBsip_get_in_reply_to()\fR function will return the Call-Id value in the +provided \fBIN-REPLY-TO\fR header value. +.sp +.LP +The \fBsip_get_retry_after_time()\fR, and \fBsip_get_retry_after_cmts()\fR +functions return the time and comments (if any), respectively, from the +\fBRETRY-AFTER\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_passertedid_display_name()\fR and +\fBsip_get_passertedid_uri_str()\fR functions will return the display name (if +any) and the \fBURI\fR string, respectively, in the provided +\fBP-ASSERTED-IDENTITY\fR header value. +.sp +.LP +The \fBsip_get_ppreferredid_display_name()\fR and +\fBsip_get_ppreferredid_uri_str()\fR functions will return the display name (if +any) and the \fBURI\fR string, respectively, in the provided +\fBP-PREFERRED-IDENTITY\fR header value. +.sp +.LP +The \fBsip_get_rack_resp_num()\fR, \fBsip_get_rack_cseq_num()\fR, and +\fBsip_get_rack_method()\fR functions will return the response-number, the +\fBCSEQ\fR number and the \fBSIP\fR method from the \fBRACK\fR header in the +provided \fBSIP\fR message \fIsip_msg\fR. The method can return one of the +following: +.br +.in +2 +INVITE +.in -2 +.br +.in +2 +ACK +.in -2 +.br +.in +2 +OPTIONS +.in -2 +.br +.in +2 +BYE +.in -2 +.br +.in +2 +CANCEL +.in -2 +.br +.in +2 +REGISTER +.in -2 +.br +.in +2 +REFER +.in -2 +.br +.in +2 +INFO +.in -2 +.br +.in +2 +SUBSCRIBE +.in -2 +.br +.in +2 +NOTIFY +.in -2 +.br +.in +2 +PRACK +.in -2 +.br +.in +2 +UNKNOWN +.in -2 +.sp +.LP +The \fBsip_get_rseq_resp_num()\fR function will return the response-number, the +\fBRSEQ\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_priv_value()\fR function will return the priv-value in the +provided \fBPRIVACY\fR header value. +.sp +.LP +The \fBsip_get_route_uri_str()\fR and \fBsip_get_route_display_name()\fR +functions will return the \fBURI\fR string, and display name (if present) from +the provided \fBROUTE\fR or \fBRECORD-ROUTE\fR header value. +.sp +.LP +The \fBsip_get_author_scheme()\fR function will return the scheme from the +\fBAUTHORIZATION\fR header in the provided \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_author_param()\fR function will return the value of the +parameter specified in name from the \fBAUTHORIZATION\fR header in the +\fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_authen_info()\fR function will return the authentication +information from the provided \fBAUTHORIZATION-INFO\fR header value. +.sp +.LP +The \fBsip_get_proxy_authen_scheme()\fR function will return the scheme from +the \fBPROXY-AUTHENTICATE\fR header in the \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_proxy_authen_param()\fR function will return the value of the +parameter in name from the \fBPROXY-AUTHENTICATE\fR header in the \fBSIP\fR +message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_proxy_author_scheme()\fR function will return the value of the +scheme from the \fBPROXY-AUTHORIZATION\fR header in the \fBSIP\fR message +\fIsip_msg\fR. +.sp +.LP +The \fBsip_get_proxy_author_param()\fR function will return the value of the +parameter specified in name from the \fBPROXY-AUTHORIZATION\fR header in the +\fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_proxy_require()\fR function will return the option-tag from the +provided \fBPROXY-REQUIRE\fR header value. +.sp +.LP +The \fBsip_get_www_authen_scheme()\fR function will return the challenge from +the \fBWWW-AUTHENTICATE\fR header in the \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_www_authen_param()\fR function will return the value of the +parameter specified in name from the \fBWWW-AUTHENTICATE\fR header in the +\fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_allow_events()\fR function returns the value of the allowed +event from the provided \fBALLOW-EVENTS\fR header value. +.sp +.LP +The \fBsip_get_event()\fR function returns the event in the \fBEVENT\fR header +in the \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_substate()\fR function the subscription state from the +\fBSUBSCRIPTION-STATE\fR header in the provided \fBSIP\fR message +\fIsip_msg\fR. +.sp +.LP +The \fBsip_get_content_lang()\fR function will return the language from the +provided \fBCONTENT-LANGUAGE\fR value. +.sp +.LP +The \fBsip_get_tstamp_value()\fR function will return the timestamp value from +the \fBTIMESTAMP\fR header in the \fBSIP\fR message \fIsip_msg\fR. +.SH RETURN VALUES +.sp +.LP +For functions that return a pointer to \fIsip_str_t\fR, the return value is the +specified value on success or \fBNULL\fR in case of error. For functions that +return an integer, the return value is the specified value on success and +\fB-1\fR on error. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +These functions take a pointer to an integer \fIerror\fR as an argument. If the +error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The input \fBSIP\fR message \fIsip_msg\fR or the header value is null; or the +specified header/header value is deleted. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPROTO\fR\fR +.ad +.RS 10n +.rt +The header value is not present or invalid. The parser could not parse it +correctly. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +There is an error allocating memory for the return value. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_cseq.3sip b/usr/src/man/man3sip/sip_get_cseq.3sip new file mode 100644 index 0000000000..0033081e0d --- /dev/null +++ b/usr/src/man/man3sip/sip_get_cseq.3sip @@ -0,0 +1,55 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_cseq 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_cseq, sip_get_rseq \- get initial sequence number +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBuint32_t\fR \fIsip_get_cseq\fR(); +.fi + +.LP +.nf +\fBuint32_t\fR \fIsip_get_rseq\fR(); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_cseq()\fR and \fBsip_get_rseq()\fR functions can be used to +generate an initial sequence number for the \fBCSEQ\fR and \fBRSEQ\fR headers. +.SH RETURN VALUES +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_dialog_state.3sip b/usr/src/man/man3sip/sip_get_dialog_state.3sip new file mode 100644 index 0000000000..03d366c6b4 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_dialog_state.3sip @@ -0,0 +1,293 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_dialog_state 3SIP "11 Jan 2008" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_dialog_state, sip_get_dialog_callid, sip_get_dialog_local_tag, +sip_get_dialog_remote_tag, sip_get_dialog_local_uri, sip_get_dialog_remote_uri, +sip_get_dialog_local_contact_uri, sip_get_dialog_remote_target_uri, +sip_get_dialog_route_set, sip_get_dialog_local_cseq, +sip_get_dialog_remote_cseq, sip_get_dialog_type, sip_get_dialog_method, +sip_is_dialog_secure, sip_get_dialog_msgcnt \- get dialog attributes +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fBsip_get_dialog_state\fR(\fBsip_dialog_t\fR \fIdialog\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_dialog_callid\fR(\fBsip_dialog_t\fR \fIdialog\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fBsip_get_dialog_local_tag\fR(\fBsip_dialog_t\fR \fIdialog\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fBsip_get_dialog_remote_tag\fR(\fBsip_dialog_t\fR \fIdialog\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst struct sip_uri *\fR\fBsip_get_dialog_local_uri\fR(\fBsip_dialog_t\fR \fIdialog\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst struct sip_uri *\fR\fBsip_get_dialog_remote_uri\fR(\fBsip_dialog_t\fR \fIdialog\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst struct sip_uri *\fR\fBsip_get_dialog_local_contact_uri\fR( + \fBsip_dialog_t\fR \fIdialog\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst struct sip_uri *\fR\fBsip_get_dialog_remote_target_uri\fR( + \fBsip_dialog_t\fR \fIdialog\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fBsip_get_dialog_route_set\fR(\fBsip_dialog_t\fR \fIdialog\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBboolean_t\fR \fBsip_is_dialog_secure\fR(\fBsip_dialog_t\fR \fIdialog\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBuint32_t\fR \fBsip_get_dialog_local_cseq\fR(\fBsip_dialog_t\fR \fIdialog\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBuint32_t\fR \fBsip_get_dialog_remote_cseq\fR(\fBsip_dialog_t\fR \fIdialog\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fBsip_get_dialog_type\fR(\fBsip_dialog_t\fR \fIdialog\fR,\fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fBsip_get_dialog_method\fR(\fBsip_dialog_t\fR \fIdialog\fR,\fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fBsip_get_dialog_msgcnt\fR(\fBsip_dialog_t\fR \fIdialog\fR,\fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +For functions that return a pointer of type \fBsip_str_t\fR, \fBsip_str_t\fR is +supplied by: +.sp +.in +2 +.nf +typedef struct sip_str { + char *sip_str_ptr; + int sip_str_len; +}sip_str_t; +.fi +.in -2 + +.sp +.LP +The \fIsip_str_ptr\fR parameter points to the start of the returned value and +\fIsip_str_len\fR supplies the length of the returned value. +.sp +.LP +The \fBsip_get_dialog_state()\fR returns the state of the \fIdialog\fR. A +\fIdialog\fR can be in one of the following states: +.br +.in +2 +\fBSIP_DLG_NEW\fR +.in -2 +.br +.in +2 +\fBSIP_DLG_EARLY\fR +.in -2 +.br +.in +2 +\fBSIP_DLG_CONFIRMED\fR +.in -2 +.br +.in +2 +\fBSIP_DLG_DESTROYED\fR +.in -2 +.sp +.LP +The \fBsip_get_dialog_callid()\fR function returns the call ID value maintained +in the \fIdialog\fR. +.sp +.LP +The \fBsip_get_dialog_local_tag()\fR and \fBsip_get_dialog_remote_tag()\fR +functions return the local and remote tag values, maintained in the +\fIdialog\fR. +.sp +.LP +The \fBsip_get_dialog_local_uri()\fR, \fBsip_get_dialog_remote_uri()\fR, +\fBsip_get_dialog_local_contact_uri()\fR, and +\fBsip_get_dialog_remote_target_uri()\fR functions return the local, remote, +local contract, and the remote target \fBURI\fRs, maintained in the +\fIdialog\fR. +.sp +.LP +The \fBsip_get_dialog_route_set()\fR function returns the route set, if any, +maintained in the \fIdialog\fR. +.sp +.LP +The \fBsip_get_dialog_local_cseq()\fR and \fBsip_get_dialog_remote_cseq()\fR +functions return the local and remote \fBCSEQ\fR numbers maintained in the +\fIdialog\fR. +.sp +.LP +The \fBsip_get_dialog_type()\fR function returns one of the following dialog +types, depending on whether it is created by the client or the server. +.sp +.ne 2 +.mk +.na +\fB\fBSIP_UAC_DIALOG\fR\fR +.ad +.RS 18n +.rt +created by client +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSIP_UAS_DIALOG\fR\fR +.ad +.RS 18n +.rt +created by server +.RE + +.sp +.LP +The \fBsip_get_dialog_method()\fR function returns the \fBSIP\fR method, +\fBINVITE\fR or \fBSUBSCRIBE\fR, of the request that created the dialog. +.sp +.LP +The \fBsip_is_dialog_secure()\fR function returns \fBB_TRUE\fR if the +\fIdialog\fR is secure and \fBB_FALSE\fR otherwise. +.sp +.LP +The \fBsip_get_dialog_msgcnt()\fR function returns the number of SIP messages +(requests and responses) that were sent and received within the context of the +given dialog. +.SH RETURN VALUES +.sp +.LP +The \fBsip_get_dialog_state()\fR, \fBsip_get_dialog_local_cseq()\fR, +\fBsip_get_dialog_remote_cseq()\fR, \fBsip_get_dialog_type()\fR, +\fBsip_get_dialog_method()\fR, and \fBsip_get_dialog_msgcnt()\fR functions +return the required value on success and \fB-1\fR on failure. +.sp +.LP +The \fBsip_get_dialog_callid()\fR, \fBsip_get_dialog_local_tag()\fR, +\fBsip_get_dialog_remote_tag()\fR, \fBsip_get_dialog_local_uri()\fR, +\fBsip_get_dialog_remote_uri()\fR, \fBsip_get_dialog_local_contact_uri()\fR, +\fBsip_get_dialog_remote_target_uri()\fR, and \fBsip_get_dialog_route_set()\fR +functions return the required value on success and \fBNULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +These functions take an \fIerror\fR argument. +.sp +.LP +If the error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.sp .6 +.RS 4n +The \fIdialog\fR is \fBNULL\fR or the stack is not configured to manage +dialogs. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOTSUP\fR\fR +.ad +.sp .6 +.RS 4n +The input \fBSIP\fR message cannot be modified. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.sp .6 +.RS 4n +The memory allocation fails when the request/response line or the headers in +the \fBACK\fR request are created. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_header.3sip b/usr/src/man/man3sip/sip_get_header.3sip new file mode 100644 index 0000000000..a8e48bdb3b --- /dev/null +++ b/usr/src/man/man3sip/sip_get_header.3sip @@ -0,0 +1,98 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_header 3SIP "09 Feb 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_header \- get a SIP header from a message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBconst struct sip_header *\fR\fIsip_get_header\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBchar *\fR\fIheader_name\fR, \fBsip_header_t\fR \fIold_header\fR, \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_header()\fR function returns the header specified by +\fIheader_name\fR (long or compact form) from the \fBSIP\fR message +\fIsip_msg\fR. If \fIheader_name\fR is \fBNULL\fR, the first header in the +\fBSIP\fR message is returned. The \fBold_header\fR, if non-null, specifies the +starting position in \fIsip_msg\fR from which the search is started. Otherwise, +the search begins at the start of the \fBSIP\fR message. For example, to get +the first \fBVIA\fR header from the \fBSIP\fR message \fIsip_msg\fR: +.sp +.in +2 +.nf +via_hdr = sip_get_header(sip_msg, "VIA", NULL, &error); +.fi +.in -2 + +.sp +.LP +To get the next \fBVIA\fR header from \fIsip_msg\fR: +.sp +.in +2 +.nf +via_hdr = sip_get_header(sip_msg, "VIA", via_hdr, &error); +.fi +.in -2 + +.sp +.LP +The \fBsip_get_header()\fR function ignores any header that is marked as +deleted. +.SH RETURN VALUES +.sp +.LP +On success, the \fBsip_get_header()\fR function returns the queried header. On +failure, it returns \fBNULL\fR. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +The following value may be returned: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The \fIheader_name\fR specified in the \fBSIP\fR message is not present or has +been deleted; or, the \fIheader_name\fR is not specified and there are no +"un-deleted" headers in the \fBSIP\fR message. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_header_value.3sip b/usr/src/man/man3sip/sip_get_header_value.3sip new file mode 100644 index 0000000000..fbe6921856 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_header_value.3sip @@ -0,0 +1,96 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_header_value 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_header_value, sip_get_next_value \- get a SIP header value +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBconst struct sip_value *\fR\fIsip_get_header_value\fR + (\fBconst struct sip_header *\fR\fIsip_header\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst struct sip_value *\fR\fIsip_get_next_value\fR + (\fBsip_header_value_t\fR \fIold_value\fR, \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_header_value()\fR function returns the first valid value from +\fBSIP\fR header \fIsip_header\fR. +.sp +.LP +The \fBsip_get_next_value()\fR function returns the next valid value following +the \fBSIP\fR value \fIold_value\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the queried value on success and \fINULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +If the error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +If any of the required input is \fINULL\fR or if the specified \fBSIP\fR header +value is marked deleted. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPROTO\fR\fR +.ad +.RS 10n +.rt +If the returned \fBSIP\fR header value is invalid (i.e. the parser encountered +errors when parsing the value). +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_msg_len.3sip b/usr/src/man/man3sip/sip_get_msg_len.3sip new file mode 100644 index 0000000000..6d220e1cf6 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_msg_len.3sip @@ -0,0 +1,99 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_msg_len 3SIP "09 Feb 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_msg_len \- returns the length of the SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_get_msg_len\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_msg_len()\fR function will return the length of the \fBSIP\fR +message \fIsip_msg\fR. +.SH RETURN VALUES +.sp +.LP +For functions that return an integer, the return value is the specified value +on success and \fB-1\fR on error. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +This function takes a pointer to an integer \fIerror\fR as an argument. If the +error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The input \fBSIP\fR message \fIsip_msg\fR or the header value is null; or the +specified header/header value is deleted. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPROTO\fR\fR +.ad +.RS 10n +.rt +The header value is not present or invalid. The parser could not parse it +correctly. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +There is an error allocating memory for the return value. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_num_via.3sip b/usr/src/man/man3sip/sip_get_num_via.3sip new file mode 100644 index 0000000000..5a41205d03 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_num_via.3sip @@ -0,0 +1,126 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_num_via 3SIP "23 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_num_via, sip_get_branchid \- get VIA header specific attributes +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_get_num_via\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBchar *\fR\fIsip_get_branchid\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_num_via()\fR function returns the number of \fBVIA\fR headers in +the \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_branchid()\fR function returns the branch ID value from the +topmost \fBVIA\fR header. The caller is responsible for freeing the returned +string. +.SH RETURN VALUES +.sp +.LP +The \fBsip_get_num_via()\fR function returns the number of \fBVIA\fR headers on +success. +.sp +.LP +The \fBsip_get_branchid()\fR function returns the branch ID on success and +\fBNULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +If the error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The \fIsip_msg\fR is \fBNULL\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOENT\fR\fR +.ad +.RS 10n +.rt +For the \fIsip_get_branchid\fR function, there is no \fBVIA\fR header or the +\fBVIA\fR header has no branch parameter. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPROTO\fR\fR +.ad +.RS 10n +.rt +For the \fIsip_sip_get_trans.3sipget_branchid\fR function, the \fBVIA\fR value +is invalid. The parser encountered an error or errors while parsing the +\fBVIA\fR header. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +For the \fIsip_get_branchid\fR function, there is an error in allocating memory +for the branch ID. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_param_value.3sip b/usr/src/man/man3sip/sip_get_param_value.3sip new file mode 100644 index 0000000000..f49d520292 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_param_value.3sip @@ -0,0 +1,128 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_param_value 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_param_value, sip_get_params, sip_is_param_present \- get parameter +information for a SIP header value +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBconst sip_str_t *\fR\fIsip_get_param_value\fR + (\fBsip_header_value_t\fR \fIheader_value\fR, \fBchar *\fR\fIparam_name\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_param_t *\fR\fIsip_get_params\fR + (\fBsip_header_value_t\fR \fIheader_value\fR, \fBint *\fR\fIerror\fR);; +.fi + +.LP +.nf +\fBboolean_t\fR \fIsip_is_param_present\fR + (\fBconst sip_param_t *\fR\fIparam_list\fR, \fBchar *\fR\fIparam_name\fR, \fBint\fR \fIparam_len\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_param_value()\fR function returns the value for the parameter +name specified by \fIparam_name\fR from the \fBSIP\fR header value +\fIheader_value\fR. +.sp +.LP +For functions that return a pointer of type \fBsip_str_t\fR, \fBsip_str_t\fR is +supplied by: +.sp +.in +2 +.nf +typedef struct sip_str { + char *sip_str_ptr; + int sip_str_len; +}sip_str_t; +.fi +.in -2 + +.sp +.LP +The \fIsip_str_ptr\fR parameter points to the start of the returned value and +\fIsip_str_len\fR supplies the length of the returned value. +.sp +.LP +The \fBsip_get_params()\fR function returns the parameter list, if any, for the +\fBSIP\fR header value \fIheader_value\fR. +.sp +.LP +The \fBsip_is_param_present()\fR function returns \fBB_TRUE\fR if the parameter +specified by \fIparam_name\fR of length supplied in \fIparam_len\fR is present +in the parameter list, \fIparam_list\fR. Otherwise, it returns \fBB_FALSE\fR. +.SH RETURN VALUES +.sp +.LP +With the exception of \fBsip_is_param_present()\fR, these functions return the +queried value on success and \fBNULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +If the error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +If any of the required input is \fBNULL\fR or if the specified \fBSIP\fR header +value is marked deleted. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPROTO\fR\fR +.ad +.RS 10n +.rt +If the returned \fBSIP\fR header value is invalid (i.e. the parser encountered +errors when parsing the value). +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_request_method.3sip b/usr/src/man/man3sip/sip_get_request_method.3sip new file mode 100644 index 0000000000..6139dfb4ed --- /dev/null +++ b/usr/src/man/man3sip/sip_get_request_method.3sip @@ -0,0 +1,221 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_request_method 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_request_method, sip_get_response_code, sip_get_response_phrase, +sip_get_sip_version \- obtain attributes from the start line in a SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBsip_method_t\fR \fIsip_get_request_method\fR(\fBconst sip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_response_code\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_response_phrase\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t*\fR\fIsip_get_sip_version\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +For functions that return a pointer of type \fBsip_str_t\fR, \fBsip_str_t\fR is +supplied by: +.sp +.in +2 +.nf +typedef struct sip_str { + char *sip_str_ptr; + int sip_str_len; +}sip_str_t; +.fi +.in -2 + +.sp +.LP +The \fIsip_str_ptr\fR parameter points to the start of the returned value and +\fIsip_str_len\fR supplies the length of the returned value. +.sp +.LP +For example, given the following request line in a \fBSIP\fR message +\fIsip_msg\fR that is input to \fBsip_get_request_uri_str()\fR: +.sp +.in +2 +.nf +FROM : <Alice sip:alice@atlanta.com>;tag=1928301774 +.fi +.in -2 + +.sp +.LP +the return is a pointer to \fIsip_str_t\fR with the \fIsip_str_ptr\fR member +pointing to "\fBA\fR" of \fBAlice\fR and \fIsip_str_len\fR being set to +\fB5\fR, the length of \fBAlice\fR. +.sp +.LP +Access functions for headers that can have multiple values take the value as +the input, while those that can have only one value take the \fBSIP\fR message +\fIsip_msg\fR as the input. +.sp +.LP +The \fBsip_get_request_method()\fR function will return the \fBSIP\fR method +from the request line in the \fBSIP\fR message \fIsip_msg\fR. The method can +be one of the following: +.br +.in +2 +INVITE +.in -2 +.br +.in +2 +ACK +.in -2 +.br +.in +2 +OPTIONS +.in -2 +.br +.in +2 +BYE +.in -2 +.br +.in +2 +CANCEL +.in -2 +.br +.in +2 +REGISTER +.in -2 +.br +.in +2 +REFER +.in -2 +.br +.in +2 +INFO +.in -2 +.br +.in +2 +SUBSCRIBE +.in -2 +.br +.in +2 +NOTIFY +.in -2 +.br +.in +2 +PRACK +.in -2 +.br +.in +2 +UNKNOWN +.in -2 +.sp +.LP +The \fBsip_get_response_code()\fR function will return the response code +\fIresponse\fR from the request line in the \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_respose_phrase()\fR function will return the response phrase +\fIresponse\fR from the request line in the \fBSIP\fR message \fIsip_msg\fR. +.sp +.LP +The \fBsip_get_sip_version()\fR function will return the version of the +\fBSIP\fR protocol from the request or the response line in the \fBSIP\fR +message \fIsip_msg\fR. +.SH RETURN VALUES +.sp +.LP +For functions that return a pointer to \fIsip_str_t\fR, the return value is the +specified value on success or \fBNULL\fR in case of error. For functions that +return an integer, the return value is the specified value on success and +\fB-1\fR on error. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +These functions take a pointer to an integer \fIerror\fR as an argument. If the +error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The input \fBSIP\fR message \fIsip_msg\fR or the header value is null; or the +specified header/header value is deleted. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPROTO\fR\fR +.ad +.RS 10n +.rt +The header value is not present or invalid. The parser could not parse it +correctly. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +There is an error allocating memory for the return value. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_request_uri_str.3sip b/usr/src/man/man3sip/sip_get_request_uri_str.3sip new file mode 100644 index 0000000000..6200147d69 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_request_uri_str.3sip @@ -0,0 +1,120 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_request_uri_str 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_request_uri_str \- return request URI +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBconst sip_str_t *\fR\fIsip_get_request_uri_str\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +For functions that return a pointer of type \fIsip_str_t\fR, \fIsip_str_t\fR is +supplied by: +.sp +.in +2 +.nf +typedef struct sip_str { + char *sip_str_ptr; + int sip_str_len; +}sip_str_t; +.fi +.in -2 + +.sp +.LP +The \fIsip_str_ptr\fR parameter points to the start of the returned value and +\fIsip_str_len\fR supplies the length of the returned value. +.sp +.LP +For example, given the following request line in a \fBSIP\fR message input to +\fBsip_get_request_uri_str()\fR: +.sp +.in +2 +.nf +INVITE sip:marconi@radio.org SIP/2.0 +.fi +.in -2 + +.sp +.LP +the return is a pointer to \fIsip_str_t\fR with the \fIsip_str_ptr\fR member +pointing to "\fBs\fR" of \fBsip:marconi@radio.org\fR and \fIsip_str_len\fR +being set to \fB21\fR, the length of \fBsip:marconi@radio.org\fR. +.sp +.LP +The \fBsip_get_request_uri_str()\fR function returns the \fBURI\fR string from +the request line in the \fBSIP\fR message \fIsip_msg\fR. +.SH RETURN VALUES +.sp +.LP +The \fBsip_get_request_uri_str()\fR function returns the \fBURI\fR string. The +function returns \fBNULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +If the error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +For the \fBsip_get_request_uri_str()\fR function, there is no request line is +in the \fBSIP\fR message. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPROTO\fR\fR +.ad +.RS 10n +.rt +For \fIsip_get_request_uri_str\fR, the request \fBURI\fR is invalid. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_resp_desc.3sip b/usr/src/man/man3sip/sip_get_resp_desc.3sip new file mode 100644 index 0000000000..f5e71975bf --- /dev/null +++ b/usr/src/man/man3sip/sip_get_resp_desc.3sip @@ -0,0 +1,51 @@ +'\" te +.\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_resp_desc 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_resp_desc \- return the response phrase +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBchar *\fR\fIsip_get_resp_desc\fR(\fBint *\fR\fIresp_code\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_resp_desc()\fR function returns the response phrase for the +given response code in \fIresp_code\fR. The response code is not one that is +listed in RFC 3261 (Section 21). The returned string is "\fBUNKNOWN\fR". +.SH RETURN VALUES +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_trans.3sip b/usr/src/man/man3sip/sip_get_trans.3sip new file mode 100644 index 0000000000..9cd5ebe732 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_trans.3sip @@ -0,0 +1,77 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_trans 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_trans \- lookup a transaction +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBconst struct sip_xaction *\fR\fIsip_get_trans\fR(\fBsip_msg_t\fR \fIsip_msg\fR, \fBint\fR \fIwhich\fR, + \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_trans()\fR transaction for the SIP message \fIsip_msg\fR. A +transaction is not freed if there are any references on it. +.sp +.LP +The transaction type should be specified as one of the following: +.br +.in +2 +\fBSIP_CLIENT_TRANSACTON\fR - lookup a client transaction +.in -2 +.br +.in +2 +\fBSIP_SERVER_TRANSACTON\fR - lookup a server transaction +.in -2 +.sp +.LP +The \fBsip_get_trans()\fR function matches a transaction to a message as +specified in RFC 3261, sections 17.1.3 and 17.2.3. The \fBsip_get_trans()\fR +function holds a reference to the returned transaction. The caller must release +this reference after use. +.SH RETURN VALUES +.sp +.LP +The \fBsip_get_trans()\fR function returns the required value on success or +\fINULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_trans_method.3sip b/usr/src/man/man3sip/sip_get_trans_method.3sip new file mode 100644 index 0000000000..556ff49ad7 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_trans_method.3sip @@ -0,0 +1,223 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_trans_method 3SIP "10 Feb 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_trans_method, sip_get_trans_state, sip_get_trans_orig_msg, +sip_get_trans_conn_obj, sip_get_trans_resp_msg, sip_get_trans_branchid \- get +transaction attributes +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBsip_method_t\fR \fIsip_get_trans_method\fR(\fBsip_transaction_t\fR \fIsip_trans\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_trans_state\fR(\fBsip_transaction_t\fR \fItrans\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst struct sip_message *\fR\fIsip_get_trans_orig_msg\fR + (\fBsip_transaction_t\fR \fIsip_trans\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst struct sip_message *\fR\fIsip_get_trans_resp_msg\fR + (\fBsip_transaction_t\fR \fIsip_trans\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst struct sip_conn_object *\fR\fIsip_get_trans_conn_obj\fR + (\fBsip_transaction_t\fR \fIsip_trans\fR, \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBchar *\fR\fIsip_get_trans_branchid\fR(\fBsip_transaction_t\fR \fItrans\fR, \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_trans_method()\fR function returns the method the SIP message +that created the transaction \fIsip_trans\fR. +.sp +.LP +The \fBsip_get_trans_state()\fR function returns the state of the transaction +\fIsip_trans\fR. +.sp +.LP +A newly created transaction is in the state: +.br +.in +2 +\fBSIP_NEW_TRANSACTION\fR +.in -2 +.sp +.LP +A client transaction could be in one of the following states: +.br +.in +2 +\fBSIP_CLNT_CALLING\fR +.in -2 +.br +.in +2 +\fBSIP_CLNT_INV_PROCEEDING\fR +.in -2 +.br +.in +2 +\fBSIP_CLNT_INV_TERMINATED\fR +.in -2 +.br +.in +2 +\fBSIP_CLNT_INV_COMPLETED\fR +.in -2 +.br +.in +2 +\fBSIP_CLNT_TRYING\fR +.in -2 +.br +.in +2 +\fBSIP_CLNT_NONINV_PROCEEDING\fR +.in -2 +.br +.in +2 +\fBSIP_CLNT_NONINV_TERMINATED\fR +.in -2 +.br +.in +2 +\fBSIP_CLNT_NONINV_COMPLETED\fR +.in -2 +.sp +.LP +A server transaction could be in one of the following states: +.br +.in +2 +\fBSIP_SRV_INV_PROCEEDING\fR +.in -2 +.br +.in +2 +\fBSIP_SRV_INV_COMPLETED\fR +.in -2 +.br +.in +2 +\fBSIP_SRV_CONFIRMED\fR +.in -2 +.br +.in +2 +\fBSIP_SRV_INV_TERMINATED\fR +.in -2 +.br +.in +2 +\fBSIP_SRV_TRYING\fR +.in -2 +.br +.in +2 +\fBSIP_SRV_NONINV_PROCEEDING\fR +.in -2 +.br +.in +2 +\fBSIP_SRV_NONINV_COMPLETED\fR +.in -2 +.br +.in +2 +\fBSIP_SRV_NONINV_TERMINATED\fR +.in -2 +.sp +.LP +The \fBsip_get_trans_orig_msg()\fR function returns the message that created +the transaction \fIsip_trans\fR. This could be a request on the client or a +response on the server. +.sp +.LP +The \fBsip_get_trans_resp_msg()\fR function returns the last response that was +sent on the transaction \fIsip_trans\fR. Typically, this response is used by +the transaction layer for retransmissions for unreliable transports or for +responding to retransmitted requests. A response that terminates a transaction +is not returned. +.sp +.LP +The \fBsip_get_trans_conn_obj()\fR function returns the cached connection +object, if any, in the transaction\fIsip_trans\fR. +.sp +.LP +The \fBsip_get_trans_branchid()\fR function returns the branch ID for the +message that created the transaction\fIsip_trans\fR. The caller is responsible +for freeing the returned string. +.SH RETURN VALUES +.sp +.LP +The \fBsip_get_trans_orig_msg()\fR, \fBsip_get_trans_resp_msg()\fR, +\fBsip_get_trans_conn_obj()\fR, and \fBsip_get_trans_branchid()\fR functions +return the required value on success or \fINULL\fR on failure. +.sp +.LP +The \fBsip_get_trans_state()\fR and \fBsip_get_trans_method()\fR functions +return the required value on success and -1 on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +If the error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The input transaction \fIsip_trans\fR is \fINULL\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +For \fBsip_get_trans_branchid()\fR there is an error allocating memory for the +branch ID string. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_get_uri_parsed.3sip b/usr/src/man/man3sip/sip_get_uri_parsed.3sip new file mode 100644 index 0000000000..255bb07293 --- /dev/null +++ b/usr/src/man/man3sip/sip_get_uri_parsed.3sip @@ -0,0 +1,82 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_get_uri_parsed 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_get_uri_parsed \- return the parsed URI +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBconst struct sip_uri *\fR\fIsip_get_uri_parsed\fR(\fBsip_header_value_t\fR \fIvalue\fR, + \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_get_uri_parsed()\fR function returns the parsed \fBURI\fR +\fIsip_uri\fR from the \fBSIP\fR header value specified in \fIvalue\fR. +.SH RETURN VALUES +.sp +.LP +The \fBsip_get_uri_parsed()\fR function returns the parsed \fBURI\fR +\fIsip_uri\fR on success. The function returns \fBNULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +If the error is non-null, following value is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The \fBSIP\fR header value of the \fBSIP\fR message is \fBNULL\fR or there is +no \fBURI\fR. +.sp +The input \fBURI\fR is null or the requested \fBURI\fR component is invalid. +The error flag is set for the requested component. +.sp +The \fBURI\fR parameters or headers are requested from a non-\fBSIP[S]\fR +\fBURI\fR; or the '\fBopaque\fR', '\fBquery\fR', '\fBpath\fR', '\fBreg-name\fR' +components are requested from a \fBSIP[S]\fR \fBURI\fR. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_guid.3sip b/usr/src/man/man3sip/sip_guid.3sip new file mode 100644 index 0000000000..13e2746403 --- /dev/null +++ b/usr/src/man/man3sip/sip_guid.3sip @@ -0,0 +1,54 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_guid 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_guid \- generate a random string +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBchar *\fR\fIsip_guid\fR(); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_guid()\fR function can be used to generate a random string. The +caller is responsible for freeing the returned string. +.SH RETURN VALUES +.sp +.LP +The \fBsip_guid()\fR function returns a string on success and \fBNULL\fR on +failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_hold_dialog.3sip b/usr/src/man/man3sip/sip_hold_dialog.3sip new file mode 100644 index 0000000000..7d058f3de0 --- /dev/null +++ b/usr/src/man/man3sip/sip_hold_dialog.3sip @@ -0,0 +1,78 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_hold_dialog 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_hold_dialog, sip_release_dialog \- hold/release reference on a dialog +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBvoid\fR \fIsip_hold_dialog\fR(\fBsip_dialog_t\fR \fIdialog\fR); +.fi + +.LP +.nf +\fBvoid\fR \fIsip_release_dialog\fR(\fBsip_dialog_t\fR \fIdialog\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +For functions that return a pointer of type \fBsip_str_t\fR, \fBsip_str_t\fR is +supplied by: +.sp +.in +2 +.nf +typedef struct sip_str { + char *sip_str_ptr; + int sip_str_len; +}sip_str_t; +.fi +.in -2 + +.sp +.LP +The \fIsip_str_ptr\fR parameter points to the start of the returned value and +\fIsip_str_len\fR supplies the length of the returned value. +.sp +.LP +The \fBsip_hold_dialog()\fR function is used to hold a reference on the +\fIdialog\fR. A dialog is not freed if there are any references on it. +.sp +.LP +The \fBsip_release_dialog()\fR function is used to release a reference in the +\fIdialog\fR. If the reference in a dialog drops to \fB0\fR and it is in +\fBSIP_DLG_DESTROYED\fR state, it is freed. +.SH RETURN VALUES +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_hold_msg.3sip b/usr/src/man/man3sip/sip_hold_msg.3sip new file mode 100644 index 0000000000..bb16182c6c --- /dev/null +++ b/usr/src/man/man3sip/sip_hold_msg.3sip @@ -0,0 +1,65 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_hold_msg 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_hold_msg, sip_free_msg \- adds and removes a reference from a SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBvoid\fR \fIsip_hold_msg\fR(\fBsip_msg_t\fR \fIsip_msg\fR); +.fi + +.LP +.nf +\fBvoid\fR \fIsip_free_msg\fR(\fBsip_msg_t\fR \fIsip_msg\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_hold_msg()\fR function adds a reference to the SIP message passed as +the argument. The reference is used to prevent the \fBSIP\fR message from being +freed when in use. +.sp +.LP +The \fBsip_free_msg()\fR function is used to remove an added reference on the +\fBSIP\fR message passed as the argument. If this is the last reference on the +\fBSIP\fR message (i.e. the number of references on the \fBSIP\fR message is +\fB0\fR), the \fBSIP\fR message is destroyed and associated resources freed. +Freeing a \fBSIP\fR message does not set the \fIsip_msg\fR pointer to +\fINULL\fR. Applications should not expect the pointer to a freed \fBSIP\fR +message to be \fINULL\fR. +.SH RETURN VALUES +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_hold_trans.3sip b/usr/src/man/man3sip/sip_hold_trans.3sip new file mode 100644 index 0000000000..22abe621a7 --- /dev/null +++ b/usr/src/man/man3sip/sip_hold_trans.3sip @@ -0,0 +1,61 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_hold_trans 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_hold_trans, sip_release_trans \- hold or release reference on a transaction +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBvoid\fR \fIsip_hold_trans\fR(\fBsip_transaction_t\fR \fIsip_trans\fR); +.fi + +.LP +.nf +\fBvoid\fR \fIsip_release_trans\fR(\fBsip_transaction_t\fR \fIsip_trans\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_hold_trans()\fR function is used to hold a reference on the +transaction \fIsip_trans\fR. A transaction is not freed if there are any +references on it. +.sp +.LP +The \fBsip_release_trans()\fR function is used to release a reference on the +transaction \fIsip_trans\fR. If the reference falls to \fB0\fR and the +transaction is in a terminated state, the transaction is freed. +.SH RETURN VALUES +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_init_conn_object.3sip b/usr/src/man/man3sip/sip_init_conn_object.3sip new file mode 100644 index 0000000000..514965727c --- /dev/null +++ b/usr/src/man/man3sip/sip_init_conn_object.3sip @@ -0,0 +1,77 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_init_conn_object 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_init_conn_object, sip_clear_stale_data, sip_conn_destroyed \- connection +object related functions +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_init_conn_object\fR(\fBsip_conn_object_t\fR \fIobj\fR); +.fi + +.LP +.nf +\fBvoid\fR \fIsip_clear_stale_data\fR(\fBsip_conn_object_t\fR \fIobj\fR); +.fi + +.LP +.nf +\fBvoid\fR \fIsip_conn_destroyed\fR(\fBsip_conn_object_t\fR \fIobj\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_init_conn_object()\fR function initializes the connection object +\fIobj\fR for use by the stack. The first member of the connection object (a +void *) is used by the stack to store connection object specific stack-private +data. +.sp +.LP +The \fBsip_clear_stale_data()\fR function is used to clear any stack-private +data in the connection object \fIobj\fR. +.sp +.LP +The \fBsip_conn_destroyed()\fR function is used to intimate the stack of the +pending destruction of the connection object \fIobj\fR. The stack clean up any +stack-private data in \fIobj\fR and also removes \fIobj\fR from any caches the +stack maintains. +.SH RETURN VALUES +.sp +.LP +The \fBsip_init_conn_object()\fR function returns \fB0\fR on success and the +appropriate error value on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_is_sip_uri.3sip b/usr/src/man/man3sip/sip_is_sip_uri.3sip new file mode 100644 index 0000000000..012d6ed07b --- /dev/null +++ b/usr/src/man/man3sip/sip_is_sip_uri.3sip @@ -0,0 +1,296 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_is_sip_uri 3SIP "10 Feb 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_is_sip_uri, sip_get_uri_scheme, sip_get_uri_host, sip_get_uri_user, +sip_get_uri_password, sip_get_uri_port, sip_get_uri_params, +sip_get_uri_headers, sip_get_uri_opaque, sip_get_uri_query, sip_get_uri_path, +sip_get_uri_regname, sip_is_uri_teluser, sip_get_uri_errflags, +sip_uri_errflags_to_str \- get URI related attributes +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBboolean_t\fR \fIsip_is_sip_uri\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_uri_scheme\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_uri_user\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_uri_password\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_uri_host\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_uri_port\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_param_t *\fR\fIsip_get_uri_params\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_uri_headers\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_uri_opaque\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_uri_query\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_uri_path\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBconst sip_str_t *\fR\fIsip_get_uri_regname\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBboolean_t\fR \fIsip_is_uri_teluser\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR); +.fi + +.LP +.nf +\fBint\fR \fIsip_get_uri_errflags\fR(\fBconst struct sip_uri *\fR\fIsip_uri\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBchar *\fR\fIsip_uri_errflags_to_str\fR(\fBint\fR \fIuri_errflags\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +For functions that return a pointer of type \fIsip_str_t\fR, \fIsip_str_t\fR is +supplied by: +.sp +.in +2 +.nf +typedef struct sip_str { + char *sip_str_ptr; + int sip_str_len; +}sip_str_t; +.fi +.in -2 + +.sp +.LP +The \fIsip_str_ptr\fR parameter points to the start of the returned value and +\fIsip_str_len\fR supplies the length of the returned value. +.sp +.LP +For example, given the following request line in a \fBSIP\fR message input to +\fBsip_get_request_uri_str()\fR: +.sp +.in +2 +.nf +INVITE sip:marconi@radio.org SIP/2.0 +.fi +.in -2 + +.sp +.LP +the return is a pointer to \fIsip_str_t\fR with the \fIsip_str_ptr\fR member +pointing to "\fBs\fR" of \fBsip:marconi@radio.org\fR and \fIsip_str_len\fR +being set to \fB21\fR, the length of \fBsip:marconi@radio.org\fR. +.sp +.LP +The \fBsip_is_sip_uri()\fR function takes a parsed \fBURI\fR \fIsip_uri\fR and +returns \fBB_TRUE\fR if it is a \fBSIP[S]\fR \fBURI\fR and \fBB_FALSE\fR if it +is not. A \fBURI\fR is a \fBSIP[S]\fR \fBURI\fR if the scheme in the \fBURI\fR +is either "\fBsip\fR" or "\fBsips\fR". +.sp +.LP +The \fBsip_get_uri_user()\fR function takes a parsed \fBURI\fR \fIsip_uri\fR +and returns the value of the "\fBuser\fR" component, if present. +.sp +.LP +The \fBsip_get_uri_password()\fR function takes a parsed \fBURI\fR +\fIsip_uri\fR and returns the value of the "\fBpassword\fR" component, if +present. +.sp +.LP +The \fBsip_get_uri_host()\fR function takes a parsed \fBURI\fR \fIsip_uri\fR +and returns the value of the "\fBhost\fR" component, if present. +.sp +.LP +The \fBsip_get_uri_port()\fR function takes a parsed \fBURI\fR \fIsip_uri\fR +and returns the value of the "\fBport\fR" component, if present. +.sp +.LP +The \fBsip_get_uri_params()\fR function takes a parsed \fBURI\fR \fIsip_uri\fR +and returns the list of \fBURI\fR parameters, if present, from a \fBSIP[S]\fR +\fBURI\fR. +.sp +.LP +The \fBsip_get_uri_headers()\fR function takes a parsed \fBURI\fR \fIsip_uri\fR +and returns '\fBheaders\fR' from a \fBSIP[S]\fR \fBURI\fR. +.sp +.LP +The \fBsip_get_uri_query()\fR function takes a parsed \fBURI\fR \fIsip_uri\fR +and returns the value of the '\fBquery\fR' component, if present. +.sp +.LP +The \fBsip_get_uri_path()\fR function takes a parsed \fBURI\fR \fIsip_uri\fR +and returns the value of the '\fBpath\fR' component, if present. +.sp +.LP +The \fBsip_get_uri_regname()\fR function takes a parsed \fBURI\fR \fIsip_uri\fR +and returns the value of the '\fBregname\fR' component, if present. +.sp +.LP +The \fBsip_is_uri_teluser()\fR function returns \fBB_TRUE\fR if the user +component is a telephone-subscriber. Otherwise, \fBB_FALSE\fR is returned. +.sp +.LP +The \fBsip_get_uri_errflags()\fR function returns the error flags from a parsed +\fBURI\fR \fIsip_uri\fR. The returned value is a bitmask with the appropriate +bit set when the parser, \fBsip_parse_uri()\fR, encounters an error. The +following are the possible error values that could be set: +.sp +.in +2 +.nf +Bit value Error Comments +_______________________________________________________________ +0x00000001 SIP_URIERR_SCHEME invalid scheme +0x00000002 SIP_URIERR_USER invalid user name +0x00000004 SIP_URIERR_PASS invalid password +0x00000008 SIP_URIERR_HOST invalid host +0x00000010 SIP_URIERR_PORT invalid port number +0x00000020 SIP_URIERR_PARAM invalid URI parameters +0x00000040 SIP_URIERR_HEADER invalid URI headers +0x00000080 SIP_URIERR_OPAQUE invalid opaque +0x00000100 SIP_URIERR_QUERY invalid query +0x00000200 SIP_URIERR_PATH invalid path +0x00000400 SIP_URIERR_REGNAME invalid reg-name +.fi +.in -2 + +.sp +.LP +The \fBsip_uri_errflags_to_str()\fR function takes the error flags from a +parsed \fBURI\fR \fIsip_uri\fR and forms a string with all the error bits that +are set. For example, if \fBSIP_URIERR_PASS\fR and \fBSIP_URIERR_PORT\fR are +set in a parsed \fBURI\fR \fIsip_uri\fR, the \fBsip_uri_errflags_to_str()\fR +function returns a string such as: +.sp +.in +2 +.nf +"Error(s) in PASSWORD, PORT part(s)" +.fi +.in -2 + +.sp +.LP +The caller is responsible for freeing the returned string. +.SH RETURN VALUES +.sp +.LP +The \fBsip_get_uri_scheme()\fR, \fBsip_get_uri_user()\fR, +\fBsip_get_uri_password()\fR, \fBsip_get_uri_host()\fR, +\fBsip_get_uri_params()\fR, \fBsip_get_uri_headers()\fR, +\fBsip_get_uri_opaque()\fR, \fBsip_get_uri_query()\fR, +\fBsip_get_uri_path()\fR, \fBsip_get_uri_regname()\fR, and +\fBsip_uri_errflags_to_str()\fR functions return the requested value on success +and \fBNULL\fR on failure. +.sp +.LP +The \fBsip_get_uri_port()\fR function returns \fIport\fR from the \fBURI\fR or +\fB0\fR if the port is not present. The returned port is in host byte order. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +If the error is non-null, the following value is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The \fBSIP\fR header value of the \fBSIP\fR message is \fBNULL\fR or there is +no \fBURI\fR. +.sp +The input \fBURI\fR is null or the requested \fBURI\fR component is invalid. +The error flag is set for the requested component. +.sp +The \fBURI\fR parameters or headers are requested from a non-\fBSIP[S]\fR +\fBURI\fR; or the '\fBopaque\fR', '\fBquery\fR', '\fBpath\fR', '\fBreg-name\fR' +components are requested from a \fBSIP[S]\fR \fBURI\fR. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_msg_is_request.3sip b/usr/src/man/man3sip/sip_msg_is_request.3sip new file mode 100644 index 0000000000..9fbed0c2ea --- /dev/null +++ b/usr/src/man/man3sip/sip_msg_is_request.3sip @@ -0,0 +1,110 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_msg_is_request 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_msg_is_request, sip_message_is_response \- determine if the SIP message is +a request or a response +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBboolean_t\fR \fIsip_msg_is_request\fR(\fBconst sip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBboolean_t\fR \fIsip_msg_is_response\fR(\fBconst sip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_msg_is_request()\fR function returns \fBB_TRUE\fR if \fIsip_msg\fR +is a request and \fBB_FALSE\fR otherwise. +.sp +.LP +The \fBsip_msg_is_response()\fR function returns \fBB_TRUE\fR if \fIsip_msg\fR +is a response and \fBB_FALSE\fR otherwise. +.SH RETURN VALUES +.sp +.LP +For functions that return an integer, the return value is the specified value +on success and \fB-1\fR on error. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +These functions take a pointer to an integer \fIerror\fR as an argument. If the +error is non-null, one of the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The input \fBSIP\fR message \fIsip_msg\fR or the header value is null; or the +specified header/header value is deleted. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPROTO\fR\fR +.ad +.RS 10n +.rt +The header value is not present or invalid. The parser could not parse it +correctly. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +There is an error allocating memory for the return value. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_msg_to_str.3sip b/usr/src/man/man3sip/sip_msg_to_str.3sip new file mode 100644 index 0000000000..dcc7c4ef30 --- /dev/null +++ b/usr/src/man/man3sip/sip_msg_to_str.3sip @@ -0,0 +1,134 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_msg_to_str 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_msg_to_str, sip_hdr_to_str, sip_reqline_to_str, sip_respline_to_str, +sip_sent_by_to_str \- return string representations +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBchar *\fR\fIsip_msg_to_str\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBchar *\fR\fIsip_hdr_to_str\fR(\fBsip_header_t\fR \fIsip_header\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBchar *\fR\fIsip_reqline_to_str\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBchar *\fR\fIsip_respline_to_str\fR(\fBsip_msg_t\fR \fIsip_msg\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBchar *\fR\fIsip_sent_by_to_str\fR(\fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_msg_to_str()\fR function returns the string representation of the +\fBSIP\fR message \fIsip_msg\fR. Deleted headers are not included in the +returned string. The caller is responsible for freeing the returned string. +.sp +.LP +The \fBsip_hdr_to_str()\fR function returns the string representation of the +\fBSIP\fR header \fIsip_header\fR. The caller is responsible for freeing the +returned string. +.sp +.LP +The \fBsip_reqline_to_str()\fR function returns the string representation of +the request line from the \fBSIP\fR message \fIsip_msg\fR. The caller is +responsible for freeing the returned string. +.sp +.LP +The \fBsip_respline_to_str()\fR function returns the string representation of +the response line from the \fBSIP\fR message \fIsip_msg\fR. The caller is +responsible for freeing the returned string. +.sp +.LP +The \fBsip_sent_by_to_str()\fR function can be used to retrieve the list of +sent-by values registered with the stack. The returned string is a comma +separated list of sent-by values. The caller is responsible for freeing the +returned string. +.SH RETURN VALUES +.sp +.LP +The \fBsip_msg_to_str()\fR, \fBsip_hdr_to_str()\fR, \fBsip_reqline_to_str()\fR, +\fBsip_respline_to_str()\fR, and \fBsip_sent_by_to_str()\fR functions return +the relevant string on success and \fBNULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +For the \fBsip_msg_to_str()\fR, \fBsip_hdr_to_str()\fR, +\fBsip_reqline_to_str()\fR, and \fBsip_respline_to_str()\fR, one of the +following values is set if the error is non-null: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +Input is null. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +Memory allocation failure. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_new_msg.3sip b/usr/src/man/man3sip/sip_new_msg.3sip new file mode 100644 index 0000000000..ea7041ace5 --- /dev/null +++ b/usr/src/man/man3sip/sip_new_msg.3sip @@ -0,0 +1,53 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_new_msg 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_new_msg \- allocates a new SIP message +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBsip_msg_t\fR \fIsip_new_msg\fR(); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_new_msg()\fR function allocates and returns a new \fBSIP\fR message. +.SH RETURN VALUES +.sp +.LP +The \fBsip_new_msg()\fR function returns the newly allocated \fBSIP\fR message +on success and \fINULL\fR on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_parse_uri.3sip b/usr/src/man/man3sip/sip_parse_uri.3sip new file mode 100644 index 0000000000..134ba90986 --- /dev/null +++ b/usr/src/man/man3sip/sip_parse_uri.3sip @@ -0,0 +1,130 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_parse_uri 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_parse_uri, sip_free_parsed_uri \- parse a URI and free a parsed URI +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBsip_uri_t\fR \fIsip_parse_uri\fR(\fBsip_str_t *\fR\fIuri_str\fR, + \fBint *\fR\fIerror\fR); +.fi + +.LP +.nf +\fBvoid\fR \fIsip_free_parsed_uri\fR(\fBsip_uri_t\fR \fIsip_uri\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +For functions that return a pointer of type \fIsip_str_t\fR, \fIsip_str_t\fR is +supplied by: +.sp +.in +2 +.nf +typedef struct sip_str { + char *sip_str_ptr; + int sip_str_len; +}sip_str_t; +.fi +.in -2 + +.sp +.LP +The \fIsip_str_ptr\fR parameter points to the start of the returned value and +\fIsip_str_len\fR supplies the length of the returned value. +.sp +.LP +For example, given the following request line in a \fBSIP\fR message input to +\fBsip_get_request_uri_str()\fR: +.sp +.in +2 +.nf +INVITE sip:marconi@radio.org SIP/2.0 +.fi +.in -2 + +.sp +.LP +the return is a pointer to \fIsip_str_t\fR with the \fIsip_str_ptr\fR member +pointing to "\fBs\fR" of \fBsip:marconi@radio.org\fR and \fIsip_str_len\fR +being set to \fB21\fR, the length of \fBsip:marconi@radio.org\fR. +.sp +.LP +The \fBsip_parse_uri()\fR function takes a \fBURI\fR string in the form +\fIsip_str_t\fR and returns a parsed \fBURI\fR \fIsip_uri\fR. The syntax of the +\fBURI\fR is as specified in RFC 3261, section 25.1. If the parser encounters +an error when parsing a component, it sets the appropriate error bit in the +error flags and proceeds to the next component, if present. +.sp +.LP +The \fBsip_free_parsed_uri()\fR function takes a parsed \fBURI\fR +\fIsip_uri\fR, obtained from \fBsip_parse_uri()\fR, and frees any associated +memory. +.SH RETURN VALUES +.sp +.LP +The \fBsip_parse_uri()\fR function returns the parsed \fBURI\fR \fIsip_uri\fR +on success. It returns a \fBNULL\fR if memory cannot be allocated for the +parsed \fBURI\fR. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +If the error is non-null, the following values is set: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +The \fBSIP\fR header value of the \fBSIP\fR message is \fBNULL\fR or there is +no \fBURI\fR. +.sp +The input \fBURI\fR is null or the requested \fBURI\fR component is invalid. +The error flag is set for the requested component. +.sp +The \fBURI\fR parameters or headers are requested from a non-\fBSIP[S]\fR +\fBURI\fR; or the '\fBopaque\fR', '\fBquery\fR', '\fBpath\fR', '\fBreg-name\fR' +components are requested from a \fBSIP[S]\fR \fBURI\fR. +.RE + +.sp +.LP +On success, the value of the location pointed to by \fIerror\fR is set to +\fB0\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_process_new_packet.3sip b/usr/src/man/man3sip/sip_process_new_packet.3sip new file mode 100644 index 0000000000..c5574b0df2 --- /dev/null +++ b/usr/src/man/man3sip/sip_process_new_packet.3sip @@ -0,0 +1,61 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_process_new_packet 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_process_new_packet \- send an inbound message to the SIP stack for +processing +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBvoid\fR \fIsip_process_new_packet\fR(\fBsip_conn_object_t\fR \fIconn_object\fR, + \fBvoid *\fR\fImsgstr\fR, \fBsize_t\fR \fImsgstr\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_process_new_packet()\fR function receives incoming message, creates +a \fBSIP\fR message, processes it and passes it on to the application. For a +byte-stream protocol like \fBTCP\fR \fBsip_process_new_packet()\fR also takes +care of breaking the byte stream into message boundaries using the +\fBCONTENT-LENGTH\fR header in the \fBSIP\fR message. If the \fBSIP\fR message +arriving on \fBTCP\fR does not contain a \fBCONTENT-LENGTH\fR header, the +behavior is unspecified. \fBsip_process_new_packet()\fR deletes the \fBSIP\fR +message on return from the application's receive function, thus if the +application wishes to retain the \fBSIP\fR message for future use, it must use +\fBsip_hod_msg()\fR so that the message is not freed by +\fBsip_process_new_packet()\fR. +.SH RETURN VALUES +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_register_sent_by.3sip b/usr/src/man/man3sip/sip_register_sent_by.3sip new file mode 100644 index 0000000000..5d8a3f0ebf --- /dev/null +++ b/usr/src/man/man3sip/sip_register_sent_by.3sip @@ -0,0 +1,78 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_register_sent_by 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_register_sent_by, sip_unregister_sent_by, sip_unregister_all_sent_by \- +allows registering and un-registering sent-by values +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_register_sent_by\fR(\fBchar *\fR\fIval\fR); +.fi + +.LP +.nf +\fBvoid\fR \fIsip_unregister_sent_by\fR(\fBchar *\fR\fIval\fR); +.fi + +.LP +.nf +\fBvoid\fR \fIsip_unregister_all_sent_by\fR(\fBint *\fR\fIerror\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_register_sent_by()\fR function can be used to register a list of +hostnames or IP addresses that the application may add to the \fBVIA\fR +headers. The \fIval\fR is a comma separated list of such sent-by values. If any +value is registered using \fBsip_register_sent_by()\fR, the \fBSIP\fR stack +validates incoming responses to check if the sent-by parameter in the topmost +\fBVIA\fR header is part of the registered list. If the check fails, the +response is dropped. If there are no sent-by values registered, there is no +check done on incoming responses. +.sp +.LP +The \fBsip_unregister_sent_by()\fR and \fBsip_unregister_all_sent_by()\fR +functions are used to un-register sent-by values. The \fIval\fR for +\fBsip_unregister_sent_by()\fR is a comma separated list of sent-by values that +need to be un-registered. \fBsip_unregister_all_sent_by()\fR un-registers all +the values that have been registered. +.SH RETURN VALUES +.sp +.LP +The \fBsip_register_sent_by()\fR function returns \fB0\fR on success and the +appropriate error value on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_sendmsg.3sip b/usr/src/man/man3sip/sip_sendmsg.3sip new file mode 100644 index 0000000000..5820513497 --- /dev/null +++ b/usr/src/man/man3sip/sip_sendmsg.3sip @@ -0,0 +1,140 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_sendmsg 3SIP "25 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_sendmsg \- send an outbound SIP message to the SIP stack for processing +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_sendmsg\fR(\fBsip_conn_object_t\fR \fIobj\fR, \fBsip_msg_t\fR \fIsip_msg\fR, + \fBsip_dialog_t\fR \fIdialog\fR, \fBuint32_t\fR \fIflags\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_sendmsg()\fR function is used to send an outbound \fBSIP\fR message +\fIsip_msg\fR to the \fBSIP\fR stack on its way to the peer. The connection +object for the \fBSIP\fR message is passed as \fIobj\fR. The caller also +provides the dialog associated with the message, if one exists. The value of +flags is the result of ORing the following, as required: +.sp +.ne 2 +.mk +.na +\fBSIP_SEND_STATEFUL\fR +.ad +.RS 22n +.rt +Send the request or response statefully. This results in the stack creating and +maintaining a transaction for this request/response. If this flag is not set +transactions are not created for the request/response. +.RE + +.sp +.ne 2 +.mk +.na +\fBSIP_DIALOG_ON_FORK\fR +.ad +.RS 22n +.rt +When this flag is set, the stack may create multiple dialogs for a dialog +completing response. This may result due to forking of the dialog creating +request. If this flag is not set, the first response to a dialog creating +request creates a dialog, but subsequent ones do not. It is only meaningful if +the stack is configured to maintain dialogs. +.RE + +.SH RETURN VALUES +.sp +.LP +The \fBsip_sendmsg()\fR function returns \fB0\fR on success and the appropriate +error on failure. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +The \fBsip_sendmsg()\fR function can return one of the following errors on +failure: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +If a message is being statefully sent and the \fIbranchid\fR in the \fBVIA\fR +header does not conform to RFC 3261 or when accessing \fBCSEQ\fR header while +creating a transaction. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOENT\fR\fR +.ad +.RS 10n +.rt +If a message is being statefully sent, error getting the \fBCSEQ\fR header +while creating a transaction. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBEPROTO\fR\fR +.ad +.RS 10n +.rt +If a message is being statefully sent, error getting the \fBCSEQ\fR value while +creating a transaction. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBENOMEM\fR\fR +.ad +.RS 10n +.rt +If the message is being statefully sent, error allocating memory for creating +or adding a transaction or during transaction related processing. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) diff --git a/usr/src/man/man3sip/sip_stack_init.3sip b/usr/src/man/man3sip/sip_stack_init.3sip new file mode 100644 index 0000000000..c1b8cd0bd9 --- /dev/null +++ b/usr/src/man/man3sip/sip_stack_init.3sip @@ -0,0 +1,504 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sip_stack_init 3SIP "23 Jan 2007" "SunOS 5.11" "Session Initiation Protocol Library Functions" +.SH NAME +sip_stack_init \- initializes SIP stack +.SH SYNOPSIS +.LP +.nf +\fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... -lsip [ \fIlibrary\fR ... ] +#include <sip.h> + +\fBint\fR \fIsip_stack_init\fR(\fBsip_stack_init_t *\fR \fIstack_val\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsip_stack_init()\fR function is used to initialize the \fBSIP\fR stack. +The stack can be initialized by a process only once. Any shared library that is +linked with a main program or another library that has already initialized the +stack will encounter a failure when trying to initialize the stack. +.sp +.LP +The initialization structure is given by: +.sp +.in +2 +.nf +typedef struct sip_stack_init_s { + int sip_version; + uint32_t sip_stack_flags; + sip_io_pointers_t *sip_io_pointers; + sip_ulp_pointers_t *sip_ulp_pointers; + sip_header_function_t *sip_function_table; +}; +.fi +.in -2 + +.sp +.ne 2 +.mk +.na +\fBsip_version\fR +.ad +.RS 19n +.rt +This must be set to \fBSIP_STACK_VERSION\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_stack_flags\fR +.ad +.RS 19n +.rt +If the application wants the \fBSIP\fR stack to maintain dialogs, this flag +must be set to \fBSIP_STACK_DIALOGS\fR. Otherwise, it must be set to \fB0\fR. +If \fBSIP_STACK_DIALOGS\fR is not set, the stack does not deal with dialogs at +all. +.RE + +.SS "Upper Layer Registrations" +.sp +.LP +These include callbacks that are invoked to deliver incoming messages or error +notification. +.sp +.LP +The callback functions should not create a thread and invoke a function that +could recursively invoke the callback. For example, the callback function for a +transition state change notification should not create a thread to send a +\fBSIP\fR message that results in a change in the state of the transaction, +which would again invoke the callback function. +.sp +.LP +The registration structure is supplied by: +.sp +.in +2 +.nf +typedef struct sip_ulp_pointers_s { + void (*sip_ulp_recv)(const sip_conn_object_t, + sip_msg_t, const sip_dialog_t); + uint_t (*sip_ulp_timeout)(void *, + void (*func)(void *), + struct timeval *); + boolean_t (*sip_ulp_untimeout)(uint_t); + int (*sip_ulp_trans_error) + (sip_transaction_t, int, void *); + void (*sip_ulp_dlg_del)(sip_dialog_t, + sip_msg_t, void *); + void (*sip_ulp_trans_state_cb) + (sip_transaction_t, sip_msg_t, + int, int); + void (*sip_ulp_dlg_state_cb)(sip_dialog_t, + sip_msg_t, int, int); +}sip_io_pointers_t; +.fi +.in -2 + +.sp +.ne 2 +.mk +.na +\fBsip_ulp_recv\fR +.ad +.RS 26n +.rt +This is a mandatory routine that the application registers for the stack to +deliver an inbound \fBSIP\fR message. The \fBSIP\fR stack invokes the function +with the connection object on which the message arrived, the \fBSIP\fR message, +and any associated dialog. +.sp +The \fBSIP\fR message is freed once the function returns. If the application +wishes to use the message beyond that, it has to hold a reference on the +message using \fBsip_hold_msg()\fR. Similarly, if the application wishes to +cache the dialog, it must hold a reference on the dialog using +\fBsip_hold_msg()\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_ulp_timeout\fR +.ad +.br +.na +\fBsip_ulp_untimeout\fR +.ad +.RS 26n +.rt +An application can register these two routines to implement its own routines +for the stack timers. Typically, an application should allow the stack to use +its own built-in timer routines. The built-in timer routines are used only by +the stack and are not available to applications. If the application registers +one routine, it must also register the other. +.sp +These functions must be registered for single-threaded application. Otherwise, +the timer thread provided by the stack could result in invoking a registered +callback function. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_ulp_trans_error\fR +.ad +.RS 26n +.rt +The application can register this routine to be notified of a transaction +error. An error can occur when the transaction layer tries to send a message +using a cached connection object which results in a failure. If this routine is +not registered the transaction is terminated on such a failure. The final +argument is for future use. It is always set to \fBNULL\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_ulp_dlg_del\fR +.ad +.RS 26n +.rt +An application can register this routine to be notified when a dialog is +deleted. The dialog to be deleted is passed along with the \fBSIP\fR message +which caused the dialog to be deleted. The final argument is for future use. It +is always set to \fBNULL\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_ulp_trans_state_cb\fR +.ad +.br +.na +\fBsip_ulp_dlg_state_cb\fR +.ad +.RS 26n +.rt +If these callback routines are registered, the stack invokes +\fBsip_ulp_trans_state_cb\fR when a transaction changes states and +\fBsip_ulp_dlg_state_cb\fR when a dialog changes states. +.RE + +.SS "Connection Manager Interface" +.sp +.LP +The connection manager interfaces must be registered by the application to +provide I/O related functionality to the stack. These interfaces act on a +connection object that is defined by the application. The application registers +the interfaces for the stack to work with the connection object. The connection +object is application defined, but the stack requires that the first member of +the connection object is a void *, used by the stack to store connection object +specific information which is private to the stack. +.sp +.LP +The connection manager structure is supplied by: +.sp +.in +2 +.nf +typedef struct sip_io_pointers_s { + int (*sip_conn_send)(const sip_conn_object_t, char *, int); + void (*sip_hold_conn_object)(sip_conn_object_t); + void (*sip_rel_conn_object)(sip_conn_object_t); + boolean_t (*sip_conn_is_stream)(sip_conn_object_t); + boolean_t (*sip_conn_is_reliable)(sip_conn_object_t); + int (*sip_conn_remote_address)(sip_conn_object_t, struct sockaddr *, + socklen_t *); + int (*sip_conn_local_address)(sip_conn_object_t, struct sockaddr *, + socklen_t *); + int (*sip_conn_transport)(sip_conn_object_t); + int (*sip_conn_timer1)(sip_conn_object_t); + int (*sip_conn_timer2)(sip_conn_object_t); + int (*sip_conn_timer4)(sip_conn_object_t); + int (*sip_conn_timerd)(sip_conn_object_t); +}sip_io_pointers_t; +.fi +.in -2 + +.sp +.ne 2 +.mk +.na +\fBsip_conn_send\fR +.ad +.RS 27n +.rt +This function is invoked by the stack after processing an outbound \fBSIP\fR +message. This function is responsible for sending the \fBSIP\fR message to the +peer. A return of \fB0\fR indicates success. The \fBSIP\fR message is passed to +the function as a string, along with the length information and the associated +connection object. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_hold_conn_object\fR +.ad +.br +.na +\fBsip_rel_conn_object\fR +.ad +.RS 27n +.rt +The application provides a mechanism for the stack to indicate that a +connection object is in use by the stack and must not be freed. The stack uses +\fBsip_hold_conn_object\fR to indicate that the connection object is in use and +\fBsip_rel_conn_object\fR to indicate that it has been released. The connection +object is passed as the argument to these functions. The stack expects that the +application will not free the connection object if it is in use by the stack. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_conn_is_stream\fR +.ad +.RS 27n +.rt +The stack uses this to determine whether the connection object, passed as the +argument, is byte-stream oriented. Byte-stream protocols include \fBTCP\fR +while message-based protocols include \fBSCTP\fR and \fBUDP\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_conn_is_reliable\fR +.ad +.RS 27n +.rt +The stack uses this to determine whether the connection object, passed as the +argument, is reliable. Reliable protocols include \fBTCP\fR and \fBSCTP\fR. +Unreliable protocols include \fBUDP\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_conn_local_address\fR +.ad +.br +.na +\fBsip_conn_remote_address\fR +.ad +.RS 27n +.rt +These two interfaces are used by the stack to obtain endpoint information for a +connection object. The \fBsip_conn_local_address\fR provides the local +address/port information. The \fBsip_conn_remote_address\fR provides the +address/port information of the peer. The caller allocates the buffer and +passes its associated length along with it. On return, the length is updated to +reflect the actual length. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_conn_transport\fR +.ad +.RS 27n +.rt +The stack uses this to determine the transport used by the connection object, +passed as the argument. The transport could be \fBTCP\fR, \fBUDP\fR, +\fBSCTP\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fBsip_conn_timer1\fR +.ad +.br +.na +\fBsip_conn_timer2\fR +.ad +.br +.na +\fBsip_conn_timer4\fR +.ad +.br +.na +\fBsip_conn_timerd\fR +.ad +.RS 27n +.rt +These four interfaces may be registered by an application to provide connection +object specific timer information. If these are not registered the stack uses +default values. +.sp +The interfaces provide the timer values for \fBTimer 1\fR (\fBRTT\fR estimate - +default \fB500\fR \fBmsec\fR), \fBTimer 2\fR (maximum retransmit interval for +non-\fBINVITE\fR request and \fBINVITE\fR response - default \fB4\fR +\fBsecs\fR), \fBTimer 4\fR (maximum duration a message will remain in the +network - default \fB5\fR \fBsecs\fR) and \fBTimer D\fR (wait time for response +retransmit interval - default \fB32\fR \fBsecs\fR). +.RE + +.SS "Custom \fBSIP\fR headers" +.sp +.LP +In addition to the \fBSIP\fR headers supported by the stack, an application can +optionally provide a table of custom headers and associated parsing functions. +The table is an array with an entry for each header. If the table includes +headers supported by the stack, parsing functions or other application-specific +table entries take precedence over \fBlibsip\fR supported headers. The header +table structure is supplied by: +.sp +.in +2 +.nf +typedef struct header_function_table { + char *header_name; + char *header_short_name; + int (*header_parse_func) + (struct sip_header *, + struct sip_parsed_header **); + boolean_t (*header_check_compliance) + (struct sip_parsed_header *); + boolean_t (*header_is_equal) + (struct sip_parsed_header *, + struct sip_parsed_header *); + void (*header_free) + (struct sip_parsed_header *); +} +.fi +.in -2 + +.sp +.ne 2 +.mk +.na +\fBheader_name\fR +.ad +.RS 27n +.rt +The full name of the header. The application must ensure that he name does not +conflict with existing headers. If it does, the one registered by the +application takes precedence. +.RE + +.sp +.ne 2 +.mk +.na +\fBheader_short_name\fR +.ad +.RS 27n +.rt +Compact name, if any, for the header. +.RE + +.sp +.ne 2 +.mk +.na +\fBheader_parse_func\fR +.ad +.RS 27n +.rt +The parsing function for the header. The parser will set the second argument to +the resulting parsed structure. A return value of \fB0\fR indicates success. +.RE + +.sp +.ne 2 +.mk +.na +\fBheader_free\fR +.ad +.RS 27n +.rt +The function that frees the parsed header +.RE + +.sp +.ne 2 +.mk +.na +\fBheader_check_compliance\fR +.ad +.RS 27n +.rt +An application can optionally provide this function that will check if the +header is compliant or not. The compliance for a custom header will be defined +by the application. +.RE + +.sp +.ne 2 +.mk +.na +\fBheader_is_equal\fR +.ad +.RS 27n +.rt +An application can optionally provide this function to determine whether two +input headers are equivalent. The equivalence criteria is defined by the +application. +.RE + +.SH RETURN VALUES +.sp +.LP +On success \fBsip_stack_init()\fR returns \fB0\fR. Otherwise, the function +returns the error value. +.sp +.LP +The value of \fBerrno\fR is not changed by these calls in the event of an +error. +.SH ERRORS +.sp +.LP +On failure, the \fBsip_stack_init()\fR function returns the following error +value: +.sp +.ne 2 +.mk +.na +\fB\fBEINVAL\fR\fR +.ad +.RS 10n +.rt +If the stack version is incorrect, or if any of the mandatory functions is +missing. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityCommitted +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlibsip\fR(3LIB) |